You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

9850 lines
362 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/v1"
  8. // ...
  9. // appengineService, err := appengine.New(oauthHttpClient)
  10. package appengine // import "google.golang.org/api/appengine/v1"
  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:v1"
  41. const apiName = "appengine"
  42. const apiVersion = "v1"
  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. // DiskUtilization: Target scaling by disk usage.
  458. DiskUtilization *DiskUtilization `json:"diskUtilization,omitempty"`
  459. // MaxConcurrentRequests: Number of concurrent requests an automatic
  460. // scaling instance can accept before the scheduler spawns a new
  461. // instance.Defaults to a runtime-specific value.
  462. MaxConcurrentRequests int64 `json:"maxConcurrentRequests,omitempty"`
  463. // MaxIdleInstances: Maximum number of idle instances that should be
  464. // maintained for this version.
  465. MaxIdleInstances int64 `json:"maxIdleInstances,omitempty"`
  466. // MaxPendingLatency: Maximum amount of time that a request should wait
  467. // in the pending queue before starting a new instance to handle it.
  468. MaxPendingLatency string `json:"maxPendingLatency,omitempty"`
  469. // MaxTotalInstances: Maximum number of instances that should be started
  470. // to handle requests for this version.
  471. MaxTotalInstances int64 `json:"maxTotalInstances,omitempty"`
  472. // MinIdleInstances: Minimum number of idle instances that should be
  473. // maintained for this version. Only applicable for the default version
  474. // of a service.
  475. MinIdleInstances int64 `json:"minIdleInstances,omitempty"`
  476. // MinPendingLatency: Minimum amount of time a request should wait in
  477. // the pending queue before starting a new instance to handle it.
  478. MinPendingLatency string `json:"minPendingLatency,omitempty"`
  479. // MinTotalInstances: Minimum number of running instances that should be
  480. // maintained for this version.
  481. MinTotalInstances int64 `json:"minTotalInstances,omitempty"`
  482. // NetworkUtilization: Target scaling by network usage.
  483. NetworkUtilization *NetworkUtilization `json:"networkUtilization,omitempty"`
  484. // RequestUtilization: Target scaling by request utilization.
  485. RequestUtilization *RequestUtilization `json:"requestUtilization,omitempty"`
  486. // StandardSchedulerSettings: Scheduler settings for standard
  487. // environment.
  488. StandardSchedulerSettings *StandardSchedulerSettings `json:"standardSchedulerSettings,omitempty"`
  489. // ForceSendFields is a list of field names (e.g. "CoolDownPeriod") to
  490. // unconditionally include in API requests. By default, fields with
  491. // empty values are omitted from API requests. However, any non-pointer,
  492. // non-interface field appearing in ForceSendFields will be sent to the
  493. // server regardless of whether the field is empty or not. This may be
  494. // used to include empty fields in Patch requests.
  495. ForceSendFields []string `json:"-"`
  496. // NullFields is a list of field names (e.g. "CoolDownPeriod") to
  497. // include in API requests with the JSON null value. By default, fields
  498. // with empty values are omitted from API requests. However, any field
  499. // with an empty value appearing in NullFields will be sent to the
  500. // server as null. It is an error if a field in this list has a
  501. // non-empty value. This may be used to include null fields in Patch
  502. // requests.
  503. NullFields []string `json:"-"`
  504. }
  505. func (s *AutomaticScaling) MarshalJSON() ([]byte, error) {
  506. type NoMethod AutomaticScaling
  507. raw := NoMethod(*s)
  508. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  509. }
  510. // BasicScaling: A service with basic scaling will create an instance
  511. // when the application receives a request. The instance will be turned
  512. // down when the app becomes idle. Basic scaling is ideal for work that
  513. // is intermittent or driven by user activity.
  514. type BasicScaling struct {
  515. // IdleTimeout: Duration of time after the last request that an instance
  516. // must wait before the instance is shut down.
  517. IdleTimeout string `json:"idleTimeout,omitempty"`
  518. // MaxInstances: Maximum number of instances to create for this version.
  519. MaxInstances int64 `json:"maxInstances,omitempty"`
  520. // ForceSendFields is a list of field names (e.g. "IdleTimeout") to
  521. // unconditionally include in API requests. By default, fields with
  522. // empty values are omitted from API requests. However, any non-pointer,
  523. // non-interface field appearing in ForceSendFields will be sent to the
  524. // server regardless of whether the field is empty or not. This may be
  525. // used to include empty fields in Patch requests.
  526. ForceSendFields []string `json:"-"`
  527. // NullFields is a list of field names (e.g. "IdleTimeout") to include
  528. // in API requests with the JSON null value. By default, fields with
  529. // empty values are omitted from API requests. However, any field with
  530. // an empty value appearing in NullFields will be sent to the server as
  531. // null. It is an error if a field in this list has a non-empty value.
  532. // This may be used to include null fields in Patch requests.
  533. NullFields []string `json:"-"`
  534. }
  535. func (s *BasicScaling) MarshalJSON() ([]byte, error) {
  536. type NoMethod BasicScaling
  537. raw := NoMethod(*s)
  538. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  539. }
  540. // BatchUpdateIngressRulesRequest: Request message for
  541. // Firewall.BatchUpdateIngressRules.
  542. type BatchUpdateIngressRulesRequest struct {
  543. // IngressRules: A list of FirewallRules to replace the existing set.
  544. IngressRules []*FirewallRule `json:"ingressRules,omitempty"`
  545. // ForceSendFields is a list of field names (e.g. "IngressRules") to
  546. // unconditionally include in API requests. By default, fields with
  547. // empty values are omitted from API requests. However, any non-pointer,
  548. // non-interface field appearing in ForceSendFields will be sent to the
  549. // server regardless of whether the field is empty or not. This may be
  550. // used to include empty fields in Patch requests.
  551. ForceSendFields []string `json:"-"`
  552. // NullFields is a list of field names (e.g. "IngressRules") to include
  553. // in API requests with the JSON null value. By default, fields with
  554. // empty values are omitted from API requests. However, any field with
  555. // an empty value appearing in NullFields will be sent to the server as
  556. // null. It is an error if a field in this list has a non-empty value.
  557. // This may be used to include null fields in Patch requests.
  558. NullFields []string `json:"-"`
  559. }
  560. func (s *BatchUpdateIngressRulesRequest) MarshalJSON() ([]byte, error) {
  561. type NoMethod BatchUpdateIngressRulesRequest
  562. raw := NoMethod(*s)
  563. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  564. }
  565. // BatchUpdateIngressRulesResponse: Response message for
  566. // Firewall.UpdateAllIngressRules.
  567. type BatchUpdateIngressRulesResponse struct {
  568. // IngressRules: The full list of ingress FirewallRules for this
  569. // application.
  570. IngressRules []*FirewallRule `json:"ingressRules,omitempty"`
  571. // ServerResponse contains the HTTP response code and headers from the
  572. // server.
  573. googleapi.ServerResponse `json:"-"`
  574. // ForceSendFields is a list of field names (e.g. "IngressRules") to
  575. // unconditionally include in API requests. By default, fields with
  576. // empty values are omitted from API requests. However, any non-pointer,
  577. // non-interface field appearing in ForceSendFields will be sent to the
  578. // server regardless of whether the field is empty or not. This may be
  579. // used to include empty fields in Patch requests.
  580. ForceSendFields []string `json:"-"`
  581. // NullFields is a list of field names (e.g. "IngressRules") to include
  582. // in API requests with the JSON null value. By default, fields with
  583. // empty values are omitted from API requests. However, any field with
  584. // an empty value appearing in NullFields will be sent to the server as
  585. // null. It is an error if a field in this list has a non-empty value.
  586. // This may be used to include null fields in Patch requests.
  587. NullFields []string `json:"-"`
  588. }
  589. func (s *BatchUpdateIngressRulesResponse) MarshalJSON() ([]byte, error) {
  590. type NoMethod BatchUpdateIngressRulesResponse
  591. raw := NoMethod(*s)
  592. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  593. }
  594. // CertificateRawData: An SSL certificate obtained from a certificate
  595. // authority.
  596. type CertificateRawData struct {
  597. // PrivateKey: Unencrypted PEM encoded RSA private key. This field is
  598. // set once on certificate creation and then encrypted. The key size
  599. // must be 2048 bits or fewer. Must include the header and footer.
  600. // Example: <pre> -----BEGIN RSA PRIVATE KEY-----
  601. // <unencrypted_key_value> -----END RSA PRIVATE KEY----- </pre>
  602. // @InputOnly
  603. PrivateKey string `json:"privateKey,omitempty"`
  604. // PublicCertificate: PEM encoded x.509 public key certificate. This
  605. // field is set once on certificate creation. Must include the header
  606. // and footer. Example: <pre> -----BEGIN CERTIFICATE-----
  607. // <certificate_value> -----END CERTIFICATE----- </pre>
  608. PublicCertificate string `json:"publicCertificate,omitempty"`
  609. // ForceSendFields is a list of field names (e.g. "PrivateKey") to
  610. // unconditionally include in API requests. By default, fields with
  611. // empty values are omitted from API requests. However, any non-pointer,
  612. // non-interface field appearing in ForceSendFields will be sent to the
  613. // server regardless of whether the field is empty or not. This may be
  614. // used to include empty fields in Patch requests.
  615. ForceSendFields []string `json:"-"`
  616. // NullFields is a list of field names (e.g. "PrivateKey") to include in
  617. // API requests with the JSON null value. By default, fields with empty
  618. // values are omitted from API requests. However, any field with an
  619. // empty value appearing in NullFields will be sent to the server as
  620. // null. It is an error if a field in this list has a non-empty value.
  621. // This may be used to include null fields in Patch requests.
  622. NullFields []string `json:"-"`
  623. }
  624. func (s *CertificateRawData) MarshalJSON() ([]byte, error) {
  625. type NoMethod CertificateRawData
  626. raw := NoMethod(*s)
  627. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  628. }
  629. // CloudBuildOptions: Options for the build operations performed as a
  630. // part of the version deployment. Only applicable for App Engine
  631. // flexible environment when creating a version using source code
  632. // directly.
  633. type CloudBuildOptions struct {
  634. // AppYamlPath: Path to the yaml file used in deployment, used to
  635. // determine runtime configuration details.Required for flexible
  636. // environment builds.See
  637. // https://cloud.google.com/appengine/docs/standard/python/config/appref
  638. // for more details.
  639. AppYamlPath string `json:"appYamlPath,omitempty"`
  640. // CloudBuildTimeout: The Cloud Build timeout used as part of any
  641. // dependent builds performed by version creation. Defaults to 10
  642. // minutes.
  643. CloudBuildTimeout string `json:"cloudBuildTimeout,omitempty"`
  644. // ForceSendFields is a list of field names (e.g. "AppYamlPath") to
  645. // unconditionally include in API requests. By default, fields with
  646. // empty values are omitted from API requests. However, any non-pointer,
  647. // non-interface field appearing in ForceSendFields will be sent to the
  648. // server regardless of whether the field is empty or not. This may be
  649. // used to include empty fields in Patch requests.
  650. ForceSendFields []string `json:"-"`
  651. // NullFields is a list of field names (e.g. "AppYamlPath") to include
  652. // in API requests with the JSON null value. By default, fields with
  653. // empty values are omitted from API requests. However, any field with
  654. // an empty value appearing in NullFields will be sent to the server as
  655. // null. It is an error if a field in this list has a non-empty value.
  656. // This may be used to include null fields in Patch requests.
  657. NullFields []string `json:"-"`
  658. }
  659. func (s *CloudBuildOptions) MarshalJSON() ([]byte, error) {
  660. type NoMethod CloudBuildOptions
  661. raw := NoMethod(*s)
  662. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  663. }
  664. // ContainerInfo: Docker image that is used to create a container and
  665. // start a VM instance for the version that you deploy. Only applicable
  666. // for instances running in the App Engine flexible environment.
  667. type ContainerInfo struct {
  668. // Image: URI to the hosted container image in Google Container
  669. // Registry. The URI must be fully qualified and include a tag or
  670. // digest. Examples: "gcr.io/my-project/image:tag" or
  671. // "gcr.io/my-project/image@digest"
  672. Image string `json:"image,omitempty"`
  673. // ForceSendFields is a list of field names (e.g. "Image") to
  674. // unconditionally include in API requests. By default, fields with
  675. // empty values are omitted from API requests. However, any non-pointer,
  676. // non-interface field appearing in ForceSendFields will be sent to the
  677. // server regardless of whether the field is empty or not. This may be
  678. // used to include empty fields in Patch requests.
  679. ForceSendFields []string `json:"-"`
  680. // NullFields is a list of field names (e.g. "Image") to include in API
  681. // requests with the JSON null value. By default, fields with empty
  682. // values are omitted from API requests. However, any field with an
  683. // empty value appearing in NullFields will be sent to the server as
  684. // null. It is an error if a field in this list has a non-empty value.
  685. // This may be used to include null fields in Patch requests.
  686. NullFields []string `json:"-"`
  687. }
  688. func (s *ContainerInfo) MarshalJSON() ([]byte, error) {
  689. type NoMethod ContainerInfo
  690. raw := NoMethod(*s)
  691. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  692. }
  693. // CpuUtilization: Target scaling by CPU usage.
  694. type CpuUtilization struct {
  695. // AggregationWindowLength: Period of time over which CPU utilization is
  696. // calculated.
  697. AggregationWindowLength string `json:"aggregationWindowLength,omitempty"`
  698. // TargetUtilization: Target CPU utilization ratio to maintain when
  699. // scaling. Must be between 0 and 1.
  700. TargetUtilization float64 `json:"targetUtilization,omitempty"`
  701. // ForceSendFields is a list of field names (e.g.
  702. // "AggregationWindowLength") to unconditionally include in API
  703. // requests. By default, fields with empty values are omitted from API
  704. // requests. However, any non-pointer, non-interface field appearing in
  705. // ForceSendFields will be sent to the server regardless of whether the
  706. // field is empty or not. This may be used to include empty fields in
  707. // Patch requests.
  708. ForceSendFields []string `json:"-"`
  709. // NullFields is a list of field names (e.g. "AggregationWindowLength")
  710. // to include in API requests with the JSON null value. By default,
  711. // fields with empty values are omitted from API requests. However, any
  712. // field with an empty value appearing in NullFields will be sent to the
  713. // server as null. It is an error if a field in this list has a
  714. // non-empty value. This may be used to include null fields in Patch
  715. // requests.
  716. NullFields []string `json:"-"`
  717. }
  718. func (s *CpuUtilization) MarshalJSON() ([]byte, error) {
  719. type NoMethod CpuUtilization
  720. raw := NoMethod(*s)
  721. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  722. }
  723. func (s *CpuUtilization) UnmarshalJSON(data []byte) error {
  724. type NoMethod CpuUtilization
  725. var s1 struct {
  726. TargetUtilization gensupport.JSONFloat64 `json:"targetUtilization"`
  727. *NoMethod
  728. }
  729. s1.NoMethod = (*NoMethod)(s)
  730. if err := json.Unmarshal(data, &s1); err != nil {
  731. return err
  732. }
  733. s.TargetUtilization = float64(s1.TargetUtilization)
  734. return nil
  735. }
  736. // CreateVersionMetadataV1: Metadata for the given
  737. // google.longrunning.Operation during a
  738. // google.appengine.v1.CreateVersionRequest.
  739. type CreateVersionMetadataV1 struct {
  740. // CloudBuildId: The Cloud Build ID if one was created as part of the
  741. // version create. @OutputOnly
  742. CloudBuildId string `json:"cloudBuildId,omitempty"`
  743. // ForceSendFields is a list of field names (e.g. "CloudBuildId") to
  744. // unconditionally include in API requests. By default, fields with
  745. // empty values are omitted from API requests. However, any non-pointer,
  746. // non-interface field appearing in ForceSendFields will be sent to the
  747. // server regardless of whether the field is empty or not. This may be
  748. // used to include empty fields in Patch requests.
  749. ForceSendFields []string `json:"-"`
  750. // NullFields is a list of field names (e.g. "CloudBuildId") to include
  751. // in API requests with the JSON null value. By default, fields with
  752. // empty values are omitted from API requests. However, any field with
  753. // an empty value appearing in NullFields will be sent to the server as
  754. // null. It is an error if a field in this list has a non-empty value.
  755. // This may be used to include null fields in Patch requests.
  756. NullFields []string `json:"-"`
  757. }
  758. func (s *CreateVersionMetadataV1) MarshalJSON() ([]byte, error) {
  759. type NoMethod CreateVersionMetadataV1
  760. raw := NoMethod(*s)
  761. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  762. }
  763. // CreateVersionMetadataV1Alpha: Metadata for the given
  764. // google.longrunning.Operation during a
  765. // google.appengine.v1alpha.CreateVersionRequest.
  766. type CreateVersionMetadataV1Alpha 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 *CreateVersionMetadataV1Alpha) MarshalJSON() ([]byte, error) {
  786. type NoMethod CreateVersionMetadataV1Alpha
  787. raw := NoMethod(*s)
  788. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  789. }
  790. // CreateVersionMetadataV1Beta: Metadata for the given
  791. // google.longrunning.Operation during a
  792. // google.appengine.v1beta.CreateVersionRequest.
  793. type CreateVersionMetadataV1Beta 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 *CreateVersionMetadataV1Beta) MarshalJSON() ([]byte, error) {
  813. type NoMethod CreateVersionMetadataV1Beta
  814. raw := NoMethod(*s)
  815. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  816. }
  817. // DebugInstanceRequest: Request message for Instances.DebugInstance.
  818. type DebugInstanceRequest struct {
  819. // SshKey: Public SSH key to add to the instance.
  820. // Examples:
  821. // [USERNAME]:ssh-rsa [KEY_VALUE] [USERNAME]
  822. // [USERNAME]:ssh-rsa [KEY_VALUE] google-ssh
  823. // {"userName":"[USERNAME]","expireOn":"[EXPIRE_TIME]"}For more
  824. // information, see Adding and Removing SSH Keys
  825. // (https://cloud.google.com/compute/docs/instances/adding-removing-ssh-k
  826. // eys).
  827. SshKey string `json:"sshKey,omitempty"`
  828. // ForceSendFields is a list of field names (e.g. "SshKey") to
  829. // unconditionally include in API requests. By default, fields with
  830. // empty values are omitted from API requests. However, any non-pointer,
  831. // non-interface field appearing in ForceSendFields will be sent to the
  832. // server regardless of whether the field is empty or not. This may be
  833. // used to include empty fields in Patch requests.
  834. ForceSendFields []string `json:"-"`
  835. // NullFields is a list of field names (e.g. "SshKey") to include in API
  836. // requests with the JSON null value. By default, fields with empty
  837. // values are omitted from API requests. However, any field with an
  838. // empty value appearing in NullFields will be sent to the server as
  839. // null. It is an error if a field in this list has a non-empty value.
  840. // This may be used to include null fields in Patch requests.
  841. NullFields []string `json:"-"`
  842. }
  843. func (s *DebugInstanceRequest) MarshalJSON() ([]byte, error) {
  844. type NoMethod DebugInstanceRequest
  845. raw := NoMethod(*s)
  846. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  847. }
  848. // Deployment: Code and application artifacts used to deploy a version
  849. // to App Engine.
  850. type Deployment struct {
  851. // CloudBuildOptions: Options for any Google Cloud Container Builder
  852. // builds created as a part of this deployment.Note that this is
  853. // orthogonal to the build parameter, where the deployment depends on an
  854. // already existing cloud build. These options will only be used if a
  855. // new build is created, such as when deploying to the App Engine
  856. // flexible environment using files or zip.
  857. CloudBuildOptions *CloudBuildOptions `json:"cloudBuildOptions,omitempty"`
  858. // Container: The Docker image for the container that runs the version.
  859. // Only applicable for instances running in the App Engine flexible
  860. // environment.
  861. Container *ContainerInfo `json:"container,omitempty"`
  862. // Files: Manifest of the files stored in Google Cloud Storage that are
  863. // included as part of this version. All files must be readable using
  864. // the credentials supplied with this call.
  865. Files map[string]FileInfo `json:"files,omitempty"`
  866. // Zip: The zip file for this deployment, if this is a zip deployment.
  867. Zip *ZipInfo `json:"zip,omitempty"`
  868. // ForceSendFields is a list of field names (e.g. "CloudBuildOptions")
  869. // to unconditionally include in API requests. By default, fields with
  870. // empty values are omitted from API requests. However, any non-pointer,
  871. // non-interface field appearing in ForceSendFields will be sent to the
  872. // server regardless of whether the field is empty or not. This may be
  873. // used to include empty fields in Patch requests.
  874. ForceSendFields []string `json:"-"`
  875. // NullFields is a list of field names (e.g. "CloudBuildOptions") to
  876. // include in API requests with the JSON null value. By default, fields
  877. // with empty values are omitted from API requests. However, any field
  878. // with an empty value appearing in NullFields will be sent to the
  879. // server as null. It is an error if a field in this list has a
  880. // non-empty value. This may be used to include null fields in Patch
  881. // requests.
  882. NullFields []string `json:"-"`
  883. }
  884. func (s *Deployment) MarshalJSON() ([]byte, error) {
  885. type NoMethod Deployment
  886. raw := NoMethod(*s)
  887. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  888. }
  889. // DiskUtilization: Target scaling by disk usage. Only applicable in the
  890. // App Engine flexible environment.
  891. type DiskUtilization struct {
  892. // TargetReadBytesPerSecond: Target bytes read per second.
  893. TargetReadBytesPerSecond int64 `json:"targetReadBytesPerSecond,omitempty"`
  894. // TargetReadOpsPerSecond: Target ops read per seconds.
  895. TargetReadOpsPerSecond int64 `json:"targetReadOpsPerSecond,omitempty"`
  896. // TargetWriteBytesPerSecond: Target bytes written per second.
  897. TargetWriteBytesPerSecond int64 `json:"targetWriteBytesPerSecond,omitempty"`
  898. // TargetWriteOpsPerSecond: Target ops written per second.
  899. TargetWriteOpsPerSecond int64 `json:"targetWriteOpsPerSecond,omitempty"`
  900. // ForceSendFields is a list of field names (e.g.
  901. // "TargetReadBytesPerSecond") to unconditionally include in API
  902. // requests. By default, fields with empty values are omitted from API
  903. // requests. However, any non-pointer, non-interface field appearing in
  904. // ForceSendFields will be sent to the server regardless of whether the
  905. // field is empty or not. This may be used to include empty fields in
  906. // Patch requests.
  907. ForceSendFields []string `json:"-"`
  908. // NullFields is a list of field names (e.g. "TargetReadBytesPerSecond")
  909. // to include in API requests with the JSON null value. By default,
  910. // fields with empty values are omitted from API requests. However, any
  911. // field with an empty value appearing in NullFields will be sent to the
  912. // server as null. It is an error if a field in this list has a
  913. // non-empty value. This may be used to include null fields in Patch
  914. // requests.
  915. NullFields []string `json:"-"`
  916. }
  917. func (s *DiskUtilization) MarshalJSON() ([]byte, error) {
  918. type NoMethod DiskUtilization
  919. raw := NoMethod(*s)
  920. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  921. }
  922. // DomainMapping: A domain serving an App Engine application.
  923. type DomainMapping struct {
  924. // Id: Relative name of the domain serving the application. Example:
  925. // example.com.
  926. Id string `json:"id,omitempty"`
  927. // Name: Full path to the DomainMapping resource in the API. Example:
  928. // apps/myapp/domainMapping/example.com.@OutputOnly
  929. Name string `json:"name,omitempty"`
  930. // ResourceRecords: The resource records required to configure this
  931. // domain mapping. These records must be added to the domain's DNS
  932. // configuration in order to serve the application via this domain
  933. // mapping.@OutputOnly
  934. ResourceRecords []*ResourceRecord `json:"resourceRecords,omitempty"`
  935. // SslSettings: SSL configuration for this domain. If unconfigured, this
  936. // domain will not serve with SSL.
  937. SslSettings *SslSettings `json:"sslSettings,omitempty"`
  938. // ServerResponse contains the HTTP response code and headers from the
  939. // server.
  940. googleapi.ServerResponse `json:"-"`
  941. // ForceSendFields is a list of field names (e.g. "Id") to
  942. // unconditionally include in API requests. By default, fields with
  943. // empty values are omitted from API requests. However, any non-pointer,
  944. // non-interface field appearing in ForceSendFields will be sent to the
  945. // server regardless of whether the field is empty or not. This may be
  946. // used to include empty fields in Patch requests.
  947. ForceSendFields []string `json:"-"`
  948. // NullFields is a list of field names (e.g. "Id") to include in API
  949. // requests with the JSON null value. By default, fields with empty
  950. // values are omitted from API requests. However, any field with an
  951. // empty value appearing in NullFields will be sent to the server as
  952. // null. It is an error if a field in this list has a non-empty value.
  953. // This may be used to include null fields in Patch requests.
  954. NullFields []string `json:"-"`
  955. }
  956. func (s *DomainMapping) MarshalJSON() ([]byte, error) {
  957. type NoMethod DomainMapping
  958. raw := NoMethod(*s)
  959. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  960. }
  961. // Empty: A generic empty message that you can re-use to avoid defining
  962. // duplicated empty messages in your APIs. A typical example is to use
  963. // it as the request or the response type of an API method. For
  964. // instance:
  965. // service Foo {
  966. // rpc Bar(google.protobuf.Empty) returns
  967. // (google.protobuf.Empty);
  968. // }
  969. // The JSON representation for Empty is empty JSON object {}.
  970. type Empty struct {
  971. // ServerResponse contains the HTTP response code and headers from the
  972. // server.
  973. googleapi.ServerResponse `json:"-"`
  974. }
  975. // EndpointsApiService: Cloud Endpoints
  976. // (https://cloud.google.com/endpoints) configuration. The Endpoints API
  977. // Service provides tooling for serving Open API and gRPC endpoints via
  978. // an NGINX proxy. Only valid for App Engine Flexible environment
  979. // deployments.The fields here refer to the name and configuration ID of
  980. // a "service" resource in the Service Management API
  981. // (https://cloud.google.com/service-management/overview).
  982. type EndpointsApiService struct {
  983. // ConfigId: Endpoints service configuration ID as specified by the
  984. // Service Management API. For example "2016-09-19r1".By default, the
  985. // rollout strategy for Endpoints is RolloutStrategy.FIXED. This means
  986. // that Endpoints starts up with a particular configuration ID. When a
  987. // new configuration is rolled out, Endpoints must be given the new
  988. // configuration ID. The config_id field is used to give the
  989. // configuration ID and is required in this case.Endpoints also has a
  990. // rollout strategy called RolloutStrategy.MANAGED. When using this,
  991. // Endpoints fetches the latest configuration and does not need the
  992. // configuration ID. In this case, config_id must be omitted.
  993. ConfigId string `json:"configId,omitempty"`
  994. // Name: Endpoints service name which is the name of the "service"
  995. // resource in the Service Management API. For example
  996. // "myapi.endpoints.myproject.cloud.goog"
  997. Name string `json:"name,omitempty"`
  998. // ForceSendFields is a list of field names (e.g. "ConfigId") to
  999. // unconditionally include in API requests. By default, fields with
  1000. // empty values are omitted from API requests. However, any non-pointer,
  1001. // non-interface field appearing in ForceSendFields will be sent to the
  1002. // server regardless of whether the field is empty or not. This may be
  1003. // used to include empty fields in Patch requests.
  1004. ForceSendFields []string `json:"-"`
  1005. // NullFields is a list of field names (e.g. "ConfigId") to include in
  1006. // API requests with the JSON null value. By default, fields with empty
  1007. // values are omitted from API requests. However, any field with an
  1008. // empty value appearing in NullFields will be sent to the server as
  1009. // null. It is an error if a field in this list has a non-empty value.
  1010. // This may be used to include null fields in Patch requests.
  1011. NullFields []string `json:"-"`
  1012. }
  1013. func (s *EndpointsApiService) MarshalJSON() ([]byte, error) {
  1014. type NoMethod EndpointsApiService
  1015. raw := NoMethod(*s)
  1016. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1017. }
  1018. // ErrorHandler: Custom static error page to be served when an error
  1019. // occurs.
  1020. type ErrorHandler struct {
  1021. // ErrorCode: Error condition this handler applies to.
  1022. //
  1023. // Possible values:
  1024. // "ERROR_CODE_UNSPECIFIED" - Not specified. ERROR_CODE_DEFAULT is
  1025. // assumed.
  1026. // "ERROR_CODE_DEFAULT" - All other error types.
  1027. // "ERROR_CODE_OVER_QUOTA" - Application has exceeded a resource
  1028. // quota.
  1029. // "ERROR_CODE_DOS_API_DENIAL" - Client blocked by the application's
  1030. // Denial of Service protection configuration.
  1031. // "ERROR_CODE_TIMEOUT" - Deadline reached before the application
  1032. // responds.
  1033. ErrorCode string `json:"errorCode,omitempty"`
  1034. // MimeType: MIME type of file. Defaults to text/html.
  1035. MimeType string `json:"mimeType,omitempty"`
  1036. // StaticFile: Static file content to be served for this error.
  1037. StaticFile string `json:"staticFile,omitempty"`
  1038. // ForceSendFields is a list of field names (e.g. "ErrorCode") to
  1039. // unconditionally include in API requests. By default, fields with
  1040. // empty values are omitted from API requests. However, any non-pointer,
  1041. // non-interface field appearing in ForceSendFields will be sent to the
  1042. // server regardless of whether the field is empty or not. This may be
  1043. // used to include empty fields in Patch requests.
  1044. ForceSendFields []string `json:"-"`
  1045. // NullFields is a list of field names (e.g. "ErrorCode") to include in
  1046. // API requests with the JSON null value. By default, fields with empty
  1047. // values are omitted from API requests. However, any field with an
  1048. // empty value appearing in NullFields will be sent to the server as
  1049. // null. It is an error if a field in this list has a non-empty value.
  1050. // This may be used to include null fields in Patch requests.
  1051. NullFields []string `json:"-"`
  1052. }
  1053. func (s *ErrorHandler) MarshalJSON() ([]byte, error) {
  1054. type NoMethod ErrorHandler
  1055. raw := NoMethod(*s)
  1056. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1057. }
  1058. // FeatureSettings: The feature specific settings to be used in the
  1059. // application. These define behaviors that are user configurable.
  1060. type FeatureSettings struct {
  1061. // SplitHealthChecks: Boolean value indicating if split health checks
  1062. // should be used instead of the legacy health checks. At an app.yaml
  1063. // level, this means defaulting to 'readiness_check' and
  1064. // 'liveness_check' values instead of 'health_check' ones. Once the
  1065. // legacy 'health_check' behavior is deprecated, and this value is
  1066. // always true, this setting can be removed.
  1067. SplitHealthChecks bool `json:"splitHealthChecks,omitempty"`
  1068. // ForceSendFields is a list of field names (e.g. "SplitHealthChecks")
  1069. // to unconditionally include in API requests. By default, fields with
  1070. // empty values are omitted from API requests. However, any non-pointer,
  1071. // non-interface field appearing in ForceSendFields will be sent to the
  1072. // server regardless of whether the field is empty or not. This may be
  1073. // used to include empty fields in Patch requests.
  1074. ForceSendFields []string `json:"-"`
  1075. // NullFields is a list of field names (e.g. "SplitHealthChecks") to
  1076. // include in API requests with the JSON null value. By default, fields
  1077. // with empty values are omitted from API requests. However, any field
  1078. // with an empty value appearing in NullFields will be sent to the
  1079. // server as null. It is an error if a field in this list has a
  1080. // non-empty value. This may be used to include null fields in Patch
  1081. // requests.
  1082. NullFields []string `json:"-"`
  1083. }
  1084. func (s *FeatureSettings) MarshalJSON() ([]byte, error) {
  1085. type NoMethod FeatureSettings
  1086. raw := NoMethod(*s)
  1087. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1088. }
  1089. // FileInfo: Single source file that is part of the version to be
  1090. // deployed. Each source file that is deployed must be specified
  1091. // separately.
  1092. type FileInfo struct {
  1093. // MimeType: The MIME type of the file.Defaults to the value from Google
  1094. // Cloud Storage.
  1095. MimeType string `json:"mimeType,omitempty"`
  1096. // Sha1Sum: The SHA1 hash of the file, in hex.
  1097. Sha1Sum string `json:"sha1Sum,omitempty"`
  1098. // SourceUrl: URL source to use to fetch this file. Must be a URL to a
  1099. // resource in Google Cloud Storage in the form
  1100. // 'http(s)://storage.googleapis.com/<bucket>/<object>'.
  1101. SourceUrl string `json:"sourceUrl,omitempty"`
  1102. // ForceSendFields is a list of field names (e.g. "MimeType") to
  1103. // unconditionally include in API requests. By default, fields with
  1104. // empty values are omitted from API requests. However, any non-pointer,
  1105. // non-interface field appearing in ForceSendFields will be sent to the
  1106. // server regardless of whether the field is empty or not. This may be
  1107. // used to include empty fields in Patch requests.
  1108. ForceSendFields []string `json:"-"`
  1109. // NullFields is a list of field names (e.g. "MimeType") to include in
  1110. // API requests with the JSON null value. By default, fields with empty
  1111. // values are omitted from API requests. However, any field with an
  1112. // empty value appearing in NullFields will be sent to the server as
  1113. // null. It is an error if a field in this list has a non-empty value.
  1114. // This may be used to include null fields in Patch requests.
  1115. NullFields []string `json:"-"`
  1116. }
  1117. func (s *FileInfo) MarshalJSON() ([]byte, error) {
  1118. type NoMethod FileInfo
  1119. raw := NoMethod(*s)
  1120. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1121. }
  1122. // FirewallRule: A single firewall rule that is evaluated against
  1123. // incoming traffic and provides an action to take on matched requests.
  1124. type FirewallRule struct {
  1125. // Action: The action to take on matched requests.
  1126. //
  1127. // Possible values:
  1128. // "UNSPECIFIED_ACTION"
  1129. // "ALLOW" - Matching requests are allowed.
  1130. // "DENY" - Matching requests are denied.
  1131. Action string `json:"action,omitempty"`
  1132. // Description: An optional string description of this rule. This field
  1133. // has a maximum length of 100 characters.
  1134. Description string `json:"description,omitempty"`
  1135. // Priority: A positive integer between 1, Int32.MaxValue-1 that defines
  1136. // the order of rule evaluation. Rules with the lowest priority are
  1137. // evaluated first.A default rule at priority Int32.MaxValue matches all
  1138. // IPv4 and IPv6 traffic when no previous rule matches. Only the action
  1139. // of this rule can be modified by the user.
  1140. Priority int64 `json:"priority,omitempty"`
  1141. // SourceRange: IP address or range, defined using CIDR notation, of
  1142. // requests that this rule applies to. You can use the wildcard
  1143. // character "*" to match all IPs equivalent to "0/0" and "::/0"
  1144. // together. Examples: 192.168.1.1 or 192.168.0.0/16 or 2001:db8::/32
  1145. // or 2001:0db8:0000:0042:0000:8a2e:0370:7334.<p>Truncation will be
  1146. // silently performed on addresses which are not properly truncated. For
  1147. // example, 1.2.3.4/24 is accepted as the same address as 1.2.3.0/24.
  1148. // Similarly, for IPv6, 2001:db8::1/32 is accepted as the same address
  1149. // as 2001:db8::/32.
  1150. SourceRange string `json:"sourceRange,omitempty"`
  1151. // ServerResponse contains the HTTP response code and headers from the
  1152. // server.
  1153. googleapi.ServerResponse `json:"-"`
  1154. // ForceSendFields is a list of field names (e.g. "Action") to
  1155. // unconditionally include in API requests. By default, fields with
  1156. // empty values are omitted from API requests. However, any non-pointer,
  1157. // non-interface field appearing in ForceSendFields will be sent to the
  1158. // server regardless of whether the field is empty or not. This may be
  1159. // used to include empty fields in Patch requests.
  1160. ForceSendFields []string `json:"-"`
  1161. // NullFields is a list of field names (e.g. "Action") to include in API
  1162. // requests with the JSON null value. By default, fields with empty
  1163. // values are omitted from API requests. However, any field with an
  1164. // empty value appearing in NullFields will be sent to the server as
  1165. // null. It is an error if a field in this list has a non-empty value.
  1166. // This may be used to include null fields in Patch requests.
  1167. NullFields []string `json:"-"`
  1168. }
  1169. func (s *FirewallRule) MarshalJSON() ([]byte, error) {
  1170. type NoMethod FirewallRule
  1171. raw := NoMethod(*s)
  1172. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1173. }
  1174. // HealthCheck: Health checking configuration for VM instances.
  1175. // Unhealthy instances are killed and replaced with new instances. Only
  1176. // applicable for instances in App Engine flexible environment.
  1177. type HealthCheck struct {
  1178. // CheckInterval: Interval between health checks.
  1179. CheckInterval string `json:"checkInterval,omitempty"`
  1180. // DisableHealthCheck: Whether to explicitly disable health checks for
  1181. // this instance.
  1182. DisableHealthCheck bool `json:"disableHealthCheck,omitempty"`
  1183. // HealthyThreshold: Number of consecutive successful health checks
  1184. // required before receiving traffic.
  1185. HealthyThreshold int64 `json:"healthyThreshold,omitempty"`
  1186. // Host: Host header to send when performing an HTTP health check.
  1187. // Example: "myapp.appspot.com"
  1188. Host string `json:"host,omitempty"`
  1189. // RestartThreshold: Number of consecutive failed health checks required
  1190. // before an instance is restarted.
  1191. RestartThreshold int64 `json:"restartThreshold,omitempty"`
  1192. // Timeout: Time before the health check is considered failed.
  1193. Timeout string `json:"timeout,omitempty"`
  1194. // UnhealthyThreshold: Number of consecutive failed health checks
  1195. // required before removing traffic.
  1196. UnhealthyThreshold int64 `json:"unhealthyThreshold,omitempty"`
  1197. // ForceSendFields is a list of field names (e.g. "CheckInterval") to
  1198. // unconditionally include in API requests. By default, fields with
  1199. // empty values are omitted from API requests. However, any non-pointer,
  1200. // non-interface field appearing in ForceSendFields will be sent to the
  1201. // server regardless of whether the field is empty or not. This may be
  1202. // used to include empty fields in Patch requests.
  1203. ForceSendFields []string `json:"-"`
  1204. // NullFields is a list of field names (e.g. "CheckInterval") to include
  1205. // in API requests with the JSON null value. By default, fields with
  1206. // empty values are omitted from API requests. However, any field with
  1207. // an empty value appearing in NullFields will be sent to the server as
  1208. // null. It is an error if a field in this list has a non-empty value.
  1209. // This may be used to include null fields in Patch requests.
  1210. NullFields []string `json:"-"`
  1211. }
  1212. func (s *HealthCheck) MarshalJSON() ([]byte, error) {
  1213. type NoMethod HealthCheck
  1214. raw := NoMethod(*s)
  1215. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1216. }
  1217. // IdentityAwareProxy: Identity-Aware Proxy
  1218. type IdentityAwareProxy struct {
  1219. // Enabled: Whether the serving infrastructure will authenticate and
  1220. // authorize all incoming requests.If true, the oauth2_client_id and
  1221. // oauth2_client_secret fields must be non-empty.
  1222. Enabled bool `json:"enabled,omitempty"`
  1223. // Oauth2ClientId: OAuth2 client ID to use for the authentication flow.
  1224. Oauth2ClientId string `json:"oauth2ClientId,omitempty"`
  1225. // Oauth2ClientSecret: OAuth2 client secret to use for the
  1226. // authentication flow.For security reasons, this value cannot be
  1227. // retrieved via the API. Instead, the SHA-256 hash of the value is
  1228. // returned in the oauth2_client_secret_sha256 field.@InputOnly
  1229. Oauth2ClientSecret string `json:"oauth2ClientSecret,omitempty"`
  1230. // Oauth2ClientSecretSha256: Hex-encoded SHA-256 hash of the client
  1231. // secret.@OutputOnly
  1232. Oauth2ClientSecretSha256 string `json:"oauth2ClientSecretSha256,omitempty"`
  1233. // ForceSendFields is a list of field names (e.g. "Enabled") to
  1234. // unconditionally include in API requests. By default, fields with
  1235. // empty values are omitted from API requests. However, any non-pointer,
  1236. // non-interface field appearing in ForceSendFields will be sent to the
  1237. // server regardless of whether the field is empty or not. This may be
  1238. // used to include empty fields in Patch requests.
  1239. ForceSendFields []string `json:"-"`
  1240. // NullFields is a list of field names (e.g. "Enabled") to include in
  1241. // API requests with the JSON null value. By default, fields with empty
  1242. // values are omitted from API requests. However, any field with an
  1243. // empty value appearing in NullFields will be sent to the server as
  1244. // null. It is an error if a field in this list has a non-empty value.
  1245. // This may be used to include null fields in Patch requests.
  1246. NullFields []string `json:"-"`
  1247. }
  1248. func (s *IdentityAwareProxy) MarshalJSON() ([]byte, error) {
  1249. type NoMethod IdentityAwareProxy
  1250. raw := NoMethod(*s)
  1251. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1252. }
  1253. // Instance: An Instance resource is the computing unit that App Engine
  1254. // uses to automatically scale an application.
  1255. type Instance struct {
  1256. // AppEngineRelease: App Engine release this instance is running
  1257. // on.@OutputOnly
  1258. AppEngineRelease string `json:"appEngineRelease,omitempty"`
  1259. // Availability: Availability of the instance.@OutputOnly
  1260. //
  1261. // Possible values:
  1262. // "UNSPECIFIED"
  1263. // "RESIDENT"
  1264. // "DYNAMIC"
  1265. Availability string `json:"availability,omitempty"`
  1266. // AverageLatency: Average latency (ms) over the last minute.@OutputOnly
  1267. AverageLatency int64 `json:"averageLatency,omitempty"`
  1268. // Errors: Number of errors since this instance was started.@OutputOnly
  1269. Errors int64 `json:"errors,omitempty"`
  1270. // Id: Relative name of the instance within the version. Example:
  1271. // instance-1.@OutputOnly
  1272. Id string `json:"id,omitempty"`
  1273. // MemoryUsage: Total memory in use (bytes).@OutputOnly
  1274. MemoryUsage int64 `json:"memoryUsage,omitempty,string"`
  1275. // Name: Full path to the Instance resource in the API. Example:
  1276. // apps/myapp/services/default/versions/v1/instances/instance-1.@OutputOn
  1277. // ly
  1278. Name string `json:"name,omitempty"`
  1279. // Qps: Average queries per second (QPS) over the last
  1280. // minute.@OutputOnly
  1281. Qps float64 `json:"qps,omitempty"`
  1282. // Requests: Number of requests since this instance was
  1283. // started.@OutputOnly
  1284. Requests int64 `json:"requests,omitempty"`
  1285. // StartTime: Time that this instance was started.@OutputOnly
  1286. StartTime string `json:"startTime,omitempty"`
  1287. // VmDebugEnabled: Whether this instance is in debug mode. Only
  1288. // applicable for instances in App Engine flexible
  1289. // environment.@OutputOnly
  1290. VmDebugEnabled bool `json:"vmDebugEnabled,omitempty"`
  1291. // VmId: Virtual machine ID of this instance. Only applicable for
  1292. // instances in App Engine flexible environment.@OutputOnly
  1293. VmId string `json:"vmId,omitempty"`
  1294. // VmIp: The IP address of this instance. Only applicable for instances
  1295. // in App Engine flexible environment.@OutputOnly
  1296. VmIp string `json:"vmIp,omitempty"`
  1297. // VmName: Name of the virtual machine where this instance lives. Only
  1298. // applicable for instances in App Engine flexible
  1299. // environment.@OutputOnly
  1300. VmName string `json:"vmName,omitempty"`
  1301. // VmStatus: Status of the virtual machine where this instance lives.
  1302. // Only applicable for instances in App Engine flexible
  1303. // environment.@OutputOnly
  1304. VmStatus string `json:"vmStatus,omitempty"`
  1305. // VmZoneName: Zone where the virtual machine is located. Only
  1306. // applicable for instances in App Engine flexible
  1307. // environment.@OutputOnly
  1308. VmZoneName string `json:"vmZoneName,omitempty"`
  1309. // ServerResponse contains the HTTP response code and headers from the
  1310. // server.
  1311. googleapi.ServerResponse `json:"-"`
  1312. // ForceSendFields is a list of field names (e.g. "AppEngineRelease") to
  1313. // unconditionally include in API requests. By default, fields with
  1314. // empty values are omitted from API requests. However, any non-pointer,
  1315. // non-interface field appearing in ForceSendFields will be sent to the
  1316. // server regardless of whether the field is empty or not. This may be
  1317. // used to include empty fields in Patch requests.
  1318. ForceSendFields []string `json:"-"`
  1319. // NullFields is a list of field names (e.g. "AppEngineRelease") to
  1320. // include in API requests with the JSON null value. By default, fields
  1321. // with empty values are omitted from API requests. However, any field
  1322. // with an empty value appearing in NullFields will be sent to the
  1323. // server as null. It is an error if a field in this list has a
  1324. // non-empty value. This may be used to include null fields in Patch
  1325. // requests.
  1326. NullFields []string `json:"-"`
  1327. }
  1328. func (s *Instance) MarshalJSON() ([]byte, error) {
  1329. type NoMethod Instance
  1330. raw := NoMethod(*s)
  1331. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1332. }
  1333. func (s *Instance) UnmarshalJSON(data []byte) error {
  1334. type NoMethod Instance
  1335. var s1 struct {
  1336. Qps gensupport.JSONFloat64 `json:"qps"`
  1337. *NoMethod
  1338. }
  1339. s1.NoMethod = (*NoMethod)(s)
  1340. if err := json.Unmarshal(data, &s1); err != nil {
  1341. return err
  1342. }
  1343. s.Qps = float64(s1.Qps)
  1344. return nil
  1345. }
  1346. // Library: Third-party Python runtime library that is required by the
  1347. // application.
  1348. type Library struct {
  1349. // Name: Name of the library. Example: "django".
  1350. Name string `json:"name,omitempty"`
  1351. // Version: Version of the library to select, or "latest".
  1352. Version string `json:"version,omitempty"`
  1353. // ForceSendFields is a list of field names (e.g. "Name") to
  1354. // unconditionally include in API requests. By default, fields with
  1355. // empty values are omitted from API requests. However, any non-pointer,
  1356. // non-interface field appearing in ForceSendFields will be sent to the
  1357. // server regardless of whether the field is empty or not. This may be
  1358. // used to include empty fields in Patch requests.
  1359. ForceSendFields []string `json:"-"`
  1360. // NullFields is a list of field names (e.g. "Name") to include in API
  1361. // requests with the JSON null value. By default, fields with empty
  1362. // values are omitted from API requests. However, any field with an
  1363. // empty value appearing in NullFields will be sent to the server as
  1364. // null. It is an error if a field in this list has a non-empty value.
  1365. // This may be used to include null fields in Patch requests.
  1366. NullFields []string `json:"-"`
  1367. }
  1368. func (s *Library) MarshalJSON() ([]byte, error) {
  1369. type NoMethod Library
  1370. raw := NoMethod(*s)
  1371. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1372. }
  1373. // ListAuthorizedCertificatesResponse: Response message for
  1374. // AuthorizedCertificates.ListAuthorizedCertificates.
  1375. type ListAuthorizedCertificatesResponse struct {
  1376. // Certificates: The SSL certificates the user is authorized to
  1377. // administer.
  1378. Certificates []*AuthorizedCertificate `json:"certificates,omitempty"`
  1379. // NextPageToken: Continuation token for fetching the next page of
  1380. // results.
  1381. NextPageToken string `json:"nextPageToken,omitempty"`
  1382. // ServerResponse contains the HTTP response code and headers from the
  1383. // server.
  1384. googleapi.ServerResponse `json:"-"`
  1385. // ForceSendFields is a list of field names (e.g. "Certificates") to
  1386. // unconditionally include in API requests. By default, fields with
  1387. // empty values are omitted from API requests. However, any non-pointer,
  1388. // non-interface field appearing in ForceSendFields will be sent to the
  1389. // server regardless of whether the field is empty or not. This may be
  1390. // used to include empty fields in Patch requests.
  1391. ForceSendFields []string `json:"-"`
  1392. // NullFields is a list of field names (e.g. "Certificates") to include
  1393. // in API requests with the JSON null value. By default, fields with
  1394. // empty values are omitted from API requests. However, any field with
  1395. // an empty value appearing in NullFields will be sent to the server as
  1396. // null. It is an error if a field in this list has a non-empty value.
  1397. // This may be used to include null fields in Patch requests.
  1398. NullFields []string `json:"-"`
  1399. }
  1400. func (s *ListAuthorizedCertificatesResponse) MarshalJSON() ([]byte, error) {
  1401. type NoMethod ListAuthorizedCertificatesResponse
  1402. raw := NoMethod(*s)
  1403. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1404. }
  1405. // ListAuthorizedDomainsResponse: Response message for
  1406. // AuthorizedDomains.ListAuthorizedDomains.
  1407. type ListAuthorizedDomainsResponse struct {
  1408. // Domains: The authorized domains belonging to the user.
  1409. Domains []*AuthorizedDomain `json:"domains,omitempty"`
  1410. // NextPageToken: Continuation token for fetching the next page of
  1411. // results.
  1412. NextPageToken string `json:"nextPageToken,omitempty"`
  1413. // ServerResponse contains the HTTP response code and headers from the
  1414. // server.
  1415. googleapi.ServerResponse `json:"-"`
  1416. // ForceSendFields is a list of field names (e.g. "Domains") to
  1417. // unconditionally include in API requests. By default, fields with
  1418. // empty values are omitted from API requests. However, any non-pointer,
  1419. // non-interface field appearing in ForceSendFields will be sent to the
  1420. // server regardless of whether the field is empty or not. This may be
  1421. // used to include empty fields in Patch requests.
  1422. ForceSendFields []string `json:"-"`
  1423. // NullFields is a list of field names (e.g. "Domains") to include in
  1424. // API requests with the JSON null value. By default, fields with empty
  1425. // values are omitted from API requests. However, any field with an
  1426. // empty value appearing in NullFields will be sent to the server as
  1427. // null. It is an error if a field in this list has a non-empty value.
  1428. // This may be used to include null fields in Patch requests.
  1429. NullFields []string `json:"-"`
  1430. }
  1431. func (s *ListAuthorizedDomainsResponse) MarshalJSON() ([]byte, error) {
  1432. type NoMethod ListAuthorizedDomainsResponse
  1433. raw := NoMethod(*s)
  1434. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1435. }
  1436. // ListDomainMappingsResponse: Response message for
  1437. // DomainMappings.ListDomainMappings.
  1438. type ListDomainMappingsResponse struct {
  1439. // DomainMappings: The domain mappings for the application.
  1440. DomainMappings []*DomainMapping `json:"domainMappings,omitempty"`
  1441. // NextPageToken: Continuation token for fetching the next page of
  1442. // results.
  1443. NextPageToken string `json:"nextPageToken,omitempty"`
  1444. // ServerResponse contains the HTTP response code and headers from the
  1445. // server.
  1446. googleapi.ServerResponse `json:"-"`
  1447. // ForceSendFields is a list of field names (e.g. "DomainMappings") to
  1448. // unconditionally include in API requests. By default, fields with
  1449. // empty values are omitted from API requests. However, any non-pointer,
  1450. // non-interface field appearing in ForceSendFields will be sent to the
  1451. // server regardless of whether the field is empty or not. This may be
  1452. // used to include empty fields in Patch requests.
  1453. ForceSendFields []string `json:"-"`
  1454. // NullFields is a list of field names (e.g. "DomainMappings") to
  1455. // include in API requests with the JSON null value. By default, fields
  1456. // with empty values are omitted from API requests. However, any field
  1457. // with an empty value appearing in NullFields will be sent to the
  1458. // server as null. It is an error if a field in this list has a
  1459. // non-empty value. This may be used to include null fields in Patch
  1460. // requests.
  1461. NullFields []string `json:"-"`
  1462. }
  1463. func (s *ListDomainMappingsResponse) MarshalJSON() ([]byte, error) {
  1464. type NoMethod ListDomainMappingsResponse
  1465. raw := NoMethod(*s)
  1466. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1467. }
  1468. // ListIngressRulesResponse: Response message for
  1469. // Firewall.ListIngressRules.
  1470. type ListIngressRulesResponse struct {
  1471. // IngressRules: The ingress FirewallRules for this application.
  1472. IngressRules []*FirewallRule `json:"ingressRules,omitempty"`
  1473. // NextPageToken: Continuation token for fetching the next page of
  1474. // results.
  1475. NextPageToken string `json:"nextPageToken,omitempty"`
  1476. // ServerResponse contains the HTTP response code and headers from the
  1477. // server.
  1478. googleapi.ServerResponse `json:"-"`
  1479. // ForceSendFields is a list of field names (e.g. "IngressRules") to
  1480. // unconditionally include in API requests. By default, fields with
  1481. // empty values are omitted from API requests. However, any non-pointer,
  1482. // non-interface field appearing in ForceSendFields will be sent to the
  1483. // server regardless of whether the field is empty or not. This may be
  1484. // used to include empty fields in Patch requests.
  1485. ForceSendFields []string `json:"-"`
  1486. // NullFields is a list of field names (e.g. "IngressRules") to include
  1487. // in API requests with the JSON null value. By default, fields with
  1488. // empty values are omitted from API requests. However, any field with
  1489. // an empty value appearing in NullFields will be sent to the server as
  1490. // null. It is an error if a field in this list has a non-empty value.
  1491. // This may be used to include null fields in Patch requests.
  1492. NullFields []string `json:"-"`
  1493. }
  1494. func (s *ListIngressRulesResponse) MarshalJSON() ([]byte, error) {
  1495. type NoMethod ListIngressRulesResponse
  1496. raw := NoMethod(*s)
  1497. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1498. }
  1499. // ListInstancesResponse: Response message for Instances.ListInstances.
  1500. type ListInstancesResponse struct {
  1501. // Instances: The instances belonging to the requested version.
  1502. Instances []*Instance `json:"instances,omitempty"`
  1503. // NextPageToken: Continuation token for fetching the next page of
  1504. // results.
  1505. NextPageToken string `json:"nextPageToken,omitempty"`
  1506. // ServerResponse contains the HTTP response code and headers from the
  1507. // server.
  1508. googleapi.ServerResponse `json:"-"`
  1509. // ForceSendFields is a list of field names (e.g. "Instances") to
  1510. // unconditionally include in API requests. By default, fields with
  1511. // empty values are omitted from API requests. However, any non-pointer,
  1512. // non-interface field appearing in ForceSendFields will be sent to the
  1513. // server regardless of whether the field is empty or not. This may be
  1514. // used to include empty fields in Patch requests.
  1515. ForceSendFields []string `json:"-"`
  1516. // NullFields is a list of field names (e.g. "Instances") to include in
  1517. // API requests with the JSON null value. By default, fields with empty
  1518. // values are omitted from API requests. However, any field with an
  1519. // empty value appearing in NullFields will be sent to the server as
  1520. // null. It is an error if a field in this list has a non-empty value.
  1521. // This may be used to include null fields in Patch requests.
  1522. NullFields []string `json:"-"`
  1523. }
  1524. func (s *ListInstancesResponse) MarshalJSON() ([]byte, error) {
  1525. type NoMethod ListInstancesResponse
  1526. raw := NoMethod(*s)
  1527. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1528. }
  1529. // ListLocationsResponse: The response message for
  1530. // Locations.ListLocations.
  1531. type ListLocationsResponse struct {
  1532. // Locations: A list of locations that matches the specified filter in
  1533. // the request.
  1534. Locations []*Location `json:"locations,omitempty"`
  1535. // NextPageToken: The standard List next-page token.
  1536. NextPageToken string `json:"nextPageToken,omitempty"`
  1537. // ServerResponse contains the HTTP response code and headers from the
  1538. // server.
  1539. googleapi.ServerResponse `json:"-"`
  1540. // ForceSendFields is a list of field names (e.g. "Locations") to
  1541. // unconditionally include in API requests. By default, fields with
  1542. // empty values are omitted from API requests. However, any non-pointer,
  1543. // non-interface field appearing in ForceSendFields will be sent to the
  1544. // server regardless of whether the field is empty or not. This may be
  1545. // used to include empty fields in Patch requests.
  1546. ForceSendFields []string `json:"-"`
  1547. // NullFields is a list of field names (e.g. "Locations") to include in
  1548. // API requests with the JSON null value. By default, fields with empty
  1549. // values are omitted from API requests. However, any field with an
  1550. // empty value appearing in NullFields will be sent to the server as
  1551. // null. It is an error if a field in this list has a non-empty value.
  1552. // This may be used to include null fields in Patch requests.
  1553. NullFields []string `json:"-"`
  1554. }
  1555. func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) {
  1556. type NoMethod ListLocationsResponse
  1557. raw := NoMethod(*s)
  1558. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1559. }
  1560. // ListOperationsResponse: The response message for
  1561. // Operations.ListOperations.
  1562. type ListOperationsResponse struct {
  1563. // NextPageToken: The standard List next-page token.
  1564. NextPageToken string `json:"nextPageToken,omitempty"`
  1565. // Operations: A list of operations that matches the specified filter in
  1566. // the request.
  1567. Operations []*Operation `json:"operations,omitempty"`
  1568. // ServerResponse contains the HTTP response code and headers from the
  1569. // server.
  1570. googleapi.ServerResponse `json:"-"`
  1571. // ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1572. // unconditionally include in API requests. By default, fields with
  1573. // empty values are omitted from API requests. However, any non-pointer,
  1574. // non-interface field appearing in ForceSendFields will be sent to the
  1575. // server regardless of whether the field is empty or not. This may be
  1576. // used to include empty fields in Patch requests.
  1577. ForceSendFields []string `json:"-"`
  1578. // NullFields is a list of field names (e.g. "NextPageToken") to include
  1579. // in API requests with the JSON null value. By default, fields with
  1580. // empty values are omitted from API requests. However, any field with
  1581. // an empty value appearing in NullFields will be sent to the server as
  1582. // null. It is an error if a field in this list has a non-empty value.
  1583. // This may be used to include null fields in Patch requests.
  1584. NullFields []string `json:"-"`
  1585. }
  1586. func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) {
  1587. type NoMethod ListOperationsResponse
  1588. raw := NoMethod(*s)
  1589. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1590. }
  1591. // ListServicesResponse: Response message for Services.ListServices.
  1592. type ListServicesResponse struct {
  1593. // NextPageToken: Continuation token for fetching the next page of
  1594. // results.
  1595. NextPageToken string `json:"nextPageToken,omitempty"`
  1596. // Services: The services belonging to the requested application.
  1597. Services []*Service `json:"services,omitempty"`
  1598. // ServerResponse contains the HTTP response code and headers from the
  1599. // server.
  1600. googleapi.ServerResponse `json:"-"`
  1601. // ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1602. // unconditionally include in API requests. By default, fields with
  1603. // empty values are omitted from API requests. However, any non-pointer,
  1604. // non-interface field appearing in ForceSendFields will be sent to the
  1605. // server regardless of whether the field is empty or not. This may be
  1606. // used to include empty fields in Patch requests.
  1607. ForceSendFields []string `json:"-"`
  1608. // NullFields is a list of field names (e.g. "NextPageToken") to include
  1609. // in API requests with the JSON null value. By default, fields with
  1610. // empty values are omitted from API requests. However, any field with
  1611. // an empty value appearing in NullFields will be sent to the server as
  1612. // null. It is an error if a field in this list has a non-empty value.
  1613. // This may be used to include null fields in Patch requests.
  1614. NullFields []string `json:"-"`
  1615. }
  1616. func (s *ListServicesResponse) MarshalJSON() ([]byte, error) {
  1617. type NoMethod ListServicesResponse
  1618. raw := NoMethod(*s)
  1619. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1620. }
  1621. // ListVersionsResponse: Response message for Versions.ListVersions.
  1622. type ListVersionsResponse struct {
  1623. // NextPageToken: Continuation token for fetching the next page of
  1624. // results.
  1625. NextPageToken string `json:"nextPageToken,omitempty"`
  1626. // Versions: The versions belonging to the requested service.
  1627. Versions []*Version `json:"versions,omitempty"`
  1628. // ServerResponse contains the HTTP response code and headers from the
  1629. // server.
  1630. googleapi.ServerResponse `json:"-"`
  1631. // ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1632. // unconditionally include in API requests. By default, fields with
  1633. // empty values are omitted from API requests. However, any non-pointer,
  1634. // non-interface field appearing in ForceSendFields will be sent to the
  1635. // server regardless of whether the field is empty or not. This may be
  1636. // used to include empty fields in Patch requests.
  1637. ForceSendFields []string `json:"-"`
  1638. // NullFields is a list of field names (e.g. "NextPageToken") to include
  1639. // in API requests with the JSON null value. By default, fields with
  1640. // empty values are omitted from API requests. However, any field with
  1641. // an empty value appearing in NullFields will be sent to the server as
  1642. // null. It is an error if a field in this list has a non-empty value.
  1643. // This may be used to include null fields in Patch requests.
  1644. NullFields []string `json:"-"`
  1645. }
  1646. func (s *ListVersionsResponse) MarshalJSON() ([]byte, error) {
  1647. type NoMethod ListVersionsResponse
  1648. raw := NoMethod(*s)
  1649. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1650. }
  1651. // LivenessCheck: Health checking configuration for VM instances.
  1652. // Unhealthy instances are killed and replaced with new instances.
  1653. type LivenessCheck struct {
  1654. // CheckInterval: Interval between health checks.
  1655. CheckInterval string `json:"checkInterval,omitempty"`
  1656. // FailureThreshold: Number of consecutive failed checks required before
  1657. // considering the VM unhealthy.
  1658. FailureThreshold int64 `json:"failureThreshold,omitempty"`
  1659. // Host: Host header to send when performing a HTTP Liveness check.
  1660. // Example: "myapp.appspot.com"
  1661. Host string `json:"host,omitempty"`
  1662. // InitialDelay: The initial delay before starting to execute the
  1663. // checks.
  1664. InitialDelay string `json:"initialDelay,omitempty"`
  1665. // Path: The request path.
  1666. Path string `json:"path,omitempty"`
  1667. // SuccessThreshold: Number of consecutive successful checks required
  1668. // before considering the VM healthy.
  1669. SuccessThreshold int64 `json:"successThreshold,omitempty"`
  1670. // Timeout: Time before the check is considered failed.
  1671. Timeout string `json:"timeout,omitempty"`
  1672. // ForceSendFields is a list of field names (e.g. "CheckInterval") to
  1673. // unconditionally include in API requests. By default, fields with
  1674. // empty values are omitted from API requests. However, any non-pointer,
  1675. // non-interface field appearing in ForceSendFields will be sent to the
  1676. // server regardless of whether the field is empty or not. This may be
  1677. // used to include empty fields in Patch requests.
  1678. ForceSendFields []string `json:"-"`
  1679. // NullFields is a list of field names (e.g. "CheckInterval") to include
  1680. // in API requests with the JSON null value. By default, fields with
  1681. // empty values are omitted from API requests. However, any field with
  1682. // an empty value appearing in NullFields will be sent to the server as
  1683. // null. It is an error if a field in this list has a non-empty value.
  1684. // This may be used to include null fields in Patch requests.
  1685. NullFields []string `json:"-"`
  1686. }
  1687. func (s *LivenessCheck) MarshalJSON() ([]byte, error) {
  1688. type NoMethod LivenessCheck
  1689. raw := NoMethod(*s)
  1690. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1691. }
  1692. // Location: A resource that represents Google Cloud Platform location.
  1693. type Location struct {
  1694. // DisplayName: The friendly name for this location, typically a nearby
  1695. // city name. For example, "Tokyo".
  1696. DisplayName string `json:"displayName,omitempty"`
  1697. // Labels: Cross-service attributes for the location. For
  1698. // example
  1699. // {"cloud.googleapis.com/region": "us-east1"}
  1700. //
  1701. Labels map[string]string `json:"labels,omitempty"`
  1702. // LocationId: The canonical id for this location. For example:
  1703. // "us-east1".
  1704. LocationId string `json:"locationId,omitempty"`
  1705. // Metadata: Service-specific metadata. For example the available
  1706. // capacity at the given location.
  1707. Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  1708. // Name: Resource name for the location, which may vary between
  1709. // implementations. For example:
  1710. // "projects/example-project/locations/us-east1"
  1711. Name string `json:"name,omitempty"`
  1712. // ServerResponse contains the HTTP response code and headers from the
  1713. // server.
  1714. googleapi.ServerResponse `json:"-"`
  1715. // ForceSendFields is a list of field names (e.g. "DisplayName") to
  1716. // unconditionally include in API requests. By default, fields with
  1717. // empty values are omitted from API requests. However, any non-pointer,
  1718. // non-interface field appearing in ForceSendFields will be sent to the
  1719. // server regardless of whether the field is empty or not. This may be
  1720. // used to include empty fields in Patch requests.
  1721. ForceSendFields []string `json:"-"`
  1722. // NullFields is a list of field names (e.g. "DisplayName") to include
  1723. // in API requests with the JSON null value. By default, fields with
  1724. // empty values are omitted from API requests. However, any field with
  1725. // an empty value appearing in NullFields will be sent to the server as
  1726. // null. It is an error if a field in this list has a non-empty value.
  1727. // This may be used to include null fields in Patch requests.
  1728. NullFields []string `json:"-"`
  1729. }
  1730. func (s *Location) MarshalJSON() ([]byte, error) {
  1731. type NoMethod Location
  1732. raw := NoMethod(*s)
  1733. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1734. }
  1735. // LocationMetadata: Metadata for the given
  1736. // google.cloud.location.Location.
  1737. type LocationMetadata struct {
  1738. // FlexibleEnvironmentAvailable: App Engine flexible environment is
  1739. // available in the given location.@OutputOnly
  1740. FlexibleEnvironmentAvailable bool `json:"flexibleEnvironmentAvailable,omitempty"`
  1741. // StandardEnvironmentAvailable: App Engine standard environment is
  1742. // available in the given location.@OutputOnly
  1743. StandardEnvironmentAvailable bool `json:"standardEnvironmentAvailable,omitempty"`
  1744. // ForceSendFields is a list of field names (e.g.
  1745. // "FlexibleEnvironmentAvailable") to unconditionally include in API
  1746. // requests. By default, fields with empty values are omitted from API
  1747. // requests. However, any non-pointer, non-interface field appearing in
  1748. // ForceSendFields will be sent to the server regardless of whether the
  1749. // field is empty or not. This may be used to include empty fields in
  1750. // Patch requests.
  1751. ForceSendFields []string `json:"-"`
  1752. // NullFields is a list of field names (e.g.
  1753. // "FlexibleEnvironmentAvailable") to include in API requests with the
  1754. // JSON null value. By default, fields with empty values are omitted
  1755. // from API requests. However, any field with an empty value appearing
  1756. // in NullFields will be sent to the server as null. It is an error if a
  1757. // field in this list has a non-empty value. This may be used to include
  1758. // null fields in Patch requests.
  1759. NullFields []string `json:"-"`
  1760. }
  1761. func (s *LocationMetadata) MarshalJSON() ([]byte, error) {
  1762. type NoMethod LocationMetadata
  1763. raw := NoMethod(*s)
  1764. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1765. }
  1766. // ManagedCertificate: A certificate managed by App Engine.
  1767. type ManagedCertificate struct {
  1768. // LastRenewalTime: Time at which the certificate was last renewed. The
  1769. // renewal process is fully managed. Certificate renewal will
  1770. // automatically occur before the certificate expires. Renewal errors
  1771. // can be tracked via ManagementStatus.@OutputOnly
  1772. LastRenewalTime string `json:"lastRenewalTime,omitempty"`
  1773. // Status: Status of certificate management. Refers to the most recent
  1774. // certificate acquisition or renewal attempt.@OutputOnly
  1775. //
  1776. // Possible values:
  1777. // "MANAGEMENT_STATUS_UNSPECIFIED"
  1778. // "OK" - Certificate was successfully obtained and inserted into the
  1779. // serving system.
  1780. // "PENDING" - Certificate is under active attempts to acquire or
  1781. // renew.
  1782. // "FAILED_RETRYING_NOT_VISIBLE" - Most recent renewal failed due to
  1783. // an invalid DNS setup and will be retried. Renewal attempts will
  1784. // continue to fail until the certificate domain's DNS configuration is
  1785. // fixed. The last successfully provisioned certificate may still be
  1786. // serving.
  1787. // "FAILED_PERMANENT" - All renewal attempts have been exhausted,
  1788. // likely due to an invalid DNS setup.
  1789. // "FAILED_RETRYING_CAA_FORBIDDEN" - Most recent renewal failed due to
  1790. // an explicit CAA record that does not include the in-use CA, Let's
  1791. // Encrypt. Renewals will continue to fail until the CAA is
  1792. // reconfigured. The last successfully provisioned certificate may still
  1793. // be serving.
  1794. // "FAILED_RETRYING_CAA_CHECKING" - Most recent renewal failed due to
  1795. // a CAA retrieval failure. This means that the domain's DNS provider
  1796. // does not properly handle CAA records, failing requests for CAA
  1797. // records when no CAA records are defined. Renewals will continue to
  1798. // fail until the DNS provider is changed or a CAA record is added for
  1799. // the given domain. The last successfully provisioned certificate may
  1800. // still be serving.
  1801. Status string `json:"status,omitempty"`
  1802. // ForceSendFields is a list of field names (e.g. "LastRenewalTime") to
  1803. // unconditionally include in API requests. By default, fields with
  1804. // empty values are omitted from API requests. However, any non-pointer,
  1805. // non-interface field appearing in ForceSendFields will be sent to the
  1806. // server regardless of whether the field is empty or not. This may be
  1807. // used to include empty fields in Patch requests.
  1808. ForceSendFields []string `json:"-"`
  1809. // NullFields is a list of field names (e.g. "LastRenewalTime") to
  1810. // include in API requests with the JSON null value. By default, fields
  1811. // with empty values are omitted from API requests. However, any field
  1812. // with an empty value appearing in NullFields will be sent to the
  1813. // server as null. It is an error if a field in this list has a
  1814. // non-empty value. This may be used to include null fields in Patch
  1815. // requests.
  1816. NullFields []string `json:"-"`
  1817. }
  1818. func (s *ManagedCertificate) MarshalJSON() ([]byte, error) {
  1819. type NoMethod ManagedCertificate
  1820. raw := NoMethod(*s)
  1821. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1822. }
  1823. // ManualScaling: A service with manual scaling runs continuously,
  1824. // allowing you to perform complex initialization and rely on the state
  1825. // of its memory over time.
  1826. type ManualScaling struct {
  1827. // Instances: Number of instances to assign to the service at the start.
  1828. // This number can later be altered by using the Modules API
  1829. // (https://cloud.google.com/appengine/docs/python/modules/functions)
  1830. // set_num_instances() function.
  1831. Instances int64 `json:"instances,omitempty"`
  1832. // ForceSendFields is a list of field names (e.g. "Instances") to
  1833. // unconditionally include in API requests. By default, fields with
  1834. // empty values are omitted from API requests. However, any non-pointer,
  1835. // non-interface field appearing in ForceSendFields will be sent to the
  1836. // server regardless of whether the field is empty or not. This may be
  1837. // used to include empty fields in Patch requests.
  1838. ForceSendFields []string `json:"-"`
  1839. // NullFields is a list of field names (e.g. "Instances") to include in
  1840. // API requests with the JSON null value. By default, fields with empty
  1841. // values are omitted from API requests. However, any field with an
  1842. // empty value appearing in NullFields will be sent to the server as
  1843. // null. It is an error if a field in this list has a non-empty value.
  1844. // This may be used to include null fields in Patch requests.
  1845. NullFields []string `json:"-"`
  1846. }
  1847. func (s *ManualScaling) MarshalJSON() ([]byte, error) {
  1848. type NoMethod ManualScaling
  1849. raw := NoMethod(*s)
  1850. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1851. }
  1852. // Network: Extra network settings. Only applicable in the App Engine
  1853. // flexible environment.
  1854. type Network struct {
  1855. // ForwardedPorts: List of ports, or port pairs, to forward from the
  1856. // virtual machine to the application container. Only applicable in the
  1857. // App Engine flexible environment.
  1858. ForwardedPorts []string `json:"forwardedPorts,omitempty"`
  1859. // InstanceTag: Tag to apply to the instance during creation. Only
  1860. // applicable in the App Engine flexible environment.
  1861. InstanceTag string `json:"instanceTag,omitempty"`
  1862. // Name: Google Compute Engine network where the virtual machines are
  1863. // created. Specify the short name, not the resource path.Defaults to
  1864. // default.
  1865. Name string `json:"name,omitempty"`
  1866. // SubnetworkName: Google Cloud Platform sub-network where the virtual
  1867. // machines are created. Specify the short name, not the resource
  1868. // path.If a subnetwork name is specified, a network name will also be
  1869. // required unless it is for the default network.
  1870. // If the network that the instance is being created in is a Legacy
  1871. // network, then the IP address is allocated from the IPv4Range.
  1872. // If the network that the instance is being created in is an auto
  1873. // Subnet Mode Network, then only network name should be specified (not
  1874. // the subnetwork_name) and the IP address is created from the
  1875. // IPCidrRange of the subnetwork that exists in that zone for that
  1876. // network.
  1877. // If the network that the instance is being created in is a custom
  1878. // Subnet Mode Network, then the subnetwork_name must be specified and
  1879. // the IP address is created from the IPCidrRange of the subnetwork.If
  1880. // specified, the subnetwork must exist in the same region as the App
  1881. // Engine flexible environment application.
  1882. SubnetworkName string `json:"subnetworkName,omitempty"`
  1883. // ForceSendFields is a list of field names (e.g. "ForwardedPorts") to
  1884. // unconditionally include in API requests. By default, fields with
  1885. // empty values are omitted from API requests. However, any non-pointer,
  1886. // non-interface field appearing in ForceSendFields will be sent to the
  1887. // server regardless of whether the field is empty or not. This may be
  1888. // used to include empty fields in Patch requests.
  1889. ForceSendFields []string `json:"-"`
  1890. // NullFields is a list of field names (e.g. "ForwardedPorts") to
  1891. // include in API requests with the JSON null value. By default, fields
  1892. // with empty values are omitted from API requests. However, any field
  1893. // with an empty value appearing in NullFields will be sent to the
  1894. // server as null. It is an error if a field in this list has a
  1895. // non-empty value. This may be used to include null fields in Patch
  1896. // requests.
  1897. NullFields []string `json:"-"`
  1898. }
  1899. func (s *Network) MarshalJSON() ([]byte, error) {
  1900. type NoMethod Network
  1901. raw := NoMethod(*s)
  1902. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1903. }
  1904. // NetworkUtilization: Target scaling by network usage. Only applicable
  1905. // in the App Engine flexible environment.
  1906. type NetworkUtilization struct {
  1907. // TargetReceivedBytesPerSecond: Target bytes received per second.
  1908. TargetReceivedBytesPerSecond int64 `json:"targetReceivedBytesPerSecond,omitempty"`
  1909. // TargetReceivedPacketsPerSecond: Target packets received per second.
  1910. TargetReceivedPacketsPerSecond int64 `json:"targetReceivedPacketsPerSecond,omitempty"`
  1911. // TargetSentBytesPerSecond: Target bytes sent per second.
  1912. TargetSentBytesPerSecond int64 `json:"targetSentBytesPerSecond,omitempty"`
  1913. // TargetSentPacketsPerSecond: Target packets sent per second.
  1914. TargetSentPacketsPerSecond int64 `json:"targetSentPacketsPerSecond,omitempty"`
  1915. // ForceSendFields is a list of field names (e.g.
  1916. // "TargetReceivedBytesPerSecond") to unconditionally include in API
  1917. // requests. By default, fields with empty values are omitted from API
  1918. // requests. However, any non-pointer, non-interface field appearing in
  1919. // ForceSendFields will be sent to the server regardless of whether the
  1920. // field is empty or not. This may be used to include empty fields in
  1921. // Patch requests.
  1922. ForceSendFields []string `json:"-"`
  1923. // NullFields is a list of field names (e.g.
  1924. // "TargetReceivedBytesPerSecond") to include in API requests with the
  1925. // JSON null value. By default, fields with empty values are omitted
  1926. // from API requests. However, any field with an empty value appearing
  1927. // in NullFields will be sent to the server as null. It is an error if a
  1928. // field in this list has a non-empty value. This may be used to include
  1929. // null fields in Patch requests.
  1930. NullFields []string `json:"-"`
  1931. }
  1932. func (s *NetworkUtilization) MarshalJSON() ([]byte, error) {
  1933. type NoMethod NetworkUtilization
  1934. raw := NoMethod(*s)
  1935. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1936. }
  1937. // Operation: This resource represents a long-running operation that is
  1938. // the result of a network API call.
  1939. type Operation struct {
  1940. // Done: If the value is false, it means the operation is still in
  1941. // progress. If true, the operation is completed, and either error or
  1942. // response is available.
  1943. Done bool `json:"done,omitempty"`
  1944. // Error: The error result of the operation in case of failure or
  1945. // cancellation.
  1946. Error *Status `json:"error,omitempty"`
  1947. // Metadata: Service-specific metadata associated with the operation. It
  1948. // typically contains progress information and common metadata such as
  1949. // create time. Some services might not provide such metadata. Any
  1950. // method that returns a long-running operation should document the
  1951. // metadata type, if any.
  1952. Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  1953. // Name: The server-assigned name, which is only unique within the same
  1954. // service that originally returns it. If you use the default HTTP
  1955. // mapping, the name should have the format of
  1956. // operations/some/unique/name.
  1957. Name string `json:"name,omitempty"`
  1958. // Response: The normal response of the operation in case of success. If
  1959. // the original method returns no data on success, such as Delete, the
  1960. // response is google.protobuf.Empty. If the original method is standard
  1961. // Get/Create/Update, the response should be the resource. For other
  1962. // methods, the response should have the type XxxResponse, where Xxx is
  1963. // the original method name. For example, if the original method name is
  1964. // TakeSnapshot(), the inferred response type is TakeSnapshotResponse.
  1965. Response googleapi.RawMessage `json:"response,omitempty"`
  1966. // ServerResponse contains the HTTP response code and headers from the
  1967. // server.
  1968. googleapi.ServerResponse `json:"-"`
  1969. // ForceSendFields is a list of field names (e.g. "Done") to
  1970. // unconditionally include in API requests. By default, fields with
  1971. // empty values are omitted from API requests. However, any non-pointer,
  1972. // non-interface field appearing in ForceSendFields will be sent to the
  1973. // server regardless of whether the field is empty or not. This may be
  1974. // used to include empty fields in Patch requests.
  1975. ForceSendFields []string `json:"-"`
  1976. // NullFields is a list of field names (e.g. "Done") to include in API
  1977. // requests with the JSON null value. By default, fields with empty
  1978. // values are omitted from API requests. However, any field with an
  1979. // empty value appearing in NullFields will be sent to the server as
  1980. // null. It is an error if a field in this list has a non-empty value.
  1981. // This may be used to include null fields in Patch requests.
  1982. NullFields []string `json:"-"`
  1983. }
  1984. func (s *Operation) MarshalJSON() ([]byte, error) {
  1985. type NoMethod Operation
  1986. raw := NoMethod(*s)
  1987. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1988. }
  1989. // OperationMetadata: Metadata for the given
  1990. // google.longrunning.Operation.
  1991. type OperationMetadata struct {
  1992. // EndTime: Timestamp that this operation completed.@OutputOnly
  1993. EndTime string `json:"endTime,omitempty"`
  1994. // InsertTime: Timestamp that this operation was created.@OutputOnly
  1995. InsertTime string `json:"insertTime,omitempty"`
  1996. // Method: API method that initiated this operation. Example:
  1997. // google.appengine.v1beta4.Version.CreateVersion.@OutputOnly
  1998. Method string `json:"method,omitempty"`
  1999. // OperationType: Type of this operation. Deprecated, use method field
  2000. // instead. Example: "create_version".@OutputOnly
  2001. OperationType string `json:"operationType,omitempty"`
  2002. // Target: Name of the resource that this operation is acting on.
  2003. // Example: apps/myapp/modules/default.@OutputOnly
  2004. Target string `json:"target,omitempty"`
  2005. // User: User who requested this operation.@OutputOnly
  2006. User string `json:"user,omitempty"`
  2007. // ForceSendFields is a list of field names (e.g. "EndTime") to
  2008. // unconditionally include in API requests. By default, fields with
  2009. // empty values are omitted from API requests. However, any non-pointer,
  2010. // non-interface field appearing in ForceSendFields will be sent to the
  2011. // server regardless of whether the field is empty or not. This may be
  2012. // used to include empty fields in Patch requests.
  2013. ForceSendFields []string `json:"-"`
  2014. // NullFields is a list of field names (e.g. "EndTime") to include in
  2015. // API requests with the JSON null value. By default, fields with empty
  2016. // values are omitted from API requests. However, any field with an
  2017. // empty value appearing in NullFields will be sent to the server as
  2018. // null. It is an error if a field in this list has a non-empty value.
  2019. // This may be used to include null fields in Patch requests.
  2020. NullFields []string `json:"-"`
  2021. }
  2022. func (s *OperationMetadata) MarshalJSON() ([]byte, error) {
  2023. type NoMethod OperationMetadata
  2024. raw := NoMethod(*s)
  2025. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2026. }
  2027. // OperationMetadataV1: Metadata for the given
  2028. // google.longrunning.Operation.
  2029. type OperationMetadataV1 struct {
  2030. CreateVersionMetadata *CreateVersionMetadataV1 `json:"createVersionMetadata,omitempty"`
  2031. // EndTime: Time that this operation completed.@OutputOnly
  2032. EndTime string `json:"endTime,omitempty"`
  2033. // EphemeralMessage: Ephemeral message that may change every time the
  2034. // operation is polled. @OutputOnly
  2035. EphemeralMessage string `json:"ephemeralMessage,omitempty"`
  2036. // InsertTime: Time that this operation was created.@OutputOnly
  2037. InsertTime string `json:"insertTime,omitempty"`
  2038. // Method: API method that initiated this operation. Example:
  2039. // google.appengine.v1.Versions.CreateVersion.@OutputOnly
  2040. Method string `json:"method,omitempty"`
  2041. // Target: Name of the resource that this operation is acting on.
  2042. // Example: apps/myapp/services/default.@OutputOnly
  2043. Target string `json:"target,omitempty"`
  2044. // User: User who requested this operation.@OutputOnly
  2045. User string `json:"user,omitempty"`
  2046. // Warning: Durable messages that persist on every operation poll.
  2047. // @OutputOnly
  2048. Warning []string `json:"warning,omitempty"`
  2049. // ForceSendFields is a list of field names (e.g.
  2050. // "CreateVersionMetadata") to unconditionally include in API requests.
  2051. // By default, fields with empty values are omitted from API requests.
  2052. // However, any non-pointer, non-interface field appearing in
  2053. // ForceSendFields will be sent to the server regardless of whether the
  2054. // field is empty or not. This may be used to include empty fields in
  2055. // Patch requests.
  2056. ForceSendFields []string `json:"-"`
  2057. // NullFields is a list of field names (e.g. "CreateVersionMetadata") to
  2058. // include in API requests with the JSON null value. By default, fields
  2059. // with empty values are omitted from API requests. However, any field
  2060. // with an empty value appearing in NullFields will be sent to the
  2061. // server as null. It is an error if a field in this list has a
  2062. // non-empty value. This may be used to include null fields in Patch
  2063. // requests.
  2064. NullFields []string `json:"-"`
  2065. }
  2066. func (s *OperationMetadataV1) MarshalJSON() ([]byte, error) {
  2067. type NoMethod OperationMetadataV1
  2068. raw := NoMethod(*s)
  2069. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2070. }
  2071. // OperationMetadataV1Alpha: Metadata for the given
  2072. // google.longrunning.Operation.
  2073. type OperationMetadataV1Alpha struct {
  2074. CreateVersionMetadata *CreateVersionMetadataV1Alpha `json:"createVersionMetadata,omitempty"`
  2075. // EndTime: Time that this operation completed.@OutputOnly
  2076. EndTime string `json:"endTime,omitempty"`
  2077. // EphemeralMessage: Ephemeral message that may change every time the
  2078. // operation is polled. @OutputOnly
  2079. EphemeralMessage string `json:"ephemeralMessage,omitempty"`
  2080. // InsertTime: Time that this operation was created.@OutputOnly
  2081. InsertTime string `json:"insertTime,omitempty"`
  2082. // Method: API method that initiated this operation. Example:
  2083. // google.appengine.v1alpha.Versions.CreateVersion.@OutputOnly
  2084. Method string `json:"method,omitempty"`
  2085. // Target: Name of the resource that this operation is acting on.
  2086. // Example: apps/myapp/services/default.@OutputOnly
  2087. Target string `json:"target,omitempty"`
  2088. // User: User who requested this operation.@OutputOnly
  2089. User string `json:"user,omitempty"`
  2090. // Warning: Durable messages that persist on every operation poll.
  2091. // @OutputOnly
  2092. Warning []string `json:"warning,omitempty"`
  2093. // ForceSendFields is a list of field names (e.g.
  2094. // "CreateVersionMetadata") to unconditionally include in API requests.
  2095. // By default, fields with empty values are omitted from API requests.
  2096. // However, any non-pointer, non-interface field appearing in
  2097. // ForceSendFields will be sent to the server regardless of whether the
  2098. // field is empty or not. This may be used to include empty fields in
  2099. // Patch requests.
  2100. ForceSendFields []string `json:"-"`
  2101. // NullFields is a list of field names (e.g. "CreateVersionMetadata") to
  2102. // include in API requests with the JSON null value. By default, fields
  2103. // with empty values are omitted from API requests. However, any field
  2104. // with an empty value appearing in NullFields will be sent to the
  2105. // server as null. It is an error if a field in this list has a
  2106. // non-empty value. This may be used to include null fields in Patch
  2107. // requests.
  2108. NullFields []string `json:"-"`
  2109. }
  2110. func (s *OperationMetadataV1Alpha) MarshalJSON() ([]byte, error) {
  2111. type NoMethod OperationMetadataV1Alpha
  2112. raw := NoMethod(*s)
  2113. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2114. }
  2115. // OperationMetadataV1Beta: Metadata for the given
  2116. // google.longrunning.Operation.
  2117. type OperationMetadataV1Beta struct {
  2118. CreateVersionMetadata *CreateVersionMetadataV1Beta `json:"createVersionMetadata,omitempty"`
  2119. // EndTime: Time that this operation completed.@OutputOnly
  2120. EndTime string `json:"endTime,omitempty"`
  2121. // EphemeralMessage: Ephemeral message that may change every time the
  2122. // operation is polled. @OutputOnly
  2123. EphemeralMessage string `json:"ephemeralMessage,omitempty"`
  2124. // InsertTime: Time that this operation was created.@OutputOnly
  2125. InsertTime string `json:"insertTime,omitempty"`
  2126. // Method: API method that initiated this operation. Example:
  2127. // google.appengine.v1beta.Versions.CreateVersion.@OutputOnly
  2128. Method string `json:"method,omitempty"`
  2129. // Target: Name of the resource that this operation is acting on.
  2130. // Example: apps/myapp/services/default.@OutputOnly
  2131. Target string `json:"target,omitempty"`
  2132. // User: User who requested this operation.@OutputOnly
  2133. User string `json:"user,omitempty"`
  2134. // Warning: Durable messages that persist on every operation poll.
  2135. // @OutputOnly
  2136. Warning []string `json:"warning,omitempty"`
  2137. // ForceSendFields is a list of field names (e.g.
  2138. // "CreateVersionMetadata") to unconditionally include in API requests.
  2139. // By default, fields with empty values are omitted from API requests.
  2140. // However, any non-pointer, non-interface field appearing in
  2141. // ForceSendFields will be sent to the server regardless of whether the
  2142. // field is empty or not. This may be used to include empty fields in
  2143. // Patch requests.
  2144. ForceSendFields []string `json:"-"`
  2145. // NullFields is a list of field names (e.g. "CreateVersionMetadata") to
  2146. // include in API requests with the JSON null value. By default, fields
  2147. // with empty values are omitted from API requests. However, any field
  2148. // with an empty value appearing in NullFields will be sent to the
  2149. // server as null. It is an error if a field in this list has a
  2150. // non-empty value. This may be used to include null fields in Patch
  2151. // requests.
  2152. NullFields []string `json:"-"`
  2153. }
  2154. func (s *OperationMetadataV1Beta) MarshalJSON() ([]byte, error) {
  2155. type NoMethod OperationMetadataV1Beta
  2156. raw := NoMethod(*s)
  2157. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2158. }
  2159. // OperationMetadataV1Beta5: Metadata for the given
  2160. // google.longrunning.Operation.
  2161. type OperationMetadataV1Beta5 struct {
  2162. // EndTime: Timestamp that this operation completed.@OutputOnly
  2163. EndTime string `json:"endTime,omitempty"`
  2164. // InsertTime: Timestamp that this operation was created.@OutputOnly
  2165. InsertTime string `json:"insertTime,omitempty"`
  2166. // Method: API method name that initiated this operation. Example:
  2167. // google.appengine.v1beta5.Version.CreateVersion.@OutputOnly
  2168. Method string `json:"method,omitempty"`
  2169. // Target: Name of the resource that this operation is acting on.
  2170. // Example: apps/myapp/services/default.@OutputOnly
  2171. Target string `json:"target,omitempty"`
  2172. // User: User who requested this operation.@OutputOnly
  2173. User string `json:"user,omitempty"`
  2174. // ForceSendFields is a list of field names (e.g. "EndTime") to
  2175. // unconditionally include in API requests. By default, fields with
  2176. // empty values are omitted from API requests. However, any non-pointer,
  2177. // non-interface field appearing in ForceSendFields will be sent to the
  2178. // server regardless of whether the field is empty or not. This may be
  2179. // used to include empty fields in Patch requests.
  2180. ForceSendFields []string `json:"-"`
  2181. // NullFields is a list of field names (e.g. "EndTime") to include in
  2182. // API requests with the JSON null value. By default, fields with empty
  2183. // values are omitted from API requests. However, any field with an
  2184. // empty value appearing in NullFields will be sent to the server as
  2185. // null. It is an error if a field in this list has a non-empty value.
  2186. // This may be used to include null fields in Patch requests.
  2187. NullFields []string `json:"-"`
  2188. }
  2189. func (s *OperationMetadataV1Beta5) MarshalJSON() ([]byte, error) {
  2190. type NoMethod OperationMetadataV1Beta5
  2191. raw := NoMethod(*s)
  2192. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2193. }
  2194. // ReadinessCheck: Readiness checking configuration for VM instances.
  2195. // Unhealthy instances are removed from traffic rotation.
  2196. type ReadinessCheck struct {
  2197. // AppStartTimeout: A maximum time limit on application initialization,
  2198. // measured from moment the application successfully replies to a
  2199. // healthcheck until it is ready to serve traffic.
  2200. AppStartTimeout string `json:"appStartTimeout,omitempty"`
  2201. // CheckInterval: Interval between health checks.
  2202. CheckInterval string `json:"checkInterval,omitempty"`
  2203. // FailureThreshold: Number of consecutive failed checks required before
  2204. // removing traffic.
  2205. FailureThreshold int64 `json:"failureThreshold,omitempty"`
  2206. // Host: Host header to send when performing a HTTP Readiness check.
  2207. // Example: "myapp.appspot.com"
  2208. Host string `json:"host,omitempty"`
  2209. // Path: The request path.
  2210. Path string `json:"path,omitempty"`
  2211. // SuccessThreshold: Number of consecutive successful checks required
  2212. // before receiving traffic.
  2213. SuccessThreshold int64 `json:"successThreshold,omitempty"`
  2214. // Timeout: Time before the check is considered failed.
  2215. Timeout string `json:"timeout,omitempty"`
  2216. // ForceSendFields is a list of field names (e.g. "AppStartTimeout") to
  2217. // unconditionally include in API requests. By default, fields with
  2218. // empty values are omitted from API requests. However, any non-pointer,
  2219. // non-interface field appearing in ForceSendFields will be sent to the
  2220. // server regardless of whether the field is empty or not. This may be
  2221. // used to include empty fields in Patch requests.
  2222. ForceSendFields []string `json:"-"`
  2223. // NullFields is a list of field names (e.g. "AppStartTimeout") to
  2224. // include in API requests with the JSON null value. By default, fields
  2225. // with empty values are omitted from API requests. However, any field
  2226. // with an empty value appearing in NullFields will be sent to the
  2227. // server as null. It is an error if a field in this list has a
  2228. // non-empty value. This may be used to include null fields in Patch
  2229. // requests.
  2230. NullFields []string `json:"-"`
  2231. }
  2232. func (s *ReadinessCheck) MarshalJSON() ([]byte, error) {
  2233. type NoMethod ReadinessCheck
  2234. raw := NoMethod(*s)
  2235. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2236. }
  2237. // RepairApplicationRequest: Request message for
  2238. // 'Applications.RepairApplication'.
  2239. type RepairApplicationRequest struct {
  2240. }
  2241. // RequestUtilization: Target scaling by request utilization. Only
  2242. // applicable in the App Engine flexible environment.
  2243. type RequestUtilization struct {
  2244. // TargetConcurrentRequests: Target number of concurrent requests.
  2245. TargetConcurrentRequests int64 `json:"targetConcurrentRequests,omitempty"`
  2246. // TargetRequestCountPerSecond: Target requests per second.
  2247. TargetRequestCountPerSecond int64 `json:"targetRequestCountPerSecond,omitempty"`
  2248. // ForceSendFields is a list of field names (e.g.
  2249. // "TargetConcurrentRequests") to unconditionally include in API
  2250. // requests. By default, fields with empty values are omitted from API
  2251. // requests. However, any non-pointer, non-interface field appearing in
  2252. // ForceSendFields will be sent to the server regardless of whether the
  2253. // field is empty or not. This may be used to include empty fields in
  2254. // Patch requests.
  2255. ForceSendFields []string `json:"-"`
  2256. // NullFields is a list of field names (e.g. "TargetConcurrentRequests")
  2257. // to include in API requests with the JSON null value. By default,
  2258. // fields with empty values are omitted from API requests. However, any
  2259. // field with an empty value appearing in NullFields will be sent to the
  2260. // server as null. It is an error if a field in this list has a
  2261. // non-empty value. This may be used to include null fields in Patch
  2262. // requests.
  2263. NullFields []string `json:"-"`
  2264. }
  2265. func (s *RequestUtilization) MarshalJSON() ([]byte, error) {
  2266. type NoMethod RequestUtilization
  2267. raw := NoMethod(*s)
  2268. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2269. }
  2270. // ResourceRecord: A DNS resource record.
  2271. type ResourceRecord struct {
  2272. // Name: Relative name of the object affected by this record. Only
  2273. // applicable for CNAME records. Example: 'www'.
  2274. Name string `json:"name,omitempty"`
  2275. // Rrdata: Data for this record. Values vary by record type, as defined
  2276. // in RFC 1035 (section 5) and RFC 1034 (section 3.6.1).
  2277. Rrdata string `json:"rrdata,omitempty"`
  2278. // Type: Resource record type. Example: AAAA.
  2279. //
  2280. // Possible values:
  2281. // "RECORD_TYPE_UNSPECIFIED" - An unknown resource record.
  2282. // "A" - An A resource record. Data is an IPv4 address.
  2283. // "AAAA" - An AAAA resource record. Data is an IPv6 address.
  2284. // "CNAME" - A CNAME resource record. Data is a domain name to be
  2285. // aliased.
  2286. Type string `json:"type,omitempty"`
  2287. // ForceSendFields is a list of field names (e.g. "Name") to
  2288. // unconditionally include in API requests. By default, fields with
  2289. // empty values are omitted from API requests. However, any non-pointer,
  2290. // non-interface field appearing in ForceSendFields will be sent to the
  2291. // server regardless of whether the field is empty or not. This may be
  2292. // used to include empty fields in Patch requests.
  2293. ForceSendFields []string `json:"-"`
  2294. // NullFields is a list of field names (e.g. "Name") to include in API
  2295. // requests with the JSON null value. By default, fields with empty
  2296. // values are omitted from API requests. However, any field with an
  2297. // empty value appearing in NullFields will be sent to the server as
  2298. // null. It is an error if a field in this list has a non-empty value.
  2299. // This may be used to include null fields in Patch requests.
  2300. NullFields []string `json:"-"`
  2301. }
  2302. func (s *ResourceRecord) MarshalJSON() ([]byte, error) {
  2303. type NoMethod ResourceRecord
  2304. raw := NoMethod(*s)
  2305. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2306. }
  2307. // Resources: Machine resources for a version.
  2308. type Resources struct {
  2309. // Cpu: Number of CPU cores needed.
  2310. Cpu float64 `json:"cpu,omitempty"`
  2311. // DiskGb: Disk size (GB) needed.
  2312. DiskGb float64 `json:"diskGb,omitempty"`
  2313. // MemoryGb: Memory (GB) needed.
  2314. MemoryGb float64 `json:"memoryGb,omitempty"`
  2315. // Volumes: User specified volumes.
  2316. Volumes []*Volume `json:"volumes,omitempty"`
  2317. // ForceSendFields is a list of field names (e.g. "Cpu") to
  2318. // unconditionally include in API requests. By default, fields with
  2319. // empty values are omitted from API requests. However, any non-pointer,
  2320. // non-interface field appearing in ForceSendFields will be sent to the
  2321. // server regardless of whether the field is empty or not. This may be
  2322. // used to include empty fields in Patch requests.
  2323. ForceSendFields []string `json:"-"`
  2324. // NullFields is a list of field names (e.g. "Cpu") to include in API
  2325. // requests with the JSON null value. By default, fields with empty
  2326. // values are omitted from API requests. However, any field with an
  2327. // empty value appearing in NullFields will be sent to the server as
  2328. // null. It is an error if a field in this list has a non-empty value.
  2329. // This may be used to include null fields in Patch requests.
  2330. NullFields []string `json:"-"`
  2331. }
  2332. func (s *Resources) MarshalJSON() ([]byte, error) {
  2333. type NoMethod Resources
  2334. raw := NoMethod(*s)
  2335. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2336. }
  2337. func (s *Resources) UnmarshalJSON(data []byte) error {
  2338. type NoMethod Resources
  2339. var s1 struct {
  2340. Cpu gensupport.JSONFloat64 `json:"cpu"`
  2341. DiskGb gensupport.JSONFloat64 `json:"diskGb"`
  2342. MemoryGb gensupport.JSONFloat64 `json:"memoryGb"`
  2343. *NoMethod
  2344. }
  2345. s1.NoMethod = (*NoMethod)(s)
  2346. if err := json.Unmarshal(data, &s1); err != nil {
  2347. return err
  2348. }
  2349. s.Cpu = float64(s1.Cpu)
  2350. s.DiskGb = float64(s1.DiskGb)
  2351. s.MemoryGb = float64(s1.MemoryGb)
  2352. return nil
  2353. }
  2354. // ScriptHandler: Executes a script to handle the request that matches
  2355. // the URL pattern.
  2356. type ScriptHandler struct {
  2357. // ScriptPath: Path to the script from the application root directory.
  2358. ScriptPath string `json:"scriptPath,omitempty"`
  2359. // ForceSendFields is a list of field names (e.g. "ScriptPath") to
  2360. // unconditionally include in API requests. By default, fields with
  2361. // empty values are omitted from API requests. However, any non-pointer,
  2362. // non-interface field appearing in ForceSendFields will be sent to the
  2363. // server regardless of whether the field is empty or not. This may be
  2364. // used to include empty fields in Patch requests.
  2365. ForceSendFields []string `json:"-"`
  2366. // NullFields is a list of field names (e.g. "ScriptPath") to include in
  2367. // API requests with the JSON null value. By default, fields with empty
  2368. // values are omitted from API requests. However, any field with an
  2369. // empty value appearing in NullFields will be sent to the server as
  2370. // null. It is an error if a field in this list has a non-empty value.
  2371. // This may be used to include null fields in Patch requests.
  2372. NullFields []string `json:"-"`
  2373. }
  2374. func (s *ScriptHandler) MarshalJSON() ([]byte, error) {
  2375. type NoMethod ScriptHandler
  2376. raw := NoMethod(*s)
  2377. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2378. }
  2379. // Service: A Service resource is a logical component of an application
  2380. // that can share state and communicate in a secure fashion with other
  2381. // services. For example, an application that handles customer requests
  2382. // might include separate services to handle tasks such as backend data
  2383. // analysis or API requests from mobile devices. Each service has a
  2384. // collection of versions that define a specific set of code used to
  2385. // implement the functionality of that service.
  2386. type Service struct {
  2387. // Id: Relative name of the service within the application. Example:
  2388. // default.@OutputOnly
  2389. Id string `json:"id,omitempty"`
  2390. // Name: Full path to the Service resource in the API. Example:
  2391. // apps/myapp/services/default.@OutputOnly
  2392. Name string `json:"name,omitempty"`
  2393. // Split: Mapping that defines fractional HTTP traffic diversion to
  2394. // different versions within the service.
  2395. Split *TrafficSplit `json:"split,omitempty"`
  2396. // ServerResponse contains the HTTP response code and headers from the
  2397. // server.
  2398. googleapi.ServerResponse `json:"-"`
  2399. // ForceSendFields is a list of field names (e.g. "Id") to
  2400. // unconditionally include in API requests. By default, fields with
  2401. // empty values are omitted from API requests. However, any non-pointer,
  2402. // non-interface field appearing in ForceSendFields will be sent to the
  2403. // server regardless of whether the field is empty or not. This may be
  2404. // used to include empty fields in Patch requests.
  2405. ForceSendFields []string `json:"-"`
  2406. // NullFields is a list of field names (e.g. "Id") to include in API
  2407. // requests with the JSON null value. By default, fields with empty
  2408. // values are omitted from API requests. However, any field with an
  2409. // empty value appearing in NullFields will be sent to the server as
  2410. // null. It is an error if a field in this list has a non-empty value.
  2411. // This may be used to include null fields in Patch requests.
  2412. NullFields []string `json:"-"`
  2413. }
  2414. func (s *Service) MarshalJSON() ([]byte, error) {
  2415. type NoMethod Service
  2416. raw := NoMethod(*s)
  2417. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2418. }
  2419. // SslSettings: SSL configuration for a DomainMapping resource.
  2420. type SslSettings struct {
  2421. // CertificateId: ID of the AuthorizedCertificate resource configuring
  2422. // SSL for the application. Clearing this field will remove SSL
  2423. // support.By default, a managed certificate is automatically created
  2424. // for every domain mapping. To omit SSL support or to configure SSL
  2425. // manually, specify SslManagementType.MANUAL on a CREATE or UPDATE
  2426. // request. You must be authorized to administer the
  2427. // AuthorizedCertificate resource to manually map it to a DomainMapping
  2428. // resource. Example: 12345.
  2429. CertificateId string `json:"certificateId,omitempty"`
  2430. // PendingManagedCertificateId: ID of the managed AuthorizedCertificate
  2431. // resource currently being provisioned, if applicable. Until the new
  2432. // managed certificate has been successfully provisioned, the previous
  2433. // SSL state will be preserved. Once the provisioning process completes,
  2434. // the certificate_id field will reflect the new managed certificate and
  2435. // this field will be left empty. To remove SSL support while there is
  2436. // still a pending managed certificate, clear the certificate_id field
  2437. // with an UpdateDomainMappingRequest.@OutputOnly
  2438. PendingManagedCertificateId string `json:"pendingManagedCertificateId,omitempty"`
  2439. // SslManagementType: SSL management type for this domain. If AUTOMATIC,
  2440. // a managed certificate is automatically provisioned. If MANUAL,
  2441. // certificate_id must be manually specified in order to configure SSL
  2442. // for this domain.
  2443. //
  2444. // Possible values:
  2445. // "SSL_MANAGEMENT_TYPE_UNSPECIFIED" - Defaults to AUTOMATIC.
  2446. // "AUTOMATIC" - SSL support for this domain is configured
  2447. // automatically. The mapped SSL certificate will be automatically
  2448. // renewed.
  2449. // "MANUAL" - SSL support for this domain is configured manually by
  2450. // the user. Either the domain has no SSL support or a user-obtained SSL
  2451. // certificate has been explictly mapped to this domain.
  2452. SslManagementType string `json:"sslManagementType,omitempty"`
  2453. // ForceSendFields is a list of field names (e.g. "CertificateId") to
  2454. // unconditionally include in API requests. By default, fields with
  2455. // empty values are omitted from API requests. However, any non-pointer,
  2456. // non-interface field appearing in ForceSendFields will be sent to the
  2457. // server regardless of whether the field is empty or not. This may be
  2458. // used to include empty fields in Patch requests.
  2459. ForceSendFields []string `json:"-"`
  2460. // NullFields is a list of field names (e.g. "CertificateId") to include
  2461. // in API requests with the JSON null value. By default, fields with
  2462. // empty values are omitted from API requests. However, any field with
  2463. // an empty value appearing in NullFields will be sent to the server as
  2464. // null. It is an error if a field in this list has a non-empty value.
  2465. // This may be used to include null fields in Patch requests.
  2466. NullFields []string `json:"-"`
  2467. }
  2468. func (s *SslSettings) MarshalJSON() ([]byte, error) {
  2469. type NoMethod SslSettings
  2470. raw := NoMethod(*s)
  2471. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2472. }
  2473. // StandardSchedulerSettings: Scheduler settings for standard
  2474. // environment.
  2475. type StandardSchedulerSettings struct {
  2476. // MaxInstances: Maximum number of instances to run for this version.
  2477. // Set to zero to disable max_instances configuration.
  2478. MaxInstances int64 `json:"maxInstances,omitempty"`
  2479. // MinInstances: Minimum number of instances to run for this version.
  2480. // Set to zero to disable min_instances configuration.
  2481. MinInstances int64 `json:"minInstances,omitempty"`
  2482. // TargetCpuUtilization: Target CPU utilization ratio to maintain when
  2483. // scaling.
  2484. TargetCpuUtilization float64 `json:"targetCpuUtilization,omitempty"`
  2485. // TargetThroughputUtilization: Target throughput utilization ratio to
  2486. // maintain when scaling
  2487. TargetThroughputUtilization float64 `json:"targetThroughputUtilization,omitempty"`
  2488. // ForceSendFields is a list of field names (e.g. "MaxInstances") to
  2489. // unconditionally include in API requests. By default, fields with
  2490. // empty values are omitted from API requests. However, any non-pointer,
  2491. // non-interface field appearing in ForceSendFields will be sent to the
  2492. // server regardless of whether the field is empty or not. This may be
  2493. // used to include empty fields in Patch requests.
  2494. ForceSendFields []string `json:"-"`
  2495. // NullFields is a list of field names (e.g. "MaxInstances") to include
  2496. // in API requests with the JSON null value. By default, fields with
  2497. // empty values are omitted from API requests. However, any field with
  2498. // an empty value appearing in NullFields will be sent to the server as
  2499. // null. It is an error if a field in this list has a non-empty value.
  2500. // This may be used to include null fields in Patch requests.
  2501. NullFields []string `json:"-"`
  2502. }
  2503. func (s *StandardSchedulerSettings) MarshalJSON() ([]byte, error) {
  2504. type NoMethod StandardSchedulerSettings
  2505. raw := NoMethod(*s)
  2506. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2507. }
  2508. func (s *StandardSchedulerSettings) UnmarshalJSON(data []byte) error {
  2509. type NoMethod StandardSchedulerSettings
  2510. var s1 struct {
  2511. TargetCpuUtilization gensupport.JSONFloat64 `json:"targetCpuUtilization"`
  2512. TargetThroughputUtilization gensupport.JSONFloat64 `json:"targetThroughputUtilization"`
  2513. *NoMethod
  2514. }
  2515. s1.NoMethod = (*NoMethod)(s)
  2516. if err := json.Unmarshal(data, &s1); err != nil {
  2517. return err
  2518. }
  2519. s.TargetCpuUtilization = float64(s1.TargetCpuUtilization)
  2520. s.TargetThroughputUtilization = float64(s1.TargetThroughputUtilization)
  2521. return nil
  2522. }
  2523. // StaticFilesHandler: Files served directly to the user for a given
  2524. // URL, such as images, CSS stylesheets, or JavaScript source files.
  2525. // Static file handlers describe which files in the application
  2526. // directory are static files, and which URLs serve them.
  2527. type StaticFilesHandler struct {
  2528. // ApplicationReadable: Whether files should also be uploaded as code
  2529. // data. By default, files declared in static file handlers are uploaded
  2530. // as static data and are only served to end users; they cannot be read
  2531. // by the application. If enabled, uploads are charged against both your
  2532. // code and static data storage resource quotas.
  2533. ApplicationReadable bool `json:"applicationReadable,omitempty"`
  2534. // Expiration: Time a static file served by this handler should be
  2535. // cached by web proxies and browsers.
  2536. Expiration string `json:"expiration,omitempty"`
  2537. // HttpHeaders: HTTP headers to use for all responses from these URLs.
  2538. HttpHeaders map[string]string `json:"httpHeaders,omitempty"`
  2539. // MimeType: MIME type used to serve all files served by this
  2540. // handler.Defaults to file-specific MIME types, which are derived from
  2541. // each file's filename extension.
  2542. MimeType string `json:"mimeType,omitempty"`
  2543. // Path: Path to the static files matched by the URL pattern, from the
  2544. // application root directory. The path can refer to text matched in
  2545. // groupings in the URL pattern.
  2546. Path string `json:"path,omitempty"`
  2547. // RequireMatchingFile: Whether this handler should match the request if
  2548. // the file referenced by the handler does not exist.
  2549. RequireMatchingFile bool `json:"requireMatchingFile,omitempty"`
  2550. // UploadPathRegex: Regular expression that matches the file paths for
  2551. // all files that should be referenced by this handler.
  2552. UploadPathRegex string `json:"uploadPathRegex,omitempty"`
  2553. // ForceSendFields is a list of field names (e.g. "ApplicationReadable")
  2554. // to unconditionally include in API requests. By default, fields with
  2555. // empty values are omitted from API requests. However, any non-pointer,
  2556. // non-interface field appearing in ForceSendFields will be sent to the
  2557. // server regardless of whether the field is empty or not. This may be
  2558. // used to include empty fields in Patch requests.
  2559. ForceSendFields []string `json:"-"`
  2560. // NullFields is a list of field names (e.g. "ApplicationReadable") to
  2561. // include in API requests with the JSON null value. By default, fields
  2562. // with empty values are omitted from API requests. However, any field
  2563. // with an empty value appearing in NullFields will be sent to the
  2564. // server as null. It is an error if a field in this list has a
  2565. // non-empty value. This may be used to include null fields in Patch
  2566. // requests.
  2567. NullFields []string `json:"-"`
  2568. }
  2569. func (s *StaticFilesHandler) MarshalJSON() ([]byte, error) {
  2570. type NoMethod StaticFilesHandler
  2571. raw := NoMethod(*s)
  2572. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2573. }
  2574. // Status: The Status type defines a logical error model that is
  2575. // suitable for different programming environments, including REST APIs
  2576. // and RPC APIs. It is used by gRPC (https://github.com/grpc). The error
  2577. // model is designed to be:
  2578. // Simple to use and understand for most users
  2579. // Flexible enough to meet unexpected needsOverviewThe Status message
  2580. // contains three pieces of data: error code, error message, and error
  2581. // details. The error code should be an enum value of google.rpc.Code,
  2582. // but it may accept additional error codes if needed. The error message
  2583. // should be a developer-facing English message that helps developers
  2584. // understand and resolve the error. If a localized user-facing error
  2585. // message is needed, put the localized message in the error details or
  2586. // localize it in the client. The optional error details may contain
  2587. // arbitrary information about the error. There is a predefined set of
  2588. // error detail types in the package google.rpc that can be used for
  2589. // common error conditions.Language mappingThe Status message is the
  2590. // logical representation of the error model, but it is not necessarily
  2591. // the actual wire format. When the Status message is exposed in
  2592. // different client libraries and different wire protocols, it can be
  2593. // mapped differently. For example, it will likely be mapped to some
  2594. // exceptions in Java, but more likely mapped to some error codes in
  2595. // C.Other usesThe error model and the Status message can be used in a
  2596. // variety of environments, either with or without APIs, to provide a
  2597. // consistent developer experience across different environments.Example
  2598. // uses of this error model include:
  2599. // Partial errors. If a service needs to return partial errors to the
  2600. // client, it may embed the Status in the normal response to indicate
  2601. // the partial errors.
  2602. // Workflow errors. A typical workflow has multiple steps. Each step may
  2603. // have a Status message for error reporting.
  2604. // Batch operations. If a client uses batch request and batch response,
  2605. // the Status message should be used directly inside batch response, one
  2606. // for each error sub-response.
  2607. // Asynchronous operations. If an API call embeds asynchronous operation
  2608. // results in its response, the status of those operations should be
  2609. // represented directly using the Status message.
  2610. // Logging. If some API errors are stored in logs, the message Status
  2611. // could be used directly after any stripping needed for
  2612. // security/privacy reasons.
  2613. type Status struct {
  2614. // Code: The status code, which should be an enum value of
  2615. // google.rpc.Code.
  2616. Code int64 `json:"code,omitempty"`
  2617. // Details: A list of messages that carry the error details. There is a
  2618. // common set of message types for APIs to use.
  2619. Details []googleapi.RawMessage `json:"details,omitempty"`
  2620. // Message: A developer-facing error message, which should be in
  2621. // English. Any user-facing error message should be localized and sent
  2622. // in the google.rpc.Status.details field, or localized by the client.
  2623. Message string `json:"message,omitempty"`
  2624. // ForceSendFields is a list of field names (e.g. "Code") to
  2625. // unconditionally include in API requests. By default, fields with
  2626. // empty values are omitted from API requests. However, any non-pointer,
  2627. // non-interface field appearing in ForceSendFields will be sent to the
  2628. // server regardless of whether the field is empty or not. This may be
  2629. // used to include empty fields in Patch requests.
  2630. ForceSendFields []string `json:"-"`
  2631. // NullFields is a list of field names (e.g. "Code") to include in API
  2632. // requests with the JSON null value. By default, fields with empty
  2633. // values are omitted from API requests. However, any field with an
  2634. // empty value appearing in NullFields will be sent to the server as
  2635. // null. It is an error if a field in this list has a non-empty value.
  2636. // This may be used to include null fields in Patch requests.
  2637. NullFields []string `json:"-"`
  2638. }
  2639. func (s *Status) MarshalJSON() ([]byte, error) {
  2640. type NoMethod Status
  2641. raw := NoMethod(*s)
  2642. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2643. }
  2644. // TrafficSplit: Traffic routing configuration for versions within a
  2645. // single service. Traffic splits define how traffic directed to the
  2646. // service is assigned to versions.
  2647. type TrafficSplit struct {
  2648. // Allocations: Mapping from version IDs within the service to
  2649. // fractional (0.000, 1] allocations of traffic for that version. Each
  2650. // version can be specified only once, but some versions in the service
  2651. // may not have any traffic allocation. Services that have traffic
  2652. // allocated cannot be deleted until either the service is deleted or
  2653. // their traffic allocation is removed. Allocations must sum to 1. Up to
  2654. // two decimal place precision is supported for IP-based splits and up
  2655. // to three decimal places is supported for cookie-based splits.
  2656. Allocations map[string]float64 `json:"allocations,omitempty"`
  2657. // ShardBy: Mechanism used to determine which version a request is sent
  2658. // to. The traffic selection algorithm will be stable for either type
  2659. // until allocations are changed.
  2660. //
  2661. // Possible values:
  2662. // "UNSPECIFIED" - Diversion method unspecified.
  2663. // "COOKIE" - Diversion based on a specially named cookie,
  2664. // "GOOGAPPUID." The cookie must be set by the application itself or no
  2665. // diversion will occur.
  2666. // "IP" - Diversion based on applying the modulus operation to a
  2667. // fingerprint of the IP address.
  2668. // "RANDOM" - Diversion based on weighted random assignment. An
  2669. // incoming request is randomly routed to a version in the traffic
  2670. // split, with probability proportional to the version's traffic share.
  2671. ShardBy string `json:"shardBy,omitempty"`
  2672. // ForceSendFields is a list of field names (e.g. "Allocations") to
  2673. // unconditionally include in API requests. By default, fields with
  2674. // empty values are omitted from API requests. However, any non-pointer,
  2675. // non-interface field appearing in ForceSendFields will be sent to the
  2676. // server regardless of whether the field is empty or not. This may be
  2677. // used to include empty fields in Patch requests.
  2678. ForceSendFields []string `json:"-"`
  2679. // NullFields is a list of field names (e.g. "Allocations") to include
  2680. // in API requests with the JSON null value. By default, fields with
  2681. // empty values are omitted from API requests. However, any field with
  2682. // an empty value appearing in NullFields will be sent to the server as
  2683. // null. It is an error if a field in this list has a non-empty value.
  2684. // This may be used to include null fields in Patch requests.
  2685. NullFields []string `json:"-"`
  2686. }
  2687. func (s *TrafficSplit) MarshalJSON() ([]byte, error) {
  2688. type NoMethod TrafficSplit
  2689. raw := NoMethod(*s)
  2690. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2691. }
  2692. // UrlDispatchRule: Rules to match an HTTP request and dispatch that
  2693. // request to a service.
  2694. type UrlDispatchRule struct {
  2695. // Domain: Domain name to match against. The wildcard "*" is supported
  2696. // if specified before a period: "*.".Defaults to matching all domains:
  2697. // "*".
  2698. Domain string `json:"domain,omitempty"`
  2699. // Path: Pathname within the host. Must start with a "/". A single "*"
  2700. // can be included at the end of the path.The sum of the lengths of the
  2701. // domain and path may not exceed 100 characters.
  2702. Path string `json:"path,omitempty"`
  2703. // Service: Resource ID of a service in this application that should
  2704. // serve the matched request. The service must already exist. Example:
  2705. // default.
  2706. Service string `json:"service,omitempty"`
  2707. // ForceSendFields is a list of field names (e.g. "Domain") to
  2708. // unconditionally include in API requests. By default, fields with
  2709. // empty values are omitted from API requests. However, any non-pointer,
  2710. // non-interface field appearing in ForceSendFields will be sent to the
  2711. // server regardless of whether the field is empty or not. This may be
  2712. // used to include empty fields in Patch requests.
  2713. ForceSendFields []string `json:"-"`
  2714. // NullFields is a list of field names (e.g. "Domain") to include in API
  2715. // requests with the JSON null value. By default, fields with empty
  2716. // values are omitted from API requests. However, any field with an
  2717. // empty value appearing in NullFields will be sent to the server as
  2718. // null. It is an error if a field in this list has a non-empty value.
  2719. // This may be used to include null fields in Patch requests.
  2720. NullFields []string `json:"-"`
  2721. }
  2722. func (s *UrlDispatchRule) MarshalJSON() ([]byte, error) {
  2723. type NoMethod UrlDispatchRule
  2724. raw := NoMethod(*s)
  2725. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2726. }
  2727. // UrlMap: URL pattern and description of how the URL should be handled.
  2728. // App Engine can handle URLs by executing application code or by
  2729. // serving static files uploaded with the version, such as images, CSS,
  2730. // or JavaScript.
  2731. type UrlMap struct {
  2732. // ApiEndpoint: Uses API Endpoints to handle requests.
  2733. ApiEndpoint *ApiEndpointHandler `json:"apiEndpoint,omitempty"`
  2734. // AuthFailAction: Action to take when users access resources that
  2735. // require authentication. Defaults to redirect.
  2736. //
  2737. // Possible values:
  2738. // "AUTH_FAIL_ACTION_UNSPECIFIED" - Not specified.
  2739. // AUTH_FAIL_ACTION_REDIRECT is assumed.
  2740. // "AUTH_FAIL_ACTION_REDIRECT" - Redirects user to
  2741. // "accounts.google.com". The user is redirected back to the application
  2742. // URL after signing in or creating an account.
  2743. // "AUTH_FAIL_ACTION_UNAUTHORIZED" - Rejects request with a 401 HTTP
  2744. // status code and an error message.
  2745. AuthFailAction string `json:"authFailAction,omitempty"`
  2746. // Login: Level of login required to access this resource.
  2747. //
  2748. // Possible values:
  2749. // "LOGIN_UNSPECIFIED" - Not specified. LOGIN_OPTIONAL is assumed.
  2750. // "LOGIN_OPTIONAL" - Does not require that the user is signed in.
  2751. // "LOGIN_ADMIN" - If the user is not signed in, the auth_fail_action
  2752. // is taken. In addition, if the user is not an administrator for the
  2753. // application, they are given an error message regardless of
  2754. // auth_fail_action. If the user is an administrator, the handler
  2755. // proceeds.
  2756. // "LOGIN_REQUIRED" - If the user has signed in, the handler proceeds
  2757. // normally. Otherwise, the auth_fail_action is taken.
  2758. Login string `json:"login,omitempty"`
  2759. // RedirectHttpResponseCode: 30x code to use when performing redirects
  2760. // for the secure field. Defaults to 302.
  2761. //
  2762. // Possible values:
  2763. // "REDIRECT_HTTP_RESPONSE_CODE_UNSPECIFIED" - Not specified. 302 is
  2764. // assumed.
  2765. // "REDIRECT_HTTP_RESPONSE_CODE_301" - 301 Moved Permanently code.
  2766. // "REDIRECT_HTTP_RESPONSE_CODE_302" - 302 Moved Temporarily code.
  2767. // "REDIRECT_HTTP_RESPONSE_CODE_303" - 303 See Other code.
  2768. // "REDIRECT_HTTP_RESPONSE_CODE_307" - 307 Temporary Redirect code.
  2769. RedirectHttpResponseCode string `json:"redirectHttpResponseCode,omitempty"`
  2770. // Script: Executes a script to handle the request that matches this URL
  2771. // pattern.
  2772. Script *ScriptHandler `json:"script,omitempty"`
  2773. // SecurityLevel: Security (HTTPS) enforcement for this URL.
  2774. //
  2775. // Possible values:
  2776. // "SECURE_UNSPECIFIED" - Not specified.
  2777. // "SECURE_DEFAULT" - Both HTTP and HTTPS requests with URLs that
  2778. // match the handler succeed without redirects. The application can
  2779. // examine the request to determine which protocol was used, and respond
  2780. // accordingly.
  2781. // "SECURE_NEVER" - Requests for a URL that match this handler that
  2782. // use HTTPS are automatically redirected to the HTTP equivalent URL.
  2783. // "SECURE_OPTIONAL" - Both HTTP and HTTPS requests with URLs that
  2784. // match the handler succeed without redirects. The application can
  2785. // examine the request to determine which protocol was used and respond
  2786. // accordingly.
  2787. // "SECURE_ALWAYS" - Requests for a URL that match this handler that
  2788. // do not use HTTPS are automatically redirected to the HTTPS URL with
  2789. // the same path. Query parameters are reserved for the redirect.
  2790. SecurityLevel string `json:"securityLevel,omitempty"`
  2791. // StaticFiles: Returns the contents of a file, such as an image, as the
  2792. // response.
  2793. StaticFiles *StaticFilesHandler `json:"staticFiles,omitempty"`
  2794. // UrlRegex: URL prefix. Uses regular expression syntax, which means
  2795. // regexp special characters must be escaped, but should not contain
  2796. // groupings. All URLs that begin with this prefix are handled by this
  2797. // handler, using the portion of the URL after the prefix as part of the
  2798. // file path.
  2799. UrlRegex string `json:"urlRegex,omitempty"`
  2800. // ForceSendFields is a list of field names (e.g. "ApiEndpoint") to
  2801. // unconditionally include in API requests. By default, fields with
  2802. // empty values are omitted from API requests. However, any non-pointer,
  2803. // non-interface field appearing in ForceSendFields will be sent to the
  2804. // server regardless of whether the field is empty or not. This may be
  2805. // used to include empty fields in Patch requests.
  2806. ForceSendFields []string `json:"-"`
  2807. // NullFields is a list of field names (e.g. "ApiEndpoint") to include
  2808. // in API requests with the JSON null value. By default, fields with
  2809. // empty values are omitted from API requests. However, any field with
  2810. // an empty value appearing in NullFields will be sent to the server as
  2811. // null. It is an error if a field in this list has a non-empty value.
  2812. // This may be used to include null fields in Patch requests.
  2813. NullFields []string `json:"-"`
  2814. }
  2815. func (s *UrlMap) MarshalJSON() ([]byte, error) {
  2816. type NoMethod UrlMap
  2817. raw := NoMethod(*s)
  2818. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2819. }
  2820. // Version: A Version resource is a specific set of source code and
  2821. // configuration files that are deployed into a service.
  2822. type Version struct {
  2823. // ApiConfig: Serving configuration for Google Cloud Endpoints
  2824. // (https://cloud.google.com/appengine/docs/python/endpoints/).Only
  2825. // returned in GET requests if view=FULL is set.
  2826. ApiConfig *ApiConfigHandler `json:"apiConfig,omitempty"`
  2827. // AutomaticScaling: Automatic scaling is based on request rate,
  2828. // response latencies, and other application metrics.
  2829. AutomaticScaling *AutomaticScaling `json:"automaticScaling,omitempty"`
  2830. // BasicScaling: A service with basic scaling will create an instance
  2831. // when the application receives a request. The instance will be turned
  2832. // down when the app becomes idle. Basic scaling is ideal for work that
  2833. // is intermittent or driven by user activity.
  2834. BasicScaling *BasicScaling `json:"basicScaling,omitempty"`
  2835. // BetaSettings: Metadata settings that are supplied to this version to
  2836. // enable beta runtime features.
  2837. BetaSettings map[string]string `json:"betaSettings,omitempty"`
  2838. // CreateTime: Time that this version was created.@OutputOnly
  2839. CreateTime string `json:"createTime,omitempty"`
  2840. // CreatedBy: Email address of the user who created this
  2841. // version.@OutputOnly
  2842. CreatedBy string `json:"createdBy,omitempty"`
  2843. // DefaultExpiration: Duration that static files should be cached by web
  2844. // proxies and browsers. Only applicable if the corresponding
  2845. // StaticFilesHandler
  2846. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/a
  2847. // pps.services.versions#staticfileshandler) does not specify its own
  2848. // expiration time.Only returned in GET requests if view=FULL is set.
  2849. DefaultExpiration string `json:"defaultExpiration,omitempty"`
  2850. // Deployment: Code and application artifacts that make up this
  2851. // version.Only returned in GET requests if view=FULL is set.
  2852. Deployment *Deployment `json:"deployment,omitempty"`
  2853. // DiskUsageBytes: Total size in bytes of all the files that are
  2854. // included in this version and currently hosted on the App Engine
  2855. // disk.@OutputOnly
  2856. DiskUsageBytes int64 `json:"diskUsageBytes,omitempty,string"`
  2857. // EndpointsApiService: Cloud Endpoints configuration.If
  2858. // endpoints_api_service is set, the Cloud Endpoints Extensible Service
  2859. // Proxy will be provided to serve the API implemented by the app.
  2860. EndpointsApiService *EndpointsApiService `json:"endpointsApiService,omitempty"`
  2861. // Env: App Engine execution environment for this version.Defaults to
  2862. // standard.
  2863. Env string `json:"env,omitempty"`
  2864. // EnvVariables: Environment variables available to the application.Only
  2865. // returned in GET requests if view=FULL is set.
  2866. EnvVariables map[string]string `json:"envVariables,omitempty"`
  2867. // ErrorHandlers: Custom static error pages. Limited to 10KB per
  2868. // page.Only returned in GET requests if view=FULL is set.
  2869. ErrorHandlers []*ErrorHandler `json:"errorHandlers,omitempty"`
  2870. // Handlers: An ordered list of URL-matching patterns that should be
  2871. // applied to incoming requests. The first matching URL handles the
  2872. // request and other request handlers are not attempted.Only returned in
  2873. // GET requests if view=FULL is set.
  2874. Handlers []*UrlMap `json:"handlers,omitempty"`
  2875. // HealthCheck: Configures health checking for instances. Unhealthy
  2876. // instances are stopped and replaced with new instances. Only
  2877. // applicable in the App Engine flexible environment.Only returned in
  2878. // GET requests if view=FULL is set.
  2879. HealthCheck *HealthCheck `json:"healthCheck,omitempty"`
  2880. // Id: Relative name of the version within the service. Example: v1.
  2881. // Version names can contain only lowercase letters, numbers, or
  2882. // hyphens. Reserved names: "default", "latest", and any name with the
  2883. // prefix "ah-".
  2884. Id string `json:"id,omitempty"`
  2885. // InboundServices: Before an application can receive email or XMPP
  2886. // messages, the application must be configured to enable the service.
  2887. //
  2888. // Possible values:
  2889. // "INBOUND_SERVICE_UNSPECIFIED" - Not specified.
  2890. // "INBOUND_SERVICE_MAIL" - Allows an application to receive mail.
  2891. // "INBOUND_SERVICE_MAIL_BOUNCE" - Allows an application to receive
  2892. // email-bound notifications.
  2893. // "INBOUND_SERVICE_XMPP_ERROR" - Allows an application to receive
  2894. // error stanzas.
  2895. // "INBOUND_SERVICE_XMPP_MESSAGE" - Allows an application to receive
  2896. // instant messages.
  2897. // "INBOUND_SERVICE_XMPP_SUBSCRIBE" - Allows an application to receive
  2898. // user subscription POSTs.
  2899. // "INBOUND_SERVICE_XMPP_PRESENCE" - Allows an application to receive
  2900. // a user's chat presence.
  2901. // "INBOUND_SERVICE_CHANNEL_PRESENCE" - Registers an application for
  2902. // notifications when a client connects or disconnects from a channel.
  2903. // "INBOUND_SERVICE_WARMUP" - Enables warmup requests.
  2904. InboundServices []string `json:"inboundServices,omitempty"`
  2905. // InstanceClass: Instance class that is used to run this version. Valid
  2906. // values are:
  2907. // AutomaticScaling: F1, F2, F4, F4_1G
  2908. // ManualScaling or BasicScaling: B1, B2, B4, B8, B4_1GDefaults to F1
  2909. // for AutomaticScaling and B1 for ManualScaling or BasicScaling.
  2910. InstanceClass string `json:"instanceClass,omitempty"`
  2911. // Libraries: Configuration for third-party Python runtime libraries
  2912. // that are required by the application.Only returned in GET requests if
  2913. // view=FULL is set.
  2914. Libraries []*Library `json:"libraries,omitempty"`
  2915. // LivenessCheck: Configures liveness health checking for instances.
  2916. // Unhealthy instances are stopped and replaced with new instancesOnly
  2917. // returned in GET requests if view=FULL is set.
  2918. LivenessCheck *LivenessCheck `json:"livenessCheck,omitempty"`
  2919. // ManualScaling: A service with manual scaling runs continuously,
  2920. // allowing you to perform complex initialization and rely on the state
  2921. // of its memory over time.
  2922. ManualScaling *ManualScaling `json:"manualScaling,omitempty"`
  2923. // Name: Full path to the Version resource in the API. Example:
  2924. // apps/myapp/services/default/versions/v1.@OutputOnly
  2925. Name string `json:"name,omitempty"`
  2926. // Network: Extra network settings. Only applicable in the App Engine
  2927. // flexible environment.
  2928. Network *Network `json:"network,omitempty"`
  2929. // NobuildFilesRegex: Files that match this pattern will not be built
  2930. // into this version. Only applicable for Go runtimes.Only returned in
  2931. // GET requests if view=FULL is set.
  2932. NobuildFilesRegex string `json:"nobuildFilesRegex,omitempty"`
  2933. // ReadinessCheck: Configures readiness health checking for instances.
  2934. // Unhealthy instances are not put into the backend traffic
  2935. // rotation.Only returned in GET requests if view=FULL is set.
  2936. ReadinessCheck *ReadinessCheck `json:"readinessCheck,omitempty"`
  2937. // Resources: Machine resources for this version. Only applicable in the
  2938. // App Engine flexible environment.
  2939. Resources *Resources `json:"resources,omitempty"`
  2940. // Runtime: Desired runtime. Example: python27.
  2941. Runtime string `json:"runtime,omitempty"`
  2942. // RuntimeApiVersion: The version of the API in the given runtime
  2943. // environment. Please see the app.yaml reference for valid values at
  2944. // https://cloud.google.com/appengine/docs/standard/<language>/config/appref
  2945. RuntimeApiVersion string `json:"runtimeApiVersion,omitempty"`
  2946. // RuntimeChannel: The channel of the runtime to use. Only available for
  2947. // some runtimes. Defaults to the default channel.
  2948. RuntimeChannel string `json:"runtimeChannel,omitempty"`
  2949. // ServingStatus: Current serving status of this version. Only the
  2950. // versions with a SERVING status create instances and can be
  2951. // billed.SERVING_STATUS_UNSPECIFIED is an invalid value. Defaults to
  2952. // SERVING.
  2953. //
  2954. // Possible values:
  2955. // "SERVING_STATUS_UNSPECIFIED" - Not specified.
  2956. // "SERVING" - Currently serving. Instances are created according to
  2957. // the scaling settings of the version.
  2958. // "STOPPED" - Disabled. No instances will be created and the scaling
  2959. // settings are ignored until the state of the version changes to
  2960. // SERVING.
  2961. ServingStatus string `json:"servingStatus,omitempty"`
  2962. // Threadsafe: Whether multiple requests can be dispatched to this
  2963. // version at once.
  2964. Threadsafe bool `json:"threadsafe,omitempty"`
  2965. // VersionUrl: Serving URL for this version. Example:
  2966. // "https://myversion-dot-myservice-dot-myapp.appspot.com"@OutputOnly
  2967. VersionUrl string `json:"versionUrl,omitempty"`
  2968. // Vm: Whether to deploy this version in a container on a virtual
  2969. // machine.
  2970. Vm bool `json:"vm,omitempty"`
  2971. // Zones: The Google Compute Engine zones that are supported by this
  2972. // version in the App Engine flexible environment.
  2973. Zones []string `json:"zones,omitempty"`
  2974. // ServerResponse contains the HTTP response code and headers from the
  2975. // server.
  2976. googleapi.ServerResponse `json:"-"`
  2977. // ForceSendFields is a list of field names (e.g. "ApiConfig") to
  2978. // unconditionally include in API requests. By default, fields with
  2979. // empty values are omitted from API requests. However, any non-pointer,
  2980. // non-interface field appearing in ForceSendFields will be sent to the
  2981. // server regardless of whether the field is empty or not. This may be
  2982. // used to include empty fields in Patch requests.
  2983. ForceSendFields []string `json:"-"`
  2984. // NullFields is a list of field names (e.g. "ApiConfig") to include in
  2985. // API requests with the JSON null value. By default, fields with empty
  2986. // values are omitted from API requests. However, any field with an
  2987. // empty value appearing in NullFields will be sent to the server as
  2988. // null. It is an error if a field in this list has a non-empty value.
  2989. // This may be used to include null fields in Patch requests.
  2990. NullFields []string `json:"-"`
  2991. }
  2992. func (s *Version) MarshalJSON() ([]byte, error) {
  2993. type NoMethod Version
  2994. raw := NoMethod(*s)
  2995. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2996. }
  2997. // Volume: Volumes mounted within the app container. Only applicable in
  2998. // the App Engine flexible environment.
  2999. type Volume struct {
  3000. // Name: Unique name for the volume.
  3001. Name string `json:"name,omitempty"`
  3002. // SizeGb: Volume size in gigabytes.
  3003. SizeGb float64 `json:"sizeGb,omitempty"`
  3004. // VolumeType: Underlying volume type, e.g. 'tmpfs'.
  3005. VolumeType string `json:"volumeType,omitempty"`
  3006. // ForceSendFields is a list of field names (e.g. "Name") to
  3007. // unconditionally include in API requests. By default, fields with
  3008. // empty values are omitted from API requests. However, any non-pointer,
  3009. // non-interface field appearing in ForceSendFields will be sent to the
  3010. // server regardless of whether the field is empty or not. This may be
  3011. // used to include empty fields in Patch requests.
  3012. ForceSendFields []string `json:"-"`
  3013. // NullFields is a list of field names (e.g. "Name") to include in API
  3014. // requests with the JSON null value. By default, fields with empty
  3015. // values are omitted from API requests. However, any field with an
  3016. // empty value appearing in NullFields will be sent to the server as
  3017. // null. It is an error if a field in this list has a non-empty value.
  3018. // This may be used to include null fields in Patch requests.
  3019. NullFields []string `json:"-"`
  3020. }
  3021. func (s *Volume) MarshalJSON() ([]byte, error) {
  3022. type NoMethod Volume
  3023. raw := NoMethod(*s)
  3024. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3025. }
  3026. func (s *Volume) UnmarshalJSON(data []byte) error {
  3027. type NoMethod Volume
  3028. var s1 struct {
  3029. SizeGb gensupport.JSONFloat64 `json:"sizeGb"`
  3030. *NoMethod
  3031. }
  3032. s1.NoMethod = (*NoMethod)(s)
  3033. if err := json.Unmarshal(data, &s1); err != nil {
  3034. return err
  3035. }
  3036. s.SizeGb = float64(s1.SizeGb)
  3037. return nil
  3038. }
  3039. // ZipInfo: The zip file information for a zip deployment.
  3040. type ZipInfo struct {
  3041. // FilesCount: An estimate of the number of files in a zip for a zip
  3042. // deployment. If set, must be greater than or equal to the actual
  3043. // number of files. Used for optimizing performance; if not provided,
  3044. // deployment may be slow.
  3045. FilesCount int64 `json:"filesCount,omitempty"`
  3046. // SourceUrl: URL of the zip file to deploy from. Must be a URL to a
  3047. // resource in Google Cloud Storage in the form
  3048. // 'http(s)://storage.googleapis.com/<bucket>/<object>'.
  3049. SourceUrl string `json:"sourceUrl,omitempty"`
  3050. // ForceSendFields is a list of field names (e.g. "FilesCount") to
  3051. // unconditionally include in API requests. By default, fields with
  3052. // empty values are omitted from API requests. However, any non-pointer,
  3053. // non-interface field appearing in ForceSendFields will be sent to the
  3054. // server regardless of whether the field is empty or not. This may be
  3055. // used to include empty fields in Patch requests.
  3056. ForceSendFields []string `json:"-"`
  3057. // NullFields is a list of field names (e.g. "FilesCount") to include in
  3058. // API requests with the JSON null value. By default, fields with empty
  3059. // values are omitted from API requests. However, any field with an
  3060. // empty value appearing in NullFields will be sent to the server as
  3061. // null. It is an error if a field in this list has a non-empty value.
  3062. // This may be used to include null fields in Patch requests.
  3063. NullFields []string `json:"-"`
  3064. }
  3065. func (s *ZipInfo) MarshalJSON() ([]byte, error) {
  3066. type NoMethod ZipInfo
  3067. raw := NoMethod(*s)
  3068. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3069. }
  3070. // method id "appengine.apps.create":
  3071. type AppsCreateCall struct {
  3072. s *APIService
  3073. application *Application
  3074. urlParams_ gensupport.URLParams
  3075. ctx_ context.Context
  3076. header_ http.Header
  3077. }
  3078. // Create: Creates an App Engine application for a Google Cloud Platform
  3079. // project. Required fields:
  3080. // id - The ID of the target Cloud Platform project.
  3081. // location - The region
  3082. // (https://cloud.google.com/appengine/docs/locations) where you want
  3083. // the App Engine application located.For more information about App
  3084. // Engine applications, see Managing Projects, Applications, and Billing
  3085. // (https://cloud.google.com/appengine/docs/standard/python/console/).
  3086. func (r *AppsService) Create(application *Application) *AppsCreateCall {
  3087. c := &AppsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3088. c.application = application
  3089. return c
  3090. }
  3091. // Fields allows partial responses to be retrieved. See
  3092. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3093. // for more information.
  3094. func (c *AppsCreateCall) Fields(s ...googleapi.Field) *AppsCreateCall {
  3095. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3096. return c
  3097. }
  3098. // Context sets the context to be used in this call's Do method. Any
  3099. // pending HTTP request will be aborted if the provided context is
  3100. // canceled.
  3101. func (c *AppsCreateCall) Context(ctx context.Context) *AppsCreateCall {
  3102. c.ctx_ = ctx
  3103. return c
  3104. }
  3105. // Header returns an http.Header that can be modified by the caller to
  3106. // add HTTP headers to the request.
  3107. func (c *AppsCreateCall) Header() http.Header {
  3108. if c.header_ == nil {
  3109. c.header_ = make(http.Header)
  3110. }
  3111. return c.header_
  3112. }
  3113. func (c *AppsCreateCall) doRequest(alt string) (*http.Response, error) {
  3114. reqHeaders := make(http.Header)
  3115. for k, v := range c.header_ {
  3116. reqHeaders[k] = v
  3117. }
  3118. reqHeaders.Set("User-Agent", c.s.userAgent())
  3119. var body io.Reader = nil
  3120. body, err := googleapi.WithoutDataWrapper.JSONReader(c.application)
  3121. if err != nil {
  3122. return nil, err
  3123. }
  3124. reqHeaders.Set("Content-Type", "application/json")
  3125. c.urlParams_.Set("alt", alt)
  3126. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps")
  3127. urls += "?" + c.urlParams_.Encode()
  3128. req, _ := http.NewRequest("POST", urls, body)
  3129. req.Header = reqHeaders
  3130. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3131. }
  3132. // Do executes the "appengine.apps.create" call.
  3133. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  3134. // status code is an error. Response headers are in either
  3135. // *Operation.ServerResponse.Header or (if a response was returned at
  3136. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  3137. // to check whether the returned error was because
  3138. // http.StatusNotModified was returned.
  3139. func (c *AppsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3140. gensupport.SetOptions(c.urlParams_, opts...)
  3141. res, err := c.doRequest("json")
  3142. if res != nil && res.StatusCode == http.StatusNotModified {
  3143. if res.Body != nil {
  3144. res.Body.Close()
  3145. }
  3146. return nil, &googleapi.Error{
  3147. Code: res.StatusCode,
  3148. Header: res.Header,
  3149. }
  3150. }
  3151. if err != nil {
  3152. return nil, err
  3153. }
  3154. defer googleapi.CloseBody(res)
  3155. if err := googleapi.CheckResponse(res); err != nil {
  3156. return nil, err
  3157. }
  3158. ret := &Operation{
  3159. ServerResponse: googleapi.ServerResponse{
  3160. Header: res.Header,
  3161. HTTPStatusCode: res.StatusCode,
  3162. },
  3163. }
  3164. target := &ret
  3165. if err := gensupport.DecodeResponse(target, res); err != nil {
  3166. return nil, err
  3167. }
  3168. return ret, nil
  3169. // {
  3170. // "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/).",
  3171. // "flatPath": "v1/apps",
  3172. // "httpMethod": "POST",
  3173. // "id": "appengine.apps.create",
  3174. // "parameterOrder": [],
  3175. // "parameters": {},
  3176. // "path": "v1/apps",
  3177. // "request": {
  3178. // "$ref": "Application"
  3179. // },
  3180. // "response": {
  3181. // "$ref": "Operation"
  3182. // },
  3183. // "scopes": [
  3184. // "https://www.googleapis.com/auth/cloud-platform"
  3185. // ]
  3186. // }
  3187. }
  3188. // method id "appengine.apps.get":
  3189. type AppsGetCall struct {
  3190. s *APIService
  3191. appsId string
  3192. urlParams_ gensupport.URLParams
  3193. ifNoneMatch_ string
  3194. ctx_ context.Context
  3195. header_ http.Header
  3196. }
  3197. // Get: Gets information about an application.
  3198. func (r *AppsService) Get(appsId string) *AppsGetCall {
  3199. c := &AppsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3200. c.appsId = appsId
  3201. return c
  3202. }
  3203. // Fields allows partial responses to be retrieved. See
  3204. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3205. // for more information.
  3206. func (c *AppsGetCall) Fields(s ...googleapi.Field) *AppsGetCall {
  3207. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3208. return c
  3209. }
  3210. // IfNoneMatch sets the optional parameter which makes the operation
  3211. // fail if the object's ETag matches the given value. This is useful for
  3212. // getting updates only after the object has changed since the last
  3213. // request. Use googleapi.IsNotModified to check whether the response
  3214. // error from Do is the result of In-None-Match.
  3215. func (c *AppsGetCall) IfNoneMatch(entityTag string) *AppsGetCall {
  3216. c.ifNoneMatch_ = entityTag
  3217. return c
  3218. }
  3219. // Context sets the context to be used in this call's Do method. Any
  3220. // pending HTTP request will be aborted if the provided context is
  3221. // canceled.
  3222. func (c *AppsGetCall) Context(ctx context.Context) *AppsGetCall {
  3223. c.ctx_ = ctx
  3224. return c
  3225. }
  3226. // Header returns an http.Header that can be modified by the caller to
  3227. // add HTTP headers to the request.
  3228. func (c *AppsGetCall) Header() http.Header {
  3229. if c.header_ == nil {
  3230. c.header_ = make(http.Header)
  3231. }
  3232. return c.header_
  3233. }
  3234. func (c *AppsGetCall) doRequest(alt string) (*http.Response, error) {
  3235. reqHeaders := make(http.Header)
  3236. for k, v := range c.header_ {
  3237. reqHeaders[k] = v
  3238. }
  3239. reqHeaders.Set("User-Agent", c.s.userAgent())
  3240. if c.ifNoneMatch_ != "" {
  3241. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3242. }
  3243. var body io.Reader = nil
  3244. c.urlParams_.Set("alt", alt)
  3245. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}")
  3246. urls += "?" + c.urlParams_.Encode()
  3247. req, _ := http.NewRequest("GET", urls, body)
  3248. req.Header = reqHeaders
  3249. googleapi.Expand(req.URL, map[string]string{
  3250. "appsId": c.appsId,
  3251. })
  3252. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3253. }
  3254. // Do executes the "appengine.apps.get" call.
  3255. // Exactly one of *Application or error will be non-nil. Any non-2xx
  3256. // status code is an error. Response headers are in either
  3257. // *Application.ServerResponse.Header or (if a response was returned at
  3258. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  3259. // to check whether the returned error was because
  3260. // http.StatusNotModified was returned.
  3261. func (c *AppsGetCall) Do(opts ...googleapi.CallOption) (*Application, error) {
  3262. gensupport.SetOptions(c.urlParams_, opts...)
  3263. res, err := c.doRequest("json")
  3264. if res != nil && res.StatusCode == http.StatusNotModified {
  3265. if res.Body != nil {
  3266. res.Body.Close()
  3267. }
  3268. return nil, &googleapi.Error{
  3269. Code: res.StatusCode,
  3270. Header: res.Header,
  3271. }
  3272. }
  3273. if err != nil {
  3274. return nil, err
  3275. }
  3276. defer googleapi.CloseBody(res)
  3277. if err := googleapi.CheckResponse(res); err != nil {
  3278. return nil, err
  3279. }
  3280. ret := &Application{
  3281. ServerResponse: googleapi.ServerResponse{
  3282. Header: res.Header,
  3283. HTTPStatusCode: res.StatusCode,
  3284. },
  3285. }
  3286. target := &ret
  3287. if err := gensupport.DecodeResponse(target, res); err != nil {
  3288. return nil, err
  3289. }
  3290. return ret, nil
  3291. // {
  3292. // "description": "Gets information about an application.",
  3293. // "flatPath": "v1/apps/{appsId}",
  3294. // "httpMethod": "GET",
  3295. // "id": "appengine.apps.get",
  3296. // "parameterOrder": [
  3297. // "appsId"
  3298. // ],
  3299. // "parameters": {
  3300. // "appsId": {
  3301. // "description": "Part of `name`. Name of the Application resource to get. Example: apps/myapp.",
  3302. // "location": "path",
  3303. // "required": true,
  3304. // "type": "string"
  3305. // }
  3306. // },
  3307. // "path": "v1/apps/{appsId}",
  3308. // "response": {
  3309. // "$ref": "Application"
  3310. // },
  3311. // "scopes": [
  3312. // "https://www.googleapis.com/auth/appengine.admin",
  3313. // "https://www.googleapis.com/auth/cloud-platform",
  3314. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  3315. // ]
  3316. // }
  3317. }
  3318. // method id "appengine.apps.patch":
  3319. type AppsPatchCall struct {
  3320. s *APIService
  3321. appsId string
  3322. application *Application
  3323. urlParams_ gensupport.URLParams
  3324. ctx_ context.Context
  3325. header_ http.Header
  3326. }
  3327. // Patch: Updates the specified Application resource. You can update the
  3328. // following fields:
  3329. // auth_domain - Google authentication domain for controlling user
  3330. // access to the application.
  3331. // default_cookie_expiration - Cookie expiration policy for the
  3332. // application.
  3333. func (r *AppsService) Patch(appsId string, application *Application) *AppsPatchCall {
  3334. c := &AppsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3335. c.appsId = appsId
  3336. c.application = application
  3337. return c
  3338. }
  3339. // UpdateMask sets the optional parameter "updateMask": Standard field
  3340. // mask for the set of fields to be updated.
  3341. func (c *AppsPatchCall) UpdateMask(updateMask string) *AppsPatchCall {
  3342. c.urlParams_.Set("updateMask", updateMask)
  3343. return c
  3344. }
  3345. // Fields allows partial responses to be retrieved. See
  3346. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3347. // for more information.
  3348. func (c *AppsPatchCall) Fields(s ...googleapi.Field) *AppsPatchCall {
  3349. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3350. return c
  3351. }
  3352. // Context sets the context to be used in this call's Do method. Any
  3353. // pending HTTP request will be aborted if the provided context is
  3354. // canceled.
  3355. func (c *AppsPatchCall) Context(ctx context.Context) *AppsPatchCall {
  3356. c.ctx_ = ctx
  3357. return c
  3358. }
  3359. // Header returns an http.Header that can be modified by the caller to
  3360. // add HTTP headers to the request.
  3361. func (c *AppsPatchCall) Header() http.Header {
  3362. if c.header_ == nil {
  3363. c.header_ = make(http.Header)
  3364. }
  3365. return c.header_
  3366. }
  3367. func (c *AppsPatchCall) doRequest(alt string) (*http.Response, error) {
  3368. reqHeaders := make(http.Header)
  3369. for k, v := range c.header_ {
  3370. reqHeaders[k] = v
  3371. }
  3372. reqHeaders.Set("User-Agent", c.s.userAgent())
  3373. var body io.Reader = nil
  3374. body, err := googleapi.WithoutDataWrapper.JSONReader(c.application)
  3375. if err != nil {
  3376. return nil, err
  3377. }
  3378. reqHeaders.Set("Content-Type", "application/json")
  3379. c.urlParams_.Set("alt", alt)
  3380. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}")
  3381. urls += "?" + c.urlParams_.Encode()
  3382. req, _ := http.NewRequest("PATCH", urls, body)
  3383. req.Header = reqHeaders
  3384. googleapi.Expand(req.URL, map[string]string{
  3385. "appsId": c.appsId,
  3386. })
  3387. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3388. }
  3389. // Do executes the "appengine.apps.patch" call.
  3390. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  3391. // status code is an error. Response headers are in either
  3392. // *Operation.ServerResponse.Header or (if a response was returned at
  3393. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  3394. // to check whether the returned error was because
  3395. // http.StatusNotModified was returned.
  3396. func (c *AppsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3397. gensupport.SetOptions(c.urlParams_, opts...)
  3398. res, err := c.doRequest("json")
  3399. if res != nil && res.StatusCode == http.StatusNotModified {
  3400. if res.Body != nil {
  3401. res.Body.Close()
  3402. }
  3403. return nil, &googleapi.Error{
  3404. Code: res.StatusCode,
  3405. Header: res.Header,
  3406. }
  3407. }
  3408. if err != nil {
  3409. return nil, err
  3410. }
  3411. defer googleapi.CloseBody(res)
  3412. if err := googleapi.CheckResponse(res); err != nil {
  3413. return nil, err
  3414. }
  3415. ret := &Operation{
  3416. ServerResponse: googleapi.ServerResponse{
  3417. Header: res.Header,
  3418. HTTPStatusCode: res.StatusCode,
  3419. },
  3420. }
  3421. target := &ret
  3422. if err := gensupport.DecodeResponse(target, res); err != nil {
  3423. return nil, err
  3424. }
  3425. return ret, nil
  3426. // {
  3427. // "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.",
  3428. // "flatPath": "v1/apps/{appsId}",
  3429. // "httpMethod": "PATCH",
  3430. // "id": "appengine.apps.patch",
  3431. // "parameterOrder": [
  3432. // "appsId"
  3433. // ],
  3434. // "parameters": {
  3435. // "appsId": {
  3436. // "description": "Part of `name`. Name of the Application resource to update. Example: apps/myapp.",
  3437. // "location": "path",
  3438. // "required": true,
  3439. // "type": "string"
  3440. // },
  3441. // "updateMask": {
  3442. // "description": "Standard field mask for the set of fields to be updated.",
  3443. // "format": "google-fieldmask",
  3444. // "location": "query",
  3445. // "type": "string"
  3446. // }
  3447. // },
  3448. // "path": "v1/apps/{appsId}",
  3449. // "request": {
  3450. // "$ref": "Application"
  3451. // },
  3452. // "response": {
  3453. // "$ref": "Operation"
  3454. // },
  3455. // "scopes": [
  3456. // "https://www.googleapis.com/auth/cloud-platform"
  3457. // ]
  3458. // }
  3459. }
  3460. // method id "appengine.apps.repair":
  3461. type AppsRepairCall struct {
  3462. s *APIService
  3463. appsId string
  3464. repairapplicationrequest *RepairApplicationRequest
  3465. urlParams_ gensupport.URLParams
  3466. ctx_ context.Context
  3467. header_ http.Header
  3468. }
  3469. // Repair: Recreates the required App Engine features for the specified
  3470. // App Engine application, for example a Cloud Storage bucket or App
  3471. // Engine service account. Use this method if you receive an error
  3472. // message about a missing feature, for example, Error retrieving the
  3473. // App Engine service account.
  3474. func (r *AppsService) Repair(appsId string, repairapplicationrequest *RepairApplicationRequest) *AppsRepairCall {
  3475. c := &AppsRepairCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3476. c.appsId = appsId
  3477. c.repairapplicationrequest = repairapplicationrequest
  3478. return c
  3479. }
  3480. // Fields allows partial responses to be retrieved. See
  3481. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3482. // for more information.
  3483. func (c *AppsRepairCall) Fields(s ...googleapi.Field) *AppsRepairCall {
  3484. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3485. return c
  3486. }
  3487. // Context sets the context to be used in this call's Do method. Any
  3488. // pending HTTP request will be aborted if the provided context is
  3489. // canceled.
  3490. func (c *AppsRepairCall) Context(ctx context.Context) *AppsRepairCall {
  3491. c.ctx_ = ctx
  3492. return c
  3493. }
  3494. // Header returns an http.Header that can be modified by the caller to
  3495. // add HTTP headers to the request.
  3496. func (c *AppsRepairCall) Header() http.Header {
  3497. if c.header_ == nil {
  3498. c.header_ = make(http.Header)
  3499. }
  3500. return c.header_
  3501. }
  3502. func (c *AppsRepairCall) doRequest(alt string) (*http.Response, error) {
  3503. reqHeaders := make(http.Header)
  3504. for k, v := range c.header_ {
  3505. reqHeaders[k] = v
  3506. }
  3507. reqHeaders.Set("User-Agent", c.s.userAgent())
  3508. var body io.Reader = nil
  3509. body, err := googleapi.WithoutDataWrapper.JSONReader(c.repairapplicationrequest)
  3510. if err != nil {
  3511. return nil, err
  3512. }
  3513. reqHeaders.Set("Content-Type", "application/json")
  3514. c.urlParams_.Set("alt", alt)
  3515. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}:repair")
  3516. urls += "?" + c.urlParams_.Encode()
  3517. req, _ := http.NewRequest("POST", urls, body)
  3518. req.Header = reqHeaders
  3519. googleapi.Expand(req.URL, map[string]string{
  3520. "appsId": c.appsId,
  3521. })
  3522. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3523. }
  3524. // Do executes the "appengine.apps.repair" call.
  3525. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  3526. // status code is an error. Response headers are in either
  3527. // *Operation.ServerResponse.Header or (if a response was returned at
  3528. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  3529. // to check whether the returned error was because
  3530. // http.StatusNotModified was returned.
  3531. func (c *AppsRepairCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3532. gensupport.SetOptions(c.urlParams_, opts...)
  3533. res, err := c.doRequest("json")
  3534. if res != nil && res.StatusCode == http.StatusNotModified {
  3535. if res.Body != nil {
  3536. res.Body.Close()
  3537. }
  3538. return nil, &googleapi.Error{
  3539. Code: res.StatusCode,
  3540. Header: res.Header,
  3541. }
  3542. }
  3543. if err != nil {
  3544. return nil, err
  3545. }
  3546. defer googleapi.CloseBody(res)
  3547. if err := googleapi.CheckResponse(res); err != nil {
  3548. return nil, err
  3549. }
  3550. ret := &Operation{
  3551. ServerResponse: googleapi.ServerResponse{
  3552. Header: res.Header,
  3553. HTTPStatusCode: res.StatusCode,
  3554. },
  3555. }
  3556. target := &ret
  3557. if err := gensupport.DecodeResponse(target, res); err != nil {
  3558. return nil, err
  3559. }
  3560. return ret, nil
  3561. // {
  3562. // "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.",
  3563. // "flatPath": "v1/apps/{appsId}:repair",
  3564. // "httpMethod": "POST",
  3565. // "id": "appengine.apps.repair",
  3566. // "parameterOrder": [
  3567. // "appsId"
  3568. // ],
  3569. // "parameters": {
  3570. // "appsId": {
  3571. // "description": "Part of `name`. Name of the application to repair. Example: apps/myapp",
  3572. // "location": "path",
  3573. // "required": true,
  3574. // "type": "string"
  3575. // }
  3576. // },
  3577. // "path": "v1/apps/{appsId}:repair",
  3578. // "request": {
  3579. // "$ref": "RepairApplicationRequest"
  3580. // },
  3581. // "response": {
  3582. // "$ref": "Operation"
  3583. // },
  3584. // "scopes": [
  3585. // "https://www.googleapis.com/auth/cloud-platform"
  3586. // ]
  3587. // }
  3588. }
  3589. // method id "appengine.apps.authorizedCertificates.create":
  3590. type AppsAuthorizedCertificatesCreateCall struct {
  3591. s *APIService
  3592. appsId string
  3593. authorizedcertificate *AuthorizedCertificate
  3594. urlParams_ gensupport.URLParams
  3595. ctx_ context.Context
  3596. header_ http.Header
  3597. }
  3598. // Create: Uploads the specified SSL certificate.
  3599. func (r *AppsAuthorizedCertificatesService) Create(appsId string, authorizedcertificate *AuthorizedCertificate) *AppsAuthorizedCertificatesCreateCall {
  3600. c := &AppsAuthorizedCertificatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3601. c.appsId = appsId
  3602. c.authorizedcertificate = authorizedcertificate
  3603. return c
  3604. }
  3605. // Fields allows partial responses to be retrieved. See
  3606. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3607. // for more information.
  3608. func (c *AppsAuthorizedCertificatesCreateCall) Fields(s ...googleapi.Field) *AppsAuthorizedCertificatesCreateCall {
  3609. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3610. return c
  3611. }
  3612. // Context sets the context to be used in this call's Do method. Any
  3613. // pending HTTP request will be aborted if the provided context is
  3614. // canceled.
  3615. func (c *AppsAuthorizedCertificatesCreateCall) Context(ctx context.Context) *AppsAuthorizedCertificatesCreateCall {
  3616. c.ctx_ = ctx
  3617. return c
  3618. }
  3619. // Header returns an http.Header that can be modified by the caller to
  3620. // add HTTP headers to the request.
  3621. func (c *AppsAuthorizedCertificatesCreateCall) Header() http.Header {
  3622. if c.header_ == nil {
  3623. c.header_ = make(http.Header)
  3624. }
  3625. return c.header_
  3626. }
  3627. func (c *AppsAuthorizedCertificatesCreateCall) doRequest(alt string) (*http.Response, error) {
  3628. reqHeaders := make(http.Header)
  3629. for k, v := range c.header_ {
  3630. reqHeaders[k] = v
  3631. }
  3632. reqHeaders.Set("User-Agent", c.s.userAgent())
  3633. var body io.Reader = nil
  3634. body, err := googleapi.WithoutDataWrapper.JSONReader(c.authorizedcertificate)
  3635. if err != nil {
  3636. return nil, err
  3637. }
  3638. reqHeaders.Set("Content-Type", "application/json")
  3639. c.urlParams_.Set("alt", alt)
  3640. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/authorizedCertificates")
  3641. urls += "?" + c.urlParams_.Encode()
  3642. req, _ := http.NewRequest("POST", urls, body)
  3643. req.Header = reqHeaders
  3644. googleapi.Expand(req.URL, map[string]string{
  3645. "appsId": c.appsId,
  3646. })
  3647. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3648. }
  3649. // Do executes the "appengine.apps.authorizedCertificates.create" call.
  3650. // Exactly one of *AuthorizedCertificate or error will be non-nil. Any
  3651. // non-2xx status code is an error. Response headers are in either
  3652. // *AuthorizedCertificate.ServerResponse.Header or (if a response was
  3653. // returned at all) in error.(*googleapi.Error).Header. Use
  3654. // googleapi.IsNotModified to check whether the returned error was
  3655. // because http.StatusNotModified was returned.
  3656. func (c *AppsAuthorizedCertificatesCreateCall) Do(opts ...googleapi.CallOption) (*AuthorizedCertificate, error) {
  3657. gensupport.SetOptions(c.urlParams_, opts...)
  3658. res, err := c.doRequest("json")
  3659. if res != nil && res.StatusCode == http.StatusNotModified {
  3660. if res.Body != nil {
  3661. res.Body.Close()
  3662. }
  3663. return nil, &googleapi.Error{
  3664. Code: res.StatusCode,
  3665. Header: res.Header,
  3666. }
  3667. }
  3668. if err != nil {
  3669. return nil, err
  3670. }
  3671. defer googleapi.CloseBody(res)
  3672. if err := googleapi.CheckResponse(res); err != nil {
  3673. return nil, err
  3674. }
  3675. ret := &AuthorizedCertificate{
  3676. ServerResponse: googleapi.ServerResponse{
  3677. Header: res.Header,
  3678. HTTPStatusCode: res.StatusCode,
  3679. },
  3680. }
  3681. target := &ret
  3682. if err := gensupport.DecodeResponse(target, res); err != nil {
  3683. return nil, err
  3684. }
  3685. return ret, nil
  3686. // {
  3687. // "description": "Uploads the specified SSL certificate.",
  3688. // "flatPath": "v1/apps/{appsId}/authorizedCertificates",
  3689. // "httpMethod": "POST",
  3690. // "id": "appengine.apps.authorizedCertificates.create",
  3691. // "parameterOrder": [
  3692. // "appsId"
  3693. // ],
  3694. // "parameters": {
  3695. // "appsId": {
  3696. // "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.",
  3697. // "location": "path",
  3698. // "required": true,
  3699. // "type": "string"
  3700. // }
  3701. // },
  3702. // "path": "v1/apps/{appsId}/authorizedCertificates",
  3703. // "request": {
  3704. // "$ref": "AuthorizedCertificate"
  3705. // },
  3706. // "response": {
  3707. // "$ref": "AuthorizedCertificate"
  3708. // },
  3709. // "scopes": [
  3710. // "https://www.googleapis.com/auth/cloud-platform"
  3711. // ]
  3712. // }
  3713. }
  3714. // method id "appengine.apps.authorizedCertificates.delete":
  3715. type AppsAuthorizedCertificatesDeleteCall struct {
  3716. s *APIService
  3717. appsId string
  3718. authorizedCertificatesId string
  3719. urlParams_ gensupport.URLParams
  3720. ctx_ context.Context
  3721. header_ http.Header
  3722. }
  3723. // Delete: Deletes the specified SSL certificate.
  3724. func (r *AppsAuthorizedCertificatesService) Delete(appsId string, authorizedCertificatesId string) *AppsAuthorizedCertificatesDeleteCall {
  3725. c := &AppsAuthorizedCertificatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3726. c.appsId = appsId
  3727. c.authorizedCertificatesId = authorizedCertificatesId
  3728. return c
  3729. }
  3730. // Fields allows partial responses to be retrieved. See
  3731. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3732. // for more information.
  3733. func (c *AppsAuthorizedCertificatesDeleteCall) Fields(s ...googleapi.Field) *AppsAuthorizedCertificatesDeleteCall {
  3734. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3735. return c
  3736. }
  3737. // Context sets the context to be used in this call's Do method. Any
  3738. // pending HTTP request will be aborted if the provided context is
  3739. // canceled.
  3740. func (c *AppsAuthorizedCertificatesDeleteCall) Context(ctx context.Context) *AppsAuthorizedCertificatesDeleteCall {
  3741. c.ctx_ = ctx
  3742. return c
  3743. }
  3744. // Header returns an http.Header that can be modified by the caller to
  3745. // add HTTP headers to the request.
  3746. func (c *AppsAuthorizedCertificatesDeleteCall) Header() http.Header {
  3747. if c.header_ == nil {
  3748. c.header_ = make(http.Header)
  3749. }
  3750. return c.header_
  3751. }
  3752. func (c *AppsAuthorizedCertificatesDeleteCall) doRequest(alt string) (*http.Response, error) {
  3753. reqHeaders := make(http.Header)
  3754. for k, v := range c.header_ {
  3755. reqHeaders[k] = v
  3756. }
  3757. reqHeaders.Set("User-Agent", c.s.userAgent())
  3758. var body io.Reader = nil
  3759. c.urlParams_.Set("alt", alt)
  3760. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}")
  3761. urls += "?" + c.urlParams_.Encode()
  3762. req, _ := http.NewRequest("DELETE", urls, body)
  3763. req.Header = reqHeaders
  3764. googleapi.Expand(req.URL, map[string]string{
  3765. "appsId": c.appsId,
  3766. "authorizedCertificatesId": c.authorizedCertificatesId,
  3767. })
  3768. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3769. }
  3770. // Do executes the "appengine.apps.authorizedCertificates.delete" call.
  3771. // Exactly one of *Empty or error will be non-nil. Any non-2xx status
  3772. // code is an error. Response headers are in either
  3773. // *Empty.ServerResponse.Header or (if a response was returned at all)
  3774. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3775. // check whether the returned error was because http.StatusNotModified
  3776. // was returned.
  3777. func (c *AppsAuthorizedCertificatesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  3778. gensupport.SetOptions(c.urlParams_, opts...)
  3779. res, err := c.doRequest("json")
  3780. if res != nil && res.StatusCode == http.StatusNotModified {
  3781. if res.Body != nil {
  3782. res.Body.Close()
  3783. }
  3784. return nil, &googleapi.Error{
  3785. Code: res.StatusCode,
  3786. Header: res.Header,
  3787. }
  3788. }
  3789. if err != nil {
  3790. return nil, err
  3791. }
  3792. defer googleapi.CloseBody(res)
  3793. if err := googleapi.CheckResponse(res); err != nil {
  3794. return nil, err
  3795. }
  3796. ret := &Empty{
  3797. ServerResponse: googleapi.ServerResponse{
  3798. Header: res.Header,
  3799. HTTPStatusCode: res.StatusCode,
  3800. },
  3801. }
  3802. target := &ret
  3803. if err := gensupport.DecodeResponse(target, res); err != nil {
  3804. return nil, err
  3805. }
  3806. return ret, nil
  3807. // {
  3808. // "description": "Deletes the specified SSL certificate.",
  3809. // "flatPath": "v1/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}",
  3810. // "httpMethod": "DELETE",
  3811. // "id": "appengine.apps.authorizedCertificates.delete",
  3812. // "parameterOrder": [
  3813. // "appsId",
  3814. // "authorizedCertificatesId"
  3815. // ],
  3816. // "parameters": {
  3817. // "appsId": {
  3818. // "description": "Part of `name`. Name of the resource to delete. Example: apps/myapp/authorizedCertificates/12345.",
  3819. // "location": "path",
  3820. // "required": true,
  3821. // "type": "string"
  3822. // },
  3823. // "authorizedCertificatesId": {
  3824. // "description": "Part of `name`. See documentation of `appsId`.",
  3825. // "location": "path",
  3826. // "required": true,
  3827. // "type": "string"
  3828. // }
  3829. // },
  3830. // "path": "v1/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}",
  3831. // "response": {
  3832. // "$ref": "Empty"
  3833. // },
  3834. // "scopes": [
  3835. // "https://www.googleapis.com/auth/cloud-platform"
  3836. // ]
  3837. // }
  3838. }
  3839. // method id "appengine.apps.authorizedCertificates.get":
  3840. type AppsAuthorizedCertificatesGetCall struct {
  3841. s *APIService
  3842. appsId string
  3843. authorizedCertificatesId string
  3844. urlParams_ gensupport.URLParams
  3845. ifNoneMatch_ string
  3846. ctx_ context.Context
  3847. header_ http.Header
  3848. }
  3849. // Get: Gets the specified SSL certificate.
  3850. func (r *AppsAuthorizedCertificatesService) Get(appsId string, authorizedCertificatesId string) *AppsAuthorizedCertificatesGetCall {
  3851. c := &AppsAuthorizedCertificatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3852. c.appsId = appsId
  3853. c.authorizedCertificatesId = authorizedCertificatesId
  3854. return c
  3855. }
  3856. // View sets the optional parameter "view": Controls the set of fields
  3857. // returned in the GET response.
  3858. //
  3859. // Possible values:
  3860. // "BASIC_CERTIFICATE"
  3861. // "FULL_CERTIFICATE"
  3862. func (c *AppsAuthorizedCertificatesGetCall) View(view string) *AppsAuthorizedCertificatesGetCall {
  3863. c.urlParams_.Set("view", view)
  3864. return c
  3865. }
  3866. // Fields allows partial responses to be retrieved. See
  3867. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3868. // for more information.
  3869. func (c *AppsAuthorizedCertificatesGetCall) Fields(s ...googleapi.Field) *AppsAuthorizedCertificatesGetCall {
  3870. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3871. return c
  3872. }
  3873. // IfNoneMatch sets the optional parameter which makes the operation
  3874. // fail if the object's ETag matches the given value. This is useful for
  3875. // getting updates only after the object has changed since the last
  3876. // request. Use googleapi.IsNotModified to check whether the response
  3877. // error from Do is the result of In-None-Match.
  3878. func (c *AppsAuthorizedCertificatesGetCall) IfNoneMatch(entityTag string) *AppsAuthorizedCertificatesGetCall {
  3879. c.ifNoneMatch_ = entityTag
  3880. return c
  3881. }
  3882. // Context sets the context to be used in this call's Do method. Any
  3883. // pending HTTP request will be aborted if the provided context is
  3884. // canceled.
  3885. func (c *AppsAuthorizedCertificatesGetCall) Context(ctx context.Context) *AppsAuthorizedCertificatesGetCall {
  3886. c.ctx_ = ctx
  3887. return c
  3888. }
  3889. // Header returns an http.Header that can be modified by the caller to
  3890. // add HTTP headers to the request.
  3891. func (c *AppsAuthorizedCertificatesGetCall) Header() http.Header {
  3892. if c.header_ == nil {
  3893. c.header_ = make(http.Header)
  3894. }
  3895. return c.header_
  3896. }
  3897. func (c *AppsAuthorizedCertificatesGetCall) doRequest(alt string) (*http.Response, error) {
  3898. reqHeaders := make(http.Header)
  3899. for k, v := range c.header_ {
  3900. reqHeaders[k] = v
  3901. }
  3902. reqHeaders.Set("User-Agent", c.s.userAgent())
  3903. if c.ifNoneMatch_ != "" {
  3904. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3905. }
  3906. var body io.Reader = nil
  3907. c.urlParams_.Set("alt", alt)
  3908. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}")
  3909. urls += "?" + c.urlParams_.Encode()
  3910. req, _ := http.NewRequest("GET", urls, body)
  3911. req.Header = reqHeaders
  3912. googleapi.Expand(req.URL, map[string]string{
  3913. "appsId": c.appsId,
  3914. "authorizedCertificatesId": c.authorizedCertificatesId,
  3915. })
  3916. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3917. }
  3918. // Do executes the "appengine.apps.authorizedCertificates.get" call.
  3919. // Exactly one of *AuthorizedCertificate or error will be non-nil. Any
  3920. // non-2xx status code is an error. Response headers are in either
  3921. // *AuthorizedCertificate.ServerResponse.Header or (if a response was
  3922. // returned at all) in error.(*googleapi.Error).Header. Use
  3923. // googleapi.IsNotModified to check whether the returned error was
  3924. // because http.StatusNotModified was returned.
  3925. func (c *AppsAuthorizedCertificatesGetCall) Do(opts ...googleapi.CallOption) (*AuthorizedCertificate, error) {
  3926. gensupport.SetOptions(c.urlParams_, opts...)
  3927. res, err := c.doRequest("json")
  3928. if res != nil && res.StatusCode == http.StatusNotModified {
  3929. if res.Body != nil {
  3930. res.Body.Close()
  3931. }
  3932. return nil, &googleapi.Error{
  3933. Code: res.StatusCode,
  3934. Header: res.Header,
  3935. }
  3936. }
  3937. if err != nil {
  3938. return nil, err
  3939. }
  3940. defer googleapi.CloseBody(res)
  3941. if err := googleapi.CheckResponse(res); err != nil {
  3942. return nil, err
  3943. }
  3944. ret := &AuthorizedCertificate{
  3945. ServerResponse: googleapi.ServerResponse{
  3946. Header: res.Header,
  3947. HTTPStatusCode: res.StatusCode,
  3948. },
  3949. }
  3950. target := &ret
  3951. if err := gensupport.DecodeResponse(target, res); err != nil {
  3952. return nil, err
  3953. }
  3954. return ret, nil
  3955. // {
  3956. // "description": "Gets the specified SSL certificate.",
  3957. // "flatPath": "v1/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}",
  3958. // "httpMethod": "GET",
  3959. // "id": "appengine.apps.authorizedCertificates.get",
  3960. // "parameterOrder": [
  3961. // "appsId",
  3962. // "authorizedCertificatesId"
  3963. // ],
  3964. // "parameters": {
  3965. // "appsId": {
  3966. // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/authorizedCertificates/12345.",
  3967. // "location": "path",
  3968. // "required": true,
  3969. // "type": "string"
  3970. // },
  3971. // "authorizedCertificatesId": {
  3972. // "description": "Part of `name`. See documentation of `appsId`.",
  3973. // "location": "path",
  3974. // "required": true,
  3975. // "type": "string"
  3976. // },
  3977. // "view": {
  3978. // "description": "Controls the set of fields returned in the GET response.",
  3979. // "enum": [
  3980. // "BASIC_CERTIFICATE",
  3981. // "FULL_CERTIFICATE"
  3982. // ],
  3983. // "location": "query",
  3984. // "type": "string"
  3985. // }
  3986. // },
  3987. // "path": "v1/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}",
  3988. // "response": {
  3989. // "$ref": "AuthorizedCertificate"
  3990. // },
  3991. // "scopes": [
  3992. // "https://www.googleapis.com/auth/appengine.admin",
  3993. // "https://www.googleapis.com/auth/cloud-platform",
  3994. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  3995. // ]
  3996. // }
  3997. }
  3998. // method id "appengine.apps.authorizedCertificates.list":
  3999. type AppsAuthorizedCertificatesListCall struct {
  4000. s *APIService
  4001. appsId string
  4002. urlParams_ gensupport.URLParams
  4003. ifNoneMatch_ string
  4004. ctx_ context.Context
  4005. header_ http.Header
  4006. }
  4007. // List: Lists all SSL certificates the user is authorized to
  4008. // administer.
  4009. func (r *AppsAuthorizedCertificatesService) List(appsId string) *AppsAuthorizedCertificatesListCall {
  4010. c := &AppsAuthorizedCertificatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4011. c.appsId = appsId
  4012. return c
  4013. }
  4014. // PageSize sets the optional parameter "pageSize": Maximum results to
  4015. // return per page.
  4016. func (c *AppsAuthorizedCertificatesListCall) PageSize(pageSize int64) *AppsAuthorizedCertificatesListCall {
  4017. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  4018. return c
  4019. }
  4020. // PageToken sets the optional parameter "pageToken": Continuation token
  4021. // for fetching the next page of results.
  4022. func (c *AppsAuthorizedCertificatesListCall) PageToken(pageToken string) *AppsAuthorizedCertificatesListCall {
  4023. c.urlParams_.Set("pageToken", pageToken)
  4024. return c
  4025. }
  4026. // View sets the optional parameter "view": Controls the set of fields
  4027. // returned in the LIST response.
  4028. //
  4029. // Possible values:
  4030. // "BASIC_CERTIFICATE"
  4031. // "FULL_CERTIFICATE"
  4032. func (c *AppsAuthorizedCertificatesListCall) View(view string) *AppsAuthorizedCertificatesListCall {
  4033. c.urlParams_.Set("view", view)
  4034. return c
  4035. }
  4036. // Fields allows partial responses to be retrieved. See
  4037. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4038. // for more information.
  4039. func (c *AppsAuthorizedCertificatesListCall) Fields(s ...googleapi.Field) *AppsAuthorizedCertificatesListCall {
  4040. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4041. return c
  4042. }
  4043. // IfNoneMatch sets the optional parameter which makes the operation
  4044. // fail if the object's ETag matches the given value. This is useful for
  4045. // getting updates only after the object has changed since the last
  4046. // request. Use googleapi.IsNotModified to check whether the response
  4047. // error from Do is the result of In-None-Match.
  4048. func (c *AppsAuthorizedCertificatesListCall) IfNoneMatch(entityTag string) *AppsAuthorizedCertificatesListCall {
  4049. c.ifNoneMatch_ = entityTag
  4050. return c
  4051. }
  4052. // Context sets the context to be used in this call's Do method. Any
  4053. // pending HTTP request will be aborted if the provided context is
  4054. // canceled.
  4055. func (c *AppsAuthorizedCertificatesListCall) Context(ctx context.Context) *AppsAuthorizedCertificatesListCall {
  4056. c.ctx_ = ctx
  4057. return c
  4058. }
  4059. // Header returns an http.Header that can be modified by the caller to
  4060. // add HTTP headers to the request.
  4061. func (c *AppsAuthorizedCertificatesListCall) Header() http.Header {
  4062. if c.header_ == nil {
  4063. c.header_ = make(http.Header)
  4064. }
  4065. return c.header_
  4066. }
  4067. func (c *AppsAuthorizedCertificatesListCall) doRequest(alt string) (*http.Response, error) {
  4068. reqHeaders := make(http.Header)
  4069. for k, v := range c.header_ {
  4070. reqHeaders[k] = v
  4071. }
  4072. reqHeaders.Set("User-Agent", c.s.userAgent())
  4073. if c.ifNoneMatch_ != "" {
  4074. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4075. }
  4076. var body io.Reader = nil
  4077. c.urlParams_.Set("alt", alt)
  4078. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/authorizedCertificates")
  4079. urls += "?" + c.urlParams_.Encode()
  4080. req, _ := http.NewRequest("GET", urls, body)
  4081. req.Header = reqHeaders
  4082. googleapi.Expand(req.URL, map[string]string{
  4083. "appsId": c.appsId,
  4084. })
  4085. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4086. }
  4087. // Do executes the "appengine.apps.authorizedCertificates.list" call.
  4088. // Exactly one of *ListAuthorizedCertificatesResponse or error will be
  4089. // non-nil. Any non-2xx status code is an error. Response headers are in
  4090. // either *ListAuthorizedCertificatesResponse.ServerResponse.Header or
  4091. // (if a response was returned at all) in
  4092. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4093. // whether the returned error was because http.StatusNotModified was
  4094. // returned.
  4095. func (c *AppsAuthorizedCertificatesListCall) Do(opts ...googleapi.CallOption) (*ListAuthorizedCertificatesResponse, error) {
  4096. gensupport.SetOptions(c.urlParams_, opts...)
  4097. res, err := c.doRequest("json")
  4098. if res != nil && res.StatusCode == http.StatusNotModified {
  4099. if res.Body != nil {
  4100. res.Body.Close()
  4101. }
  4102. return nil, &googleapi.Error{
  4103. Code: res.StatusCode,
  4104. Header: res.Header,
  4105. }
  4106. }
  4107. if err != nil {
  4108. return nil, err
  4109. }
  4110. defer googleapi.CloseBody(res)
  4111. if err := googleapi.CheckResponse(res); err != nil {
  4112. return nil, err
  4113. }
  4114. ret := &ListAuthorizedCertificatesResponse{
  4115. ServerResponse: googleapi.ServerResponse{
  4116. Header: res.Header,
  4117. HTTPStatusCode: res.StatusCode,
  4118. },
  4119. }
  4120. target := &ret
  4121. if err := gensupport.DecodeResponse(target, res); err != nil {
  4122. return nil, err
  4123. }
  4124. return ret, nil
  4125. // {
  4126. // "description": "Lists all SSL certificates the user is authorized to administer.",
  4127. // "flatPath": "v1/apps/{appsId}/authorizedCertificates",
  4128. // "httpMethod": "GET",
  4129. // "id": "appengine.apps.authorizedCertificates.list",
  4130. // "parameterOrder": [
  4131. // "appsId"
  4132. // ],
  4133. // "parameters": {
  4134. // "appsId": {
  4135. // "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.",
  4136. // "location": "path",
  4137. // "required": true,
  4138. // "type": "string"
  4139. // },
  4140. // "pageSize": {
  4141. // "description": "Maximum results to return per page.",
  4142. // "format": "int32",
  4143. // "location": "query",
  4144. // "type": "integer"
  4145. // },
  4146. // "pageToken": {
  4147. // "description": "Continuation token for fetching the next page of results.",
  4148. // "location": "query",
  4149. // "type": "string"
  4150. // },
  4151. // "view": {
  4152. // "description": "Controls the set of fields returned in the LIST response.",
  4153. // "enum": [
  4154. // "BASIC_CERTIFICATE",
  4155. // "FULL_CERTIFICATE"
  4156. // ],
  4157. // "location": "query",
  4158. // "type": "string"
  4159. // }
  4160. // },
  4161. // "path": "v1/apps/{appsId}/authorizedCertificates",
  4162. // "response": {
  4163. // "$ref": "ListAuthorizedCertificatesResponse"
  4164. // },
  4165. // "scopes": [
  4166. // "https://www.googleapis.com/auth/appengine.admin",
  4167. // "https://www.googleapis.com/auth/cloud-platform",
  4168. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  4169. // ]
  4170. // }
  4171. }
  4172. // Pages invokes f for each page of results.
  4173. // A non-nil error returned from f will halt the iteration.
  4174. // The provided context supersedes any context provided to the Context method.
  4175. func (c *AppsAuthorizedCertificatesListCall) Pages(ctx context.Context, f func(*ListAuthorizedCertificatesResponse) error) error {
  4176. c.ctx_ = ctx
  4177. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  4178. for {
  4179. x, err := c.Do()
  4180. if err != nil {
  4181. return err
  4182. }
  4183. if err := f(x); err != nil {
  4184. return err
  4185. }
  4186. if x.NextPageToken == "" {
  4187. return nil
  4188. }
  4189. c.PageToken(x.NextPageToken)
  4190. }
  4191. }
  4192. // method id "appengine.apps.authorizedCertificates.patch":
  4193. type AppsAuthorizedCertificatesPatchCall struct {
  4194. s *APIService
  4195. appsId string
  4196. authorizedCertificatesId string
  4197. authorizedcertificate *AuthorizedCertificate
  4198. urlParams_ gensupport.URLParams
  4199. ctx_ context.Context
  4200. header_ http.Header
  4201. }
  4202. // Patch: Updates the specified SSL certificate. To renew a certificate
  4203. // and maintain its existing domain mappings, update certificate_data
  4204. // with a new certificate. The new certificate must be applicable to the
  4205. // same domains as the original certificate. The certificate
  4206. // display_name may also be updated.
  4207. func (r *AppsAuthorizedCertificatesService) Patch(appsId string, authorizedCertificatesId string, authorizedcertificate *AuthorizedCertificate) *AppsAuthorizedCertificatesPatchCall {
  4208. c := &AppsAuthorizedCertificatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4209. c.appsId = appsId
  4210. c.authorizedCertificatesId = authorizedCertificatesId
  4211. c.authorizedcertificate = authorizedcertificate
  4212. return c
  4213. }
  4214. // UpdateMask sets the optional parameter "updateMask": Standard field
  4215. // mask for the set of fields to be updated. Updates are only supported
  4216. // on the certificate_raw_data and display_name fields.
  4217. func (c *AppsAuthorizedCertificatesPatchCall) UpdateMask(updateMask string) *AppsAuthorizedCertificatesPatchCall {
  4218. c.urlParams_.Set("updateMask", updateMask)
  4219. return c
  4220. }
  4221. // Fields allows partial responses to be retrieved. See
  4222. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4223. // for more information.
  4224. func (c *AppsAuthorizedCertificatesPatchCall) Fields(s ...googleapi.Field) *AppsAuthorizedCertificatesPatchCall {
  4225. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4226. return c
  4227. }
  4228. // Context sets the context to be used in this call's Do method. Any
  4229. // pending HTTP request will be aborted if the provided context is
  4230. // canceled.
  4231. func (c *AppsAuthorizedCertificatesPatchCall) Context(ctx context.Context) *AppsAuthorizedCertificatesPatchCall {
  4232. c.ctx_ = ctx
  4233. return c
  4234. }
  4235. // Header returns an http.Header that can be modified by the caller to
  4236. // add HTTP headers to the request.
  4237. func (c *AppsAuthorizedCertificatesPatchCall) Header() http.Header {
  4238. if c.header_ == nil {
  4239. c.header_ = make(http.Header)
  4240. }
  4241. return c.header_
  4242. }
  4243. func (c *AppsAuthorizedCertificatesPatchCall) doRequest(alt string) (*http.Response, error) {
  4244. reqHeaders := make(http.Header)
  4245. for k, v := range c.header_ {
  4246. reqHeaders[k] = v
  4247. }
  4248. reqHeaders.Set("User-Agent", c.s.userAgent())
  4249. var body io.Reader = nil
  4250. body, err := googleapi.WithoutDataWrapper.JSONReader(c.authorizedcertificate)
  4251. if err != nil {
  4252. return nil, err
  4253. }
  4254. reqHeaders.Set("Content-Type", "application/json")
  4255. c.urlParams_.Set("alt", alt)
  4256. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}")
  4257. urls += "?" + c.urlParams_.Encode()
  4258. req, _ := http.NewRequest("PATCH", urls, body)
  4259. req.Header = reqHeaders
  4260. googleapi.Expand(req.URL, map[string]string{
  4261. "appsId": c.appsId,
  4262. "authorizedCertificatesId": c.authorizedCertificatesId,
  4263. })
  4264. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4265. }
  4266. // Do executes the "appengine.apps.authorizedCertificates.patch" call.
  4267. // Exactly one of *AuthorizedCertificate or error will be non-nil. Any
  4268. // non-2xx status code is an error. Response headers are in either
  4269. // *AuthorizedCertificate.ServerResponse.Header or (if a response was
  4270. // returned at all) in error.(*googleapi.Error).Header. Use
  4271. // googleapi.IsNotModified to check whether the returned error was
  4272. // because http.StatusNotModified was returned.
  4273. func (c *AppsAuthorizedCertificatesPatchCall) Do(opts ...googleapi.CallOption) (*AuthorizedCertificate, error) {
  4274. gensupport.SetOptions(c.urlParams_, opts...)
  4275. res, err := c.doRequest("json")
  4276. if res != nil && res.StatusCode == http.StatusNotModified {
  4277. if res.Body != nil {
  4278. res.Body.Close()
  4279. }
  4280. return nil, &googleapi.Error{
  4281. Code: res.StatusCode,
  4282. Header: res.Header,
  4283. }
  4284. }
  4285. if err != nil {
  4286. return nil, err
  4287. }
  4288. defer googleapi.CloseBody(res)
  4289. if err := googleapi.CheckResponse(res); err != nil {
  4290. return nil, err
  4291. }
  4292. ret := &AuthorizedCertificate{
  4293. ServerResponse: googleapi.ServerResponse{
  4294. Header: res.Header,
  4295. HTTPStatusCode: res.StatusCode,
  4296. },
  4297. }
  4298. target := &ret
  4299. if err := gensupport.DecodeResponse(target, res); err != nil {
  4300. return nil, err
  4301. }
  4302. return ret, nil
  4303. // {
  4304. // "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.",
  4305. // "flatPath": "v1/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}",
  4306. // "httpMethod": "PATCH",
  4307. // "id": "appengine.apps.authorizedCertificates.patch",
  4308. // "parameterOrder": [
  4309. // "appsId",
  4310. // "authorizedCertificatesId"
  4311. // ],
  4312. // "parameters": {
  4313. // "appsId": {
  4314. // "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/authorizedCertificates/12345.",
  4315. // "location": "path",
  4316. // "required": true,
  4317. // "type": "string"
  4318. // },
  4319. // "authorizedCertificatesId": {
  4320. // "description": "Part of `name`. See documentation of `appsId`.",
  4321. // "location": "path",
  4322. // "required": true,
  4323. // "type": "string"
  4324. // },
  4325. // "updateMask": {
  4326. // "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.",
  4327. // "format": "google-fieldmask",
  4328. // "location": "query",
  4329. // "type": "string"
  4330. // }
  4331. // },
  4332. // "path": "v1/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}",
  4333. // "request": {
  4334. // "$ref": "AuthorizedCertificate"
  4335. // },
  4336. // "response": {
  4337. // "$ref": "AuthorizedCertificate"
  4338. // },
  4339. // "scopes": [
  4340. // "https://www.googleapis.com/auth/cloud-platform"
  4341. // ]
  4342. // }
  4343. }
  4344. // method id "appengine.apps.authorizedDomains.list":
  4345. type AppsAuthorizedDomainsListCall struct {
  4346. s *APIService
  4347. appsId string
  4348. urlParams_ gensupport.URLParams
  4349. ifNoneMatch_ string
  4350. ctx_ context.Context
  4351. header_ http.Header
  4352. }
  4353. // List: Lists all domains the user is authorized to administer.
  4354. func (r *AppsAuthorizedDomainsService) List(appsId string) *AppsAuthorizedDomainsListCall {
  4355. c := &AppsAuthorizedDomainsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4356. c.appsId = appsId
  4357. return c
  4358. }
  4359. // PageSize sets the optional parameter "pageSize": Maximum results to
  4360. // return per page.
  4361. func (c *AppsAuthorizedDomainsListCall) PageSize(pageSize int64) *AppsAuthorizedDomainsListCall {
  4362. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  4363. return c
  4364. }
  4365. // PageToken sets the optional parameter "pageToken": Continuation token
  4366. // for fetching the next page of results.
  4367. func (c *AppsAuthorizedDomainsListCall) PageToken(pageToken string) *AppsAuthorizedDomainsListCall {
  4368. c.urlParams_.Set("pageToken", pageToken)
  4369. return c
  4370. }
  4371. // Fields allows partial responses to be retrieved. See
  4372. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4373. // for more information.
  4374. func (c *AppsAuthorizedDomainsListCall) Fields(s ...googleapi.Field) *AppsAuthorizedDomainsListCall {
  4375. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4376. return c
  4377. }
  4378. // IfNoneMatch sets the optional parameter which makes the operation
  4379. // fail if the object's ETag matches the given value. This is useful for
  4380. // getting updates only after the object has changed since the last
  4381. // request. Use googleapi.IsNotModified to check whether the response
  4382. // error from Do is the result of In-None-Match.
  4383. func (c *AppsAuthorizedDomainsListCall) IfNoneMatch(entityTag string) *AppsAuthorizedDomainsListCall {
  4384. c.ifNoneMatch_ = entityTag
  4385. return c
  4386. }
  4387. // Context sets the context to be used in this call's Do method. Any
  4388. // pending HTTP request will be aborted if the provided context is
  4389. // canceled.
  4390. func (c *AppsAuthorizedDomainsListCall) Context(ctx context.Context) *AppsAuthorizedDomainsListCall {
  4391. c.ctx_ = ctx
  4392. return c
  4393. }
  4394. // Header returns an http.Header that can be modified by the caller to
  4395. // add HTTP headers to the request.
  4396. func (c *AppsAuthorizedDomainsListCall) Header() http.Header {
  4397. if c.header_ == nil {
  4398. c.header_ = make(http.Header)
  4399. }
  4400. return c.header_
  4401. }
  4402. func (c *AppsAuthorizedDomainsListCall) doRequest(alt string) (*http.Response, error) {
  4403. reqHeaders := make(http.Header)
  4404. for k, v := range c.header_ {
  4405. reqHeaders[k] = v
  4406. }
  4407. reqHeaders.Set("User-Agent", c.s.userAgent())
  4408. if c.ifNoneMatch_ != "" {
  4409. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4410. }
  4411. var body io.Reader = nil
  4412. c.urlParams_.Set("alt", alt)
  4413. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/authorizedDomains")
  4414. urls += "?" + c.urlParams_.Encode()
  4415. req, _ := http.NewRequest("GET", urls, body)
  4416. req.Header = reqHeaders
  4417. googleapi.Expand(req.URL, map[string]string{
  4418. "appsId": c.appsId,
  4419. })
  4420. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4421. }
  4422. // Do executes the "appengine.apps.authorizedDomains.list" call.
  4423. // Exactly one of *ListAuthorizedDomainsResponse or error will be
  4424. // non-nil. Any non-2xx status code is an error. Response headers are in
  4425. // either *ListAuthorizedDomainsResponse.ServerResponse.Header or (if a
  4426. // response was returned at all) in error.(*googleapi.Error).Header. Use
  4427. // googleapi.IsNotModified to check whether the returned error was
  4428. // because http.StatusNotModified was returned.
  4429. func (c *AppsAuthorizedDomainsListCall) Do(opts ...googleapi.CallOption) (*ListAuthorizedDomainsResponse, error) {
  4430. gensupport.SetOptions(c.urlParams_, opts...)
  4431. res, err := c.doRequest("json")
  4432. if res != nil && res.StatusCode == http.StatusNotModified {
  4433. if res.Body != nil {
  4434. res.Body.Close()
  4435. }
  4436. return nil, &googleapi.Error{
  4437. Code: res.StatusCode,
  4438. Header: res.Header,
  4439. }
  4440. }
  4441. if err != nil {
  4442. return nil, err
  4443. }
  4444. defer googleapi.CloseBody(res)
  4445. if err := googleapi.CheckResponse(res); err != nil {
  4446. return nil, err
  4447. }
  4448. ret := &ListAuthorizedDomainsResponse{
  4449. ServerResponse: googleapi.ServerResponse{
  4450. Header: res.Header,
  4451. HTTPStatusCode: res.StatusCode,
  4452. },
  4453. }
  4454. target := &ret
  4455. if err := gensupport.DecodeResponse(target, res); err != nil {
  4456. return nil, err
  4457. }
  4458. return ret, nil
  4459. // {
  4460. // "description": "Lists all domains the user is authorized to administer.",
  4461. // "flatPath": "v1/apps/{appsId}/authorizedDomains",
  4462. // "httpMethod": "GET",
  4463. // "id": "appengine.apps.authorizedDomains.list",
  4464. // "parameterOrder": [
  4465. // "appsId"
  4466. // ],
  4467. // "parameters": {
  4468. // "appsId": {
  4469. // "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.",
  4470. // "location": "path",
  4471. // "required": true,
  4472. // "type": "string"
  4473. // },
  4474. // "pageSize": {
  4475. // "description": "Maximum results to return per page.",
  4476. // "format": "int32",
  4477. // "location": "query",
  4478. // "type": "integer"
  4479. // },
  4480. // "pageToken": {
  4481. // "description": "Continuation token for fetching the next page of results.",
  4482. // "location": "query",
  4483. // "type": "string"
  4484. // }
  4485. // },
  4486. // "path": "v1/apps/{appsId}/authorizedDomains",
  4487. // "response": {
  4488. // "$ref": "ListAuthorizedDomainsResponse"
  4489. // },
  4490. // "scopes": [
  4491. // "https://www.googleapis.com/auth/appengine.admin",
  4492. // "https://www.googleapis.com/auth/cloud-platform",
  4493. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  4494. // ]
  4495. // }
  4496. }
  4497. // Pages invokes f for each page of results.
  4498. // A non-nil error returned from f will halt the iteration.
  4499. // The provided context supersedes any context provided to the Context method.
  4500. func (c *AppsAuthorizedDomainsListCall) Pages(ctx context.Context, f func(*ListAuthorizedDomainsResponse) error) error {
  4501. c.ctx_ = ctx
  4502. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  4503. for {
  4504. x, err := c.Do()
  4505. if err != nil {
  4506. return err
  4507. }
  4508. if err := f(x); err != nil {
  4509. return err
  4510. }
  4511. if x.NextPageToken == "" {
  4512. return nil
  4513. }
  4514. c.PageToken(x.NextPageToken)
  4515. }
  4516. }
  4517. // method id "appengine.apps.domainMappings.create":
  4518. type AppsDomainMappingsCreateCall struct {
  4519. s *APIService
  4520. appsId string
  4521. domainmapping *DomainMapping
  4522. urlParams_ gensupport.URLParams
  4523. ctx_ context.Context
  4524. header_ http.Header
  4525. }
  4526. // Create: Maps a domain to an application. A user must be authorized to
  4527. // administer a domain in order to map it to an application. For a list
  4528. // of available authorized domains, see
  4529. // AuthorizedDomains.ListAuthorizedDomains.
  4530. func (r *AppsDomainMappingsService) Create(appsId string, domainmapping *DomainMapping) *AppsDomainMappingsCreateCall {
  4531. c := &AppsDomainMappingsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4532. c.appsId = appsId
  4533. c.domainmapping = domainmapping
  4534. return c
  4535. }
  4536. // OverrideStrategy sets the optional parameter "overrideStrategy":
  4537. // Whether the domain creation should override any existing mappings for
  4538. // this domain. By default, overrides are rejected.
  4539. //
  4540. // Possible values:
  4541. // "UNSPECIFIED_DOMAIN_OVERRIDE_STRATEGY"
  4542. // "STRICT"
  4543. // "OVERRIDE"
  4544. func (c *AppsDomainMappingsCreateCall) OverrideStrategy(overrideStrategy string) *AppsDomainMappingsCreateCall {
  4545. c.urlParams_.Set("overrideStrategy", overrideStrategy)
  4546. return c
  4547. }
  4548. // Fields allows partial responses to be retrieved. See
  4549. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4550. // for more information.
  4551. func (c *AppsDomainMappingsCreateCall) Fields(s ...googleapi.Field) *AppsDomainMappingsCreateCall {
  4552. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4553. return c
  4554. }
  4555. // Context sets the context to be used in this call's Do method. Any
  4556. // pending HTTP request will be aborted if the provided context is
  4557. // canceled.
  4558. func (c *AppsDomainMappingsCreateCall) Context(ctx context.Context) *AppsDomainMappingsCreateCall {
  4559. c.ctx_ = ctx
  4560. return c
  4561. }
  4562. // Header returns an http.Header that can be modified by the caller to
  4563. // add HTTP headers to the request.
  4564. func (c *AppsDomainMappingsCreateCall) Header() http.Header {
  4565. if c.header_ == nil {
  4566. c.header_ = make(http.Header)
  4567. }
  4568. return c.header_
  4569. }
  4570. func (c *AppsDomainMappingsCreateCall) doRequest(alt string) (*http.Response, error) {
  4571. reqHeaders := make(http.Header)
  4572. for k, v := range c.header_ {
  4573. reqHeaders[k] = v
  4574. }
  4575. reqHeaders.Set("User-Agent", c.s.userAgent())
  4576. var body io.Reader = nil
  4577. body, err := googleapi.WithoutDataWrapper.JSONReader(c.domainmapping)
  4578. if err != nil {
  4579. return nil, err
  4580. }
  4581. reqHeaders.Set("Content-Type", "application/json")
  4582. c.urlParams_.Set("alt", alt)
  4583. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/domainMappings")
  4584. urls += "?" + c.urlParams_.Encode()
  4585. req, _ := http.NewRequest("POST", urls, body)
  4586. req.Header = reqHeaders
  4587. googleapi.Expand(req.URL, map[string]string{
  4588. "appsId": c.appsId,
  4589. })
  4590. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4591. }
  4592. // Do executes the "appengine.apps.domainMappings.create" call.
  4593. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  4594. // status code is an error. Response headers are in either
  4595. // *Operation.ServerResponse.Header or (if a response was returned at
  4596. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  4597. // to check whether the returned error was because
  4598. // http.StatusNotModified was returned.
  4599. func (c *AppsDomainMappingsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4600. gensupport.SetOptions(c.urlParams_, opts...)
  4601. res, err := c.doRequest("json")
  4602. if res != nil && res.StatusCode == http.StatusNotModified {
  4603. if res.Body != nil {
  4604. res.Body.Close()
  4605. }
  4606. return nil, &googleapi.Error{
  4607. Code: res.StatusCode,
  4608. Header: res.Header,
  4609. }
  4610. }
  4611. if err != nil {
  4612. return nil, err
  4613. }
  4614. defer googleapi.CloseBody(res)
  4615. if err := googleapi.CheckResponse(res); err != nil {
  4616. return nil, err
  4617. }
  4618. ret := &Operation{
  4619. ServerResponse: googleapi.ServerResponse{
  4620. Header: res.Header,
  4621. HTTPStatusCode: res.StatusCode,
  4622. },
  4623. }
  4624. target := &ret
  4625. if err := gensupport.DecodeResponse(target, res); err != nil {
  4626. return nil, err
  4627. }
  4628. return ret, nil
  4629. // {
  4630. // "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.",
  4631. // "flatPath": "v1/apps/{appsId}/domainMappings",
  4632. // "httpMethod": "POST",
  4633. // "id": "appengine.apps.domainMappings.create",
  4634. // "parameterOrder": [
  4635. // "appsId"
  4636. // ],
  4637. // "parameters": {
  4638. // "appsId": {
  4639. // "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.",
  4640. // "location": "path",
  4641. // "required": true,
  4642. // "type": "string"
  4643. // },
  4644. // "overrideStrategy": {
  4645. // "description": "Whether the domain creation should override any existing mappings for this domain. By default, overrides are rejected.",
  4646. // "enum": [
  4647. // "UNSPECIFIED_DOMAIN_OVERRIDE_STRATEGY",
  4648. // "STRICT",
  4649. // "OVERRIDE"
  4650. // ],
  4651. // "location": "query",
  4652. // "type": "string"
  4653. // }
  4654. // },
  4655. // "path": "v1/apps/{appsId}/domainMappings",
  4656. // "request": {
  4657. // "$ref": "DomainMapping"
  4658. // },
  4659. // "response": {
  4660. // "$ref": "Operation"
  4661. // },
  4662. // "scopes": [
  4663. // "https://www.googleapis.com/auth/cloud-platform"
  4664. // ]
  4665. // }
  4666. }
  4667. // method id "appengine.apps.domainMappings.delete":
  4668. type AppsDomainMappingsDeleteCall struct {
  4669. s *APIService
  4670. appsId string
  4671. domainMappingsId string
  4672. urlParams_ gensupport.URLParams
  4673. ctx_ context.Context
  4674. header_ http.Header
  4675. }
  4676. // Delete: Deletes the specified domain mapping. A user must be
  4677. // authorized to administer the associated domain in order to delete a
  4678. // DomainMapping resource.
  4679. func (r *AppsDomainMappingsService) Delete(appsId string, domainMappingsId string) *AppsDomainMappingsDeleteCall {
  4680. c := &AppsDomainMappingsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4681. c.appsId = appsId
  4682. c.domainMappingsId = domainMappingsId
  4683. return c
  4684. }
  4685. // Fields allows partial responses to be retrieved. See
  4686. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4687. // for more information.
  4688. func (c *AppsDomainMappingsDeleteCall) Fields(s ...googleapi.Field) *AppsDomainMappingsDeleteCall {
  4689. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4690. return c
  4691. }
  4692. // Context sets the context to be used in this call's Do method. Any
  4693. // pending HTTP request will be aborted if the provided context is
  4694. // canceled.
  4695. func (c *AppsDomainMappingsDeleteCall) Context(ctx context.Context) *AppsDomainMappingsDeleteCall {
  4696. c.ctx_ = ctx
  4697. return c
  4698. }
  4699. // Header returns an http.Header that can be modified by the caller to
  4700. // add HTTP headers to the request.
  4701. func (c *AppsDomainMappingsDeleteCall) Header() http.Header {
  4702. if c.header_ == nil {
  4703. c.header_ = make(http.Header)
  4704. }
  4705. return c.header_
  4706. }
  4707. func (c *AppsDomainMappingsDeleteCall) doRequest(alt string) (*http.Response, error) {
  4708. reqHeaders := make(http.Header)
  4709. for k, v := range c.header_ {
  4710. reqHeaders[k] = v
  4711. }
  4712. reqHeaders.Set("User-Agent", c.s.userAgent())
  4713. var body io.Reader = nil
  4714. c.urlParams_.Set("alt", alt)
  4715. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/domainMappings/{domainMappingsId}")
  4716. urls += "?" + c.urlParams_.Encode()
  4717. req, _ := http.NewRequest("DELETE", urls, body)
  4718. req.Header = reqHeaders
  4719. googleapi.Expand(req.URL, map[string]string{
  4720. "appsId": c.appsId,
  4721. "domainMappingsId": c.domainMappingsId,
  4722. })
  4723. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4724. }
  4725. // Do executes the "appengine.apps.domainMappings.delete" call.
  4726. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  4727. // status code is an error. Response headers are in either
  4728. // *Operation.ServerResponse.Header or (if a response was returned at
  4729. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  4730. // to check whether the returned error was because
  4731. // http.StatusNotModified was returned.
  4732. func (c *AppsDomainMappingsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4733. gensupport.SetOptions(c.urlParams_, opts...)
  4734. res, err := c.doRequest("json")
  4735. if res != nil && res.StatusCode == http.StatusNotModified {
  4736. if res.Body != nil {
  4737. res.Body.Close()
  4738. }
  4739. return nil, &googleapi.Error{
  4740. Code: res.StatusCode,
  4741. Header: res.Header,
  4742. }
  4743. }
  4744. if err != nil {
  4745. return nil, err
  4746. }
  4747. defer googleapi.CloseBody(res)
  4748. if err := googleapi.CheckResponse(res); err != nil {
  4749. return nil, err
  4750. }
  4751. ret := &Operation{
  4752. ServerResponse: googleapi.ServerResponse{
  4753. Header: res.Header,
  4754. HTTPStatusCode: res.StatusCode,
  4755. },
  4756. }
  4757. target := &ret
  4758. if err := gensupport.DecodeResponse(target, res); err != nil {
  4759. return nil, err
  4760. }
  4761. return ret, nil
  4762. // {
  4763. // "description": "Deletes the specified domain mapping. A user must be authorized to administer the associated domain in order to delete a DomainMapping resource.",
  4764. // "flatPath": "v1/apps/{appsId}/domainMappings/{domainMappingsId}",
  4765. // "httpMethod": "DELETE",
  4766. // "id": "appengine.apps.domainMappings.delete",
  4767. // "parameterOrder": [
  4768. // "appsId",
  4769. // "domainMappingsId"
  4770. // ],
  4771. // "parameters": {
  4772. // "appsId": {
  4773. // "description": "Part of `name`. Name of the resource to delete. Example: apps/myapp/domainMappings/example.com.",
  4774. // "location": "path",
  4775. // "required": true,
  4776. // "type": "string"
  4777. // },
  4778. // "domainMappingsId": {
  4779. // "description": "Part of `name`. See documentation of `appsId`.",
  4780. // "location": "path",
  4781. // "required": true,
  4782. // "type": "string"
  4783. // }
  4784. // },
  4785. // "path": "v1/apps/{appsId}/domainMappings/{domainMappingsId}",
  4786. // "response": {
  4787. // "$ref": "Operation"
  4788. // },
  4789. // "scopes": [
  4790. // "https://www.googleapis.com/auth/cloud-platform"
  4791. // ]
  4792. // }
  4793. }
  4794. // method id "appengine.apps.domainMappings.get":
  4795. type AppsDomainMappingsGetCall struct {
  4796. s *APIService
  4797. appsId string
  4798. domainMappingsId string
  4799. urlParams_ gensupport.URLParams
  4800. ifNoneMatch_ string
  4801. ctx_ context.Context
  4802. header_ http.Header
  4803. }
  4804. // Get: Gets the specified domain mapping.
  4805. func (r *AppsDomainMappingsService) Get(appsId string, domainMappingsId string) *AppsDomainMappingsGetCall {
  4806. c := &AppsDomainMappingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4807. c.appsId = appsId
  4808. c.domainMappingsId = domainMappingsId
  4809. return c
  4810. }
  4811. // Fields allows partial responses to be retrieved. See
  4812. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4813. // for more information.
  4814. func (c *AppsDomainMappingsGetCall) Fields(s ...googleapi.Field) *AppsDomainMappingsGetCall {
  4815. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4816. return c
  4817. }
  4818. // IfNoneMatch sets the optional parameter which makes the operation
  4819. // fail if the object's ETag matches the given value. This is useful for
  4820. // getting updates only after the object has changed since the last
  4821. // request. Use googleapi.IsNotModified to check whether the response
  4822. // error from Do is the result of In-None-Match.
  4823. func (c *AppsDomainMappingsGetCall) IfNoneMatch(entityTag string) *AppsDomainMappingsGetCall {
  4824. c.ifNoneMatch_ = entityTag
  4825. return c
  4826. }
  4827. // Context sets the context to be used in this call's Do method. Any
  4828. // pending HTTP request will be aborted if the provided context is
  4829. // canceled.
  4830. func (c *AppsDomainMappingsGetCall) Context(ctx context.Context) *AppsDomainMappingsGetCall {
  4831. c.ctx_ = ctx
  4832. return c
  4833. }
  4834. // Header returns an http.Header that can be modified by the caller to
  4835. // add HTTP headers to the request.
  4836. func (c *AppsDomainMappingsGetCall) Header() http.Header {
  4837. if c.header_ == nil {
  4838. c.header_ = make(http.Header)
  4839. }
  4840. return c.header_
  4841. }
  4842. func (c *AppsDomainMappingsGetCall) doRequest(alt string) (*http.Response, error) {
  4843. reqHeaders := make(http.Header)
  4844. for k, v := range c.header_ {
  4845. reqHeaders[k] = v
  4846. }
  4847. reqHeaders.Set("User-Agent", c.s.userAgent())
  4848. if c.ifNoneMatch_ != "" {
  4849. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4850. }
  4851. var body io.Reader = nil
  4852. c.urlParams_.Set("alt", alt)
  4853. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/domainMappings/{domainMappingsId}")
  4854. urls += "?" + c.urlParams_.Encode()
  4855. req, _ := http.NewRequest("GET", urls, body)
  4856. req.Header = reqHeaders
  4857. googleapi.Expand(req.URL, map[string]string{
  4858. "appsId": c.appsId,
  4859. "domainMappingsId": c.domainMappingsId,
  4860. })
  4861. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4862. }
  4863. // Do executes the "appengine.apps.domainMappings.get" call.
  4864. // Exactly one of *DomainMapping or error will be non-nil. Any non-2xx
  4865. // status code is an error. Response headers are in either
  4866. // *DomainMapping.ServerResponse.Header or (if a response was returned
  4867. // at all) in error.(*googleapi.Error).Header. Use
  4868. // googleapi.IsNotModified to check whether the returned error was
  4869. // because http.StatusNotModified was returned.
  4870. func (c *AppsDomainMappingsGetCall) Do(opts ...googleapi.CallOption) (*DomainMapping, error) {
  4871. gensupport.SetOptions(c.urlParams_, opts...)
  4872. res, err := c.doRequest("json")
  4873. if res != nil && res.StatusCode == http.StatusNotModified {
  4874. if res.Body != nil {
  4875. res.Body.Close()
  4876. }
  4877. return nil, &googleapi.Error{
  4878. Code: res.StatusCode,
  4879. Header: res.Header,
  4880. }
  4881. }
  4882. if err != nil {
  4883. return nil, err
  4884. }
  4885. defer googleapi.CloseBody(res)
  4886. if err := googleapi.CheckResponse(res); err != nil {
  4887. return nil, err
  4888. }
  4889. ret := &DomainMapping{
  4890. ServerResponse: googleapi.ServerResponse{
  4891. Header: res.Header,
  4892. HTTPStatusCode: res.StatusCode,
  4893. },
  4894. }
  4895. target := &ret
  4896. if err := gensupport.DecodeResponse(target, res); err != nil {
  4897. return nil, err
  4898. }
  4899. return ret, nil
  4900. // {
  4901. // "description": "Gets the specified domain mapping.",
  4902. // "flatPath": "v1/apps/{appsId}/domainMappings/{domainMappingsId}",
  4903. // "httpMethod": "GET",
  4904. // "id": "appengine.apps.domainMappings.get",
  4905. // "parameterOrder": [
  4906. // "appsId",
  4907. // "domainMappingsId"
  4908. // ],
  4909. // "parameters": {
  4910. // "appsId": {
  4911. // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/domainMappings/example.com.",
  4912. // "location": "path",
  4913. // "required": true,
  4914. // "type": "string"
  4915. // },
  4916. // "domainMappingsId": {
  4917. // "description": "Part of `name`. See documentation of `appsId`.",
  4918. // "location": "path",
  4919. // "required": true,
  4920. // "type": "string"
  4921. // }
  4922. // },
  4923. // "path": "v1/apps/{appsId}/domainMappings/{domainMappingsId}",
  4924. // "response": {
  4925. // "$ref": "DomainMapping"
  4926. // },
  4927. // "scopes": [
  4928. // "https://www.googleapis.com/auth/appengine.admin",
  4929. // "https://www.googleapis.com/auth/cloud-platform",
  4930. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  4931. // ]
  4932. // }
  4933. }
  4934. // method id "appengine.apps.domainMappings.list":
  4935. type AppsDomainMappingsListCall struct {
  4936. s *APIService
  4937. appsId string
  4938. urlParams_ gensupport.URLParams
  4939. ifNoneMatch_ string
  4940. ctx_ context.Context
  4941. header_ http.Header
  4942. }
  4943. // List: Lists the domain mappings on an application.
  4944. func (r *AppsDomainMappingsService) List(appsId string) *AppsDomainMappingsListCall {
  4945. c := &AppsDomainMappingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4946. c.appsId = appsId
  4947. return c
  4948. }
  4949. // PageSize sets the optional parameter "pageSize": Maximum results to
  4950. // return per page.
  4951. func (c *AppsDomainMappingsListCall) PageSize(pageSize int64) *AppsDomainMappingsListCall {
  4952. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  4953. return c
  4954. }
  4955. // PageToken sets the optional parameter "pageToken": Continuation token
  4956. // for fetching the next page of results.
  4957. func (c *AppsDomainMappingsListCall) PageToken(pageToken string) *AppsDomainMappingsListCall {
  4958. c.urlParams_.Set("pageToken", pageToken)
  4959. return c
  4960. }
  4961. // Fields allows partial responses to be retrieved. See
  4962. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4963. // for more information.
  4964. func (c *AppsDomainMappingsListCall) Fields(s ...googleapi.Field) *AppsDomainMappingsListCall {
  4965. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4966. return c
  4967. }
  4968. // IfNoneMatch sets the optional parameter which makes the operation
  4969. // fail if the object's ETag matches the given value. This is useful for
  4970. // getting updates only after the object has changed since the last
  4971. // request. Use googleapi.IsNotModified to check whether the response
  4972. // error from Do is the result of In-None-Match.
  4973. func (c *AppsDomainMappingsListCall) IfNoneMatch(entityTag string) *AppsDomainMappingsListCall {
  4974. c.ifNoneMatch_ = entityTag
  4975. return c
  4976. }
  4977. // Context sets the context to be used in this call's Do method. Any
  4978. // pending HTTP request will be aborted if the provided context is
  4979. // canceled.
  4980. func (c *AppsDomainMappingsListCall) Context(ctx context.Context) *AppsDomainMappingsListCall {
  4981. c.ctx_ = ctx
  4982. return c
  4983. }
  4984. // Header returns an http.Header that can be modified by the caller to
  4985. // add HTTP headers to the request.
  4986. func (c *AppsDomainMappingsListCall) Header() http.Header {
  4987. if c.header_ == nil {
  4988. c.header_ = make(http.Header)
  4989. }
  4990. return c.header_
  4991. }
  4992. func (c *AppsDomainMappingsListCall) doRequest(alt string) (*http.Response, error) {
  4993. reqHeaders := make(http.Header)
  4994. for k, v := range c.header_ {
  4995. reqHeaders[k] = v
  4996. }
  4997. reqHeaders.Set("User-Agent", c.s.userAgent())
  4998. if c.ifNoneMatch_ != "" {
  4999. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5000. }
  5001. var body io.Reader = nil
  5002. c.urlParams_.Set("alt", alt)
  5003. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/domainMappings")
  5004. urls += "?" + c.urlParams_.Encode()
  5005. req, _ := http.NewRequest("GET", urls, body)
  5006. req.Header = reqHeaders
  5007. googleapi.Expand(req.URL, map[string]string{
  5008. "appsId": c.appsId,
  5009. })
  5010. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5011. }
  5012. // Do executes the "appengine.apps.domainMappings.list" call.
  5013. // Exactly one of *ListDomainMappingsResponse or error will be non-nil.
  5014. // Any non-2xx status code is an error. Response headers are in either
  5015. // *ListDomainMappingsResponse.ServerResponse.Header or (if a response
  5016. // was returned at all) in error.(*googleapi.Error).Header. Use
  5017. // googleapi.IsNotModified to check whether the returned error was
  5018. // because http.StatusNotModified was returned.
  5019. func (c *AppsDomainMappingsListCall) Do(opts ...googleapi.CallOption) (*ListDomainMappingsResponse, error) {
  5020. gensupport.SetOptions(c.urlParams_, opts...)
  5021. res, err := c.doRequest("json")
  5022. if res != nil && res.StatusCode == http.StatusNotModified {
  5023. if res.Body != nil {
  5024. res.Body.Close()
  5025. }
  5026. return nil, &googleapi.Error{
  5027. Code: res.StatusCode,
  5028. Header: res.Header,
  5029. }
  5030. }
  5031. if err != nil {
  5032. return nil, err
  5033. }
  5034. defer googleapi.CloseBody(res)
  5035. if err := googleapi.CheckResponse(res); err != nil {
  5036. return nil, err
  5037. }
  5038. ret := &ListDomainMappingsResponse{
  5039. ServerResponse: googleapi.ServerResponse{
  5040. Header: res.Header,
  5041. HTTPStatusCode: res.StatusCode,
  5042. },
  5043. }
  5044. target := &ret
  5045. if err := gensupport.DecodeResponse(target, res); err != nil {
  5046. return nil, err
  5047. }
  5048. return ret, nil
  5049. // {
  5050. // "description": "Lists the domain mappings on an application.",
  5051. // "flatPath": "v1/apps/{appsId}/domainMappings",
  5052. // "httpMethod": "GET",
  5053. // "id": "appengine.apps.domainMappings.list",
  5054. // "parameterOrder": [
  5055. // "appsId"
  5056. // ],
  5057. // "parameters": {
  5058. // "appsId": {
  5059. // "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.",
  5060. // "location": "path",
  5061. // "required": true,
  5062. // "type": "string"
  5063. // },
  5064. // "pageSize": {
  5065. // "description": "Maximum results to return per page.",
  5066. // "format": "int32",
  5067. // "location": "query",
  5068. // "type": "integer"
  5069. // },
  5070. // "pageToken": {
  5071. // "description": "Continuation token for fetching the next page of results.",
  5072. // "location": "query",
  5073. // "type": "string"
  5074. // }
  5075. // },
  5076. // "path": "v1/apps/{appsId}/domainMappings",
  5077. // "response": {
  5078. // "$ref": "ListDomainMappingsResponse"
  5079. // },
  5080. // "scopes": [
  5081. // "https://www.googleapis.com/auth/appengine.admin",
  5082. // "https://www.googleapis.com/auth/cloud-platform",
  5083. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  5084. // ]
  5085. // }
  5086. }
  5087. // Pages invokes f for each page of results.
  5088. // A non-nil error returned from f will halt the iteration.
  5089. // The provided context supersedes any context provided to the Context method.
  5090. func (c *AppsDomainMappingsListCall) Pages(ctx context.Context, f func(*ListDomainMappingsResponse) error) error {
  5091. c.ctx_ = ctx
  5092. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  5093. for {
  5094. x, err := c.Do()
  5095. if err != nil {
  5096. return err
  5097. }
  5098. if err := f(x); err != nil {
  5099. return err
  5100. }
  5101. if x.NextPageToken == "" {
  5102. return nil
  5103. }
  5104. c.PageToken(x.NextPageToken)
  5105. }
  5106. }
  5107. // method id "appengine.apps.domainMappings.patch":
  5108. type AppsDomainMappingsPatchCall struct {
  5109. s *APIService
  5110. appsId string
  5111. domainMappingsId string
  5112. domainmapping *DomainMapping
  5113. urlParams_ gensupport.URLParams
  5114. ctx_ context.Context
  5115. header_ http.Header
  5116. }
  5117. // Patch: Updates the specified domain mapping. To map an SSL
  5118. // certificate to a domain mapping, update certificate_id to point to an
  5119. // AuthorizedCertificate resource. A user must be authorized to
  5120. // administer the associated domain in order to update a DomainMapping
  5121. // resource.
  5122. func (r *AppsDomainMappingsService) Patch(appsId string, domainMappingsId string, domainmapping *DomainMapping) *AppsDomainMappingsPatchCall {
  5123. c := &AppsDomainMappingsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5124. c.appsId = appsId
  5125. c.domainMappingsId = domainMappingsId
  5126. c.domainmapping = domainmapping
  5127. return c
  5128. }
  5129. // UpdateMask sets the optional parameter "updateMask": Standard field
  5130. // mask for the set of fields to be updated.
  5131. func (c *AppsDomainMappingsPatchCall) UpdateMask(updateMask string) *AppsDomainMappingsPatchCall {
  5132. c.urlParams_.Set("updateMask", updateMask)
  5133. return c
  5134. }
  5135. // Fields allows partial responses to be retrieved. See
  5136. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5137. // for more information.
  5138. func (c *AppsDomainMappingsPatchCall) Fields(s ...googleapi.Field) *AppsDomainMappingsPatchCall {
  5139. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5140. return c
  5141. }
  5142. // Context sets the context to be used in this call's Do method. Any
  5143. // pending HTTP request will be aborted if the provided context is
  5144. // canceled.
  5145. func (c *AppsDomainMappingsPatchCall) Context(ctx context.Context) *AppsDomainMappingsPatchCall {
  5146. c.ctx_ = ctx
  5147. return c
  5148. }
  5149. // Header returns an http.Header that can be modified by the caller to
  5150. // add HTTP headers to the request.
  5151. func (c *AppsDomainMappingsPatchCall) Header() http.Header {
  5152. if c.header_ == nil {
  5153. c.header_ = make(http.Header)
  5154. }
  5155. return c.header_
  5156. }
  5157. func (c *AppsDomainMappingsPatchCall) doRequest(alt string) (*http.Response, error) {
  5158. reqHeaders := make(http.Header)
  5159. for k, v := range c.header_ {
  5160. reqHeaders[k] = v
  5161. }
  5162. reqHeaders.Set("User-Agent", c.s.userAgent())
  5163. var body io.Reader = nil
  5164. body, err := googleapi.WithoutDataWrapper.JSONReader(c.domainmapping)
  5165. if err != nil {
  5166. return nil, err
  5167. }
  5168. reqHeaders.Set("Content-Type", "application/json")
  5169. c.urlParams_.Set("alt", alt)
  5170. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/domainMappings/{domainMappingsId}")
  5171. urls += "?" + c.urlParams_.Encode()
  5172. req, _ := http.NewRequest("PATCH", urls, body)
  5173. req.Header = reqHeaders
  5174. googleapi.Expand(req.URL, map[string]string{
  5175. "appsId": c.appsId,
  5176. "domainMappingsId": c.domainMappingsId,
  5177. })
  5178. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5179. }
  5180. // Do executes the "appengine.apps.domainMappings.patch" call.
  5181. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  5182. // status code is an error. Response headers are in either
  5183. // *Operation.ServerResponse.Header or (if a response was returned at
  5184. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  5185. // to check whether the returned error was because
  5186. // http.StatusNotModified was returned.
  5187. func (c *AppsDomainMappingsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  5188. gensupport.SetOptions(c.urlParams_, opts...)
  5189. res, err := c.doRequest("json")
  5190. if res != nil && res.StatusCode == http.StatusNotModified {
  5191. if res.Body != nil {
  5192. res.Body.Close()
  5193. }
  5194. return nil, &googleapi.Error{
  5195. Code: res.StatusCode,
  5196. Header: res.Header,
  5197. }
  5198. }
  5199. if err != nil {
  5200. return nil, err
  5201. }
  5202. defer googleapi.CloseBody(res)
  5203. if err := googleapi.CheckResponse(res); err != nil {
  5204. return nil, err
  5205. }
  5206. ret := &Operation{
  5207. ServerResponse: googleapi.ServerResponse{
  5208. Header: res.Header,
  5209. HTTPStatusCode: res.StatusCode,
  5210. },
  5211. }
  5212. target := &ret
  5213. if err := gensupport.DecodeResponse(target, res); err != nil {
  5214. return nil, err
  5215. }
  5216. return ret, nil
  5217. // {
  5218. // "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.",
  5219. // "flatPath": "v1/apps/{appsId}/domainMappings/{domainMappingsId}",
  5220. // "httpMethod": "PATCH",
  5221. // "id": "appengine.apps.domainMappings.patch",
  5222. // "parameterOrder": [
  5223. // "appsId",
  5224. // "domainMappingsId"
  5225. // ],
  5226. // "parameters": {
  5227. // "appsId": {
  5228. // "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/domainMappings/example.com.",
  5229. // "location": "path",
  5230. // "required": true,
  5231. // "type": "string"
  5232. // },
  5233. // "domainMappingsId": {
  5234. // "description": "Part of `name`. See documentation of `appsId`.",
  5235. // "location": "path",
  5236. // "required": true,
  5237. // "type": "string"
  5238. // },
  5239. // "updateMask": {
  5240. // "description": "Standard field mask for the set of fields to be updated.",
  5241. // "format": "google-fieldmask",
  5242. // "location": "query",
  5243. // "type": "string"
  5244. // }
  5245. // },
  5246. // "path": "v1/apps/{appsId}/domainMappings/{domainMappingsId}",
  5247. // "request": {
  5248. // "$ref": "DomainMapping"
  5249. // },
  5250. // "response": {
  5251. // "$ref": "Operation"
  5252. // },
  5253. // "scopes": [
  5254. // "https://www.googleapis.com/auth/cloud-platform"
  5255. // ]
  5256. // }
  5257. }
  5258. // method id "appengine.apps.firewall.ingressRules.batchUpdate":
  5259. type AppsFirewallIngressRulesBatchUpdateCall struct {
  5260. s *APIService
  5261. appsId string
  5262. batchupdateingressrulesrequest *BatchUpdateIngressRulesRequest
  5263. urlParams_ gensupport.URLParams
  5264. ctx_ context.Context
  5265. header_ http.Header
  5266. }
  5267. // BatchUpdate: Replaces the entire firewall ruleset in one bulk
  5268. // operation. This overrides and replaces the rules of an existing
  5269. // firewall with the new rules.If the final rule does not match traffic
  5270. // with the '*' wildcard IP range, then an "allow all" rule is
  5271. // explicitly added to the end of the list.
  5272. func (r *AppsFirewallIngressRulesService) BatchUpdate(appsId string, batchupdateingressrulesrequest *BatchUpdateIngressRulesRequest) *AppsFirewallIngressRulesBatchUpdateCall {
  5273. c := &AppsFirewallIngressRulesBatchUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5274. c.appsId = appsId
  5275. c.batchupdateingressrulesrequest = batchupdateingressrulesrequest
  5276. return c
  5277. }
  5278. // Fields allows partial responses to be retrieved. See
  5279. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5280. // for more information.
  5281. func (c *AppsFirewallIngressRulesBatchUpdateCall) Fields(s ...googleapi.Field) *AppsFirewallIngressRulesBatchUpdateCall {
  5282. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5283. return c
  5284. }
  5285. // Context sets the context to be used in this call's Do method. Any
  5286. // pending HTTP request will be aborted if the provided context is
  5287. // canceled.
  5288. func (c *AppsFirewallIngressRulesBatchUpdateCall) Context(ctx context.Context) *AppsFirewallIngressRulesBatchUpdateCall {
  5289. c.ctx_ = ctx
  5290. return c
  5291. }
  5292. // Header returns an http.Header that can be modified by the caller to
  5293. // add HTTP headers to the request.
  5294. func (c *AppsFirewallIngressRulesBatchUpdateCall) Header() http.Header {
  5295. if c.header_ == nil {
  5296. c.header_ = make(http.Header)
  5297. }
  5298. return c.header_
  5299. }
  5300. func (c *AppsFirewallIngressRulesBatchUpdateCall) doRequest(alt string) (*http.Response, error) {
  5301. reqHeaders := make(http.Header)
  5302. for k, v := range c.header_ {
  5303. reqHeaders[k] = v
  5304. }
  5305. reqHeaders.Set("User-Agent", c.s.userAgent())
  5306. var body io.Reader = nil
  5307. body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchupdateingressrulesrequest)
  5308. if err != nil {
  5309. return nil, err
  5310. }
  5311. reqHeaders.Set("Content-Type", "application/json")
  5312. c.urlParams_.Set("alt", alt)
  5313. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/firewall/ingressRules:batchUpdate")
  5314. urls += "?" + c.urlParams_.Encode()
  5315. req, _ := http.NewRequest("POST", urls, body)
  5316. req.Header = reqHeaders
  5317. googleapi.Expand(req.URL, map[string]string{
  5318. "appsId": c.appsId,
  5319. })
  5320. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5321. }
  5322. // Do executes the "appengine.apps.firewall.ingressRules.batchUpdate" call.
  5323. // Exactly one of *BatchUpdateIngressRulesResponse or error will be
  5324. // non-nil. Any non-2xx status code is an error. Response headers are in
  5325. // either *BatchUpdateIngressRulesResponse.ServerResponse.Header or (if
  5326. // a response was returned at all) in error.(*googleapi.Error).Header.
  5327. // Use googleapi.IsNotModified to check whether the returned error was
  5328. // because http.StatusNotModified was returned.
  5329. func (c *AppsFirewallIngressRulesBatchUpdateCall) Do(opts ...googleapi.CallOption) (*BatchUpdateIngressRulesResponse, error) {
  5330. gensupport.SetOptions(c.urlParams_, opts...)
  5331. res, err := c.doRequest("json")
  5332. if res != nil && res.StatusCode == http.StatusNotModified {
  5333. if res.Body != nil {
  5334. res.Body.Close()
  5335. }
  5336. return nil, &googleapi.Error{
  5337. Code: res.StatusCode,
  5338. Header: res.Header,
  5339. }
  5340. }
  5341. if err != nil {
  5342. return nil, err
  5343. }
  5344. defer googleapi.CloseBody(res)
  5345. if err := googleapi.CheckResponse(res); err != nil {
  5346. return nil, err
  5347. }
  5348. ret := &BatchUpdateIngressRulesResponse{
  5349. ServerResponse: googleapi.ServerResponse{
  5350. Header: res.Header,
  5351. HTTPStatusCode: res.StatusCode,
  5352. },
  5353. }
  5354. target := &ret
  5355. if err := gensupport.DecodeResponse(target, res); err != nil {
  5356. return nil, err
  5357. }
  5358. return ret, nil
  5359. // {
  5360. // "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.",
  5361. // "flatPath": "v1/apps/{appsId}/firewall/ingressRules:batchUpdate",
  5362. // "httpMethod": "POST",
  5363. // "id": "appengine.apps.firewall.ingressRules.batchUpdate",
  5364. // "parameterOrder": [
  5365. // "appsId"
  5366. // ],
  5367. // "parameters": {
  5368. // "appsId": {
  5369. // "description": "Part of `name`. Name of the Firewall collection to set. Example: apps/myapp/firewall/ingressRules.",
  5370. // "location": "path",
  5371. // "required": true,
  5372. // "type": "string"
  5373. // }
  5374. // },
  5375. // "path": "v1/apps/{appsId}/firewall/ingressRules:batchUpdate",
  5376. // "request": {
  5377. // "$ref": "BatchUpdateIngressRulesRequest"
  5378. // },
  5379. // "response": {
  5380. // "$ref": "BatchUpdateIngressRulesResponse"
  5381. // },
  5382. // "scopes": [
  5383. // "https://www.googleapis.com/auth/cloud-platform"
  5384. // ]
  5385. // }
  5386. }
  5387. // method id "appengine.apps.firewall.ingressRules.create":
  5388. type AppsFirewallIngressRulesCreateCall struct {
  5389. s *APIService
  5390. appsId string
  5391. firewallrule *FirewallRule
  5392. urlParams_ gensupport.URLParams
  5393. ctx_ context.Context
  5394. header_ http.Header
  5395. }
  5396. // Create: Creates a firewall rule for the application.
  5397. func (r *AppsFirewallIngressRulesService) Create(appsId string, firewallrule *FirewallRule) *AppsFirewallIngressRulesCreateCall {
  5398. c := &AppsFirewallIngressRulesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5399. c.appsId = appsId
  5400. c.firewallrule = firewallrule
  5401. return c
  5402. }
  5403. // Fields allows partial responses to be retrieved. See
  5404. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5405. // for more information.
  5406. func (c *AppsFirewallIngressRulesCreateCall) Fields(s ...googleapi.Field) *AppsFirewallIngressRulesCreateCall {
  5407. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5408. return c
  5409. }
  5410. // Context sets the context to be used in this call's Do method. Any
  5411. // pending HTTP request will be aborted if the provided context is
  5412. // canceled.
  5413. func (c *AppsFirewallIngressRulesCreateCall) Context(ctx context.Context) *AppsFirewallIngressRulesCreateCall {
  5414. c.ctx_ = ctx
  5415. return c
  5416. }
  5417. // Header returns an http.Header that can be modified by the caller to
  5418. // add HTTP headers to the request.
  5419. func (c *AppsFirewallIngressRulesCreateCall) Header() http.Header {
  5420. if c.header_ == nil {
  5421. c.header_ = make(http.Header)
  5422. }
  5423. return c.header_
  5424. }
  5425. func (c *AppsFirewallIngressRulesCreateCall) doRequest(alt string) (*http.Response, error) {
  5426. reqHeaders := make(http.Header)
  5427. for k, v := range c.header_ {
  5428. reqHeaders[k] = v
  5429. }
  5430. reqHeaders.Set("User-Agent", c.s.userAgent())
  5431. var body io.Reader = nil
  5432. body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewallrule)
  5433. if err != nil {
  5434. return nil, err
  5435. }
  5436. reqHeaders.Set("Content-Type", "application/json")
  5437. c.urlParams_.Set("alt", alt)
  5438. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/firewall/ingressRules")
  5439. urls += "?" + c.urlParams_.Encode()
  5440. req, _ := http.NewRequest("POST", urls, body)
  5441. req.Header = reqHeaders
  5442. googleapi.Expand(req.URL, map[string]string{
  5443. "appsId": c.appsId,
  5444. })
  5445. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5446. }
  5447. // Do executes the "appengine.apps.firewall.ingressRules.create" call.
  5448. // Exactly one of *FirewallRule or error will be non-nil. Any non-2xx
  5449. // status code is an error. Response headers are in either
  5450. // *FirewallRule.ServerResponse.Header or (if a response was returned at
  5451. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  5452. // to check whether the returned error was because
  5453. // http.StatusNotModified was returned.
  5454. func (c *AppsFirewallIngressRulesCreateCall) Do(opts ...googleapi.CallOption) (*FirewallRule, error) {
  5455. gensupport.SetOptions(c.urlParams_, opts...)
  5456. res, err := c.doRequest("json")
  5457. if res != nil && res.StatusCode == http.StatusNotModified {
  5458. if res.Body != nil {
  5459. res.Body.Close()
  5460. }
  5461. return nil, &googleapi.Error{
  5462. Code: res.StatusCode,
  5463. Header: res.Header,
  5464. }
  5465. }
  5466. if err != nil {
  5467. return nil, err
  5468. }
  5469. defer googleapi.CloseBody(res)
  5470. if err := googleapi.CheckResponse(res); err != nil {
  5471. return nil, err
  5472. }
  5473. ret := &FirewallRule{
  5474. ServerResponse: googleapi.ServerResponse{
  5475. Header: res.Header,
  5476. HTTPStatusCode: res.StatusCode,
  5477. },
  5478. }
  5479. target := &ret
  5480. if err := gensupport.DecodeResponse(target, res); err != nil {
  5481. return nil, err
  5482. }
  5483. return ret, nil
  5484. // {
  5485. // "description": "Creates a firewall rule for the application.",
  5486. // "flatPath": "v1/apps/{appsId}/firewall/ingressRules",
  5487. // "httpMethod": "POST",
  5488. // "id": "appengine.apps.firewall.ingressRules.create",
  5489. // "parameterOrder": [
  5490. // "appsId"
  5491. // ],
  5492. // "parameters": {
  5493. // "appsId": {
  5494. // "description": "Part of `parent`. Name of the parent Firewall collection in which to create a new rule. Example: apps/myapp/firewall/ingressRules.",
  5495. // "location": "path",
  5496. // "required": true,
  5497. // "type": "string"
  5498. // }
  5499. // },
  5500. // "path": "v1/apps/{appsId}/firewall/ingressRules",
  5501. // "request": {
  5502. // "$ref": "FirewallRule"
  5503. // },
  5504. // "response": {
  5505. // "$ref": "FirewallRule"
  5506. // },
  5507. // "scopes": [
  5508. // "https://www.googleapis.com/auth/cloud-platform"
  5509. // ]
  5510. // }
  5511. }
  5512. // method id "appengine.apps.firewall.ingressRules.delete":
  5513. type AppsFirewallIngressRulesDeleteCall struct {
  5514. s *APIService
  5515. appsId string
  5516. ingressRulesId string
  5517. urlParams_ gensupport.URLParams
  5518. ctx_ context.Context
  5519. header_ http.Header
  5520. }
  5521. // Delete: Deletes the specified firewall rule.
  5522. func (r *AppsFirewallIngressRulesService) Delete(appsId string, ingressRulesId string) *AppsFirewallIngressRulesDeleteCall {
  5523. c := &AppsFirewallIngressRulesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5524. c.appsId = appsId
  5525. c.ingressRulesId = ingressRulesId
  5526. return c
  5527. }
  5528. // Fields allows partial responses to be retrieved. See
  5529. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5530. // for more information.
  5531. func (c *AppsFirewallIngressRulesDeleteCall) Fields(s ...googleapi.Field) *AppsFirewallIngressRulesDeleteCall {
  5532. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5533. return c
  5534. }
  5535. // Context sets the context to be used in this call's Do method. Any
  5536. // pending HTTP request will be aborted if the provided context is
  5537. // canceled.
  5538. func (c *AppsFirewallIngressRulesDeleteCall) Context(ctx context.Context) *AppsFirewallIngressRulesDeleteCall {
  5539. c.ctx_ = ctx
  5540. return c
  5541. }
  5542. // Header returns an http.Header that can be modified by the caller to
  5543. // add HTTP headers to the request.
  5544. func (c *AppsFirewallIngressRulesDeleteCall) Header() http.Header {
  5545. if c.header_ == nil {
  5546. c.header_ = make(http.Header)
  5547. }
  5548. return c.header_
  5549. }
  5550. func (c *AppsFirewallIngressRulesDeleteCall) doRequest(alt string) (*http.Response, error) {
  5551. reqHeaders := make(http.Header)
  5552. for k, v := range c.header_ {
  5553. reqHeaders[k] = v
  5554. }
  5555. reqHeaders.Set("User-Agent", c.s.userAgent())
  5556. var body io.Reader = nil
  5557. c.urlParams_.Set("alt", alt)
  5558. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/firewall/ingressRules/{ingressRulesId}")
  5559. urls += "?" + c.urlParams_.Encode()
  5560. req, _ := http.NewRequest("DELETE", urls, body)
  5561. req.Header = reqHeaders
  5562. googleapi.Expand(req.URL, map[string]string{
  5563. "appsId": c.appsId,
  5564. "ingressRulesId": c.ingressRulesId,
  5565. })
  5566. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5567. }
  5568. // Do executes the "appengine.apps.firewall.ingressRules.delete" call.
  5569. // Exactly one of *Empty or error will be non-nil. Any non-2xx status
  5570. // code is an error. Response headers are in either
  5571. // *Empty.ServerResponse.Header or (if a response was returned at all)
  5572. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  5573. // check whether the returned error was because http.StatusNotModified
  5574. // was returned.
  5575. func (c *AppsFirewallIngressRulesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  5576. gensupport.SetOptions(c.urlParams_, opts...)
  5577. res, err := c.doRequest("json")
  5578. if res != nil && res.StatusCode == http.StatusNotModified {
  5579. if res.Body != nil {
  5580. res.Body.Close()
  5581. }
  5582. return nil, &googleapi.Error{
  5583. Code: res.StatusCode,
  5584. Header: res.Header,
  5585. }
  5586. }
  5587. if err != nil {
  5588. return nil, err
  5589. }
  5590. defer googleapi.CloseBody(res)
  5591. if err := googleapi.CheckResponse(res); err != nil {
  5592. return nil, err
  5593. }
  5594. ret := &Empty{
  5595. ServerResponse: googleapi.ServerResponse{
  5596. Header: res.Header,
  5597. HTTPStatusCode: res.StatusCode,
  5598. },
  5599. }
  5600. target := &ret
  5601. if err := gensupport.DecodeResponse(target, res); err != nil {
  5602. return nil, err
  5603. }
  5604. return ret, nil
  5605. // {
  5606. // "description": "Deletes the specified firewall rule.",
  5607. // "flatPath": "v1/apps/{appsId}/firewall/ingressRules/{ingressRulesId}",
  5608. // "httpMethod": "DELETE",
  5609. // "id": "appengine.apps.firewall.ingressRules.delete",
  5610. // "parameterOrder": [
  5611. // "appsId",
  5612. // "ingressRulesId"
  5613. // ],
  5614. // "parameters": {
  5615. // "appsId": {
  5616. // "description": "Part of `name`. Name of the Firewall resource to delete. Example: apps/myapp/firewall/ingressRules/100.",
  5617. // "location": "path",
  5618. // "required": true,
  5619. // "type": "string"
  5620. // },
  5621. // "ingressRulesId": {
  5622. // "description": "Part of `name`. See documentation of `appsId`.",
  5623. // "location": "path",
  5624. // "required": true,
  5625. // "type": "string"
  5626. // }
  5627. // },
  5628. // "path": "v1/apps/{appsId}/firewall/ingressRules/{ingressRulesId}",
  5629. // "response": {
  5630. // "$ref": "Empty"
  5631. // },
  5632. // "scopes": [
  5633. // "https://www.googleapis.com/auth/cloud-platform"
  5634. // ]
  5635. // }
  5636. }
  5637. // method id "appengine.apps.firewall.ingressRules.get":
  5638. type AppsFirewallIngressRulesGetCall struct {
  5639. s *APIService
  5640. appsId string
  5641. ingressRulesId string
  5642. urlParams_ gensupport.URLParams
  5643. ifNoneMatch_ string
  5644. ctx_ context.Context
  5645. header_ http.Header
  5646. }
  5647. // Get: Gets the specified firewall rule.
  5648. func (r *AppsFirewallIngressRulesService) Get(appsId string, ingressRulesId string) *AppsFirewallIngressRulesGetCall {
  5649. c := &AppsFirewallIngressRulesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5650. c.appsId = appsId
  5651. c.ingressRulesId = ingressRulesId
  5652. return c
  5653. }
  5654. // Fields allows partial responses to be retrieved. See
  5655. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5656. // for more information.
  5657. func (c *AppsFirewallIngressRulesGetCall) Fields(s ...googleapi.Field) *AppsFirewallIngressRulesGetCall {
  5658. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5659. return c
  5660. }
  5661. // IfNoneMatch sets the optional parameter which makes the operation
  5662. // fail if the object's ETag matches the given value. This is useful for
  5663. // getting updates only after the object has changed since the last
  5664. // request. Use googleapi.IsNotModified to check whether the response
  5665. // error from Do is the result of In-None-Match.
  5666. func (c *AppsFirewallIngressRulesGetCall) IfNoneMatch(entityTag string) *AppsFirewallIngressRulesGetCall {
  5667. c.ifNoneMatch_ = entityTag
  5668. return c
  5669. }
  5670. // Context sets the context to be used in this call's Do method. Any
  5671. // pending HTTP request will be aborted if the provided context is
  5672. // canceled.
  5673. func (c *AppsFirewallIngressRulesGetCall) Context(ctx context.Context) *AppsFirewallIngressRulesGetCall {
  5674. c.ctx_ = ctx
  5675. return c
  5676. }
  5677. // Header returns an http.Header that can be modified by the caller to
  5678. // add HTTP headers to the request.
  5679. func (c *AppsFirewallIngressRulesGetCall) Header() http.Header {
  5680. if c.header_ == nil {
  5681. c.header_ = make(http.Header)
  5682. }
  5683. return c.header_
  5684. }
  5685. func (c *AppsFirewallIngressRulesGetCall) doRequest(alt string) (*http.Response, error) {
  5686. reqHeaders := make(http.Header)
  5687. for k, v := range c.header_ {
  5688. reqHeaders[k] = v
  5689. }
  5690. reqHeaders.Set("User-Agent", c.s.userAgent())
  5691. if c.ifNoneMatch_ != "" {
  5692. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5693. }
  5694. var body io.Reader = nil
  5695. c.urlParams_.Set("alt", alt)
  5696. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/firewall/ingressRules/{ingressRulesId}")
  5697. urls += "?" + c.urlParams_.Encode()
  5698. req, _ := http.NewRequest("GET", urls, body)
  5699. req.Header = reqHeaders
  5700. googleapi.Expand(req.URL, map[string]string{
  5701. "appsId": c.appsId,
  5702. "ingressRulesId": c.ingressRulesId,
  5703. })
  5704. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5705. }
  5706. // Do executes the "appengine.apps.firewall.ingressRules.get" call.
  5707. // Exactly one of *FirewallRule or error will be non-nil. Any non-2xx
  5708. // status code is an error. Response headers are in either
  5709. // *FirewallRule.ServerResponse.Header or (if a response was returned at
  5710. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  5711. // to check whether the returned error was because
  5712. // http.StatusNotModified was returned.
  5713. func (c *AppsFirewallIngressRulesGetCall) Do(opts ...googleapi.CallOption) (*FirewallRule, error) {
  5714. gensupport.SetOptions(c.urlParams_, opts...)
  5715. res, err := c.doRequest("json")
  5716. if res != nil && res.StatusCode == http.StatusNotModified {
  5717. if res.Body != nil {
  5718. res.Body.Close()
  5719. }
  5720. return nil, &googleapi.Error{
  5721. Code: res.StatusCode,
  5722. Header: res.Header,
  5723. }
  5724. }
  5725. if err != nil {
  5726. return nil, err
  5727. }
  5728. defer googleapi.CloseBody(res)
  5729. if err := googleapi.CheckResponse(res); err != nil {
  5730. return nil, err
  5731. }
  5732. ret := &FirewallRule{
  5733. ServerResponse: googleapi.ServerResponse{
  5734. Header: res.Header,
  5735. HTTPStatusCode: res.StatusCode,
  5736. },
  5737. }
  5738. target := &ret
  5739. if err := gensupport.DecodeResponse(target, res); err != nil {
  5740. return nil, err
  5741. }
  5742. return ret, nil
  5743. // {
  5744. // "description": "Gets the specified firewall rule.",
  5745. // "flatPath": "v1/apps/{appsId}/firewall/ingressRules/{ingressRulesId}",
  5746. // "httpMethod": "GET",
  5747. // "id": "appengine.apps.firewall.ingressRules.get",
  5748. // "parameterOrder": [
  5749. // "appsId",
  5750. // "ingressRulesId"
  5751. // ],
  5752. // "parameters": {
  5753. // "appsId": {
  5754. // "description": "Part of `name`. Name of the Firewall resource to retrieve. Example: apps/myapp/firewall/ingressRules/100.",
  5755. // "location": "path",
  5756. // "required": true,
  5757. // "type": "string"
  5758. // },
  5759. // "ingressRulesId": {
  5760. // "description": "Part of `name`. See documentation of `appsId`.",
  5761. // "location": "path",
  5762. // "required": true,
  5763. // "type": "string"
  5764. // }
  5765. // },
  5766. // "path": "v1/apps/{appsId}/firewall/ingressRules/{ingressRulesId}",
  5767. // "response": {
  5768. // "$ref": "FirewallRule"
  5769. // },
  5770. // "scopes": [
  5771. // "https://www.googleapis.com/auth/appengine.admin",
  5772. // "https://www.googleapis.com/auth/cloud-platform",
  5773. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  5774. // ]
  5775. // }
  5776. }
  5777. // method id "appengine.apps.firewall.ingressRules.list":
  5778. type AppsFirewallIngressRulesListCall struct {
  5779. s *APIService
  5780. appsId string
  5781. urlParams_ gensupport.URLParams
  5782. ifNoneMatch_ string
  5783. ctx_ context.Context
  5784. header_ http.Header
  5785. }
  5786. // List: Lists the firewall rules of an application.
  5787. func (r *AppsFirewallIngressRulesService) List(appsId string) *AppsFirewallIngressRulesListCall {
  5788. c := &AppsFirewallIngressRulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5789. c.appsId = appsId
  5790. return c
  5791. }
  5792. // MatchingAddress sets the optional parameter "matchingAddress": A
  5793. // valid IP Address. If set, only rules matching this address will be
  5794. // returned. The first returned rule will be the rule that fires on
  5795. // requests from this IP.
  5796. func (c *AppsFirewallIngressRulesListCall) MatchingAddress(matchingAddress string) *AppsFirewallIngressRulesListCall {
  5797. c.urlParams_.Set("matchingAddress", matchingAddress)
  5798. return c
  5799. }
  5800. // PageSize sets the optional parameter "pageSize": Maximum results to
  5801. // return per page.
  5802. func (c *AppsFirewallIngressRulesListCall) PageSize(pageSize int64) *AppsFirewallIngressRulesListCall {
  5803. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  5804. return c
  5805. }
  5806. // PageToken sets the optional parameter "pageToken": Continuation token
  5807. // for fetching the next page of results.
  5808. func (c *AppsFirewallIngressRulesListCall) PageToken(pageToken string) *AppsFirewallIngressRulesListCall {
  5809. c.urlParams_.Set("pageToken", pageToken)
  5810. return c
  5811. }
  5812. // Fields allows partial responses to be retrieved. See
  5813. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5814. // for more information.
  5815. func (c *AppsFirewallIngressRulesListCall) Fields(s ...googleapi.Field) *AppsFirewallIngressRulesListCall {
  5816. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5817. return c
  5818. }
  5819. // IfNoneMatch sets the optional parameter which makes the operation
  5820. // fail if the object's ETag matches the given value. This is useful for
  5821. // getting updates only after the object has changed since the last
  5822. // request. Use googleapi.IsNotModified to check whether the response
  5823. // error from Do is the result of In-None-Match.
  5824. func (c *AppsFirewallIngressRulesListCall) IfNoneMatch(entityTag string) *AppsFirewallIngressRulesListCall {
  5825. c.ifNoneMatch_ = entityTag
  5826. return c
  5827. }
  5828. // Context sets the context to be used in this call's Do method. Any
  5829. // pending HTTP request will be aborted if the provided context is
  5830. // canceled.
  5831. func (c *AppsFirewallIngressRulesListCall) Context(ctx context.Context) *AppsFirewallIngressRulesListCall {
  5832. c.ctx_ = ctx
  5833. return c
  5834. }
  5835. // Header returns an http.Header that can be modified by the caller to
  5836. // add HTTP headers to the request.
  5837. func (c *AppsFirewallIngressRulesListCall) Header() http.Header {
  5838. if c.header_ == nil {
  5839. c.header_ = make(http.Header)
  5840. }
  5841. return c.header_
  5842. }
  5843. func (c *AppsFirewallIngressRulesListCall) doRequest(alt string) (*http.Response, error) {
  5844. reqHeaders := make(http.Header)
  5845. for k, v := range c.header_ {
  5846. reqHeaders[k] = v
  5847. }
  5848. reqHeaders.Set("User-Agent", c.s.userAgent())
  5849. if c.ifNoneMatch_ != "" {
  5850. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5851. }
  5852. var body io.Reader = nil
  5853. c.urlParams_.Set("alt", alt)
  5854. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/firewall/ingressRules")
  5855. urls += "?" + c.urlParams_.Encode()
  5856. req, _ := http.NewRequest("GET", urls, body)
  5857. req.Header = reqHeaders
  5858. googleapi.Expand(req.URL, map[string]string{
  5859. "appsId": c.appsId,
  5860. })
  5861. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5862. }
  5863. // Do executes the "appengine.apps.firewall.ingressRules.list" call.
  5864. // Exactly one of *ListIngressRulesResponse or error will be non-nil.
  5865. // Any non-2xx status code is an error. Response headers are in either
  5866. // *ListIngressRulesResponse.ServerResponse.Header or (if a response was
  5867. // returned at all) in error.(*googleapi.Error).Header. Use
  5868. // googleapi.IsNotModified to check whether the returned error was
  5869. // because http.StatusNotModified was returned.
  5870. func (c *AppsFirewallIngressRulesListCall) Do(opts ...googleapi.CallOption) (*ListIngressRulesResponse, error) {
  5871. gensupport.SetOptions(c.urlParams_, opts...)
  5872. res, err := c.doRequest("json")
  5873. if res != nil && res.StatusCode == http.StatusNotModified {
  5874. if res.Body != nil {
  5875. res.Body.Close()
  5876. }
  5877. return nil, &googleapi.Error{
  5878. Code: res.StatusCode,
  5879. Header: res.Header,
  5880. }
  5881. }
  5882. if err != nil {
  5883. return nil, err
  5884. }
  5885. defer googleapi.CloseBody(res)
  5886. if err := googleapi.CheckResponse(res); err != nil {
  5887. return nil, err
  5888. }
  5889. ret := &ListIngressRulesResponse{
  5890. ServerResponse: googleapi.ServerResponse{
  5891. Header: res.Header,
  5892. HTTPStatusCode: res.StatusCode,
  5893. },
  5894. }
  5895. target := &ret
  5896. if err := gensupport.DecodeResponse(target, res); err != nil {
  5897. return nil, err
  5898. }
  5899. return ret, nil
  5900. // {
  5901. // "description": "Lists the firewall rules of an application.",
  5902. // "flatPath": "v1/apps/{appsId}/firewall/ingressRules",
  5903. // "httpMethod": "GET",
  5904. // "id": "appengine.apps.firewall.ingressRules.list",
  5905. // "parameterOrder": [
  5906. // "appsId"
  5907. // ],
  5908. // "parameters": {
  5909. // "appsId": {
  5910. // "description": "Part of `parent`. Name of the Firewall collection to retrieve. Example: apps/myapp/firewall/ingressRules.",
  5911. // "location": "path",
  5912. // "required": true,
  5913. // "type": "string"
  5914. // },
  5915. // "matchingAddress": {
  5916. // "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.",
  5917. // "location": "query",
  5918. // "type": "string"
  5919. // },
  5920. // "pageSize": {
  5921. // "description": "Maximum results to return per page.",
  5922. // "format": "int32",
  5923. // "location": "query",
  5924. // "type": "integer"
  5925. // },
  5926. // "pageToken": {
  5927. // "description": "Continuation token for fetching the next page of results.",
  5928. // "location": "query",
  5929. // "type": "string"
  5930. // }
  5931. // },
  5932. // "path": "v1/apps/{appsId}/firewall/ingressRules",
  5933. // "response": {
  5934. // "$ref": "ListIngressRulesResponse"
  5935. // },
  5936. // "scopes": [
  5937. // "https://www.googleapis.com/auth/appengine.admin",
  5938. // "https://www.googleapis.com/auth/cloud-platform",
  5939. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  5940. // ]
  5941. // }
  5942. }
  5943. // Pages invokes f for each page of results.
  5944. // A non-nil error returned from f will halt the iteration.
  5945. // The provided context supersedes any context provided to the Context method.
  5946. func (c *AppsFirewallIngressRulesListCall) Pages(ctx context.Context, f func(*ListIngressRulesResponse) error) error {
  5947. c.ctx_ = ctx
  5948. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  5949. for {
  5950. x, err := c.Do()
  5951. if err != nil {
  5952. return err
  5953. }
  5954. if err := f(x); err != nil {
  5955. return err
  5956. }
  5957. if x.NextPageToken == "" {
  5958. return nil
  5959. }
  5960. c.PageToken(x.NextPageToken)
  5961. }
  5962. }
  5963. // method id "appengine.apps.firewall.ingressRules.patch":
  5964. type AppsFirewallIngressRulesPatchCall struct {
  5965. s *APIService
  5966. appsId string
  5967. ingressRulesId string
  5968. firewallrule *FirewallRule
  5969. urlParams_ gensupport.URLParams
  5970. ctx_ context.Context
  5971. header_ http.Header
  5972. }
  5973. // Patch: Updates the specified firewall rule.
  5974. func (r *AppsFirewallIngressRulesService) Patch(appsId string, ingressRulesId string, firewallrule *FirewallRule) *AppsFirewallIngressRulesPatchCall {
  5975. c := &AppsFirewallIngressRulesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5976. c.appsId = appsId
  5977. c.ingressRulesId = ingressRulesId
  5978. c.firewallrule = firewallrule
  5979. return c
  5980. }
  5981. // UpdateMask sets the optional parameter "updateMask": Standard field
  5982. // mask for the set of fields to be updated.
  5983. func (c *AppsFirewallIngressRulesPatchCall) UpdateMask(updateMask string) *AppsFirewallIngressRulesPatchCall {
  5984. c.urlParams_.Set("updateMask", updateMask)
  5985. return c
  5986. }
  5987. // Fields allows partial responses to be retrieved. See
  5988. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5989. // for more information.
  5990. func (c *AppsFirewallIngressRulesPatchCall) Fields(s ...googleapi.Field) *AppsFirewallIngressRulesPatchCall {
  5991. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5992. return c
  5993. }
  5994. // Context sets the context to be used in this call's Do method. Any
  5995. // pending HTTP request will be aborted if the provided context is
  5996. // canceled.
  5997. func (c *AppsFirewallIngressRulesPatchCall) Context(ctx context.Context) *AppsFirewallIngressRulesPatchCall {
  5998. c.ctx_ = ctx
  5999. return c
  6000. }
  6001. // Header returns an http.Header that can be modified by the caller to
  6002. // add HTTP headers to the request.
  6003. func (c *AppsFirewallIngressRulesPatchCall) Header() http.Header {
  6004. if c.header_ == nil {
  6005. c.header_ = make(http.Header)
  6006. }
  6007. return c.header_
  6008. }
  6009. func (c *AppsFirewallIngressRulesPatchCall) doRequest(alt string) (*http.Response, error) {
  6010. reqHeaders := make(http.Header)
  6011. for k, v := range c.header_ {
  6012. reqHeaders[k] = v
  6013. }
  6014. reqHeaders.Set("User-Agent", c.s.userAgent())
  6015. var body io.Reader = nil
  6016. body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewallrule)
  6017. if err != nil {
  6018. return nil, err
  6019. }
  6020. reqHeaders.Set("Content-Type", "application/json")
  6021. c.urlParams_.Set("alt", alt)
  6022. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/firewall/ingressRules/{ingressRulesId}")
  6023. urls += "?" + c.urlParams_.Encode()
  6024. req, _ := http.NewRequest("PATCH", urls, body)
  6025. req.Header = reqHeaders
  6026. googleapi.Expand(req.URL, map[string]string{
  6027. "appsId": c.appsId,
  6028. "ingressRulesId": c.ingressRulesId,
  6029. })
  6030. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6031. }
  6032. // Do executes the "appengine.apps.firewall.ingressRules.patch" call.
  6033. // Exactly one of *FirewallRule or error will be non-nil. Any non-2xx
  6034. // status code is an error. Response headers are in either
  6035. // *FirewallRule.ServerResponse.Header or (if a response was returned at
  6036. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  6037. // to check whether the returned error was because
  6038. // http.StatusNotModified was returned.
  6039. func (c *AppsFirewallIngressRulesPatchCall) Do(opts ...googleapi.CallOption) (*FirewallRule, error) {
  6040. gensupport.SetOptions(c.urlParams_, opts...)
  6041. res, err := c.doRequest("json")
  6042. if res != nil && res.StatusCode == http.StatusNotModified {
  6043. if res.Body != nil {
  6044. res.Body.Close()
  6045. }
  6046. return nil, &googleapi.Error{
  6047. Code: res.StatusCode,
  6048. Header: res.Header,
  6049. }
  6050. }
  6051. if err != nil {
  6052. return nil, err
  6053. }
  6054. defer googleapi.CloseBody(res)
  6055. if err := googleapi.CheckResponse(res); err != nil {
  6056. return nil, err
  6057. }
  6058. ret := &FirewallRule{
  6059. ServerResponse: googleapi.ServerResponse{
  6060. Header: res.Header,
  6061. HTTPStatusCode: res.StatusCode,
  6062. },
  6063. }
  6064. target := &ret
  6065. if err := gensupport.DecodeResponse(target, res); err != nil {
  6066. return nil, err
  6067. }
  6068. return ret, nil
  6069. // {
  6070. // "description": "Updates the specified firewall rule.",
  6071. // "flatPath": "v1/apps/{appsId}/firewall/ingressRules/{ingressRulesId}",
  6072. // "httpMethod": "PATCH",
  6073. // "id": "appengine.apps.firewall.ingressRules.patch",
  6074. // "parameterOrder": [
  6075. // "appsId",
  6076. // "ingressRulesId"
  6077. // ],
  6078. // "parameters": {
  6079. // "appsId": {
  6080. // "description": "Part of `name`. Name of the Firewall resource to update. Example: apps/myapp/firewall/ingressRules/100.",
  6081. // "location": "path",
  6082. // "required": true,
  6083. // "type": "string"
  6084. // },
  6085. // "ingressRulesId": {
  6086. // "description": "Part of `name`. See documentation of `appsId`.",
  6087. // "location": "path",
  6088. // "required": true,
  6089. // "type": "string"
  6090. // },
  6091. // "updateMask": {
  6092. // "description": "Standard field mask for the set of fields to be updated.",
  6093. // "format": "google-fieldmask",
  6094. // "location": "query",
  6095. // "type": "string"
  6096. // }
  6097. // },
  6098. // "path": "v1/apps/{appsId}/firewall/ingressRules/{ingressRulesId}",
  6099. // "request": {
  6100. // "$ref": "FirewallRule"
  6101. // },
  6102. // "response": {
  6103. // "$ref": "FirewallRule"
  6104. // },
  6105. // "scopes": [
  6106. // "https://www.googleapis.com/auth/cloud-platform"
  6107. // ]
  6108. // }
  6109. }
  6110. // method id "appengine.apps.locations.get":
  6111. type AppsLocationsGetCall struct {
  6112. s *APIService
  6113. appsId string
  6114. locationsId string
  6115. urlParams_ gensupport.URLParams
  6116. ifNoneMatch_ string
  6117. ctx_ context.Context
  6118. header_ http.Header
  6119. }
  6120. // Get: Gets information about a location.
  6121. func (r *AppsLocationsService) Get(appsId string, locationsId string) *AppsLocationsGetCall {
  6122. c := &AppsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6123. c.appsId = appsId
  6124. c.locationsId = locationsId
  6125. return c
  6126. }
  6127. // Fields allows partial responses to be retrieved. See
  6128. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6129. // for more information.
  6130. func (c *AppsLocationsGetCall) Fields(s ...googleapi.Field) *AppsLocationsGetCall {
  6131. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6132. return c
  6133. }
  6134. // IfNoneMatch sets the optional parameter which makes the operation
  6135. // fail if the object's ETag matches the given value. This is useful for
  6136. // getting updates only after the object has changed since the last
  6137. // request. Use googleapi.IsNotModified to check whether the response
  6138. // error from Do is the result of In-None-Match.
  6139. func (c *AppsLocationsGetCall) IfNoneMatch(entityTag string) *AppsLocationsGetCall {
  6140. c.ifNoneMatch_ = entityTag
  6141. return c
  6142. }
  6143. // Context sets the context to be used in this call's Do method. Any
  6144. // pending HTTP request will be aborted if the provided context is
  6145. // canceled.
  6146. func (c *AppsLocationsGetCall) Context(ctx context.Context) *AppsLocationsGetCall {
  6147. c.ctx_ = ctx
  6148. return c
  6149. }
  6150. // Header returns an http.Header that can be modified by the caller to
  6151. // add HTTP headers to the request.
  6152. func (c *AppsLocationsGetCall) Header() http.Header {
  6153. if c.header_ == nil {
  6154. c.header_ = make(http.Header)
  6155. }
  6156. return c.header_
  6157. }
  6158. func (c *AppsLocationsGetCall) doRequest(alt string) (*http.Response, error) {
  6159. reqHeaders := make(http.Header)
  6160. for k, v := range c.header_ {
  6161. reqHeaders[k] = v
  6162. }
  6163. reqHeaders.Set("User-Agent", c.s.userAgent())
  6164. if c.ifNoneMatch_ != "" {
  6165. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6166. }
  6167. var body io.Reader = nil
  6168. c.urlParams_.Set("alt", alt)
  6169. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/locations/{locationsId}")
  6170. urls += "?" + c.urlParams_.Encode()
  6171. req, _ := http.NewRequest("GET", urls, body)
  6172. req.Header = reqHeaders
  6173. googleapi.Expand(req.URL, map[string]string{
  6174. "appsId": c.appsId,
  6175. "locationsId": c.locationsId,
  6176. })
  6177. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6178. }
  6179. // Do executes the "appengine.apps.locations.get" call.
  6180. // Exactly one of *Location or error will be non-nil. Any non-2xx status
  6181. // code is an error. Response headers are in either
  6182. // *Location.ServerResponse.Header or (if a response was returned at
  6183. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  6184. // to check whether the returned error was because
  6185. // http.StatusNotModified was returned.
  6186. func (c *AppsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) {
  6187. gensupport.SetOptions(c.urlParams_, opts...)
  6188. res, err := c.doRequest("json")
  6189. if res != nil && res.StatusCode == http.StatusNotModified {
  6190. if res.Body != nil {
  6191. res.Body.Close()
  6192. }
  6193. return nil, &googleapi.Error{
  6194. Code: res.StatusCode,
  6195. Header: res.Header,
  6196. }
  6197. }
  6198. if err != nil {
  6199. return nil, err
  6200. }
  6201. defer googleapi.CloseBody(res)
  6202. if err := googleapi.CheckResponse(res); err != nil {
  6203. return nil, err
  6204. }
  6205. ret := &Location{
  6206. ServerResponse: googleapi.ServerResponse{
  6207. Header: res.Header,
  6208. HTTPStatusCode: res.StatusCode,
  6209. },
  6210. }
  6211. target := &ret
  6212. if err := gensupport.DecodeResponse(target, res); err != nil {
  6213. return nil, err
  6214. }
  6215. return ret, nil
  6216. // {
  6217. // "description": "Gets information about a location.",
  6218. // "flatPath": "v1/apps/{appsId}/locations/{locationsId}",
  6219. // "httpMethod": "GET",
  6220. // "id": "appengine.apps.locations.get",
  6221. // "parameterOrder": [
  6222. // "appsId",
  6223. // "locationsId"
  6224. // ],
  6225. // "parameters": {
  6226. // "appsId": {
  6227. // "description": "Part of `name`. Resource name for the location.",
  6228. // "location": "path",
  6229. // "required": true,
  6230. // "type": "string"
  6231. // },
  6232. // "locationsId": {
  6233. // "description": "Part of `name`. See documentation of `appsId`.",
  6234. // "location": "path",
  6235. // "required": true,
  6236. // "type": "string"
  6237. // }
  6238. // },
  6239. // "path": "v1/apps/{appsId}/locations/{locationsId}",
  6240. // "response": {
  6241. // "$ref": "Location"
  6242. // },
  6243. // "scopes": [
  6244. // "https://www.googleapis.com/auth/appengine.admin",
  6245. // "https://www.googleapis.com/auth/cloud-platform",
  6246. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  6247. // ]
  6248. // }
  6249. }
  6250. // method id "appengine.apps.locations.list":
  6251. type AppsLocationsListCall struct {
  6252. s *APIService
  6253. appsId string
  6254. urlParams_ gensupport.URLParams
  6255. ifNoneMatch_ string
  6256. ctx_ context.Context
  6257. header_ http.Header
  6258. }
  6259. // List: Lists information about the supported locations for this
  6260. // service.
  6261. func (r *AppsLocationsService) List(appsId string) *AppsLocationsListCall {
  6262. c := &AppsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6263. c.appsId = appsId
  6264. return c
  6265. }
  6266. // Filter sets the optional parameter "filter": The standard list
  6267. // filter.
  6268. func (c *AppsLocationsListCall) Filter(filter string) *AppsLocationsListCall {
  6269. c.urlParams_.Set("filter", filter)
  6270. return c
  6271. }
  6272. // PageSize sets the optional parameter "pageSize": The standard list
  6273. // page size.
  6274. func (c *AppsLocationsListCall) PageSize(pageSize int64) *AppsLocationsListCall {
  6275. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  6276. return c
  6277. }
  6278. // PageToken sets the optional parameter "pageToken": The standard list
  6279. // page token.
  6280. func (c *AppsLocationsListCall) PageToken(pageToken string) *AppsLocationsListCall {
  6281. c.urlParams_.Set("pageToken", pageToken)
  6282. return c
  6283. }
  6284. // Fields allows partial responses to be retrieved. See
  6285. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6286. // for more information.
  6287. func (c *AppsLocationsListCall) Fields(s ...googleapi.Field) *AppsLocationsListCall {
  6288. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6289. return c
  6290. }
  6291. // IfNoneMatch sets the optional parameter which makes the operation
  6292. // fail if the object's ETag matches the given value. This is useful for
  6293. // getting updates only after the object has changed since the last
  6294. // request. Use googleapi.IsNotModified to check whether the response
  6295. // error from Do is the result of In-None-Match.
  6296. func (c *AppsLocationsListCall) IfNoneMatch(entityTag string) *AppsLocationsListCall {
  6297. c.ifNoneMatch_ = entityTag
  6298. return c
  6299. }
  6300. // Context sets the context to be used in this call's Do method. Any
  6301. // pending HTTP request will be aborted if the provided context is
  6302. // canceled.
  6303. func (c *AppsLocationsListCall) Context(ctx context.Context) *AppsLocationsListCall {
  6304. c.ctx_ = ctx
  6305. return c
  6306. }
  6307. // Header returns an http.Header that can be modified by the caller to
  6308. // add HTTP headers to the request.
  6309. func (c *AppsLocationsListCall) Header() http.Header {
  6310. if c.header_ == nil {
  6311. c.header_ = make(http.Header)
  6312. }
  6313. return c.header_
  6314. }
  6315. func (c *AppsLocationsListCall) doRequest(alt string) (*http.Response, error) {
  6316. reqHeaders := make(http.Header)
  6317. for k, v := range c.header_ {
  6318. reqHeaders[k] = v
  6319. }
  6320. reqHeaders.Set("User-Agent", c.s.userAgent())
  6321. if c.ifNoneMatch_ != "" {
  6322. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6323. }
  6324. var body io.Reader = nil
  6325. c.urlParams_.Set("alt", alt)
  6326. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/locations")
  6327. urls += "?" + c.urlParams_.Encode()
  6328. req, _ := http.NewRequest("GET", urls, body)
  6329. req.Header = reqHeaders
  6330. googleapi.Expand(req.URL, map[string]string{
  6331. "appsId": c.appsId,
  6332. })
  6333. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6334. }
  6335. // Do executes the "appengine.apps.locations.list" call.
  6336. // Exactly one of *ListLocationsResponse or error will be non-nil. Any
  6337. // non-2xx status code is an error. Response headers are in either
  6338. // *ListLocationsResponse.ServerResponse.Header or (if a response was
  6339. // returned at all) in error.(*googleapi.Error).Header. Use
  6340. // googleapi.IsNotModified to check whether the returned error was
  6341. // because http.StatusNotModified was returned.
  6342. func (c *AppsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) {
  6343. gensupport.SetOptions(c.urlParams_, opts...)
  6344. res, err := c.doRequest("json")
  6345. if res != nil && res.StatusCode == http.StatusNotModified {
  6346. if res.Body != nil {
  6347. res.Body.Close()
  6348. }
  6349. return nil, &googleapi.Error{
  6350. Code: res.StatusCode,
  6351. Header: res.Header,
  6352. }
  6353. }
  6354. if err != nil {
  6355. return nil, err
  6356. }
  6357. defer googleapi.CloseBody(res)
  6358. if err := googleapi.CheckResponse(res); err != nil {
  6359. return nil, err
  6360. }
  6361. ret := &ListLocationsResponse{
  6362. ServerResponse: googleapi.ServerResponse{
  6363. Header: res.Header,
  6364. HTTPStatusCode: res.StatusCode,
  6365. },
  6366. }
  6367. target := &ret
  6368. if err := gensupport.DecodeResponse(target, res); err != nil {
  6369. return nil, err
  6370. }
  6371. return ret, nil
  6372. // {
  6373. // "description": "Lists information about the supported locations for this service.",
  6374. // "flatPath": "v1/apps/{appsId}/locations",
  6375. // "httpMethod": "GET",
  6376. // "id": "appengine.apps.locations.list",
  6377. // "parameterOrder": [
  6378. // "appsId"
  6379. // ],
  6380. // "parameters": {
  6381. // "appsId": {
  6382. // "description": "Part of `name`. The resource that owns the locations collection, if applicable.",
  6383. // "location": "path",
  6384. // "required": true,
  6385. // "type": "string"
  6386. // },
  6387. // "filter": {
  6388. // "description": "The standard list filter.",
  6389. // "location": "query",
  6390. // "type": "string"
  6391. // },
  6392. // "pageSize": {
  6393. // "description": "The standard list page size.",
  6394. // "format": "int32",
  6395. // "location": "query",
  6396. // "type": "integer"
  6397. // },
  6398. // "pageToken": {
  6399. // "description": "The standard list page token.",
  6400. // "location": "query",
  6401. // "type": "string"
  6402. // }
  6403. // },
  6404. // "path": "v1/apps/{appsId}/locations",
  6405. // "response": {
  6406. // "$ref": "ListLocationsResponse"
  6407. // },
  6408. // "scopes": [
  6409. // "https://www.googleapis.com/auth/appengine.admin",
  6410. // "https://www.googleapis.com/auth/cloud-platform",
  6411. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  6412. // ]
  6413. // }
  6414. }
  6415. // Pages invokes f for each page of results.
  6416. // A non-nil error returned from f will halt the iteration.
  6417. // The provided context supersedes any context provided to the Context method.
  6418. func (c *AppsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error {
  6419. c.ctx_ = ctx
  6420. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  6421. for {
  6422. x, err := c.Do()
  6423. if err != nil {
  6424. return err
  6425. }
  6426. if err := f(x); err != nil {
  6427. return err
  6428. }
  6429. if x.NextPageToken == "" {
  6430. return nil
  6431. }
  6432. c.PageToken(x.NextPageToken)
  6433. }
  6434. }
  6435. // method id "appengine.apps.operations.get":
  6436. type AppsOperationsGetCall struct {
  6437. s *APIService
  6438. appsId string
  6439. operationsId string
  6440. urlParams_ gensupport.URLParams
  6441. ifNoneMatch_ string
  6442. ctx_ context.Context
  6443. header_ http.Header
  6444. }
  6445. // Get: Gets the latest state of a long-running operation. Clients can
  6446. // use this method to poll the operation result at intervals as
  6447. // recommended by the API service.
  6448. func (r *AppsOperationsService) Get(appsId string, operationsId string) *AppsOperationsGetCall {
  6449. c := &AppsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6450. c.appsId = appsId
  6451. c.operationsId = operationsId
  6452. return c
  6453. }
  6454. // Fields allows partial responses to be retrieved. See
  6455. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6456. // for more information.
  6457. func (c *AppsOperationsGetCall) Fields(s ...googleapi.Field) *AppsOperationsGetCall {
  6458. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6459. return c
  6460. }
  6461. // IfNoneMatch sets the optional parameter which makes the operation
  6462. // fail if the object's ETag matches the given value. This is useful for
  6463. // getting updates only after the object has changed since the last
  6464. // request. Use googleapi.IsNotModified to check whether the response
  6465. // error from Do is the result of In-None-Match.
  6466. func (c *AppsOperationsGetCall) IfNoneMatch(entityTag string) *AppsOperationsGetCall {
  6467. c.ifNoneMatch_ = entityTag
  6468. return c
  6469. }
  6470. // Context sets the context to be used in this call's Do method. Any
  6471. // pending HTTP request will be aborted if the provided context is
  6472. // canceled.
  6473. func (c *AppsOperationsGetCall) Context(ctx context.Context) *AppsOperationsGetCall {
  6474. c.ctx_ = ctx
  6475. return c
  6476. }
  6477. // Header returns an http.Header that can be modified by the caller to
  6478. // add HTTP headers to the request.
  6479. func (c *AppsOperationsGetCall) Header() http.Header {
  6480. if c.header_ == nil {
  6481. c.header_ = make(http.Header)
  6482. }
  6483. return c.header_
  6484. }
  6485. func (c *AppsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
  6486. reqHeaders := make(http.Header)
  6487. for k, v := range c.header_ {
  6488. reqHeaders[k] = v
  6489. }
  6490. reqHeaders.Set("User-Agent", c.s.userAgent())
  6491. if c.ifNoneMatch_ != "" {
  6492. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6493. }
  6494. var body io.Reader = nil
  6495. c.urlParams_.Set("alt", alt)
  6496. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/operations/{operationsId}")
  6497. urls += "?" + c.urlParams_.Encode()
  6498. req, _ := http.NewRequest("GET", urls, body)
  6499. req.Header = reqHeaders
  6500. googleapi.Expand(req.URL, map[string]string{
  6501. "appsId": c.appsId,
  6502. "operationsId": c.operationsId,
  6503. })
  6504. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6505. }
  6506. // Do executes the "appengine.apps.operations.get" call.
  6507. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  6508. // status code is an error. Response headers are in either
  6509. // *Operation.ServerResponse.Header or (if a response was returned at
  6510. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  6511. // to check whether the returned error was because
  6512. // http.StatusNotModified was returned.
  6513. func (c *AppsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  6514. gensupport.SetOptions(c.urlParams_, opts...)
  6515. res, err := c.doRequest("json")
  6516. if res != nil && res.StatusCode == http.StatusNotModified {
  6517. if res.Body != nil {
  6518. res.Body.Close()
  6519. }
  6520. return nil, &googleapi.Error{
  6521. Code: res.StatusCode,
  6522. Header: res.Header,
  6523. }
  6524. }
  6525. if err != nil {
  6526. return nil, err
  6527. }
  6528. defer googleapi.CloseBody(res)
  6529. if err := googleapi.CheckResponse(res); err != nil {
  6530. return nil, err
  6531. }
  6532. ret := &Operation{
  6533. ServerResponse: googleapi.ServerResponse{
  6534. Header: res.Header,
  6535. HTTPStatusCode: res.StatusCode,
  6536. },
  6537. }
  6538. target := &ret
  6539. if err := gensupport.DecodeResponse(target, res); err != nil {
  6540. return nil, err
  6541. }
  6542. return ret, nil
  6543. // {
  6544. // "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.",
  6545. // "flatPath": "v1/apps/{appsId}/operations/{operationsId}",
  6546. // "httpMethod": "GET",
  6547. // "id": "appengine.apps.operations.get",
  6548. // "parameterOrder": [
  6549. // "appsId",
  6550. // "operationsId"
  6551. // ],
  6552. // "parameters": {
  6553. // "appsId": {
  6554. // "description": "Part of `name`. The name of the operation resource.",
  6555. // "location": "path",
  6556. // "required": true,
  6557. // "type": "string"
  6558. // },
  6559. // "operationsId": {
  6560. // "description": "Part of `name`. See documentation of `appsId`.",
  6561. // "location": "path",
  6562. // "required": true,
  6563. // "type": "string"
  6564. // }
  6565. // },
  6566. // "path": "v1/apps/{appsId}/operations/{operationsId}",
  6567. // "response": {
  6568. // "$ref": "Operation"
  6569. // },
  6570. // "scopes": [
  6571. // "https://www.googleapis.com/auth/appengine.admin",
  6572. // "https://www.googleapis.com/auth/cloud-platform",
  6573. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  6574. // ]
  6575. // }
  6576. }
  6577. // method id "appengine.apps.operations.list":
  6578. type AppsOperationsListCall struct {
  6579. s *APIService
  6580. appsId string
  6581. urlParams_ gensupport.URLParams
  6582. ifNoneMatch_ string
  6583. ctx_ context.Context
  6584. header_ http.Header
  6585. }
  6586. // List: Lists operations that match the specified filter in the
  6587. // request. If the server doesn't support this method, it returns
  6588. // UNIMPLEMENTED.NOTE: the name binding allows API services to override
  6589. // the binding to use different resource name schemes, such as
  6590. // users/*/operations. To override the binding, API services can add a
  6591. // binding such as "/v1/{name=users/*}/operations" to their service
  6592. // configuration. For backwards compatibility, the default name includes
  6593. // the operations collection id, however overriding users must ensure
  6594. // the name binding is the parent resource, without the operations
  6595. // collection id.
  6596. func (r *AppsOperationsService) List(appsId string) *AppsOperationsListCall {
  6597. c := &AppsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6598. c.appsId = appsId
  6599. return c
  6600. }
  6601. // Filter sets the optional parameter "filter": The standard list
  6602. // filter.
  6603. func (c *AppsOperationsListCall) Filter(filter string) *AppsOperationsListCall {
  6604. c.urlParams_.Set("filter", filter)
  6605. return c
  6606. }
  6607. // PageSize sets the optional parameter "pageSize": The standard list
  6608. // page size.
  6609. func (c *AppsOperationsListCall) PageSize(pageSize int64) *AppsOperationsListCall {
  6610. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  6611. return c
  6612. }
  6613. // PageToken sets the optional parameter "pageToken": The standard list
  6614. // page token.
  6615. func (c *AppsOperationsListCall) PageToken(pageToken string) *AppsOperationsListCall {
  6616. c.urlParams_.Set("pageToken", pageToken)
  6617. return c
  6618. }
  6619. // Fields allows partial responses to be retrieved. See
  6620. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6621. // for more information.
  6622. func (c *AppsOperationsListCall) Fields(s ...googleapi.Field) *AppsOperationsListCall {
  6623. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6624. return c
  6625. }
  6626. // IfNoneMatch sets the optional parameter which makes the operation
  6627. // fail if the object's ETag matches the given value. This is useful for
  6628. // getting updates only after the object has changed since the last
  6629. // request. Use googleapi.IsNotModified to check whether the response
  6630. // error from Do is the result of In-None-Match.
  6631. func (c *AppsOperationsListCall) IfNoneMatch(entityTag string) *AppsOperationsListCall {
  6632. c.ifNoneMatch_ = entityTag
  6633. return c
  6634. }
  6635. // Context sets the context to be used in this call's Do method. Any
  6636. // pending HTTP request will be aborted if the provided context is
  6637. // canceled.
  6638. func (c *AppsOperationsListCall) Context(ctx context.Context) *AppsOperationsListCall {
  6639. c.ctx_ = ctx
  6640. return c
  6641. }
  6642. // Header returns an http.Header that can be modified by the caller to
  6643. // add HTTP headers to the request.
  6644. func (c *AppsOperationsListCall) Header() http.Header {
  6645. if c.header_ == nil {
  6646. c.header_ = make(http.Header)
  6647. }
  6648. return c.header_
  6649. }
  6650. func (c *AppsOperationsListCall) doRequest(alt string) (*http.Response, error) {
  6651. reqHeaders := make(http.Header)
  6652. for k, v := range c.header_ {
  6653. reqHeaders[k] = v
  6654. }
  6655. reqHeaders.Set("User-Agent", c.s.userAgent())
  6656. if c.ifNoneMatch_ != "" {
  6657. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6658. }
  6659. var body io.Reader = nil
  6660. c.urlParams_.Set("alt", alt)
  6661. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/operations")
  6662. urls += "?" + c.urlParams_.Encode()
  6663. req, _ := http.NewRequest("GET", urls, body)
  6664. req.Header = reqHeaders
  6665. googleapi.Expand(req.URL, map[string]string{
  6666. "appsId": c.appsId,
  6667. })
  6668. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6669. }
  6670. // Do executes the "appengine.apps.operations.list" call.
  6671. // Exactly one of *ListOperationsResponse or error will be non-nil. Any
  6672. // non-2xx status code is an error. Response headers are in either
  6673. // *ListOperationsResponse.ServerResponse.Header or (if a response was
  6674. // returned at all) in error.(*googleapi.Error).Header. Use
  6675. // googleapi.IsNotModified to check whether the returned error was
  6676. // because http.StatusNotModified was returned.
  6677. func (c *AppsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
  6678. gensupport.SetOptions(c.urlParams_, opts...)
  6679. res, err := c.doRequest("json")
  6680. if res != nil && res.StatusCode == http.StatusNotModified {
  6681. if res.Body != nil {
  6682. res.Body.Close()
  6683. }
  6684. return nil, &googleapi.Error{
  6685. Code: res.StatusCode,
  6686. Header: res.Header,
  6687. }
  6688. }
  6689. if err != nil {
  6690. return nil, err
  6691. }
  6692. defer googleapi.CloseBody(res)
  6693. if err := googleapi.CheckResponse(res); err != nil {
  6694. return nil, err
  6695. }
  6696. ret := &ListOperationsResponse{
  6697. ServerResponse: googleapi.ServerResponse{
  6698. Header: res.Header,
  6699. HTTPStatusCode: res.StatusCode,
  6700. },
  6701. }
  6702. target := &ret
  6703. if err := gensupport.DecodeResponse(target, res); err != nil {
  6704. return nil, err
  6705. }
  6706. return ret, nil
  6707. // {
  6708. // "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.",
  6709. // "flatPath": "v1/apps/{appsId}/operations",
  6710. // "httpMethod": "GET",
  6711. // "id": "appengine.apps.operations.list",
  6712. // "parameterOrder": [
  6713. // "appsId"
  6714. // ],
  6715. // "parameters": {
  6716. // "appsId": {
  6717. // "description": "Part of `name`. The name of the operation's parent resource.",
  6718. // "location": "path",
  6719. // "required": true,
  6720. // "type": "string"
  6721. // },
  6722. // "filter": {
  6723. // "description": "The standard list filter.",
  6724. // "location": "query",
  6725. // "type": "string"
  6726. // },
  6727. // "pageSize": {
  6728. // "description": "The standard list page size.",
  6729. // "format": "int32",
  6730. // "location": "query",
  6731. // "type": "integer"
  6732. // },
  6733. // "pageToken": {
  6734. // "description": "The standard list page token.",
  6735. // "location": "query",
  6736. // "type": "string"
  6737. // }
  6738. // },
  6739. // "path": "v1/apps/{appsId}/operations",
  6740. // "response": {
  6741. // "$ref": "ListOperationsResponse"
  6742. // },
  6743. // "scopes": [
  6744. // "https://www.googleapis.com/auth/appengine.admin",
  6745. // "https://www.googleapis.com/auth/cloud-platform",
  6746. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  6747. // ]
  6748. // }
  6749. }
  6750. // Pages invokes f for each page of results.
  6751. // A non-nil error returned from f will halt the iteration.
  6752. // The provided context supersedes any context provided to the Context method.
  6753. func (c *AppsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
  6754. c.ctx_ = ctx
  6755. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  6756. for {
  6757. x, err := c.Do()
  6758. if err != nil {
  6759. return err
  6760. }
  6761. if err := f(x); err != nil {
  6762. return err
  6763. }
  6764. if x.NextPageToken == "" {
  6765. return nil
  6766. }
  6767. c.PageToken(x.NextPageToken)
  6768. }
  6769. }
  6770. // method id "appengine.apps.services.delete":
  6771. type AppsServicesDeleteCall struct {
  6772. s *APIService
  6773. appsId string
  6774. servicesId string
  6775. urlParams_ gensupport.URLParams
  6776. ctx_ context.Context
  6777. header_ http.Header
  6778. }
  6779. // Delete: Deletes the specified service and all enclosed versions.
  6780. func (r *AppsServicesService) Delete(appsId string, servicesId string) *AppsServicesDeleteCall {
  6781. c := &AppsServicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6782. c.appsId = appsId
  6783. c.servicesId = servicesId
  6784. return c
  6785. }
  6786. // Fields allows partial responses to be retrieved. See
  6787. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6788. // for more information.
  6789. func (c *AppsServicesDeleteCall) Fields(s ...googleapi.Field) *AppsServicesDeleteCall {
  6790. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6791. return c
  6792. }
  6793. // Context sets the context to be used in this call's Do method. Any
  6794. // pending HTTP request will be aborted if the provided context is
  6795. // canceled.
  6796. func (c *AppsServicesDeleteCall) Context(ctx context.Context) *AppsServicesDeleteCall {
  6797. c.ctx_ = ctx
  6798. return c
  6799. }
  6800. // Header returns an http.Header that can be modified by the caller to
  6801. // add HTTP headers to the request.
  6802. func (c *AppsServicesDeleteCall) Header() http.Header {
  6803. if c.header_ == nil {
  6804. c.header_ = make(http.Header)
  6805. }
  6806. return c.header_
  6807. }
  6808. func (c *AppsServicesDeleteCall) doRequest(alt string) (*http.Response, error) {
  6809. reqHeaders := make(http.Header)
  6810. for k, v := range c.header_ {
  6811. reqHeaders[k] = v
  6812. }
  6813. reqHeaders.Set("User-Agent", c.s.userAgent())
  6814. var body io.Reader = nil
  6815. c.urlParams_.Set("alt", alt)
  6816. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/services/{servicesId}")
  6817. urls += "?" + c.urlParams_.Encode()
  6818. req, _ := http.NewRequest("DELETE", urls, body)
  6819. req.Header = reqHeaders
  6820. googleapi.Expand(req.URL, map[string]string{
  6821. "appsId": c.appsId,
  6822. "servicesId": c.servicesId,
  6823. })
  6824. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6825. }
  6826. // Do executes the "appengine.apps.services.delete" call.
  6827. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  6828. // status code is an error. Response headers are in either
  6829. // *Operation.ServerResponse.Header or (if a response was returned at
  6830. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  6831. // to check whether the returned error was because
  6832. // http.StatusNotModified was returned.
  6833. func (c *AppsServicesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  6834. gensupport.SetOptions(c.urlParams_, opts...)
  6835. res, err := c.doRequest("json")
  6836. if res != nil && res.StatusCode == http.StatusNotModified {
  6837. if res.Body != nil {
  6838. res.Body.Close()
  6839. }
  6840. return nil, &googleapi.Error{
  6841. Code: res.StatusCode,
  6842. Header: res.Header,
  6843. }
  6844. }
  6845. if err != nil {
  6846. return nil, err
  6847. }
  6848. defer googleapi.CloseBody(res)
  6849. if err := googleapi.CheckResponse(res); err != nil {
  6850. return nil, err
  6851. }
  6852. ret := &Operation{
  6853. ServerResponse: googleapi.ServerResponse{
  6854. Header: res.Header,
  6855. HTTPStatusCode: res.StatusCode,
  6856. },
  6857. }
  6858. target := &ret
  6859. if err := gensupport.DecodeResponse(target, res); err != nil {
  6860. return nil, err
  6861. }
  6862. return ret, nil
  6863. // {
  6864. // "description": "Deletes the specified service and all enclosed versions.",
  6865. // "flatPath": "v1/apps/{appsId}/services/{servicesId}",
  6866. // "httpMethod": "DELETE",
  6867. // "id": "appengine.apps.services.delete",
  6868. // "parameterOrder": [
  6869. // "appsId",
  6870. // "servicesId"
  6871. // ],
  6872. // "parameters": {
  6873. // "appsId": {
  6874. // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default.",
  6875. // "location": "path",
  6876. // "required": true,
  6877. // "type": "string"
  6878. // },
  6879. // "servicesId": {
  6880. // "description": "Part of `name`. See documentation of `appsId`.",
  6881. // "location": "path",
  6882. // "required": true,
  6883. // "type": "string"
  6884. // }
  6885. // },
  6886. // "path": "v1/apps/{appsId}/services/{servicesId}",
  6887. // "response": {
  6888. // "$ref": "Operation"
  6889. // },
  6890. // "scopes": [
  6891. // "https://www.googleapis.com/auth/cloud-platform"
  6892. // ]
  6893. // }
  6894. }
  6895. // method id "appengine.apps.services.get":
  6896. type AppsServicesGetCall struct {
  6897. s *APIService
  6898. appsId string
  6899. servicesId string
  6900. urlParams_ gensupport.URLParams
  6901. ifNoneMatch_ string
  6902. ctx_ context.Context
  6903. header_ http.Header
  6904. }
  6905. // Get: Gets the current configuration of the specified service.
  6906. func (r *AppsServicesService) Get(appsId string, servicesId string) *AppsServicesGetCall {
  6907. c := &AppsServicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6908. c.appsId = appsId
  6909. c.servicesId = servicesId
  6910. return c
  6911. }
  6912. // Fields allows partial responses to be retrieved. See
  6913. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6914. // for more information.
  6915. func (c *AppsServicesGetCall) Fields(s ...googleapi.Field) *AppsServicesGetCall {
  6916. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6917. return c
  6918. }
  6919. // IfNoneMatch sets the optional parameter which makes the operation
  6920. // fail if the object's ETag matches the given value. This is useful for
  6921. // getting updates only after the object has changed since the last
  6922. // request. Use googleapi.IsNotModified to check whether the response
  6923. // error from Do is the result of In-None-Match.
  6924. func (c *AppsServicesGetCall) IfNoneMatch(entityTag string) *AppsServicesGetCall {
  6925. c.ifNoneMatch_ = entityTag
  6926. return c
  6927. }
  6928. // Context sets the context to be used in this call's Do method. Any
  6929. // pending HTTP request will be aborted if the provided context is
  6930. // canceled.
  6931. func (c *AppsServicesGetCall) Context(ctx context.Context) *AppsServicesGetCall {
  6932. c.ctx_ = ctx
  6933. return c
  6934. }
  6935. // Header returns an http.Header that can be modified by the caller to
  6936. // add HTTP headers to the request.
  6937. func (c *AppsServicesGetCall) Header() http.Header {
  6938. if c.header_ == nil {
  6939. c.header_ = make(http.Header)
  6940. }
  6941. return c.header_
  6942. }
  6943. func (c *AppsServicesGetCall) doRequest(alt string) (*http.Response, error) {
  6944. reqHeaders := make(http.Header)
  6945. for k, v := range c.header_ {
  6946. reqHeaders[k] = v
  6947. }
  6948. reqHeaders.Set("User-Agent", c.s.userAgent())
  6949. if c.ifNoneMatch_ != "" {
  6950. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6951. }
  6952. var body io.Reader = nil
  6953. c.urlParams_.Set("alt", alt)
  6954. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/services/{servicesId}")
  6955. urls += "?" + c.urlParams_.Encode()
  6956. req, _ := http.NewRequest("GET", urls, body)
  6957. req.Header = reqHeaders
  6958. googleapi.Expand(req.URL, map[string]string{
  6959. "appsId": c.appsId,
  6960. "servicesId": c.servicesId,
  6961. })
  6962. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6963. }
  6964. // Do executes the "appengine.apps.services.get" call.
  6965. // Exactly one of *Service or error will be non-nil. Any non-2xx status
  6966. // code is an error. Response headers are in either
  6967. // *Service.ServerResponse.Header or (if a response was returned at all)
  6968. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  6969. // check whether the returned error was because http.StatusNotModified
  6970. // was returned.
  6971. func (c *AppsServicesGetCall) Do(opts ...googleapi.CallOption) (*Service, error) {
  6972. gensupport.SetOptions(c.urlParams_, opts...)
  6973. res, err := c.doRequest("json")
  6974. if res != nil && res.StatusCode == http.StatusNotModified {
  6975. if res.Body != nil {
  6976. res.Body.Close()
  6977. }
  6978. return nil, &googleapi.Error{
  6979. Code: res.StatusCode,
  6980. Header: res.Header,
  6981. }
  6982. }
  6983. if err != nil {
  6984. return nil, err
  6985. }
  6986. defer googleapi.CloseBody(res)
  6987. if err := googleapi.CheckResponse(res); err != nil {
  6988. return nil, err
  6989. }
  6990. ret := &Service{
  6991. ServerResponse: googleapi.ServerResponse{
  6992. Header: res.Header,
  6993. HTTPStatusCode: res.StatusCode,
  6994. },
  6995. }
  6996. target := &ret
  6997. if err := gensupport.DecodeResponse(target, res); err != nil {
  6998. return nil, err
  6999. }
  7000. return ret, nil
  7001. // {
  7002. // "description": "Gets the current configuration of the specified service.",
  7003. // "flatPath": "v1/apps/{appsId}/services/{servicesId}",
  7004. // "httpMethod": "GET",
  7005. // "id": "appengine.apps.services.get",
  7006. // "parameterOrder": [
  7007. // "appsId",
  7008. // "servicesId"
  7009. // ],
  7010. // "parameters": {
  7011. // "appsId": {
  7012. // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default.",
  7013. // "location": "path",
  7014. // "required": true,
  7015. // "type": "string"
  7016. // },
  7017. // "servicesId": {
  7018. // "description": "Part of `name`. See documentation of `appsId`.",
  7019. // "location": "path",
  7020. // "required": true,
  7021. // "type": "string"
  7022. // }
  7023. // },
  7024. // "path": "v1/apps/{appsId}/services/{servicesId}",
  7025. // "response": {
  7026. // "$ref": "Service"
  7027. // },
  7028. // "scopes": [
  7029. // "https://www.googleapis.com/auth/appengine.admin",
  7030. // "https://www.googleapis.com/auth/cloud-platform",
  7031. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  7032. // ]
  7033. // }
  7034. }
  7035. // method id "appengine.apps.services.list":
  7036. type AppsServicesListCall struct {
  7037. s *APIService
  7038. appsId string
  7039. urlParams_ gensupport.URLParams
  7040. ifNoneMatch_ string
  7041. ctx_ context.Context
  7042. header_ http.Header
  7043. }
  7044. // List: Lists all the services in the application.
  7045. func (r *AppsServicesService) List(appsId string) *AppsServicesListCall {
  7046. c := &AppsServicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7047. c.appsId = appsId
  7048. return c
  7049. }
  7050. // PageSize sets the optional parameter "pageSize": Maximum results to
  7051. // return per page.
  7052. func (c *AppsServicesListCall) PageSize(pageSize int64) *AppsServicesListCall {
  7053. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  7054. return c
  7055. }
  7056. // PageToken sets the optional parameter "pageToken": Continuation token
  7057. // for fetching the next page of results.
  7058. func (c *AppsServicesListCall) PageToken(pageToken string) *AppsServicesListCall {
  7059. c.urlParams_.Set("pageToken", pageToken)
  7060. return c
  7061. }
  7062. // Fields allows partial responses to be retrieved. See
  7063. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7064. // for more information.
  7065. func (c *AppsServicesListCall) Fields(s ...googleapi.Field) *AppsServicesListCall {
  7066. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7067. return c
  7068. }
  7069. // IfNoneMatch sets the optional parameter which makes the operation
  7070. // fail if the object's ETag matches the given value. This is useful for
  7071. // getting updates only after the object has changed since the last
  7072. // request. Use googleapi.IsNotModified to check whether the response
  7073. // error from Do is the result of In-None-Match.
  7074. func (c *AppsServicesListCall) IfNoneMatch(entityTag string) *AppsServicesListCall {
  7075. c.ifNoneMatch_ = entityTag
  7076. return c
  7077. }
  7078. // Context sets the context to be used in this call's Do method. Any
  7079. // pending HTTP request will be aborted if the provided context is
  7080. // canceled.
  7081. func (c *AppsServicesListCall) Context(ctx context.Context) *AppsServicesListCall {
  7082. c.ctx_ = ctx
  7083. return c
  7084. }
  7085. // Header returns an http.Header that can be modified by the caller to
  7086. // add HTTP headers to the request.
  7087. func (c *AppsServicesListCall) Header() http.Header {
  7088. if c.header_ == nil {
  7089. c.header_ = make(http.Header)
  7090. }
  7091. return c.header_
  7092. }
  7093. func (c *AppsServicesListCall) doRequest(alt string) (*http.Response, error) {
  7094. reqHeaders := make(http.Header)
  7095. for k, v := range c.header_ {
  7096. reqHeaders[k] = v
  7097. }
  7098. reqHeaders.Set("User-Agent", c.s.userAgent())
  7099. if c.ifNoneMatch_ != "" {
  7100. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7101. }
  7102. var body io.Reader = nil
  7103. c.urlParams_.Set("alt", alt)
  7104. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/services")
  7105. urls += "?" + c.urlParams_.Encode()
  7106. req, _ := http.NewRequest("GET", urls, body)
  7107. req.Header = reqHeaders
  7108. googleapi.Expand(req.URL, map[string]string{
  7109. "appsId": c.appsId,
  7110. })
  7111. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7112. }
  7113. // Do executes the "appengine.apps.services.list" call.
  7114. // Exactly one of *ListServicesResponse or error will be non-nil. Any
  7115. // non-2xx status code is an error. Response headers are in either
  7116. // *ListServicesResponse.ServerResponse.Header or (if a response was
  7117. // returned at all) in error.(*googleapi.Error).Header. Use
  7118. // googleapi.IsNotModified to check whether the returned error was
  7119. // because http.StatusNotModified was returned.
  7120. func (c *AppsServicesListCall) Do(opts ...googleapi.CallOption) (*ListServicesResponse, error) {
  7121. gensupport.SetOptions(c.urlParams_, opts...)
  7122. res, err := c.doRequest("json")
  7123. if res != nil && res.StatusCode == http.StatusNotModified {
  7124. if res.Body != nil {
  7125. res.Body.Close()
  7126. }
  7127. return nil, &googleapi.Error{
  7128. Code: res.StatusCode,
  7129. Header: res.Header,
  7130. }
  7131. }
  7132. if err != nil {
  7133. return nil, err
  7134. }
  7135. defer googleapi.CloseBody(res)
  7136. if err := googleapi.CheckResponse(res); err != nil {
  7137. return nil, err
  7138. }
  7139. ret := &ListServicesResponse{
  7140. ServerResponse: googleapi.ServerResponse{
  7141. Header: res.Header,
  7142. HTTPStatusCode: res.StatusCode,
  7143. },
  7144. }
  7145. target := &ret
  7146. if err := gensupport.DecodeResponse(target, res); err != nil {
  7147. return nil, err
  7148. }
  7149. return ret, nil
  7150. // {
  7151. // "description": "Lists all the services in the application.",
  7152. // "flatPath": "v1/apps/{appsId}/services",
  7153. // "httpMethod": "GET",
  7154. // "id": "appengine.apps.services.list",
  7155. // "parameterOrder": [
  7156. // "appsId"
  7157. // ],
  7158. // "parameters": {
  7159. // "appsId": {
  7160. // "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.",
  7161. // "location": "path",
  7162. // "required": true,
  7163. // "type": "string"
  7164. // },
  7165. // "pageSize": {
  7166. // "description": "Maximum results to return per page.",
  7167. // "format": "int32",
  7168. // "location": "query",
  7169. // "type": "integer"
  7170. // },
  7171. // "pageToken": {
  7172. // "description": "Continuation token for fetching the next page of results.",
  7173. // "location": "query",
  7174. // "type": "string"
  7175. // }
  7176. // },
  7177. // "path": "v1/apps/{appsId}/services",
  7178. // "response": {
  7179. // "$ref": "ListServicesResponse"
  7180. // },
  7181. // "scopes": [
  7182. // "https://www.googleapis.com/auth/appengine.admin",
  7183. // "https://www.googleapis.com/auth/cloud-platform",
  7184. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  7185. // ]
  7186. // }
  7187. }
  7188. // Pages invokes f for each page of results.
  7189. // A non-nil error returned from f will halt the iteration.
  7190. // The provided context supersedes any context provided to the Context method.
  7191. func (c *AppsServicesListCall) Pages(ctx context.Context, f func(*ListServicesResponse) error) error {
  7192. c.ctx_ = ctx
  7193. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  7194. for {
  7195. x, err := c.Do()
  7196. if err != nil {
  7197. return err
  7198. }
  7199. if err := f(x); err != nil {
  7200. return err
  7201. }
  7202. if x.NextPageToken == "" {
  7203. return nil
  7204. }
  7205. c.PageToken(x.NextPageToken)
  7206. }
  7207. }
  7208. // method id "appengine.apps.services.patch":
  7209. type AppsServicesPatchCall struct {
  7210. s *APIService
  7211. appsId string
  7212. servicesId string
  7213. service *Service
  7214. urlParams_ gensupport.URLParams
  7215. ctx_ context.Context
  7216. header_ http.Header
  7217. }
  7218. // Patch: Updates the configuration of the specified service.
  7219. func (r *AppsServicesService) Patch(appsId string, servicesId string, service *Service) *AppsServicesPatchCall {
  7220. c := &AppsServicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7221. c.appsId = appsId
  7222. c.servicesId = servicesId
  7223. c.service = service
  7224. return c
  7225. }
  7226. // MigrateTraffic sets the optional parameter "migrateTraffic": Set to
  7227. // true to gradually shift traffic to one or more versions that you
  7228. // specify. By default, traffic is shifted immediately. For gradual
  7229. // traffic migration, the target versions must be located within
  7230. // instances that are configured for both warmup requests
  7231. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/a
  7232. // pps.services.versions#inboundservicetype) and automatic scaling
  7233. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/a
  7234. // pps.services.versions#automaticscaling). You must specify the shardBy
  7235. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/a
  7236. // pps.services#shardby) field in the Service resource. Gradual traffic
  7237. // migration is not supported in the App Engine flexible environment.
  7238. // For examples, see Migrating and Splitting Traffic
  7239. // (https://cloud.google.com/appengine/docs/admin-api/migrating-splitting
  7240. // -traffic).
  7241. func (c *AppsServicesPatchCall) MigrateTraffic(migrateTraffic bool) *AppsServicesPatchCall {
  7242. c.urlParams_.Set("migrateTraffic", fmt.Sprint(migrateTraffic))
  7243. return c
  7244. }
  7245. // UpdateMask sets the optional parameter "updateMask": Standard field
  7246. // mask for the set of fields to be updated.
  7247. func (c *AppsServicesPatchCall) UpdateMask(updateMask string) *AppsServicesPatchCall {
  7248. c.urlParams_.Set("updateMask", updateMask)
  7249. return c
  7250. }
  7251. // Fields allows partial responses to be retrieved. See
  7252. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7253. // for more information.
  7254. func (c *AppsServicesPatchCall) Fields(s ...googleapi.Field) *AppsServicesPatchCall {
  7255. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7256. return c
  7257. }
  7258. // Context sets the context to be used in this call's Do method. Any
  7259. // pending HTTP request will be aborted if the provided context is
  7260. // canceled.
  7261. func (c *AppsServicesPatchCall) Context(ctx context.Context) *AppsServicesPatchCall {
  7262. c.ctx_ = ctx
  7263. return c
  7264. }
  7265. // Header returns an http.Header that can be modified by the caller to
  7266. // add HTTP headers to the request.
  7267. func (c *AppsServicesPatchCall) Header() http.Header {
  7268. if c.header_ == nil {
  7269. c.header_ = make(http.Header)
  7270. }
  7271. return c.header_
  7272. }
  7273. func (c *AppsServicesPatchCall) doRequest(alt string) (*http.Response, error) {
  7274. reqHeaders := make(http.Header)
  7275. for k, v := range c.header_ {
  7276. reqHeaders[k] = v
  7277. }
  7278. reqHeaders.Set("User-Agent", c.s.userAgent())
  7279. var body io.Reader = nil
  7280. body, err := googleapi.WithoutDataWrapper.JSONReader(c.service)
  7281. if err != nil {
  7282. return nil, err
  7283. }
  7284. reqHeaders.Set("Content-Type", "application/json")
  7285. c.urlParams_.Set("alt", alt)
  7286. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/services/{servicesId}")
  7287. urls += "?" + c.urlParams_.Encode()
  7288. req, _ := http.NewRequest("PATCH", urls, body)
  7289. req.Header = reqHeaders
  7290. googleapi.Expand(req.URL, map[string]string{
  7291. "appsId": c.appsId,
  7292. "servicesId": c.servicesId,
  7293. })
  7294. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7295. }
  7296. // Do executes the "appengine.apps.services.patch" call.
  7297. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  7298. // status code is an error. Response headers are in either
  7299. // *Operation.ServerResponse.Header or (if a response was returned at
  7300. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  7301. // to check whether the returned error was because
  7302. // http.StatusNotModified was returned.
  7303. func (c *AppsServicesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  7304. gensupport.SetOptions(c.urlParams_, opts...)
  7305. res, err := c.doRequest("json")
  7306. if res != nil && res.StatusCode == http.StatusNotModified {
  7307. if res.Body != nil {
  7308. res.Body.Close()
  7309. }
  7310. return nil, &googleapi.Error{
  7311. Code: res.StatusCode,
  7312. Header: res.Header,
  7313. }
  7314. }
  7315. if err != nil {
  7316. return nil, err
  7317. }
  7318. defer googleapi.CloseBody(res)
  7319. if err := googleapi.CheckResponse(res); err != nil {
  7320. return nil, err
  7321. }
  7322. ret := &Operation{
  7323. ServerResponse: googleapi.ServerResponse{
  7324. Header: res.Header,
  7325. HTTPStatusCode: res.StatusCode,
  7326. },
  7327. }
  7328. target := &ret
  7329. if err := gensupport.DecodeResponse(target, res); err != nil {
  7330. return nil, err
  7331. }
  7332. return ret, nil
  7333. // {
  7334. // "description": "Updates the configuration of the specified service.",
  7335. // "flatPath": "v1/apps/{appsId}/services/{servicesId}",
  7336. // "httpMethod": "PATCH",
  7337. // "id": "appengine.apps.services.patch",
  7338. // "parameterOrder": [
  7339. // "appsId",
  7340. // "servicesId"
  7341. // ],
  7342. // "parameters": {
  7343. // "appsId": {
  7344. // "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/services/default.",
  7345. // "location": "path",
  7346. // "required": true,
  7347. // "type": "string"
  7348. // },
  7349. // "migrateTraffic": {
  7350. // "description": "Set to true to gradually shift traffic to one or more versions that you specify. By default, traffic is shifted immediately. For gradual traffic migration, the target versions must be located within instances that are configured for both warmup requests (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#inboundservicetype) and automatic scaling (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#automaticscaling). You must specify the shardBy (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services#shardby) field in the Service resource. Gradual traffic migration is not supported in the App Engine flexible environment. For examples, see Migrating and Splitting Traffic (https://cloud.google.com/appengine/docs/admin-api/migrating-splitting-traffic).",
  7351. // "location": "query",
  7352. // "type": "boolean"
  7353. // },
  7354. // "servicesId": {
  7355. // "description": "Part of `name`. See documentation of `appsId`.",
  7356. // "location": "path",
  7357. // "required": true,
  7358. // "type": "string"
  7359. // },
  7360. // "updateMask": {
  7361. // "description": "Standard field mask for the set of fields to be updated.",
  7362. // "format": "google-fieldmask",
  7363. // "location": "query",
  7364. // "type": "string"
  7365. // }
  7366. // },
  7367. // "path": "v1/apps/{appsId}/services/{servicesId}",
  7368. // "request": {
  7369. // "$ref": "Service"
  7370. // },
  7371. // "response": {
  7372. // "$ref": "Operation"
  7373. // },
  7374. // "scopes": [
  7375. // "https://www.googleapis.com/auth/cloud-platform"
  7376. // ]
  7377. // }
  7378. }
  7379. // method id "appengine.apps.services.versions.create":
  7380. type AppsServicesVersionsCreateCall struct {
  7381. s *APIService
  7382. appsId string
  7383. servicesId string
  7384. version *Version
  7385. urlParams_ gensupport.URLParams
  7386. ctx_ context.Context
  7387. header_ http.Header
  7388. }
  7389. // Create: Deploys code and resource files to a new version.
  7390. func (r *AppsServicesVersionsService) Create(appsId string, servicesId string, version *Version) *AppsServicesVersionsCreateCall {
  7391. c := &AppsServicesVersionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7392. c.appsId = appsId
  7393. c.servicesId = servicesId
  7394. c.version = version
  7395. return c
  7396. }
  7397. // Fields allows partial responses to be retrieved. See
  7398. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7399. // for more information.
  7400. func (c *AppsServicesVersionsCreateCall) Fields(s ...googleapi.Field) *AppsServicesVersionsCreateCall {
  7401. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7402. return c
  7403. }
  7404. // Context sets the context to be used in this call's Do method. Any
  7405. // pending HTTP request will be aborted if the provided context is
  7406. // canceled.
  7407. func (c *AppsServicesVersionsCreateCall) Context(ctx context.Context) *AppsServicesVersionsCreateCall {
  7408. c.ctx_ = ctx
  7409. return c
  7410. }
  7411. // Header returns an http.Header that can be modified by the caller to
  7412. // add HTTP headers to the request.
  7413. func (c *AppsServicesVersionsCreateCall) Header() http.Header {
  7414. if c.header_ == nil {
  7415. c.header_ = make(http.Header)
  7416. }
  7417. return c.header_
  7418. }
  7419. func (c *AppsServicesVersionsCreateCall) doRequest(alt string) (*http.Response, error) {
  7420. reqHeaders := make(http.Header)
  7421. for k, v := range c.header_ {
  7422. reqHeaders[k] = v
  7423. }
  7424. reqHeaders.Set("User-Agent", c.s.userAgent())
  7425. var body io.Reader = nil
  7426. body, err := googleapi.WithoutDataWrapper.JSONReader(c.version)
  7427. if err != nil {
  7428. return nil, err
  7429. }
  7430. reqHeaders.Set("Content-Type", "application/json")
  7431. c.urlParams_.Set("alt", alt)
  7432. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/services/{servicesId}/versions")
  7433. urls += "?" + c.urlParams_.Encode()
  7434. req, _ := http.NewRequest("POST", urls, body)
  7435. req.Header = reqHeaders
  7436. googleapi.Expand(req.URL, map[string]string{
  7437. "appsId": c.appsId,
  7438. "servicesId": c.servicesId,
  7439. })
  7440. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7441. }
  7442. // Do executes the "appengine.apps.services.versions.create" call.
  7443. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  7444. // status code is an error. Response headers are in either
  7445. // *Operation.ServerResponse.Header or (if a response was returned at
  7446. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  7447. // to check whether the returned error was because
  7448. // http.StatusNotModified was returned.
  7449. func (c *AppsServicesVersionsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  7450. gensupport.SetOptions(c.urlParams_, opts...)
  7451. res, err := c.doRequest("json")
  7452. if res != nil && res.StatusCode == http.StatusNotModified {
  7453. if res.Body != nil {
  7454. res.Body.Close()
  7455. }
  7456. return nil, &googleapi.Error{
  7457. Code: res.StatusCode,
  7458. Header: res.Header,
  7459. }
  7460. }
  7461. if err != nil {
  7462. return nil, err
  7463. }
  7464. defer googleapi.CloseBody(res)
  7465. if err := googleapi.CheckResponse(res); err != nil {
  7466. return nil, err
  7467. }
  7468. ret := &Operation{
  7469. ServerResponse: googleapi.ServerResponse{
  7470. Header: res.Header,
  7471. HTTPStatusCode: res.StatusCode,
  7472. },
  7473. }
  7474. target := &ret
  7475. if err := gensupport.DecodeResponse(target, res); err != nil {
  7476. return nil, err
  7477. }
  7478. return ret, nil
  7479. // {
  7480. // "description": "Deploys code and resource files to a new version.",
  7481. // "flatPath": "v1/apps/{appsId}/services/{servicesId}/versions",
  7482. // "httpMethod": "POST",
  7483. // "id": "appengine.apps.services.versions.create",
  7484. // "parameterOrder": [
  7485. // "appsId",
  7486. // "servicesId"
  7487. // ],
  7488. // "parameters": {
  7489. // "appsId": {
  7490. // "description": "Part of `parent`. Name of the parent resource to create this version under. Example: apps/myapp/services/default.",
  7491. // "location": "path",
  7492. // "required": true,
  7493. // "type": "string"
  7494. // },
  7495. // "servicesId": {
  7496. // "description": "Part of `parent`. See documentation of `appsId`.",
  7497. // "location": "path",
  7498. // "required": true,
  7499. // "type": "string"
  7500. // }
  7501. // },
  7502. // "path": "v1/apps/{appsId}/services/{servicesId}/versions",
  7503. // "request": {
  7504. // "$ref": "Version"
  7505. // },
  7506. // "response": {
  7507. // "$ref": "Operation"
  7508. // },
  7509. // "scopes": [
  7510. // "https://www.googleapis.com/auth/cloud-platform"
  7511. // ]
  7512. // }
  7513. }
  7514. // method id "appengine.apps.services.versions.delete":
  7515. type AppsServicesVersionsDeleteCall struct {
  7516. s *APIService
  7517. appsId string
  7518. servicesId string
  7519. versionsId string
  7520. urlParams_ gensupport.URLParams
  7521. ctx_ context.Context
  7522. header_ http.Header
  7523. }
  7524. // Delete: Deletes an existing Version resource.
  7525. func (r *AppsServicesVersionsService) Delete(appsId string, servicesId string, versionsId string) *AppsServicesVersionsDeleteCall {
  7526. c := &AppsServicesVersionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7527. c.appsId = appsId
  7528. c.servicesId = servicesId
  7529. c.versionsId = versionsId
  7530. return c
  7531. }
  7532. // Fields allows partial responses to be retrieved. See
  7533. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7534. // for more information.
  7535. func (c *AppsServicesVersionsDeleteCall) Fields(s ...googleapi.Field) *AppsServicesVersionsDeleteCall {
  7536. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7537. return c
  7538. }
  7539. // Context sets the context to be used in this call's Do method. Any
  7540. // pending HTTP request will be aborted if the provided context is
  7541. // canceled.
  7542. func (c *AppsServicesVersionsDeleteCall) Context(ctx context.Context) *AppsServicesVersionsDeleteCall {
  7543. c.ctx_ = ctx
  7544. return c
  7545. }
  7546. // Header returns an http.Header that can be modified by the caller to
  7547. // add HTTP headers to the request.
  7548. func (c *AppsServicesVersionsDeleteCall) Header() http.Header {
  7549. if c.header_ == nil {
  7550. c.header_ = make(http.Header)
  7551. }
  7552. return c.header_
  7553. }
  7554. func (c *AppsServicesVersionsDeleteCall) doRequest(alt string) (*http.Response, error) {
  7555. reqHeaders := make(http.Header)
  7556. for k, v := range c.header_ {
  7557. reqHeaders[k] = v
  7558. }
  7559. reqHeaders.Set("User-Agent", c.s.userAgent())
  7560. var body io.Reader = nil
  7561. c.urlParams_.Set("alt", alt)
  7562. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}")
  7563. urls += "?" + c.urlParams_.Encode()
  7564. req, _ := http.NewRequest("DELETE", urls, body)
  7565. req.Header = reqHeaders
  7566. googleapi.Expand(req.URL, map[string]string{
  7567. "appsId": c.appsId,
  7568. "servicesId": c.servicesId,
  7569. "versionsId": c.versionsId,
  7570. })
  7571. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7572. }
  7573. // Do executes the "appengine.apps.services.versions.delete" call.
  7574. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  7575. // status code is an error. Response headers are in either
  7576. // *Operation.ServerResponse.Header or (if a response was returned at
  7577. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  7578. // to check whether the returned error was because
  7579. // http.StatusNotModified was returned.
  7580. func (c *AppsServicesVersionsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  7581. gensupport.SetOptions(c.urlParams_, opts...)
  7582. res, err := c.doRequest("json")
  7583. if res != nil && res.StatusCode == http.StatusNotModified {
  7584. if res.Body != nil {
  7585. res.Body.Close()
  7586. }
  7587. return nil, &googleapi.Error{
  7588. Code: res.StatusCode,
  7589. Header: res.Header,
  7590. }
  7591. }
  7592. if err != nil {
  7593. return nil, err
  7594. }
  7595. defer googleapi.CloseBody(res)
  7596. if err := googleapi.CheckResponse(res); err != nil {
  7597. return nil, err
  7598. }
  7599. ret := &Operation{
  7600. ServerResponse: googleapi.ServerResponse{
  7601. Header: res.Header,
  7602. HTTPStatusCode: res.StatusCode,
  7603. },
  7604. }
  7605. target := &ret
  7606. if err := gensupport.DecodeResponse(target, res); err != nil {
  7607. return nil, err
  7608. }
  7609. return ret, nil
  7610. // {
  7611. // "description": "Deletes an existing Version resource.",
  7612. // "flatPath": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}",
  7613. // "httpMethod": "DELETE",
  7614. // "id": "appengine.apps.services.versions.delete",
  7615. // "parameterOrder": [
  7616. // "appsId",
  7617. // "servicesId",
  7618. // "versionsId"
  7619. // ],
  7620. // "parameters": {
  7621. // "appsId": {
  7622. // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1.",
  7623. // "location": "path",
  7624. // "required": true,
  7625. // "type": "string"
  7626. // },
  7627. // "servicesId": {
  7628. // "description": "Part of `name`. See documentation of `appsId`.",
  7629. // "location": "path",
  7630. // "required": true,
  7631. // "type": "string"
  7632. // },
  7633. // "versionsId": {
  7634. // "description": "Part of `name`. See documentation of `appsId`.",
  7635. // "location": "path",
  7636. // "required": true,
  7637. // "type": "string"
  7638. // }
  7639. // },
  7640. // "path": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}",
  7641. // "response": {
  7642. // "$ref": "Operation"
  7643. // },
  7644. // "scopes": [
  7645. // "https://www.googleapis.com/auth/cloud-platform"
  7646. // ]
  7647. // }
  7648. }
  7649. // method id "appengine.apps.services.versions.get":
  7650. type AppsServicesVersionsGetCall struct {
  7651. s *APIService
  7652. appsId string
  7653. servicesId string
  7654. versionsId string
  7655. urlParams_ gensupport.URLParams
  7656. ifNoneMatch_ string
  7657. ctx_ context.Context
  7658. header_ http.Header
  7659. }
  7660. // Get: Gets the specified Version resource. By default, only a
  7661. // BASIC_VIEW will be returned. Specify the FULL_VIEW parameter to get
  7662. // the full resource.
  7663. func (r *AppsServicesVersionsService) Get(appsId string, servicesId string, versionsId string) *AppsServicesVersionsGetCall {
  7664. c := &AppsServicesVersionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7665. c.appsId = appsId
  7666. c.servicesId = servicesId
  7667. c.versionsId = versionsId
  7668. return c
  7669. }
  7670. // View sets the optional parameter "view": Controls the set of fields
  7671. // returned in the Get response.
  7672. //
  7673. // Possible values:
  7674. // "BASIC"
  7675. // "FULL"
  7676. func (c *AppsServicesVersionsGetCall) View(view string) *AppsServicesVersionsGetCall {
  7677. c.urlParams_.Set("view", view)
  7678. return c
  7679. }
  7680. // Fields allows partial responses to be retrieved. See
  7681. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7682. // for more information.
  7683. func (c *AppsServicesVersionsGetCall) Fields(s ...googleapi.Field) *AppsServicesVersionsGetCall {
  7684. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7685. return c
  7686. }
  7687. // IfNoneMatch sets the optional parameter which makes the operation
  7688. // fail if the object's ETag matches the given value. This is useful for
  7689. // getting updates only after the object has changed since the last
  7690. // request. Use googleapi.IsNotModified to check whether the response
  7691. // error from Do is the result of In-None-Match.
  7692. func (c *AppsServicesVersionsGetCall) IfNoneMatch(entityTag string) *AppsServicesVersionsGetCall {
  7693. c.ifNoneMatch_ = entityTag
  7694. return c
  7695. }
  7696. // Context sets the context to be used in this call's Do method. Any
  7697. // pending HTTP request will be aborted if the provided context is
  7698. // canceled.
  7699. func (c *AppsServicesVersionsGetCall) Context(ctx context.Context) *AppsServicesVersionsGetCall {
  7700. c.ctx_ = ctx
  7701. return c
  7702. }
  7703. // Header returns an http.Header that can be modified by the caller to
  7704. // add HTTP headers to the request.
  7705. func (c *AppsServicesVersionsGetCall) Header() http.Header {
  7706. if c.header_ == nil {
  7707. c.header_ = make(http.Header)
  7708. }
  7709. return c.header_
  7710. }
  7711. func (c *AppsServicesVersionsGetCall) doRequest(alt string) (*http.Response, error) {
  7712. reqHeaders := make(http.Header)
  7713. for k, v := range c.header_ {
  7714. reqHeaders[k] = v
  7715. }
  7716. reqHeaders.Set("User-Agent", c.s.userAgent())
  7717. if c.ifNoneMatch_ != "" {
  7718. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7719. }
  7720. var body io.Reader = nil
  7721. c.urlParams_.Set("alt", alt)
  7722. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}")
  7723. urls += "?" + c.urlParams_.Encode()
  7724. req, _ := http.NewRequest("GET", urls, body)
  7725. req.Header = reqHeaders
  7726. googleapi.Expand(req.URL, map[string]string{
  7727. "appsId": c.appsId,
  7728. "servicesId": c.servicesId,
  7729. "versionsId": c.versionsId,
  7730. })
  7731. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7732. }
  7733. // Do executes the "appengine.apps.services.versions.get" call.
  7734. // Exactly one of *Version or error will be non-nil. Any non-2xx status
  7735. // code is an error. Response headers are in either
  7736. // *Version.ServerResponse.Header or (if a response was returned at all)
  7737. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  7738. // check whether the returned error was because http.StatusNotModified
  7739. // was returned.
  7740. func (c *AppsServicesVersionsGetCall) Do(opts ...googleapi.CallOption) (*Version, error) {
  7741. gensupport.SetOptions(c.urlParams_, opts...)
  7742. res, err := c.doRequest("json")
  7743. if res != nil && res.StatusCode == http.StatusNotModified {
  7744. if res.Body != nil {
  7745. res.Body.Close()
  7746. }
  7747. return nil, &googleapi.Error{
  7748. Code: res.StatusCode,
  7749. Header: res.Header,
  7750. }
  7751. }
  7752. if err != nil {
  7753. return nil, err
  7754. }
  7755. defer googleapi.CloseBody(res)
  7756. if err := googleapi.CheckResponse(res); err != nil {
  7757. return nil, err
  7758. }
  7759. ret := &Version{
  7760. ServerResponse: googleapi.ServerResponse{
  7761. Header: res.Header,
  7762. HTTPStatusCode: res.StatusCode,
  7763. },
  7764. }
  7765. target := &ret
  7766. if err := gensupport.DecodeResponse(target, res); err != nil {
  7767. return nil, err
  7768. }
  7769. return ret, nil
  7770. // {
  7771. // "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.",
  7772. // "flatPath": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}",
  7773. // "httpMethod": "GET",
  7774. // "id": "appengine.apps.services.versions.get",
  7775. // "parameterOrder": [
  7776. // "appsId",
  7777. // "servicesId",
  7778. // "versionsId"
  7779. // ],
  7780. // "parameters": {
  7781. // "appsId": {
  7782. // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1.",
  7783. // "location": "path",
  7784. // "required": true,
  7785. // "type": "string"
  7786. // },
  7787. // "servicesId": {
  7788. // "description": "Part of `name`. See documentation of `appsId`.",
  7789. // "location": "path",
  7790. // "required": true,
  7791. // "type": "string"
  7792. // },
  7793. // "versionsId": {
  7794. // "description": "Part of `name`. See documentation of `appsId`.",
  7795. // "location": "path",
  7796. // "required": true,
  7797. // "type": "string"
  7798. // },
  7799. // "view": {
  7800. // "description": "Controls the set of fields returned in the Get response.",
  7801. // "enum": [
  7802. // "BASIC",
  7803. // "FULL"
  7804. // ],
  7805. // "location": "query",
  7806. // "type": "string"
  7807. // }
  7808. // },
  7809. // "path": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}",
  7810. // "response": {
  7811. // "$ref": "Version"
  7812. // },
  7813. // "scopes": [
  7814. // "https://www.googleapis.com/auth/appengine.admin",
  7815. // "https://www.googleapis.com/auth/cloud-platform",
  7816. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  7817. // ]
  7818. // }
  7819. }
  7820. // method id "appengine.apps.services.versions.list":
  7821. type AppsServicesVersionsListCall struct {
  7822. s *APIService
  7823. appsId string
  7824. servicesId string
  7825. urlParams_ gensupport.URLParams
  7826. ifNoneMatch_ string
  7827. ctx_ context.Context
  7828. header_ http.Header
  7829. }
  7830. // List: Lists the versions of a service.
  7831. func (r *AppsServicesVersionsService) List(appsId string, servicesId string) *AppsServicesVersionsListCall {
  7832. c := &AppsServicesVersionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7833. c.appsId = appsId
  7834. c.servicesId = servicesId
  7835. return c
  7836. }
  7837. // PageSize sets the optional parameter "pageSize": Maximum results to
  7838. // return per page.
  7839. func (c *AppsServicesVersionsListCall) PageSize(pageSize int64) *AppsServicesVersionsListCall {
  7840. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  7841. return c
  7842. }
  7843. // PageToken sets the optional parameter "pageToken": Continuation token
  7844. // for fetching the next page of results.
  7845. func (c *AppsServicesVersionsListCall) PageToken(pageToken string) *AppsServicesVersionsListCall {
  7846. c.urlParams_.Set("pageToken", pageToken)
  7847. return c
  7848. }
  7849. // View sets the optional parameter "view": Controls the set of fields
  7850. // returned in the List response.
  7851. //
  7852. // Possible values:
  7853. // "BASIC"
  7854. // "FULL"
  7855. func (c *AppsServicesVersionsListCall) View(view string) *AppsServicesVersionsListCall {
  7856. c.urlParams_.Set("view", view)
  7857. return c
  7858. }
  7859. // Fields allows partial responses to be retrieved. See
  7860. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7861. // for more information.
  7862. func (c *AppsServicesVersionsListCall) Fields(s ...googleapi.Field) *AppsServicesVersionsListCall {
  7863. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7864. return c
  7865. }
  7866. // IfNoneMatch sets the optional parameter which makes the operation
  7867. // fail if the object's ETag matches the given value. This is useful for
  7868. // getting updates only after the object has changed since the last
  7869. // request. Use googleapi.IsNotModified to check whether the response
  7870. // error from Do is the result of In-None-Match.
  7871. func (c *AppsServicesVersionsListCall) IfNoneMatch(entityTag string) *AppsServicesVersionsListCall {
  7872. c.ifNoneMatch_ = entityTag
  7873. return c
  7874. }
  7875. // Context sets the context to be used in this call's Do method. Any
  7876. // pending HTTP request will be aborted if the provided context is
  7877. // canceled.
  7878. func (c *AppsServicesVersionsListCall) Context(ctx context.Context) *AppsServicesVersionsListCall {
  7879. c.ctx_ = ctx
  7880. return c
  7881. }
  7882. // Header returns an http.Header that can be modified by the caller to
  7883. // add HTTP headers to the request.
  7884. func (c *AppsServicesVersionsListCall) Header() http.Header {
  7885. if c.header_ == nil {
  7886. c.header_ = make(http.Header)
  7887. }
  7888. return c.header_
  7889. }
  7890. func (c *AppsServicesVersionsListCall) doRequest(alt string) (*http.Response, error) {
  7891. reqHeaders := make(http.Header)
  7892. for k, v := range c.header_ {
  7893. reqHeaders[k] = v
  7894. }
  7895. reqHeaders.Set("User-Agent", c.s.userAgent())
  7896. if c.ifNoneMatch_ != "" {
  7897. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7898. }
  7899. var body io.Reader = nil
  7900. c.urlParams_.Set("alt", alt)
  7901. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/services/{servicesId}/versions")
  7902. urls += "?" + c.urlParams_.Encode()
  7903. req, _ := http.NewRequest("GET", urls, body)
  7904. req.Header = reqHeaders
  7905. googleapi.Expand(req.URL, map[string]string{
  7906. "appsId": c.appsId,
  7907. "servicesId": c.servicesId,
  7908. })
  7909. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7910. }
  7911. // Do executes the "appengine.apps.services.versions.list" call.
  7912. // Exactly one of *ListVersionsResponse or error will be non-nil. Any
  7913. // non-2xx status code is an error. Response headers are in either
  7914. // *ListVersionsResponse.ServerResponse.Header or (if a response was
  7915. // returned at all) in error.(*googleapi.Error).Header. Use
  7916. // googleapi.IsNotModified to check whether the returned error was
  7917. // because http.StatusNotModified was returned.
  7918. func (c *AppsServicesVersionsListCall) Do(opts ...googleapi.CallOption) (*ListVersionsResponse, error) {
  7919. gensupport.SetOptions(c.urlParams_, opts...)
  7920. res, err := c.doRequest("json")
  7921. if res != nil && res.StatusCode == http.StatusNotModified {
  7922. if res.Body != nil {
  7923. res.Body.Close()
  7924. }
  7925. return nil, &googleapi.Error{
  7926. Code: res.StatusCode,
  7927. Header: res.Header,
  7928. }
  7929. }
  7930. if err != nil {
  7931. return nil, err
  7932. }
  7933. defer googleapi.CloseBody(res)
  7934. if err := googleapi.CheckResponse(res); err != nil {
  7935. return nil, err
  7936. }
  7937. ret := &ListVersionsResponse{
  7938. ServerResponse: googleapi.ServerResponse{
  7939. Header: res.Header,
  7940. HTTPStatusCode: res.StatusCode,
  7941. },
  7942. }
  7943. target := &ret
  7944. if err := gensupport.DecodeResponse(target, res); err != nil {
  7945. return nil, err
  7946. }
  7947. return ret, nil
  7948. // {
  7949. // "description": "Lists the versions of a service.",
  7950. // "flatPath": "v1/apps/{appsId}/services/{servicesId}/versions",
  7951. // "httpMethod": "GET",
  7952. // "id": "appengine.apps.services.versions.list",
  7953. // "parameterOrder": [
  7954. // "appsId",
  7955. // "servicesId"
  7956. // ],
  7957. // "parameters": {
  7958. // "appsId": {
  7959. // "description": "Part of `parent`. Name of the parent Service resource. Example: apps/myapp/services/default.",
  7960. // "location": "path",
  7961. // "required": true,
  7962. // "type": "string"
  7963. // },
  7964. // "pageSize": {
  7965. // "description": "Maximum results to return per page.",
  7966. // "format": "int32",
  7967. // "location": "query",
  7968. // "type": "integer"
  7969. // },
  7970. // "pageToken": {
  7971. // "description": "Continuation token for fetching the next page of results.",
  7972. // "location": "query",
  7973. // "type": "string"
  7974. // },
  7975. // "servicesId": {
  7976. // "description": "Part of `parent`. See documentation of `appsId`.",
  7977. // "location": "path",
  7978. // "required": true,
  7979. // "type": "string"
  7980. // },
  7981. // "view": {
  7982. // "description": "Controls the set of fields returned in the List response.",
  7983. // "enum": [
  7984. // "BASIC",
  7985. // "FULL"
  7986. // ],
  7987. // "location": "query",
  7988. // "type": "string"
  7989. // }
  7990. // },
  7991. // "path": "v1/apps/{appsId}/services/{servicesId}/versions",
  7992. // "response": {
  7993. // "$ref": "ListVersionsResponse"
  7994. // },
  7995. // "scopes": [
  7996. // "https://www.googleapis.com/auth/appengine.admin",
  7997. // "https://www.googleapis.com/auth/cloud-platform",
  7998. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  7999. // ]
  8000. // }
  8001. }
  8002. // Pages invokes f for each page of results.
  8003. // A non-nil error returned from f will halt the iteration.
  8004. // The provided context supersedes any context provided to the Context method.
  8005. func (c *AppsServicesVersionsListCall) Pages(ctx context.Context, f func(*ListVersionsResponse) error) error {
  8006. c.ctx_ = ctx
  8007. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  8008. for {
  8009. x, err := c.Do()
  8010. if err != nil {
  8011. return err
  8012. }
  8013. if err := f(x); err != nil {
  8014. return err
  8015. }
  8016. if x.NextPageToken == "" {
  8017. return nil
  8018. }
  8019. c.PageToken(x.NextPageToken)
  8020. }
  8021. }
  8022. // method id "appengine.apps.services.versions.patch":
  8023. type AppsServicesVersionsPatchCall struct {
  8024. s *APIService
  8025. appsId string
  8026. servicesId string
  8027. versionsId string
  8028. version *Version
  8029. urlParams_ gensupport.URLParams
  8030. ctx_ context.Context
  8031. header_ http.Header
  8032. }
  8033. // Patch: Updates the specified Version resource. You can specify the
  8034. // following fields depending on the App Engine environment and type of
  8035. // scaling that the version resource uses:Standard
  8036. // environment
  8037. // instance_class
  8038. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/a
  8039. // pps.services.versions#Version.FIELDS.instance_class)automatic scaling
  8040. // in the standard environment:
  8041. // automatic_scaling.min_idle_instances
  8042. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/a
  8043. // pps.services.versions#Version.FIELDS.automatic_scaling)
  8044. // automatic_scal
  8045. // ing.max_idle_instances
  8046. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/a
  8047. // pps.services.versions#Version.FIELDS.automatic_scaling)
  8048. // automaticScali
  8049. // ng.standard_scheduler_settings.max_instances
  8050. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/a
  8051. // pps.services.versions#StandardSchedulerSettings)
  8052. // automaticScaling.stan
  8053. // dard_scheduler_settings.min_instances
  8054. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/a
  8055. // pps.services.versions#StandardSchedulerSettings)
  8056. // automaticScaling.stan
  8057. // dard_scheduler_settings.target_cpu_utilization
  8058. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/a
  8059. // pps.services.versions#StandardSchedulerSettings)
  8060. // automaticScaling.stan
  8061. // dard_scheduler_settings.target_throughput_utilization
  8062. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/a
  8063. // pps.services.versions#StandardSchedulerSettings)basic scaling or
  8064. // manual scaling in the standard environment:
  8065. // serving_status
  8066. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/a
  8067. // pps.services.versions#Version.FIELDS.serving_status)Flexible
  8068. // environment
  8069. // serving_status
  8070. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/a
  8071. // pps.services.versions#Version.FIELDS.serving_status)automatic scaling
  8072. // in the flexible environment:
  8073. // automatic_scaling.min_total_instances
  8074. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/a
  8075. // pps.services.versions#Version.FIELDS.automatic_scaling)
  8076. // automatic_scal
  8077. // ing.max_total_instances
  8078. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/a
  8079. // pps.services.versions#Version.FIELDS.automatic_scaling)
  8080. // automatic_scal
  8081. // ing.cool_down_period_sec
  8082. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/a
  8083. // pps.services.versions#Version.FIELDS.automatic_scaling)
  8084. // automatic_scal
  8085. // ing.cpu_utilization.target_utilization
  8086. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/a
  8087. // pps.services.versions#Version.FIELDS.automatic_scaling)
  8088. func (r *AppsServicesVersionsService) Patch(appsId string, servicesId string, versionsId string, version *Version) *AppsServicesVersionsPatchCall {
  8089. c := &AppsServicesVersionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8090. c.appsId = appsId
  8091. c.servicesId = servicesId
  8092. c.versionsId = versionsId
  8093. c.version = version
  8094. return c
  8095. }
  8096. // UpdateMask sets the optional parameter "updateMask": Standard field
  8097. // mask for the set of fields to be updated.
  8098. func (c *AppsServicesVersionsPatchCall) UpdateMask(updateMask string) *AppsServicesVersionsPatchCall {
  8099. c.urlParams_.Set("updateMask", updateMask)
  8100. return c
  8101. }
  8102. // Fields allows partial responses to be retrieved. See
  8103. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8104. // for more information.
  8105. func (c *AppsServicesVersionsPatchCall) Fields(s ...googleapi.Field) *AppsServicesVersionsPatchCall {
  8106. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8107. return c
  8108. }
  8109. // Context sets the context to be used in this call's Do method. Any
  8110. // pending HTTP request will be aborted if the provided context is
  8111. // canceled.
  8112. func (c *AppsServicesVersionsPatchCall) Context(ctx context.Context) *AppsServicesVersionsPatchCall {
  8113. c.ctx_ = ctx
  8114. return c
  8115. }
  8116. // Header returns an http.Header that can be modified by the caller to
  8117. // add HTTP headers to the request.
  8118. func (c *AppsServicesVersionsPatchCall) Header() http.Header {
  8119. if c.header_ == nil {
  8120. c.header_ = make(http.Header)
  8121. }
  8122. return c.header_
  8123. }
  8124. func (c *AppsServicesVersionsPatchCall) doRequest(alt string) (*http.Response, error) {
  8125. reqHeaders := make(http.Header)
  8126. for k, v := range c.header_ {
  8127. reqHeaders[k] = v
  8128. }
  8129. reqHeaders.Set("User-Agent", c.s.userAgent())
  8130. var body io.Reader = nil
  8131. body, err := googleapi.WithoutDataWrapper.JSONReader(c.version)
  8132. if err != nil {
  8133. return nil, err
  8134. }
  8135. reqHeaders.Set("Content-Type", "application/json")
  8136. c.urlParams_.Set("alt", alt)
  8137. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}")
  8138. urls += "?" + c.urlParams_.Encode()
  8139. req, _ := http.NewRequest("PATCH", urls, body)
  8140. req.Header = reqHeaders
  8141. googleapi.Expand(req.URL, map[string]string{
  8142. "appsId": c.appsId,
  8143. "servicesId": c.servicesId,
  8144. "versionsId": c.versionsId,
  8145. })
  8146. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8147. }
  8148. // Do executes the "appengine.apps.services.versions.patch" call.
  8149. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  8150. // status code is an error. Response headers are in either
  8151. // *Operation.ServerResponse.Header or (if a response was returned at
  8152. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  8153. // to check whether the returned error was because
  8154. // http.StatusNotModified was returned.
  8155. func (c *AppsServicesVersionsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  8156. gensupport.SetOptions(c.urlParams_, opts...)
  8157. res, err := c.doRequest("json")
  8158. if res != nil && res.StatusCode == http.StatusNotModified {
  8159. if res.Body != nil {
  8160. res.Body.Close()
  8161. }
  8162. return nil, &googleapi.Error{
  8163. Code: res.StatusCode,
  8164. Header: res.Header,
  8165. }
  8166. }
  8167. if err != nil {
  8168. return nil, err
  8169. }
  8170. defer googleapi.CloseBody(res)
  8171. if err := googleapi.CheckResponse(res); err != nil {
  8172. return nil, err
  8173. }
  8174. ret := &Operation{
  8175. ServerResponse: googleapi.ServerResponse{
  8176. Header: res.Header,
  8177. HTTPStatusCode: res.StatusCode,
  8178. },
  8179. }
  8180. target := &ret
  8181. if err := gensupport.DecodeResponse(target, res); err != nil {
  8182. return nil, err
  8183. }
  8184. return ret, nil
  8185. // {
  8186. // "description": "Updates the specified Version resource. You can specify the following fields depending on the App Engine environment and type of scaling that the version resource uses:Standard environment\ninstance_class (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.instance_class)automatic scaling in the standard environment:\nautomatic_scaling.min_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling)\nautomatic_scaling.max_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling)\nautomaticScaling.standard_scheduler_settings.max_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings)\nautomaticScaling.standard_scheduler_settings.min_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings)\nautomaticScaling.standard_scheduler_settings.target_cpu_utilization (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings)\nautomaticScaling.standard_scheduler_settings.target_throughput_utilization (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings)basic scaling or manual scaling in the standard environment:\nserving_status (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.serving_status)Flexible environment\nserving_status (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.serving_status)automatic scaling in the flexible environment:\nautomatic_scaling.min_total_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling)\nautomatic_scaling.max_total_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling)\nautomatic_scaling.cool_down_period_sec (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling)\nautomatic_scaling.cpu_utilization.target_utilization (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling)",
  8187. // "flatPath": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}",
  8188. // "httpMethod": "PATCH",
  8189. // "id": "appengine.apps.services.versions.patch",
  8190. // "parameterOrder": [
  8191. // "appsId",
  8192. // "servicesId",
  8193. // "versionsId"
  8194. // ],
  8195. // "parameters": {
  8196. // "appsId": {
  8197. // "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/services/default/versions/1.",
  8198. // "location": "path",
  8199. // "required": true,
  8200. // "type": "string"
  8201. // },
  8202. // "servicesId": {
  8203. // "description": "Part of `name`. See documentation of `appsId`.",
  8204. // "location": "path",
  8205. // "required": true,
  8206. // "type": "string"
  8207. // },
  8208. // "updateMask": {
  8209. // "description": "Standard field mask for the set of fields to be updated.",
  8210. // "format": "google-fieldmask",
  8211. // "location": "query",
  8212. // "type": "string"
  8213. // },
  8214. // "versionsId": {
  8215. // "description": "Part of `name`. See documentation of `appsId`.",
  8216. // "location": "path",
  8217. // "required": true,
  8218. // "type": "string"
  8219. // }
  8220. // },
  8221. // "path": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}",
  8222. // "request": {
  8223. // "$ref": "Version"
  8224. // },
  8225. // "response": {
  8226. // "$ref": "Operation"
  8227. // },
  8228. // "scopes": [
  8229. // "https://www.googleapis.com/auth/cloud-platform"
  8230. // ]
  8231. // }
  8232. }
  8233. // method id "appengine.apps.services.versions.instances.debug":
  8234. type AppsServicesVersionsInstancesDebugCall struct {
  8235. s *APIService
  8236. appsId string
  8237. servicesId string
  8238. versionsId string
  8239. instancesId string
  8240. debuginstancerequest *DebugInstanceRequest
  8241. urlParams_ gensupport.URLParams
  8242. ctx_ context.Context
  8243. header_ http.Header
  8244. }
  8245. // Debug: Enables debugging on a VM instance. This allows you to use the
  8246. // SSH command to connect to the virtual machine where the instance
  8247. // lives. While in "debug mode", the instance continues to serve live
  8248. // traffic. You should delete the instance when you are done debugging
  8249. // and then allow the system to take over and determine if another
  8250. // instance should be started.Only applicable for instances in App
  8251. // Engine flexible environment.
  8252. func (r *AppsServicesVersionsInstancesService) Debug(appsId string, servicesId string, versionsId string, instancesId string, debuginstancerequest *DebugInstanceRequest) *AppsServicesVersionsInstancesDebugCall {
  8253. c := &AppsServicesVersionsInstancesDebugCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8254. c.appsId = appsId
  8255. c.servicesId = servicesId
  8256. c.versionsId = versionsId
  8257. c.instancesId = instancesId
  8258. c.debuginstancerequest = debuginstancerequest
  8259. return c
  8260. }
  8261. // Fields allows partial responses to be retrieved. See
  8262. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8263. // for more information.
  8264. func (c *AppsServicesVersionsInstancesDebugCall) Fields(s ...googleapi.Field) *AppsServicesVersionsInstancesDebugCall {
  8265. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8266. return c
  8267. }
  8268. // Context sets the context to be used in this call's Do method. Any
  8269. // pending HTTP request will be aborted if the provided context is
  8270. // canceled.
  8271. func (c *AppsServicesVersionsInstancesDebugCall) Context(ctx context.Context) *AppsServicesVersionsInstancesDebugCall {
  8272. c.ctx_ = ctx
  8273. return c
  8274. }
  8275. // Header returns an http.Header that can be modified by the caller to
  8276. // add HTTP headers to the request.
  8277. func (c *AppsServicesVersionsInstancesDebugCall) Header() http.Header {
  8278. if c.header_ == nil {
  8279. c.header_ = make(http.Header)
  8280. }
  8281. return c.header_
  8282. }
  8283. func (c *AppsServicesVersionsInstancesDebugCall) doRequest(alt string) (*http.Response, error) {
  8284. reqHeaders := make(http.Header)
  8285. for k, v := range c.header_ {
  8286. reqHeaders[k] = v
  8287. }
  8288. reqHeaders.Set("User-Agent", c.s.userAgent())
  8289. var body io.Reader = nil
  8290. body, err := googleapi.WithoutDataWrapper.JSONReader(c.debuginstancerequest)
  8291. if err != nil {
  8292. return nil, err
  8293. }
  8294. reqHeaders.Set("Content-Type", "application/json")
  8295. c.urlParams_.Set("alt", alt)
  8296. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}:debug")
  8297. urls += "?" + c.urlParams_.Encode()
  8298. req, _ := http.NewRequest("POST", urls, body)
  8299. req.Header = reqHeaders
  8300. googleapi.Expand(req.URL, map[string]string{
  8301. "appsId": c.appsId,
  8302. "servicesId": c.servicesId,
  8303. "versionsId": c.versionsId,
  8304. "instancesId": c.instancesId,
  8305. })
  8306. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8307. }
  8308. // Do executes the "appengine.apps.services.versions.instances.debug" call.
  8309. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  8310. // status code is an error. Response headers are in either
  8311. // *Operation.ServerResponse.Header or (if a response was returned at
  8312. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  8313. // to check whether the returned error was because
  8314. // http.StatusNotModified was returned.
  8315. func (c *AppsServicesVersionsInstancesDebugCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  8316. gensupport.SetOptions(c.urlParams_, opts...)
  8317. res, err := c.doRequest("json")
  8318. if res != nil && res.StatusCode == http.StatusNotModified {
  8319. if res.Body != nil {
  8320. res.Body.Close()
  8321. }
  8322. return nil, &googleapi.Error{
  8323. Code: res.StatusCode,
  8324. Header: res.Header,
  8325. }
  8326. }
  8327. if err != nil {
  8328. return nil, err
  8329. }
  8330. defer googleapi.CloseBody(res)
  8331. if err := googleapi.CheckResponse(res); err != nil {
  8332. return nil, err
  8333. }
  8334. ret := &Operation{
  8335. ServerResponse: googleapi.ServerResponse{
  8336. Header: res.Header,
  8337. HTTPStatusCode: res.StatusCode,
  8338. },
  8339. }
  8340. target := &ret
  8341. if err := gensupport.DecodeResponse(target, res); err != nil {
  8342. return nil, err
  8343. }
  8344. return ret, nil
  8345. // {
  8346. // "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.",
  8347. // "flatPath": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}:debug",
  8348. // "httpMethod": "POST",
  8349. // "id": "appengine.apps.services.versions.instances.debug",
  8350. // "parameterOrder": [
  8351. // "appsId",
  8352. // "servicesId",
  8353. // "versionsId",
  8354. // "instancesId"
  8355. // ],
  8356. // "parameters": {
  8357. // "appsId": {
  8358. // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1/instances/instance-1.",
  8359. // "location": "path",
  8360. // "required": true,
  8361. // "type": "string"
  8362. // },
  8363. // "instancesId": {
  8364. // "description": "Part of `name`. See documentation of `appsId`.",
  8365. // "location": "path",
  8366. // "required": true,
  8367. // "type": "string"
  8368. // },
  8369. // "servicesId": {
  8370. // "description": "Part of `name`. See documentation of `appsId`.",
  8371. // "location": "path",
  8372. // "required": true,
  8373. // "type": "string"
  8374. // },
  8375. // "versionsId": {
  8376. // "description": "Part of `name`. See documentation of `appsId`.",
  8377. // "location": "path",
  8378. // "required": true,
  8379. // "type": "string"
  8380. // }
  8381. // },
  8382. // "path": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}:debug",
  8383. // "request": {
  8384. // "$ref": "DebugInstanceRequest"
  8385. // },
  8386. // "response": {
  8387. // "$ref": "Operation"
  8388. // },
  8389. // "scopes": [
  8390. // "https://www.googleapis.com/auth/cloud-platform"
  8391. // ]
  8392. // }
  8393. }
  8394. // method id "appengine.apps.services.versions.instances.delete":
  8395. type AppsServicesVersionsInstancesDeleteCall struct {
  8396. s *APIService
  8397. appsId string
  8398. servicesId string
  8399. versionsId string
  8400. instancesId string
  8401. urlParams_ gensupport.URLParams
  8402. ctx_ context.Context
  8403. header_ http.Header
  8404. }
  8405. // Delete: Stops a running instance.
  8406. func (r *AppsServicesVersionsInstancesService) Delete(appsId string, servicesId string, versionsId string, instancesId string) *AppsServicesVersionsInstancesDeleteCall {
  8407. c := &AppsServicesVersionsInstancesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8408. c.appsId = appsId
  8409. c.servicesId = servicesId
  8410. c.versionsId = versionsId
  8411. c.instancesId = instancesId
  8412. return c
  8413. }
  8414. // Fields allows partial responses to be retrieved. See
  8415. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8416. // for more information.
  8417. func (c *AppsServicesVersionsInstancesDeleteCall) Fields(s ...googleapi.Field) *AppsServicesVersionsInstancesDeleteCall {
  8418. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8419. return c
  8420. }
  8421. // Context sets the context to be used in this call's Do method. Any
  8422. // pending HTTP request will be aborted if the provided context is
  8423. // canceled.
  8424. func (c *AppsServicesVersionsInstancesDeleteCall) Context(ctx context.Context) *AppsServicesVersionsInstancesDeleteCall {
  8425. c.ctx_ = ctx
  8426. return c
  8427. }
  8428. // Header returns an http.Header that can be modified by the caller to
  8429. // add HTTP headers to the request.
  8430. func (c *AppsServicesVersionsInstancesDeleteCall) Header() http.Header {
  8431. if c.header_ == nil {
  8432. c.header_ = make(http.Header)
  8433. }
  8434. return c.header_
  8435. }
  8436. func (c *AppsServicesVersionsInstancesDeleteCall) doRequest(alt string) (*http.Response, error) {
  8437. reqHeaders := make(http.Header)
  8438. for k, v := range c.header_ {
  8439. reqHeaders[k] = v
  8440. }
  8441. reqHeaders.Set("User-Agent", c.s.userAgent())
  8442. var body io.Reader = nil
  8443. c.urlParams_.Set("alt", alt)
  8444. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}")
  8445. urls += "?" + c.urlParams_.Encode()
  8446. req, _ := http.NewRequest("DELETE", urls, body)
  8447. req.Header = reqHeaders
  8448. googleapi.Expand(req.URL, map[string]string{
  8449. "appsId": c.appsId,
  8450. "servicesId": c.servicesId,
  8451. "versionsId": c.versionsId,
  8452. "instancesId": c.instancesId,
  8453. })
  8454. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8455. }
  8456. // Do executes the "appengine.apps.services.versions.instances.delete" call.
  8457. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  8458. // status code is an error. Response headers are in either
  8459. // *Operation.ServerResponse.Header or (if a response was returned at
  8460. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  8461. // to check whether the returned error was because
  8462. // http.StatusNotModified was returned.
  8463. func (c *AppsServicesVersionsInstancesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  8464. gensupport.SetOptions(c.urlParams_, opts...)
  8465. res, err := c.doRequest("json")
  8466. if res != nil && res.StatusCode == http.StatusNotModified {
  8467. if res.Body != nil {
  8468. res.Body.Close()
  8469. }
  8470. return nil, &googleapi.Error{
  8471. Code: res.StatusCode,
  8472. Header: res.Header,
  8473. }
  8474. }
  8475. if err != nil {
  8476. return nil, err
  8477. }
  8478. defer googleapi.CloseBody(res)
  8479. if err := googleapi.CheckResponse(res); err != nil {
  8480. return nil, err
  8481. }
  8482. ret := &Operation{
  8483. ServerResponse: googleapi.ServerResponse{
  8484. Header: res.Header,
  8485. HTTPStatusCode: res.StatusCode,
  8486. },
  8487. }
  8488. target := &ret
  8489. if err := gensupport.DecodeResponse(target, res); err != nil {
  8490. return nil, err
  8491. }
  8492. return ret, nil
  8493. // {
  8494. // "description": "Stops a running instance.",
  8495. // "flatPath": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}",
  8496. // "httpMethod": "DELETE",
  8497. // "id": "appengine.apps.services.versions.instances.delete",
  8498. // "parameterOrder": [
  8499. // "appsId",
  8500. // "servicesId",
  8501. // "versionsId",
  8502. // "instancesId"
  8503. // ],
  8504. // "parameters": {
  8505. // "appsId": {
  8506. // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1/instances/instance-1.",
  8507. // "location": "path",
  8508. // "required": true,
  8509. // "type": "string"
  8510. // },
  8511. // "instancesId": {
  8512. // "description": "Part of `name`. See documentation of `appsId`.",
  8513. // "location": "path",
  8514. // "required": true,
  8515. // "type": "string"
  8516. // },
  8517. // "servicesId": {
  8518. // "description": "Part of `name`. See documentation of `appsId`.",
  8519. // "location": "path",
  8520. // "required": true,
  8521. // "type": "string"
  8522. // },
  8523. // "versionsId": {
  8524. // "description": "Part of `name`. See documentation of `appsId`.",
  8525. // "location": "path",
  8526. // "required": true,
  8527. // "type": "string"
  8528. // }
  8529. // },
  8530. // "path": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}",
  8531. // "response": {
  8532. // "$ref": "Operation"
  8533. // },
  8534. // "scopes": [
  8535. // "https://www.googleapis.com/auth/cloud-platform"
  8536. // ]
  8537. // }
  8538. }
  8539. // method id "appengine.apps.services.versions.instances.get":
  8540. type AppsServicesVersionsInstancesGetCall struct {
  8541. s *APIService
  8542. appsId string
  8543. servicesId string
  8544. versionsId string
  8545. instancesId string
  8546. urlParams_ gensupport.URLParams
  8547. ifNoneMatch_ string
  8548. ctx_ context.Context
  8549. header_ http.Header
  8550. }
  8551. // Get: Gets instance information.
  8552. func (r *AppsServicesVersionsInstancesService) Get(appsId string, servicesId string, versionsId string, instancesId string) *AppsServicesVersionsInstancesGetCall {
  8553. c := &AppsServicesVersionsInstancesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8554. c.appsId = appsId
  8555. c.servicesId = servicesId
  8556. c.versionsId = versionsId
  8557. c.instancesId = instancesId
  8558. return c
  8559. }
  8560. // Fields allows partial responses to be retrieved. See
  8561. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8562. // for more information.
  8563. func (c *AppsServicesVersionsInstancesGetCall) Fields(s ...googleapi.Field) *AppsServicesVersionsInstancesGetCall {
  8564. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8565. return c
  8566. }
  8567. // IfNoneMatch sets the optional parameter which makes the operation
  8568. // fail if the object's ETag matches the given value. This is useful for
  8569. // getting updates only after the object has changed since the last
  8570. // request. Use googleapi.IsNotModified to check whether the response
  8571. // error from Do is the result of In-None-Match.
  8572. func (c *AppsServicesVersionsInstancesGetCall) IfNoneMatch(entityTag string) *AppsServicesVersionsInstancesGetCall {
  8573. c.ifNoneMatch_ = entityTag
  8574. return c
  8575. }
  8576. // Context sets the context to be used in this call's Do method. Any
  8577. // pending HTTP request will be aborted if the provided context is
  8578. // canceled.
  8579. func (c *AppsServicesVersionsInstancesGetCall) Context(ctx context.Context) *AppsServicesVersionsInstancesGetCall {
  8580. c.ctx_ = ctx
  8581. return c
  8582. }
  8583. // Header returns an http.Header that can be modified by the caller to
  8584. // add HTTP headers to the request.
  8585. func (c *AppsServicesVersionsInstancesGetCall) Header() http.Header {
  8586. if c.header_ == nil {
  8587. c.header_ = make(http.Header)
  8588. }
  8589. return c.header_
  8590. }
  8591. func (c *AppsServicesVersionsInstancesGetCall) doRequest(alt string) (*http.Response, error) {
  8592. reqHeaders := make(http.Header)
  8593. for k, v := range c.header_ {
  8594. reqHeaders[k] = v
  8595. }
  8596. reqHeaders.Set("User-Agent", c.s.userAgent())
  8597. if c.ifNoneMatch_ != "" {
  8598. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8599. }
  8600. var body io.Reader = nil
  8601. c.urlParams_.Set("alt", alt)
  8602. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}")
  8603. urls += "?" + c.urlParams_.Encode()
  8604. req, _ := http.NewRequest("GET", urls, body)
  8605. req.Header = reqHeaders
  8606. googleapi.Expand(req.URL, map[string]string{
  8607. "appsId": c.appsId,
  8608. "servicesId": c.servicesId,
  8609. "versionsId": c.versionsId,
  8610. "instancesId": c.instancesId,
  8611. })
  8612. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8613. }
  8614. // Do executes the "appengine.apps.services.versions.instances.get" call.
  8615. // Exactly one of *Instance or error will be non-nil. Any non-2xx status
  8616. // code is an error. Response headers are in either
  8617. // *Instance.ServerResponse.Header or (if a response was returned at
  8618. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  8619. // to check whether the returned error was because
  8620. // http.StatusNotModified was returned.
  8621. func (c *AppsServicesVersionsInstancesGetCall) Do(opts ...googleapi.CallOption) (*Instance, error) {
  8622. gensupport.SetOptions(c.urlParams_, opts...)
  8623. res, err := c.doRequest("json")
  8624. if res != nil && res.StatusCode == http.StatusNotModified {
  8625. if res.Body != nil {
  8626. res.Body.Close()
  8627. }
  8628. return nil, &googleapi.Error{
  8629. Code: res.StatusCode,
  8630. Header: res.Header,
  8631. }
  8632. }
  8633. if err != nil {
  8634. return nil, err
  8635. }
  8636. defer googleapi.CloseBody(res)
  8637. if err := googleapi.CheckResponse(res); err != nil {
  8638. return nil, err
  8639. }
  8640. ret := &Instance{
  8641. ServerResponse: googleapi.ServerResponse{
  8642. Header: res.Header,
  8643. HTTPStatusCode: res.StatusCode,
  8644. },
  8645. }
  8646. target := &ret
  8647. if err := gensupport.DecodeResponse(target, res); err != nil {
  8648. return nil, err
  8649. }
  8650. return ret, nil
  8651. // {
  8652. // "description": "Gets instance information.",
  8653. // "flatPath": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}",
  8654. // "httpMethod": "GET",
  8655. // "id": "appengine.apps.services.versions.instances.get",
  8656. // "parameterOrder": [
  8657. // "appsId",
  8658. // "servicesId",
  8659. // "versionsId",
  8660. // "instancesId"
  8661. // ],
  8662. // "parameters": {
  8663. // "appsId": {
  8664. // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1/instances/instance-1.",
  8665. // "location": "path",
  8666. // "required": true,
  8667. // "type": "string"
  8668. // },
  8669. // "instancesId": {
  8670. // "description": "Part of `name`. See documentation of `appsId`.",
  8671. // "location": "path",
  8672. // "required": true,
  8673. // "type": "string"
  8674. // },
  8675. // "servicesId": {
  8676. // "description": "Part of `name`. See documentation of `appsId`.",
  8677. // "location": "path",
  8678. // "required": true,
  8679. // "type": "string"
  8680. // },
  8681. // "versionsId": {
  8682. // "description": "Part of `name`. See documentation of `appsId`.",
  8683. // "location": "path",
  8684. // "required": true,
  8685. // "type": "string"
  8686. // }
  8687. // },
  8688. // "path": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}",
  8689. // "response": {
  8690. // "$ref": "Instance"
  8691. // },
  8692. // "scopes": [
  8693. // "https://www.googleapis.com/auth/appengine.admin",
  8694. // "https://www.googleapis.com/auth/cloud-platform",
  8695. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  8696. // ]
  8697. // }
  8698. }
  8699. // method id "appengine.apps.services.versions.instances.list":
  8700. type AppsServicesVersionsInstancesListCall struct {
  8701. s *APIService
  8702. appsId string
  8703. servicesId string
  8704. versionsId string
  8705. urlParams_ gensupport.URLParams
  8706. ifNoneMatch_ string
  8707. ctx_ context.Context
  8708. header_ http.Header
  8709. }
  8710. // List: Lists the instances of a version.Tip: To aggregate details
  8711. // about instances over time, see the Stackdriver Monitoring API
  8712. // (https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeS
  8713. // eries/list).
  8714. func (r *AppsServicesVersionsInstancesService) List(appsId string, servicesId string, versionsId string) *AppsServicesVersionsInstancesListCall {
  8715. c := &AppsServicesVersionsInstancesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8716. c.appsId = appsId
  8717. c.servicesId = servicesId
  8718. c.versionsId = versionsId
  8719. return c
  8720. }
  8721. // PageSize sets the optional parameter "pageSize": Maximum results to
  8722. // return per page.
  8723. func (c *AppsServicesVersionsInstancesListCall) PageSize(pageSize int64) *AppsServicesVersionsInstancesListCall {
  8724. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  8725. return c
  8726. }
  8727. // PageToken sets the optional parameter "pageToken": Continuation token
  8728. // for fetching the next page of results.
  8729. func (c *AppsServicesVersionsInstancesListCall) PageToken(pageToken string) *AppsServicesVersionsInstancesListCall {
  8730. c.urlParams_.Set("pageToken", pageToken)
  8731. return c
  8732. }
  8733. // Fields allows partial responses to be retrieved. See
  8734. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8735. // for more information.
  8736. func (c *AppsServicesVersionsInstancesListCall) Fields(s ...googleapi.Field) *AppsServicesVersionsInstancesListCall {
  8737. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8738. return c
  8739. }
  8740. // IfNoneMatch sets the optional parameter which makes the operation
  8741. // fail if the object's ETag matches the given value. This is useful for
  8742. // getting updates only after the object has changed since the last
  8743. // request. Use googleapi.IsNotModified to check whether the response
  8744. // error from Do is the result of In-None-Match.
  8745. func (c *AppsServicesVersionsInstancesListCall) IfNoneMatch(entityTag string) *AppsServicesVersionsInstancesListCall {
  8746. c.ifNoneMatch_ = entityTag
  8747. return c
  8748. }
  8749. // Context sets the context to be used in this call's Do method. Any
  8750. // pending HTTP request will be aborted if the provided context is
  8751. // canceled.
  8752. func (c *AppsServicesVersionsInstancesListCall) Context(ctx context.Context) *AppsServicesVersionsInstancesListCall {
  8753. c.ctx_ = ctx
  8754. return c
  8755. }
  8756. // Header returns an http.Header that can be modified by the caller to
  8757. // add HTTP headers to the request.
  8758. func (c *AppsServicesVersionsInstancesListCall) Header() http.Header {
  8759. if c.header_ == nil {
  8760. c.header_ = make(http.Header)
  8761. }
  8762. return c.header_
  8763. }
  8764. func (c *AppsServicesVersionsInstancesListCall) doRequest(alt string) (*http.Response, error) {
  8765. reqHeaders := make(http.Header)
  8766. for k, v := range c.header_ {
  8767. reqHeaders[k] = v
  8768. }
  8769. reqHeaders.Set("User-Agent", c.s.userAgent())
  8770. if c.ifNoneMatch_ != "" {
  8771. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8772. }
  8773. var body io.Reader = nil
  8774. c.urlParams_.Set("alt", alt)
  8775. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances")
  8776. urls += "?" + c.urlParams_.Encode()
  8777. req, _ := http.NewRequest("GET", urls, body)
  8778. req.Header = reqHeaders
  8779. googleapi.Expand(req.URL, map[string]string{
  8780. "appsId": c.appsId,
  8781. "servicesId": c.servicesId,
  8782. "versionsId": c.versionsId,
  8783. })
  8784. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8785. }
  8786. // Do executes the "appengine.apps.services.versions.instances.list" call.
  8787. // Exactly one of *ListInstancesResponse or error will be non-nil. Any
  8788. // non-2xx status code is an error. Response headers are in either
  8789. // *ListInstancesResponse.ServerResponse.Header or (if a response was
  8790. // returned at all) in error.(*googleapi.Error).Header. Use
  8791. // googleapi.IsNotModified to check whether the returned error was
  8792. // because http.StatusNotModified was returned.
  8793. func (c *AppsServicesVersionsInstancesListCall) Do(opts ...googleapi.CallOption) (*ListInstancesResponse, error) {
  8794. gensupport.SetOptions(c.urlParams_, opts...)
  8795. res, err := c.doRequest("json")
  8796. if res != nil && res.StatusCode == http.StatusNotModified {
  8797. if res.Body != nil {
  8798. res.Body.Close()
  8799. }
  8800. return nil, &googleapi.Error{
  8801. Code: res.StatusCode,
  8802. Header: res.Header,
  8803. }
  8804. }
  8805. if err != nil {
  8806. return nil, err
  8807. }
  8808. defer googleapi.CloseBody(res)
  8809. if err := googleapi.CheckResponse(res); err != nil {
  8810. return nil, err
  8811. }
  8812. ret := &ListInstancesResponse{
  8813. ServerResponse: googleapi.ServerResponse{
  8814. Header: res.Header,
  8815. HTTPStatusCode: res.StatusCode,
  8816. },
  8817. }
  8818. target := &ret
  8819. if err := gensupport.DecodeResponse(target, res); err != nil {
  8820. return nil, err
  8821. }
  8822. return ret, nil
  8823. // {
  8824. // "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).",
  8825. // "flatPath": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances",
  8826. // "httpMethod": "GET",
  8827. // "id": "appengine.apps.services.versions.instances.list",
  8828. // "parameterOrder": [
  8829. // "appsId",
  8830. // "servicesId",
  8831. // "versionsId"
  8832. // ],
  8833. // "parameters": {
  8834. // "appsId": {
  8835. // "description": "Part of `parent`. Name of the parent Version resource. Example: apps/myapp/services/default/versions/v1.",
  8836. // "location": "path",
  8837. // "required": true,
  8838. // "type": "string"
  8839. // },
  8840. // "pageSize": {
  8841. // "description": "Maximum results to return per page.",
  8842. // "format": "int32",
  8843. // "location": "query",
  8844. // "type": "integer"
  8845. // },
  8846. // "pageToken": {
  8847. // "description": "Continuation token for fetching the next page of results.",
  8848. // "location": "query",
  8849. // "type": "string"
  8850. // },
  8851. // "servicesId": {
  8852. // "description": "Part of `parent`. See documentation of `appsId`.",
  8853. // "location": "path",
  8854. // "required": true,
  8855. // "type": "string"
  8856. // },
  8857. // "versionsId": {
  8858. // "description": "Part of `parent`. See documentation of `appsId`.",
  8859. // "location": "path",
  8860. // "required": true,
  8861. // "type": "string"
  8862. // }
  8863. // },
  8864. // "path": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances",
  8865. // "response": {
  8866. // "$ref": "ListInstancesResponse"
  8867. // },
  8868. // "scopes": [
  8869. // "https://www.googleapis.com/auth/appengine.admin",
  8870. // "https://www.googleapis.com/auth/cloud-platform",
  8871. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  8872. // ]
  8873. // }
  8874. }
  8875. // Pages invokes f for each page of results.
  8876. // A non-nil error returned from f will halt the iteration.
  8877. // The provided context supersedes any context provided to the Context method.
  8878. func (c *AppsServicesVersionsInstancesListCall) Pages(ctx context.Context, f func(*ListInstancesResponse) error) error {
  8879. c.ctx_ = ctx
  8880. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  8881. for {
  8882. x, err := c.Do()
  8883. if err != nil {
  8884. return err
  8885. }
  8886. if err := f(x); err != nil {
  8887. return err
  8888. }
  8889. if x.NextPageToken == "" {
  8890. return nil
  8891. }
  8892. c.PageToken(x.NextPageToken)
  8893. }
  8894. }