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.

3845 lines
138 KiB

  1. // Copyright 2019 Google LLC.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. // Code generated file. DO NOT EDIT.
  5. // Package appengine provides access to the App Engine Admin API.
  6. //
  7. // For product documentation, see: https://cloud.google.com/appengine/docs/admin-api/
  8. //
  9. // Creating a client
  10. //
  11. // Usage example:
  12. //
  13. // import "google.golang.org/api/appengine/v1alpha"
  14. // ...
  15. // ctx := context.Background()
  16. // appengineService, err := appengine.NewService(ctx)
  17. //
  18. // In this example, Google Application Default Credentials are used for authentication.
  19. //
  20. // For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
  21. //
  22. // Other authentication options
  23. //
  24. // By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes:
  25. //
  26. // appengineService, err := appengine.NewService(ctx, option.WithScopes(appengine.CloudPlatformReadOnlyScope))
  27. //
  28. // To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
  29. //
  30. // appengineService, err := appengine.NewService(ctx, option.WithAPIKey("AIza..."))
  31. //
  32. // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
  33. //
  34. // config := &oauth2.Config{...}
  35. // // ...
  36. // token, err := config.Exchange(ctx, ...)
  37. // appengineService, err := appengine.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
  38. //
  39. // See https://godoc.org/google.golang.org/api/option/ for details on options.
  40. package appengine // import "google.golang.org/api/appengine/v1alpha"
  41. import (
  42. "bytes"
  43. "context"
  44. "encoding/json"
  45. "errors"
  46. "fmt"
  47. "io"
  48. "net/http"
  49. "net/url"
  50. "strconv"
  51. "strings"
  52. gensupport "google.golang.org/api/gensupport"
  53. googleapi "google.golang.org/api/googleapi"
  54. option "google.golang.org/api/option"
  55. htransport "google.golang.org/api/transport/http"
  56. )
  57. // Always reference these packages, just in case the auto-generated code
  58. // below doesn't.
  59. var _ = bytes.NewBuffer
  60. var _ = strconv.Itoa
  61. var _ = fmt.Sprintf
  62. var _ = json.NewDecoder
  63. var _ = io.Copy
  64. var _ = url.Parse
  65. var _ = gensupport.MarshalJSON
  66. var _ = googleapi.Version
  67. var _ = errors.New
  68. var _ = strings.Replace
  69. var _ = context.Canceled
  70. const apiId = "appengine:v1alpha"
  71. const apiName = "appengine"
  72. const apiVersion = "v1alpha"
  73. const basePath = "https://appengine.googleapis.com/"
  74. // OAuth2 scopes used by this API.
  75. const (
  76. // View and manage your applications deployed on Google App Engine
  77. AppengineAdminScope = "https://www.googleapis.com/auth/appengine.admin"
  78. // View and manage your data across Google Cloud Platform services
  79. CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
  80. // View your data across Google Cloud Platform services
  81. CloudPlatformReadOnlyScope = "https://www.googleapis.com/auth/cloud-platform.read-only"
  82. )
  83. // NewService creates a new APIService.
  84. func NewService(ctx context.Context, opts ...option.ClientOption) (*APIService, error) {
  85. scopesOption := option.WithScopes(
  86. "https://www.googleapis.com/auth/appengine.admin",
  87. "https://www.googleapis.com/auth/cloud-platform",
  88. "https://www.googleapis.com/auth/cloud-platform.read-only",
  89. )
  90. // NOTE: prepend, so we don't override user-specified scopes.
  91. opts = append([]option.ClientOption{scopesOption}, opts...)
  92. client, endpoint, err := htransport.NewClient(ctx, opts...)
  93. if err != nil {
  94. return nil, err
  95. }
  96. s, err := New(client)
  97. if err != nil {
  98. return nil, err
  99. }
  100. if endpoint != "" {
  101. s.BasePath = endpoint
  102. }
  103. return s, nil
  104. }
  105. // New creates a new APIService. It uses the provided http.Client for requests.
  106. //
  107. // Deprecated: please use NewService instead.
  108. // To provide a custom HTTP client, use option.WithHTTPClient.
  109. // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
  110. func New(client *http.Client) (*APIService, error) {
  111. if client == nil {
  112. return nil, errors.New("client is nil")
  113. }
  114. s := &APIService{client: client, BasePath: basePath}
  115. s.Apps = NewAppsService(s)
  116. return s, nil
  117. }
  118. type APIService struct {
  119. client *http.Client
  120. BasePath string // API endpoint base URL
  121. UserAgent string // optional additional User-Agent fragment
  122. Apps *AppsService
  123. }
  124. func (s *APIService) userAgent() string {
  125. if s.UserAgent == "" {
  126. return googleapi.UserAgent
  127. }
  128. return googleapi.UserAgent + " " + s.UserAgent
  129. }
  130. func NewAppsService(s *APIService) *AppsService {
  131. rs := &AppsService{s: s}
  132. rs.AuthorizedCertificates = NewAppsAuthorizedCertificatesService(s)
  133. rs.AuthorizedDomains = NewAppsAuthorizedDomainsService(s)
  134. rs.DomainMappings = NewAppsDomainMappingsService(s)
  135. rs.Locations = NewAppsLocationsService(s)
  136. rs.Operations = NewAppsOperationsService(s)
  137. return rs
  138. }
  139. type AppsService struct {
  140. s *APIService
  141. AuthorizedCertificates *AppsAuthorizedCertificatesService
  142. AuthorizedDomains *AppsAuthorizedDomainsService
  143. DomainMappings *AppsDomainMappingsService
  144. Locations *AppsLocationsService
  145. Operations *AppsOperationsService
  146. }
  147. func NewAppsAuthorizedCertificatesService(s *APIService) *AppsAuthorizedCertificatesService {
  148. rs := &AppsAuthorizedCertificatesService{s: s}
  149. return rs
  150. }
  151. type AppsAuthorizedCertificatesService struct {
  152. s *APIService
  153. }
  154. func NewAppsAuthorizedDomainsService(s *APIService) *AppsAuthorizedDomainsService {
  155. rs := &AppsAuthorizedDomainsService{s: s}
  156. return rs
  157. }
  158. type AppsAuthorizedDomainsService struct {
  159. s *APIService
  160. }
  161. func NewAppsDomainMappingsService(s *APIService) *AppsDomainMappingsService {
  162. rs := &AppsDomainMappingsService{s: s}
  163. return rs
  164. }
  165. type AppsDomainMappingsService struct {
  166. s *APIService
  167. }
  168. func NewAppsLocationsService(s *APIService) *AppsLocationsService {
  169. rs := &AppsLocationsService{s: s}
  170. return rs
  171. }
  172. type AppsLocationsService struct {
  173. s *APIService
  174. }
  175. func NewAppsOperationsService(s *APIService) *AppsOperationsService {
  176. rs := &AppsOperationsService{s: s}
  177. return rs
  178. }
  179. type AppsOperationsService struct {
  180. s *APIService
  181. }
  182. // AuthorizedCertificate: An SSL certificate that a user has been
  183. // authorized to administer. A user is authorized to administer any
  184. // certificate that applies to one of their authorized domains.
  185. type AuthorizedCertificate struct {
  186. // CertificateRawData: The SSL certificate serving the
  187. // AuthorizedCertificate resource. This must be obtained independently
  188. // from a certificate authority.
  189. CertificateRawData *CertificateRawData `json:"certificateRawData,omitempty"`
  190. // DisplayName: The user-specified display name of the certificate. This
  191. // is not guaranteed to be unique. Example: My Certificate.
  192. DisplayName string `json:"displayName,omitempty"`
  193. // DomainMappingsCount: Aggregate count of the domain mappings with this
  194. // certificate mapped. This count includes domain mappings on
  195. // applications for which the user does not have VIEWER permissions.Only
  196. // returned by GET or LIST requests when specifically requested by the
  197. // view=FULL_CERTIFICATE option.@OutputOnly
  198. DomainMappingsCount int64 `json:"domainMappingsCount,omitempty"`
  199. // DomainNames: Topmost applicable domains of this certificate. This
  200. // certificate applies to these domains and their subdomains. Example:
  201. // example.com.@OutputOnly
  202. DomainNames []string `json:"domainNames,omitempty"`
  203. // ExpireTime: The time when this certificate expires. To update the
  204. // renewal time on this certificate, upload an SSL certificate with a
  205. // different expiration time using
  206. // AuthorizedCertificates.UpdateAuthorizedCertificate.@OutputOnly
  207. ExpireTime string `json:"expireTime,omitempty"`
  208. // Id: Relative name of the certificate. This is a unique value
  209. // autogenerated on AuthorizedCertificate resource creation. Example:
  210. // 12345.@OutputOnly
  211. Id string `json:"id,omitempty"`
  212. // ManagedCertificate: Only applicable if this certificate is managed by
  213. // App Engine. Managed certificates are tied to the lifecycle of a
  214. // DomainMapping and cannot be updated or deleted via the
  215. // AuthorizedCertificates API. If this certificate is manually
  216. // administered by the user, this field will be empty.@OutputOnly
  217. ManagedCertificate *ManagedCertificate `json:"managedCertificate,omitempty"`
  218. // Name: Full path to the AuthorizedCertificate resource in the API.
  219. // Example: apps/myapp/authorizedCertificates/12345.@OutputOnly
  220. Name string `json:"name,omitempty"`
  221. // VisibleDomainMappings: The full paths to user visible Domain Mapping
  222. // resources that have this certificate mapped. Example:
  223. // apps/myapp/domainMappings/example.com.This may not represent the full
  224. // list of mapped domain mappings if the user does not have VIEWER
  225. // permissions on all of the applications that have this certificate
  226. // mapped. See domain_mappings_count for a complete count.Only returned
  227. // by GET or LIST requests when specifically requested by the
  228. // view=FULL_CERTIFICATE option.@OutputOnly
  229. VisibleDomainMappings []string `json:"visibleDomainMappings,omitempty"`
  230. // ServerResponse contains the HTTP response code and headers from the
  231. // server.
  232. googleapi.ServerResponse `json:"-"`
  233. // ForceSendFields is a list of field names (e.g. "CertificateRawData")
  234. // to unconditionally include in API requests. By default, fields with
  235. // empty values are omitted from API requests. However, any non-pointer,
  236. // non-interface field appearing in ForceSendFields will be sent to the
  237. // server regardless of whether the field is empty or not. This may be
  238. // used to include empty fields in Patch requests.
  239. ForceSendFields []string `json:"-"`
  240. // NullFields is a list of field names (e.g. "CertificateRawData") to
  241. // include in API requests with the JSON null value. By default, fields
  242. // with empty values are omitted from API requests. However, any field
  243. // with an empty value appearing in NullFields will be sent to the
  244. // server as null. It is an error if a field in this list has a
  245. // non-empty value. This may be used to include null fields in Patch
  246. // requests.
  247. NullFields []string `json:"-"`
  248. }
  249. func (s *AuthorizedCertificate) MarshalJSON() ([]byte, error) {
  250. type NoMethod AuthorizedCertificate
  251. raw := NoMethod(*s)
  252. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  253. }
  254. // AuthorizedDomain: A domain that a user has been authorized to
  255. // administer. To authorize use of a domain, verify ownership via
  256. // Webmaster Central
  257. // (https://www.google.com/webmasters/verification/home).
  258. type AuthorizedDomain struct {
  259. // Id: Fully qualified domain name of the domain authorized for use.
  260. // Example: example.com.
  261. Id string `json:"id,omitempty"`
  262. // Name: Full path to the AuthorizedDomain resource in the API. Example:
  263. // apps/myapp/authorizedDomains/example.com.@OutputOnly
  264. Name string `json:"name,omitempty"`
  265. // ForceSendFields is a list of field names (e.g. "Id") to
  266. // unconditionally include in API requests. By default, fields with
  267. // empty values are omitted from API requests. However, any non-pointer,
  268. // non-interface field appearing in ForceSendFields will be sent to the
  269. // server regardless of whether the field is empty or not. This may be
  270. // used to include empty fields in Patch requests.
  271. ForceSendFields []string `json:"-"`
  272. // NullFields is a list of field names (e.g. "Id") to include in API
  273. // requests with the JSON null value. By default, fields with empty
  274. // values are omitted from API requests. However, any field with an
  275. // empty value appearing in NullFields will be sent to the server as
  276. // null. It is an error if a field in this list has a non-empty value.
  277. // This may be used to include null fields in Patch requests.
  278. NullFields []string `json:"-"`
  279. }
  280. func (s *AuthorizedDomain) MarshalJSON() ([]byte, error) {
  281. type NoMethod AuthorizedDomain
  282. raw := NoMethod(*s)
  283. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  284. }
  285. // CertificateRawData: An SSL certificate obtained from a certificate
  286. // authority.
  287. type CertificateRawData struct {
  288. // PrivateKey: Unencrypted PEM encoded RSA private key. This field is
  289. // set once on certificate creation and then encrypted. The key size
  290. // must be 2048 bits or fewer. Must include the header and footer.
  291. // Example: <pre> -----BEGIN RSA PRIVATE KEY-----
  292. // <unencrypted_key_value> -----END RSA PRIVATE KEY----- </pre>
  293. // @InputOnly
  294. PrivateKey string `json:"privateKey,omitempty"`
  295. // PublicCertificate: PEM encoded x.509 public key certificate. This
  296. // field is set once on certificate creation. Must include the header
  297. // and footer. Example: <pre> -----BEGIN CERTIFICATE-----
  298. // <certificate_value> -----END CERTIFICATE----- </pre>
  299. PublicCertificate string `json:"publicCertificate,omitempty"`
  300. // ForceSendFields is a list of field names (e.g. "PrivateKey") to
  301. // unconditionally include in API requests. By default, fields with
  302. // empty values are omitted from API requests. However, any non-pointer,
  303. // non-interface field appearing in ForceSendFields will be sent to the
  304. // server regardless of whether the field is empty or not. This may be
  305. // used to include empty fields in Patch requests.
  306. ForceSendFields []string `json:"-"`
  307. // NullFields is a list of field names (e.g. "PrivateKey") to include in
  308. // API requests with the JSON null value. By default, fields with empty
  309. // values are omitted from API requests. However, any field with an
  310. // empty value appearing in NullFields will be sent to the server as
  311. // null. It is an error if a field in this list has a non-empty value.
  312. // This may be used to include null fields in Patch requests.
  313. NullFields []string `json:"-"`
  314. }
  315. func (s *CertificateRawData) MarshalJSON() ([]byte, error) {
  316. type NoMethod CertificateRawData
  317. raw := NoMethod(*s)
  318. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  319. }
  320. // CreateVersionMetadataV1: Metadata for the given
  321. // google.longrunning.Operation during a
  322. // google.appengine.v1.CreateVersionRequest.
  323. type CreateVersionMetadataV1 struct {
  324. // CloudBuildId: The Cloud Build ID if one was created as part of the
  325. // version create. @OutputOnly
  326. CloudBuildId string `json:"cloudBuildId,omitempty"`
  327. // ForceSendFields is a list of field names (e.g. "CloudBuildId") to
  328. // unconditionally include in API requests. By default, fields with
  329. // empty values are omitted from API requests. However, any non-pointer,
  330. // non-interface field appearing in ForceSendFields will be sent to the
  331. // server regardless of whether the field is empty or not. This may be
  332. // used to include empty fields in Patch requests.
  333. ForceSendFields []string `json:"-"`
  334. // NullFields is a list of field names (e.g. "CloudBuildId") to include
  335. // in API requests with the JSON null value. By default, fields with
  336. // empty values are omitted from API requests. However, any field with
  337. // an empty value appearing in NullFields will be sent to the server as
  338. // null. It is an error if a field in this list has a non-empty value.
  339. // This may be used to include null fields in Patch requests.
  340. NullFields []string `json:"-"`
  341. }
  342. func (s *CreateVersionMetadataV1) MarshalJSON() ([]byte, error) {
  343. type NoMethod CreateVersionMetadataV1
  344. raw := NoMethod(*s)
  345. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  346. }
  347. // CreateVersionMetadataV1Alpha: Metadata for the given
  348. // google.longrunning.Operation during a
  349. // google.appengine.v1alpha.CreateVersionRequest.
  350. type CreateVersionMetadataV1Alpha struct {
  351. // CloudBuildId: The Cloud Build ID if one was created as part of the
  352. // version create. @OutputOnly
  353. CloudBuildId string `json:"cloudBuildId,omitempty"`
  354. // ForceSendFields is a list of field names (e.g. "CloudBuildId") to
  355. // unconditionally include in API requests. By default, fields with
  356. // empty values are omitted from API requests. However, any non-pointer,
  357. // non-interface field appearing in ForceSendFields will be sent to the
  358. // server regardless of whether the field is empty or not. This may be
  359. // used to include empty fields in Patch requests.
  360. ForceSendFields []string `json:"-"`
  361. // NullFields is a list of field names (e.g. "CloudBuildId") to include
  362. // in API requests with the JSON null value. By default, fields with
  363. // empty values are omitted from API requests. However, any field with
  364. // an empty value appearing in NullFields will be sent to the server as
  365. // null. It is an error if a field in this list has a non-empty value.
  366. // This may be used to include null fields in Patch requests.
  367. NullFields []string `json:"-"`
  368. }
  369. func (s *CreateVersionMetadataV1Alpha) MarshalJSON() ([]byte, error) {
  370. type NoMethod CreateVersionMetadataV1Alpha
  371. raw := NoMethod(*s)
  372. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  373. }
  374. // CreateVersionMetadataV1Beta: Metadata for the given
  375. // google.longrunning.Operation during a
  376. // google.appengine.v1beta.CreateVersionRequest.
  377. type CreateVersionMetadataV1Beta struct {
  378. // CloudBuildId: The Cloud Build ID if one was created as part of the
  379. // version create. @OutputOnly
  380. CloudBuildId string `json:"cloudBuildId,omitempty"`
  381. // ForceSendFields is a list of field names (e.g. "CloudBuildId") to
  382. // unconditionally include in API requests. By default, fields with
  383. // empty values are omitted from API requests. However, any non-pointer,
  384. // non-interface field appearing in ForceSendFields will be sent to the
  385. // server regardless of whether the field is empty or not. This may be
  386. // used to include empty fields in Patch requests.
  387. ForceSendFields []string `json:"-"`
  388. // NullFields is a list of field names (e.g. "CloudBuildId") to include
  389. // in API requests with the JSON null value. By default, fields with
  390. // empty values are omitted from API requests. However, any field with
  391. // an empty value appearing in NullFields will be sent to the server as
  392. // null. It is an error if a field in this list has a non-empty value.
  393. // This may be used to include null fields in Patch requests.
  394. NullFields []string `json:"-"`
  395. }
  396. func (s *CreateVersionMetadataV1Beta) MarshalJSON() ([]byte, error) {
  397. type NoMethod CreateVersionMetadataV1Beta
  398. raw := NoMethod(*s)
  399. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  400. }
  401. // DomainMapping: A domain serving an App Engine application.
  402. type DomainMapping struct {
  403. // Id: Relative name of the domain serving the application. Example:
  404. // example.com.
  405. Id string `json:"id,omitempty"`
  406. // Name: Full path to the DomainMapping resource in the API. Example:
  407. // apps/myapp/domainMapping/example.com.@OutputOnly
  408. Name string `json:"name,omitempty"`
  409. // ResourceRecords: The resource records required to configure this
  410. // domain mapping. These records must be added to the domain's DNS
  411. // configuration in order to serve the application via this domain
  412. // mapping.@OutputOnly
  413. ResourceRecords []*ResourceRecord `json:"resourceRecords,omitempty"`
  414. // SslSettings: SSL configuration for this domain. If unconfigured, this
  415. // domain will not serve with SSL.
  416. SslSettings *SslSettings `json:"sslSettings,omitempty"`
  417. // ServerResponse contains the HTTP response code and headers from the
  418. // server.
  419. googleapi.ServerResponse `json:"-"`
  420. // ForceSendFields is a list of field names (e.g. "Id") to
  421. // unconditionally include in API requests. By default, fields with
  422. // empty values are omitted from API requests. However, any non-pointer,
  423. // non-interface field appearing in ForceSendFields will be sent to the
  424. // server regardless of whether the field is empty or not. This may be
  425. // used to include empty fields in Patch requests.
  426. ForceSendFields []string `json:"-"`
  427. // NullFields is a list of field names (e.g. "Id") to include in API
  428. // requests with the JSON null value. By default, fields with empty
  429. // values are omitted from API requests. However, any field with an
  430. // empty value appearing in NullFields will be sent to the server as
  431. // null. It is an error if a field in this list has a non-empty value.
  432. // This may be used to include null fields in Patch requests.
  433. NullFields []string `json:"-"`
  434. }
  435. func (s *DomainMapping) MarshalJSON() ([]byte, error) {
  436. type NoMethod DomainMapping
  437. raw := NoMethod(*s)
  438. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  439. }
  440. // Empty: A generic empty message that you can re-use to avoid defining
  441. // duplicated empty messages in your APIs. A typical example is to use
  442. // it as the request or the response type of an API method. For
  443. // instance:
  444. // service Foo {
  445. // rpc Bar(google.protobuf.Empty) returns
  446. // (google.protobuf.Empty);
  447. // }
  448. // The JSON representation for Empty is empty JSON object {}.
  449. type Empty struct {
  450. // ServerResponse contains the HTTP response code and headers from the
  451. // server.
  452. googleapi.ServerResponse `json:"-"`
  453. }
  454. // ListAuthorizedCertificatesResponse: Response message for
  455. // AuthorizedCertificates.ListAuthorizedCertificates.
  456. type ListAuthorizedCertificatesResponse struct {
  457. // Certificates: The SSL certificates the user is authorized to
  458. // administer.
  459. Certificates []*AuthorizedCertificate `json:"certificates,omitempty"`
  460. // NextPageToken: Continuation token for fetching the next page of
  461. // results.
  462. NextPageToken string `json:"nextPageToken,omitempty"`
  463. // ServerResponse contains the HTTP response code and headers from the
  464. // server.
  465. googleapi.ServerResponse `json:"-"`
  466. // ForceSendFields is a list of field names (e.g. "Certificates") to
  467. // unconditionally include in API requests. By default, fields with
  468. // empty values are omitted from API requests. However, any non-pointer,
  469. // non-interface field appearing in ForceSendFields will be sent to the
  470. // server regardless of whether the field is empty or not. This may be
  471. // used to include empty fields in Patch requests.
  472. ForceSendFields []string `json:"-"`
  473. // NullFields is a list of field names (e.g. "Certificates") to include
  474. // in API requests with the JSON null value. By default, fields with
  475. // empty values are omitted from API requests. However, any field with
  476. // an empty value appearing in NullFields will be sent to the server as
  477. // null. It is an error if a field in this list has a non-empty value.
  478. // This may be used to include null fields in Patch requests.
  479. NullFields []string `json:"-"`
  480. }
  481. func (s *ListAuthorizedCertificatesResponse) MarshalJSON() ([]byte, error) {
  482. type NoMethod ListAuthorizedCertificatesResponse
  483. raw := NoMethod(*s)
  484. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  485. }
  486. // ListAuthorizedDomainsResponse: Response message for
  487. // AuthorizedDomains.ListAuthorizedDomains.
  488. type ListAuthorizedDomainsResponse struct {
  489. // Domains: The authorized domains belonging to the user.
  490. Domains []*AuthorizedDomain `json:"domains,omitempty"`
  491. // NextPageToken: Continuation token for fetching the next page of
  492. // results.
  493. NextPageToken string `json:"nextPageToken,omitempty"`
  494. // ServerResponse contains the HTTP response code and headers from the
  495. // server.
  496. googleapi.ServerResponse `json:"-"`
  497. // ForceSendFields is a list of field names (e.g. "Domains") to
  498. // unconditionally include in API requests. By default, fields with
  499. // empty values are omitted from API requests. However, any non-pointer,
  500. // non-interface field appearing in ForceSendFields will be sent to the
  501. // server regardless of whether the field is empty or not. This may be
  502. // used to include empty fields in Patch requests.
  503. ForceSendFields []string `json:"-"`
  504. // NullFields is a list of field names (e.g. "Domains") to include in
  505. // API requests with the JSON null value. By default, fields with empty
  506. // values are omitted from API requests. However, any field with an
  507. // empty value appearing in NullFields will be sent to the server as
  508. // null. It is an error if a field in this list has a non-empty value.
  509. // This may be used to include null fields in Patch requests.
  510. NullFields []string `json:"-"`
  511. }
  512. func (s *ListAuthorizedDomainsResponse) MarshalJSON() ([]byte, error) {
  513. type NoMethod ListAuthorizedDomainsResponse
  514. raw := NoMethod(*s)
  515. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  516. }
  517. // ListDomainMappingsResponse: Response message for
  518. // DomainMappings.ListDomainMappings.
  519. type ListDomainMappingsResponse struct {
  520. // DomainMappings: The domain mappings for the application.
  521. DomainMappings []*DomainMapping `json:"domainMappings,omitempty"`
  522. // NextPageToken: Continuation token for fetching the next page of
  523. // results.
  524. NextPageToken string `json:"nextPageToken,omitempty"`
  525. // ServerResponse contains the HTTP response code and headers from the
  526. // server.
  527. googleapi.ServerResponse `json:"-"`
  528. // ForceSendFields is a list of field names (e.g. "DomainMappings") to
  529. // unconditionally include in API requests. By default, fields with
  530. // empty values are omitted from API requests. However, any non-pointer,
  531. // non-interface field appearing in ForceSendFields will be sent to the
  532. // server regardless of whether the field is empty or not. This may be
  533. // used to include empty fields in Patch requests.
  534. ForceSendFields []string `json:"-"`
  535. // NullFields is a list of field names (e.g. "DomainMappings") to
  536. // include in API requests with the JSON null value. By default, fields
  537. // with empty values are omitted from API requests. However, any field
  538. // with an empty value appearing in NullFields will be sent to the
  539. // server as null. It is an error if a field in this list has a
  540. // non-empty value. This may be used to include null fields in Patch
  541. // requests.
  542. NullFields []string `json:"-"`
  543. }
  544. func (s *ListDomainMappingsResponse) MarshalJSON() ([]byte, error) {
  545. type NoMethod ListDomainMappingsResponse
  546. raw := NoMethod(*s)
  547. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  548. }
  549. // ListLocationsResponse: The response message for
  550. // Locations.ListLocations.
  551. type ListLocationsResponse struct {
  552. // Locations: A list of locations that matches the specified filter in
  553. // the request.
  554. Locations []*Location `json:"locations,omitempty"`
  555. // NextPageToken: The standard List next-page token.
  556. NextPageToken string `json:"nextPageToken,omitempty"`
  557. // ServerResponse contains the HTTP response code and headers from the
  558. // server.
  559. googleapi.ServerResponse `json:"-"`
  560. // ForceSendFields is a list of field names (e.g. "Locations") to
  561. // unconditionally include in API requests. By default, fields with
  562. // empty values are omitted from API requests. However, any non-pointer,
  563. // non-interface field appearing in ForceSendFields will be sent to the
  564. // server regardless of whether the field is empty or not. This may be
  565. // used to include empty fields in Patch requests.
  566. ForceSendFields []string `json:"-"`
  567. // NullFields is a list of field names (e.g. "Locations") to include in
  568. // API requests with the JSON null value. By default, fields with empty
  569. // values are omitted from API requests. However, any field with an
  570. // empty value appearing in NullFields will be sent to the server as
  571. // null. It is an error if a field in this list has a non-empty value.
  572. // This may be used to include null fields in Patch requests.
  573. NullFields []string `json:"-"`
  574. }
  575. func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) {
  576. type NoMethod ListLocationsResponse
  577. raw := NoMethod(*s)
  578. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  579. }
  580. // ListOperationsResponse: The response message for
  581. // Operations.ListOperations.
  582. type ListOperationsResponse struct {
  583. // NextPageToken: The standard List next-page token.
  584. NextPageToken string `json:"nextPageToken,omitempty"`
  585. // Operations: A list of operations that matches the specified filter in
  586. // the request.
  587. Operations []*Operation `json:"operations,omitempty"`
  588. // ServerResponse contains the HTTP response code and headers from the
  589. // server.
  590. googleapi.ServerResponse `json:"-"`
  591. // ForceSendFields is a list of field names (e.g. "NextPageToken") to
  592. // unconditionally include in API requests. By default, fields with
  593. // empty values are omitted from API requests. However, any non-pointer,
  594. // non-interface field appearing in ForceSendFields will be sent to the
  595. // server regardless of whether the field is empty or not. This may be
  596. // used to include empty fields in Patch requests.
  597. ForceSendFields []string `json:"-"`
  598. // NullFields is a list of field names (e.g. "NextPageToken") to include
  599. // in API requests with the JSON null value. By default, fields with
  600. // empty values are omitted from API requests. However, any field with
  601. // an empty value appearing in NullFields will be sent to the server as
  602. // null. It is an error if a field in this list has a non-empty value.
  603. // This may be used to include null fields in Patch requests.
  604. NullFields []string `json:"-"`
  605. }
  606. func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) {
  607. type NoMethod ListOperationsResponse
  608. raw := NoMethod(*s)
  609. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  610. }
  611. // Location: A resource that represents Google Cloud Platform location.
  612. type Location struct {
  613. // DisplayName: The friendly name for this location, typically a nearby
  614. // city name. For example, "Tokyo".
  615. DisplayName string `json:"displayName,omitempty"`
  616. // Labels: Cross-service attributes for the location. For
  617. // example
  618. // {"cloud.googleapis.com/region": "us-east1"}
  619. //
  620. Labels map[string]string `json:"labels,omitempty"`
  621. // LocationId: The canonical id for this location. For example:
  622. // "us-east1".
  623. LocationId string `json:"locationId,omitempty"`
  624. // Metadata: Service-specific metadata. For example the available
  625. // capacity at the given location.
  626. Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  627. // Name: Resource name for the location, which may vary between
  628. // implementations. For example:
  629. // "projects/example-project/locations/us-east1"
  630. Name string `json:"name,omitempty"`
  631. // ServerResponse contains the HTTP response code and headers from the
  632. // server.
  633. googleapi.ServerResponse `json:"-"`
  634. // ForceSendFields is a list of field names (e.g. "DisplayName") to
  635. // unconditionally include in API requests. By default, fields with
  636. // empty values are omitted from API requests. However, any non-pointer,
  637. // non-interface field appearing in ForceSendFields will be sent to the
  638. // server regardless of whether the field is empty or not. This may be
  639. // used to include empty fields in Patch requests.
  640. ForceSendFields []string `json:"-"`
  641. // NullFields is a list of field names (e.g. "DisplayName") to include
  642. // in API requests with the JSON null value. By default, fields with
  643. // empty values are omitted from API requests. However, any field with
  644. // an empty value appearing in NullFields will be sent to the server as
  645. // null. It is an error if a field in this list has a non-empty value.
  646. // This may be used to include null fields in Patch requests.
  647. NullFields []string `json:"-"`
  648. }
  649. func (s *Location) MarshalJSON() ([]byte, error) {
  650. type NoMethod Location
  651. raw := NoMethod(*s)
  652. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  653. }
  654. // LocationMetadata: Metadata for the given
  655. // google.cloud.location.Location.
  656. type LocationMetadata struct {
  657. // FlexibleEnvironmentAvailable: App Engine flexible environment is
  658. // available in the given location.@OutputOnly
  659. FlexibleEnvironmentAvailable bool `json:"flexibleEnvironmentAvailable,omitempty"`
  660. // StandardEnvironmentAvailable: App Engine standard environment is
  661. // available in the given location.@OutputOnly
  662. StandardEnvironmentAvailable bool `json:"standardEnvironmentAvailable,omitempty"`
  663. // ForceSendFields is a list of field names (e.g.
  664. // "FlexibleEnvironmentAvailable") to unconditionally include in API
  665. // requests. By default, fields with empty values are omitted from API
  666. // requests. However, any non-pointer, non-interface field appearing in
  667. // ForceSendFields will be sent to the server regardless of whether the
  668. // field is empty or not. This may be used to include empty fields in
  669. // Patch requests.
  670. ForceSendFields []string `json:"-"`
  671. // NullFields is a list of field names (e.g.
  672. // "FlexibleEnvironmentAvailable") to include in API requests with the
  673. // JSON null value. By default, fields with empty values are omitted
  674. // from API requests. However, any field with an empty value appearing
  675. // in NullFields will be sent to the server as null. It is an error if a
  676. // field in this list has a non-empty value. This may be used to include
  677. // null fields in Patch requests.
  678. NullFields []string `json:"-"`
  679. }
  680. func (s *LocationMetadata) MarshalJSON() ([]byte, error) {
  681. type NoMethod LocationMetadata
  682. raw := NoMethod(*s)
  683. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  684. }
  685. // ManagedCertificate: A certificate managed by App Engine.
  686. type ManagedCertificate struct {
  687. // LastRenewalTime: Time at which the certificate was last renewed. The
  688. // renewal process is fully managed. Certificate renewal will
  689. // automatically occur before the certificate expires. Renewal errors
  690. // can be tracked via ManagementStatus.@OutputOnly
  691. LastRenewalTime string `json:"lastRenewalTime,omitempty"`
  692. // Status: Status of certificate management. Refers to the most recent
  693. // certificate acquisition or renewal attempt.@OutputOnly
  694. //
  695. // Possible values:
  696. // "UNSPECIFIED_STATUS"
  697. // "OK" - Certificate was successfully obtained and inserted into the
  698. // serving system.
  699. // "PENDING" - Certificate is under active attempts to acquire or
  700. // renew.
  701. // "FAILED_RETRYING_INTERNAL" - Most recent renewal failed due to a
  702. // system failure and will be retried. System failure is likely
  703. // transient, and subsequent renewal attempts may succeed. The last
  704. // successfully provisioned certificate may still be serving.
  705. // "FAILED_RETRYING_NOT_VISIBLE" - Most recent renewal failed due to
  706. // an invalid DNS setup and will be retried. Renewal attempts will
  707. // continue to fail until the certificate domain's DNS configuration is
  708. // fixed. The last successfully provisioned certificate may still be
  709. // serving.
  710. // "FAILED_PERMANENTLY_NOT_VISIBLE" - All renewal attempts have been
  711. // exhausted. Most recent renewal failed due to an invalid DNS setup and
  712. // will not be retried. The last successfully provisioned certificate
  713. // may still be serving.
  714. // "FAILED_RETRYING_CAA_FORBIDDEN" - Most recent renewal failed due to
  715. // an explicit CAA record that does not include the in-use CA, Let's
  716. // Encrypt. Renewals will continue to fail until the CAA is
  717. // reconfigured. The last successfully provisioned certificate may still
  718. // be serving.
  719. // "FAILED_RETRYING_CAA_CHECKING" - Most recent renewal failed due to
  720. // a CAA retrieval failure. This means that the domain's DNS provider
  721. // does not properly handle CAA records, failing requests for CAA
  722. // records when no CAA records are defined. Renewals will continue to
  723. // fail until the DNS provider is changed or a CAA record is added for
  724. // the given domain. The last successfully provisioned certificate may
  725. // still be serving.
  726. Status string `json:"status,omitempty"`
  727. // ForceSendFields is a list of field names (e.g. "LastRenewalTime") to
  728. // unconditionally include in API requests. By default, fields with
  729. // empty values are omitted from API requests. However, any non-pointer,
  730. // non-interface field appearing in ForceSendFields will be sent to the
  731. // server regardless of whether the field is empty or not. This may be
  732. // used to include empty fields in Patch requests.
  733. ForceSendFields []string `json:"-"`
  734. // NullFields is a list of field names (e.g. "LastRenewalTime") to
  735. // include in API requests with the JSON null value. By default, fields
  736. // with empty values are omitted from API requests. However, any field
  737. // with an empty value appearing in NullFields will be sent to the
  738. // server as null. It is an error if a field in this list has a
  739. // non-empty value. This may be used to include null fields in Patch
  740. // requests.
  741. NullFields []string `json:"-"`
  742. }
  743. func (s *ManagedCertificate) MarshalJSON() ([]byte, error) {
  744. type NoMethod ManagedCertificate
  745. raw := NoMethod(*s)
  746. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  747. }
  748. // Operation: This resource represents a long-running operation that is
  749. // the result of a network API call.
  750. type Operation struct {
  751. // Done: If the value is false, it means the operation is still in
  752. // progress. If true, the operation is completed, and either error or
  753. // response is available.
  754. Done bool `json:"done,omitempty"`
  755. // Error: The error result of the operation in case of failure or
  756. // cancellation.
  757. Error *Status `json:"error,omitempty"`
  758. // Metadata: Service-specific metadata associated with the operation. It
  759. // typically contains progress information and common metadata such as
  760. // create time. Some services might not provide such metadata. Any
  761. // method that returns a long-running operation should document the
  762. // metadata type, if any.
  763. Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  764. // Name: The server-assigned name, which is only unique within the same
  765. // service that originally returns it. If you use the default HTTP
  766. // mapping, the name should have the format of
  767. // operations/some/unique/name.
  768. Name string `json:"name,omitempty"`
  769. // Response: The normal response of the operation in case of success. If
  770. // the original method returns no data on success, such as Delete, the
  771. // response is google.protobuf.Empty. If the original method is standard
  772. // Get/Create/Update, the response should be the resource. For other
  773. // methods, the response should have the type XxxResponse, where Xxx is
  774. // the original method name. For example, if the original method name is
  775. // TakeSnapshot(), the inferred response type is TakeSnapshotResponse.
  776. Response googleapi.RawMessage `json:"response,omitempty"`
  777. // ServerResponse contains the HTTP response code and headers from the
  778. // server.
  779. googleapi.ServerResponse `json:"-"`
  780. // ForceSendFields is a list of field names (e.g. "Done") to
  781. // unconditionally include in API requests. By default, fields with
  782. // empty values are omitted from API requests. However, any non-pointer,
  783. // non-interface field appearing in ForceSendFields will be sent to the
  784. // server regardless of whether the field is empty or not. This may be
  785. // used to include empty fields in Patch requests.
  786. ForceSendFields []string `json:"-"`
  787. // NullFields is a list of field names (e.g. "Done") to include in API
  788. // requests with the JSON null value. By default, fields with empty
  789. // values are omitted from API requests. However, any field with an
  790. // empty value appearing in NullFields will be sent to the server as
  791. // null. It is an error if a field in this list has a non-empty value.
  792. // This may be used to include null fields in Patch requests.
  793. NullFields []string `json:"-"`
  794. }
  795. func (s *Operation) MarshalJSON() ([]byte, error) {
  796. type NoMethod Operation
  797. raw := NoMethod(*s)
  798. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  799. }
  800. // OperationMetadataV1: Metadata for the given
  801. // google.longrunning.Operation.
  802. type OperationMetadataV1 struct {
  803. CreateVersionMetadata *CreateVersionMetadataV1 `json:"createVersionMetadata,omitempty"`
  804. // EndTime: Time that this operation completed.@OutputOnly
  805. EndTime string `json:"endTime,omitempty"`
  806. // EphemeralMessage: Ephemeral message that may change every time the
  807. // operation is polled. @OutputOnly
  808. EphemeralMessage string `json:"ephemeralMessage,omitempty"`
  809. // InsertTime: Time that this operation was created.@OutputOnly
  810. InsertTime string `json:"insertTime,omitempty"`
  811. // Method: API method that initiated this operation. Example:
  812. // google.appengine.v1.Versions.CreateVersion.@OutputOnly
  813. Method string `json:"method,omitempty"`
  814. // Target: Name of the resource that this operation is acting on.
  815. // Example: apps/myapp/services/default.@OutputOnly
  816. Target string `json:"target,omitempty"`
  817. // User: User who requested this operation.@OutputOnly
  818. User string `json:"user,omitempty"`
  819. // Warning: Durable messages that persist on every operation poll.
  820. // @OutputOnly
  821. Warning []string `json:"warning,omitempty"`
  822. // ForceSendFields is a list of field names (e.g.
  823. // "CreateVersionMetadata") to unconditionally include in API requests.
  824. // By default, fields with empty values are omitted from API requests.
  825. // However, any non-pointer, non-interface field appearing in
  826. // ForceSendFields will be sent to the server regardless of whether the
  827. // field is empty or not. This may be used to include empty fields in
  828. // Patch requests.
  829. ForceSendFields []string `json:"-"`
  830. // NullFields is a list of field names (e.g. "CreateVersionMetadata") to
  831. // include in API requests with the JSON null value. By default, fields
  832. // with empty values are omitted from API requests. However, any field
  833. // with an empty value appearing in NullFields will be sent to the
  834. // server as null. It is an error if a field in this list has a
  835. // non-empty value. This may be used to include null fields in Patch
  836. // requests.
  837. NullFields []string `json:"-"`
  838. }
  839. func (s *OperationMetadataV1) MarshalJSON() ([]byte, error) {
  840. type NoMethod OperationMetadataV1
  841. raw := NoMethod(*s)
  842. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  843. }
  844. // OperationMetadataV1Alpha: Metadata for the given
  845. // google.longrunning.Operation.
  846. type OperationMetadataV1Alpha struct {
  847. CreateVersionMetadata *CreateVersionMetadataV1Alpha `json:"createVersionMetadata,omitempty"`
  848. // EndTime: Time that this operation completed.@OutputOnly
  849. EndTime string `json:"endTime,omitempty"`
  850. // EphemeralMessage: Ephemeral message that may change every time the
  851. // operation is polled. @OutputOnly
  852. EphemeralMessage string `json:"ephemeralMessage,omitempty"`
  853. // InsertTime: Time that this operation was created.@OutputOnly
  854. InsertTime string `json:"insertTime,omitempty"`
  855. // Method: API method that initiated this operation. Example:
  856. // google.appengine.v1alpha.Versions.CreateVersion.@OutputOnly
  857. Method string `json:"method,omitempty"`
  858. // Target: Name of the resource that this operation is acting on.
  859. // Example: apps/myapp/services/default.@OutputOnly
  860. Target string `json:"target,omitempty"`
  861. // User: User who requested this operation.@OutputOnly
  862. User string `json:"user,omitempty"`
  863. // Warning: Durable messages that persist on every operation poll.
  864. // @OutputOnly
  865. Warning []string `json:"warning,omitempty"`
  866. // ForceSendFields is a list of field names (e.g.
  867. // "CreateVersionMetadata") to unconditionally include in API requests.
  868. // By default, fields with empty values are omitted from API requests.
  869. // However, any non-pointer, non-interface field appearing in
  870. // ForceSendFields will be sent to the server regardless of whether the
  871. // field is empty or not. This may be used to include empty fields in
  872. // Patch requests.
  873. ForceSendFields []string `json:"-"`
  874. // NullFields is a list of field names (e.g. "CreateVersionMetadata") to
  875. // include in API requests with the JSON null value. By default, fields
  876. // with empty values are omitted from API requests. However, any field
  877. // with an empty value appearing in NullFields will be sent to the
  878. // server as null. It is an error if a field in this list has a
  879. // non-empty value. This may be used to include null fields in Patch
  880. // requests.
  881. NullFields []string `json:"-"`
  882. }
  883. func (s *OperationMetadataV1Alpha) MarshalJSON() ([]byte, error) {
  884. type NoMethod OperationMetadataV1Alpha
  885. raw := NoMethod(*s)
  886. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  887. }
  888. // OperationMetadataV1Beta: Metadata for the given
  889. // google.longrunning.Operation.
  890. type OperationMetadataV1Beta struct {
  891. CreateVersionMetadata *CreateVersionMetadataV1Beta `json:"createVersionMetadata,omitempty"`
  892. // EndTime: Time that this operation completed.@OutputOnly
  893. EndTime string `json:"endTime,omitempty"`
  894. // EphemeralMessage: Ephemeral message that may change every time the
  895. // operation is polled. @OutputOnly
  896. EphemeralMessage string `json:"ephemeralMessage,omitempty"`
  897. // InsertTime: Time that this operation was created.@OutputOnly
  898. InsertTime string `json:"insertTime,omitempty"`
  899. // Method: API method that initiated this operation. Example:
  900. // google.appengine.v1beta.Versions.CreateVersion.@OutputOnly
  901. Method string `json:"method,omitempty"`
  902. // Target: Name of the resource that this operation is acting on.
  903. // Example: apps/myapp/services/default.@OutputOnly
  904. Target string `json:"target,omitempty"`
  905. // User: User who requested this operation.@OutputOnly
  906. User string `json:"user,omitempty"`
  907. // Warning: Durable messages that persist on every operation poll.
  908. // @OutputOnly
  909. Warning []string `json:"warning,omitempty"`
  910. // ForceSendFields is a list of field names (e.g.
  911. // "CreateVersionMetadata") to unconditionally include in API requests.
  912. // By default, fields with empty values are omitted from API requests.
  913. // However, any non-pointer, non-interface field appearing in
  914. // ForceSendFields will be sent to the server regardless of whether the
  915. // field is empty or not. This may be used to include empty fields in
  916. // Patch requests.
  917. ForceSendFields []string `json:"-"`
  918. // NullFields is a list of field names (e.g. "CreateVersionMetadata") to
  919. // include in API requests with the JSON null value. By default, fields
  920. // with empty values are omitted from API requests. However, any field
  921. // with an empty value appearing in NullFields will be sent to the
  922. // server as null. It is an error if a field in this list has a
  923. // non-empty value. This may be used to include null fields in Patch
  924. // requests.
  925. NullFields []string `json:"-"`
  926. }
  927. func (s *OperationMetadataV1Beta) MarshalJSON() ([]byte, error) {
  928. type NoMethod OperationMetadataV1Beta
  929. raw := NoMethod(*s)
  930. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  931. }
  932. // ResourceRecord: A DNS resource record.
  933. type ResourceRecord struct {
  934. // Name: Relative name of the object affected by this record. Only
  935. // applicable for CNAME records. Example: 'www'.
  936. Name string `json:"name,omitempty"`
  937. // Rrdata: Data for this record. Values vary by record type, as defined
  938. // in RFC 1035 (section 5) and RFC 1034 (section 3.6.1).
  939. Rrdata string `json:"rrdata,omitempty"`
  940. // Type: Resource record type. Example: AAAA.
  941. //
  942. // Possible values:
  943. // "A" - An A resource record. Data is an IPv4 address.
  944. // "AAAA" - An AAAA resource record. Data is an IPv6 address.
  945. // "CNAME" - A CNAME resource record. Data is a domain name to be
  946. // aliased.
  947. Type string `json:"type,omitempty"`
  948. // ForceSendFields is a list of field names (e.g. "Name") to
  949. // unconditionally include in API requests. By default, fields with
  950. // empty values are omitted from API requests. However, any non-pointer,
  951. // non-interface field appearing in ForceSendFields will be sent to the
  952. // server regardless of whether the field is empty or not. This may be
  953. // used to include empty fields in Patch requests.
  954. ForceSendFields []string `json:"-"`
  955. // NullFields is a list of field names (e.g. "Name") to include in API
  956. // requests with the JSON null value. By default, fields with empty
  957. // values are omitted from API requests. However, any field with an
  958. // empty value appearing in NullFields will be sent to the server as
  959. // null. It is an error if a field in this list has a non-empty value.
  960. // This may be used to include null fields in Patch requests.
  961. NullFields []string `json:"-"`
  962. }
  963. func (s *ResourceRecord) MarshalJSON() ([]byte, error) {
  964. type NoMethod ResourceRecord
  965. raw := NoMethod(*s)
  966. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  967. }
  968. // SslSettings: SSL configuration for a DomainMapping resource.
  969. type SslSettings struct {
  970. // CertificateId: ID of the AuthorizedCertificate resource configuring
  971. // SSL for the application. Clearing this field will remove SSL
  972. // support.By default, a managed certificate is automatically created
  973. // for every domain mapping. To omit SSL support or to configure SSL
  974. // manually, specify no_managed_certificate on a CREATE or UPDATE
  975. // request. You must be authorized to administer the
  976. // AuthorizedCertificate resource to manually map it to a DomainMapping
  977. // resource. Example: 12345.
  978. CertificateId string `json:"certificateId,omitempty"`
  979. // IsManagedCertificate: Whether the mapped certificate is an App Engine
  980. // managed certificate. Managed certificates are created by default with
  981. // a domain mapping. To opt out, specify no_managed_certificate on a
  982. // CREATE or UPDATE request.@OutputOnly
  983. IsManagedCertificate bool `json:"isManagedCertificate,omitempty"`
  984. // ForceSendFields is a list of field names (e.g. "CertificateId") to
  985. // unconditionally include in API requests. By default, fields with
  986. // empty values are omitted from API requests. However, any non-pointer,
  987. // non-interface field appearing in ForceSendFields will be sent to the
  988. // server regardless of whether the field is empty or not. This may be
  989. // used to include empty fields in Patch requests.
  990. ForceSendFields []string `json:"-"`
  991. // NullFields is a list of field names (e.g. "CertificateId") to include
  992. // in API requests with the JSON null value. By default, fields with
  993. // empty values are omitted from API requests. However, any field with
  994. // an empty value appearing in NullFields will be sent to the server as
  995. // null. It is an error if a field in this list has a non-empty value.
  996. // This may be used to include null fields in Patch requests.
  997. NullFields []string `json:"-"`
  998. }
  999. func (s *SslSettings) MarshalJSON() ([]byte, error) {
  1000. type NoMethod SslSettings
  1001. raw := NoMethod(*s)
  1002. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1003. }
  1004. // Status: The Status type defines a logical error model that is
  1005. // suitable for different programming environments, including REST APIs
  1006. // and RPC APIs. It is used by gRPC (https://github.com/grpc). The error
  1007. // model is designed to be:
  1008. // Simple to use and understand for most users
  1009. // Flexible enough to meet unexpected needsOverviewThe Status message
  1010. // contains three pieces of data: error code, error message, and error
  1011. // details. The error code should be an enum value of google.rpc.Code,
  1012. // but it may accept additional error codes if needed. The error message
  1013. // should be a developer-facing English message that helps developers
  1014. // understand and resolve the error. If a localized user-facing error
  1015. // message is needed, put the localized message in the error details or
  1016. // localize it in the client. The optional error details may contain
  1017. // arbitrary information about the error. There is a predefined set of
  1018. // error detail types in the package google.rpc that can be used for
  1019. // common error conditions.Language mappingThe Status message is the
  1020. // logical representation of the error model, but it is not necessarily
  1021. // the actual wire format. When the Status message is exposed in
  1022. // different client libraries and different wire protocols, it can be
  1023. // mapped differently. For example, it will likely be mapped to some
  1024. // exceptions in Java, but more likely mapped to some error codes in
  1025. // C.Other usesThe error model and the Status message can be used in a
  1026. // variety of environments, either with or without APIs, to provide a
  1027. // consistent developer experience across different environments.Example
  1028. // uses of this error model include:
  1029. // Partial errors. If a service needs to return partial errors to the
  1030. // client, it may embed the Status in the normal response to indicate
  1031. // the partial errors.
  1032. // Workflow errors. A typical workflow has multiple steps. Each step may
  1033. // have a Status message for error reporting.
  1034. // Batch operations. If a client uses batch request and batch response,
  1035. // the Status message should be used directly inside batch response, one
  1036. // for each error sub-response.
  1037. // Asynchronous operations. If an API call embeds asynchronous operation
  1038. // results in its response, the status of those operations should be
  1039. // represented directly using the Status message.
  1040. // Logging. If some API errors are stored in logs, the message Status
  1041. // could be used directly after any stripping needed for
  1042. // security/privacy reasons.
  1043. type Status struct {
  1044. // Code: The status code, which should be an enum value of
  1045. // google.rpc.Code.
  1046. Code int64 `json:"code,omitempty"`
  1047. // Details: A list of messages that carry the error details. There is a
  1048. // common set of message types for APIs to use.
  1049. Details []googleapi.RawMessage `json:"details,omitempty"`
  1050. // Message: A developer-facing error message, which should be in
  1051. // English. Any user-facing error message should be localized and sent
  1052. // in the google.rpc.Status.details field, or localized by the client.
  1053. Message string `json:"message,omitempty"`
  1054. // ForceSendFields is a list of field names (e.g. "Code") to
  1055. // unconditionally include in API requests. By default, fields with
  1056. // empty values are omitted from API requests. However, any non-pointer,
  1057. // non-interface field appearing in ForceSendFields will be sent to the
  1058. // server regardless of whether the field is empty or not. This may be
  1059. // used to include empty fields in Patch requests.
  1060. ForceSendFields []string `json:"-"`
  1061. // NullFields is a list of field names (e.g. "Code") to include in API
  1062. // requests with the JSON null value. By default, fields with empty
  1063. // values are omitted from API requests. However, any field with an
  1064. // empty value appearing in NullFields will be sent to the server as
  1065. // null. It is an error if a field in this list has a non-empty value.
  1066. // This may be used to include null fields in Patch requests.
  1067. NullFields []string `json:"-"`
  1068. }
  1069. func (s *Status) MarshalJSON() ([]byte, error) {
  1070. type NoMethod Status
  1071. raw := NoMethod(*s)
  1072. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1073. }
  1074. // method id "appengine.apps.authorizedCertificates.create":
  1075. type AppsAuthorizedCertificatesCreateCall struct {
  1076. s *APIService
  1077. appsId string
  1078. authorizedcertificate *AuthorizedCertificate
  1079. urlParams_ gensupport.URLParams
  1080. ctx_ context.Context
  1081. header_ http.Header
  1082. }
  1083. // Create: Uploads the specified SSL certificate.
  1084. func (r *AppsAuthorizedCertificatesService) Create(appsId string, authorizedcertificate *AuthorizedCertificate) *AppsAuthorizedCertificatesCreateCall {
  1085. c := &AppsAuthorizedCertificatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1086. c.appsId = appsId
  1087. c.authorizedcertificate = authorizedcertificate
  1088. return c
  1089. }
  1090. // Fields allows partial responses to be retrieved. See
  1091. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  1092. // for more information.
  1093. func (c *AppsAuthorizedCertificatesCreateCall) Fields(s ...googleapi.Field) *AppsAuthorizedCertificatesCreateCall {
  1094. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1095. return c
  1096. }
  1097. // Context sets the context to be used in this call's Do method. Any
  1098. // pending HTTP request will be aborted if the provided context is
  1099. // canceled.
  1100. func (c *AppsAuthorizedCertificatesCreateCall) Context(ctx context.Context) *AppsAuthorizedCertificatesCreateCall {
  1101. c.ctx_ = ctx
  1102. return c
  1103. }
  1104. // Header returns an http.Header that can be modified by the caller to
  1105. // add HTTP headers to the request.
  1106. func (c *AppsAuthorizedCertificatesCreateCall) Header() http.Header {
  1107. if c.header_ == nil {
  1108. c.header_ = make(http.Header)
  1109. }
  1110. return c.header_
  1111. }
  1112. func (c *AppsAuthorizedCertificatesCreateCall) doRequest(alt string) (*http.Response, error) {
  1113. reqHeaders := make(http.Header)
  1114. for k, v := range c.header_ {
  1115. reqHeaders[k] = v
  1116. }
  1117. reqHeaders.Set("User-Agent", c.s.userAgent())
  1118. var body io.Reader = nil
  1119. body, err := googleapi.WithoutDataWrapper.JSONReader(c.authorizedcertificate)
  1120. if err != nil {
  1121. return nil, err
  1122. }
  1123. reqHeaders.Set("Content-Type", "application/json")
  1124. c.urlParams_.Set("alt", alt)
  1125. c.urlParams_.Set("prettyPrint", "false")
  1126. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/apps/{appsId}/authorizedCertificates")
  1127. urls += "?" + c.urlParams_.Encode()
  1128. req, err := http.NewRequest("POST", urls, body)
  1129. if err != nil {
  1130. return nil, err
  1131. }
  1132. req.Header = reqHeaders
  1133. googleapi.Expand(req.URL, map[string]string{
  1134. "appsId": c.appsId,
  1135. })
  1136. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1137. }
  1138. // Do executes the "appengine.apps.authorizedCertificates.create" call.
  1139. // Exactly one of *AuthorizedCertificate or error will be non-nil. Any
  1140. // non-2xx status code is an error. Response headers are in either
  1141. // *AuthorizedCertificate.ServerResponse.Header or (if a response was
  1142. // returned at all) in error.(*googleapi.Error).Header. Use
  1143. // googleapi.IsNotModified to check whether the returned error was
  1144. // because http.StatusNotModified was returned.
  1145. func (c *AppsAuthorizedCertificatesCreateCall) Do(opts ...googleapi.CallOption) (*AuthorizedCertificate, error) {
  1146. gensupport.SetOptions(c.urlParams_, opts...)
  1147. res, err := c.doRequest("json")
  1148. if res != nil && res.StatusCode == http.StatusNotModified {
  1149. if res.Body != nil {
  1150. res.Body.Close()
  1151. }
  1152. return nil, &googleapi.Error{
  1153. Code: res.StatusCode,
  1154. Header: res.Header,
  1155. }
  1156. }
  1157. if err != nil {
  1158. return nil, err
  1159. }
  1160. defer googleapi.CloseBody(res)
  1161. if err := googleapi.CheckResponse(res); err != nil {
  1162. return nil, err
  1163. }
  1164. ret := &AuthorizedCertificate{
  1165. ServerResponse: googleapi.ServerResponse{
  1166. Header: res.Header,
  1167. HTTPStatusCode: res.StatusCode,
  1168. },
  1169. }
  1170. target := &ret
  1171. if err := gensupport.DecodeResponse(target, res); err != nil {
  1172. return nil, err
  1173. }
  1174. return ret, nil
  1175. // {
  1176. // "description": "Uploads the specified SSL certificate.",
  1177. // "flatPath": "v1alpha/apps/{appsId}/authorizedCertificates",
  1178. // "httpMethod": "POST",
  1179. // "id": "appengine.apps.authorizedCertificates.create",
  1180. // "parameterOrder": [
  1181. // "appsId"
  1182. // ],
  1183. // "parameters": {
  1184. // "appsId": {
  1185. // "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.",
  1186. // "location": "path",
  1187. // "required": true,
  1188. // "type": "string"
  1189. // }
  1190. // },
  1191. // "path": "v1alpha/apps/{appsId}/authorizedCertificates",
  1192. // "request": {
  1193. // "$ref": "AuthorizedCertificate"
  1194. // },
  1195. // "response": {
  1196. // "$ref": "AuthorizedCertificate"
  1197. // },
  1198. // "scopes": [
  1199. // "https://www.googleapis.com/auth/cloud-platform"
  1200. // ]
  1201. // }
  1202. }
  1203. // method id "appengine.apps.authorizedCertificates.delete":
  1204. type AppsAuthorizedCertificatesDeleteCall struct {
  1205. s *APIService
  1206. appsId string
  1207. authorizedCertificatesId string
  1208. urlParams_ gensupport.URLParams
  1209. ctx_ context.Context
  1210. header_ http.Header
  1211. }
  1212. // Delete: Deletes the specified SSL certificate.
  1213. func (r *AppsAuthorizedCertificatesService) Delete(appsId string, authorizedCertificatesId string) *AppsAuthorizedCertificatesDeleteCall {
  1214. c := &AppsAuthorizedCertificatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1215. c.appsId = appsId
  1216. c.authorizedCertificatesId = authorizedCertificatesId
  1217. return c
  1218. }
  1219. // Fields allows partial responses to be retrieved. See
  1220. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  1221. // for more information.
  1222. func (c *AppsAuthorizedCertificatesDeleteCall) Fields(s ...googleapi.Field) *AppsAuthorizedCertificatesDeleteCall {
  1223. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1224. return c
  1225. }
  1226. // Context sets the context to be used in this call's Do method. Any
  1227. // pending HTTP request will be aborted if the provided context is
  1228. // canceled.
  1229. func (c *AppsAuthorizedCertificatesDeleteCall) Context(ctx context.Context) *AppsAuthorizedCertificatesDeleteCall {
  1230. c.ctx_ = ctx
  1231. return c
  1232. }
  1233. // Header returns an http.Header that can be modified by the caller to
  1234. // add HTTP headers to the request.
  1235. func (c *AppsAuthorizedCertificatesDeleteCall) Header() http.Header {
  1236. if c.header_ == nil {
  1237. c.header_ = make(http.Header)
  1238. }
  1239. return c.header_
  1240. }
  1241. func (c *AppsAuthorizedCertificatesDeleteCall) doRequest(alt string) (*http.Response, error) {
  1242. reqHeaders := make(http.Header)
  1243. for k, v := range c.header_ {
  1244. reqHeaders[k] = v
  1245. }
  1246. reqHeaders.Set("User-Agent", c.s.userAgent())
  1247. var body io.Reader = nil
  1248. c.urlParams_.Set("alt", alt)
  1249. c.urlParams_.Set("prettyPrint", "false")
  1250. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}")
  1251. urls += "?" + c.urlParams_.Encode()
  1252. req, err := http.NewRequest("DELETE", urls, body)
  1253. if err != nil {
  1254. return nil, err
  1255. }
  1256. req.Header = reqHeaders
  1257. googleapi.Expand(req.URL, map[string]string{
  1258. "appsId": c.appsId,
  1259. "authorizedCertificatesId": c.authorizedCertificatesId,
  1260. })
  1261. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1262. }
  1263. // Do executes the "appengine.apps.authorizedCertificates.delete" call.
  1264. // Exactly one of *Empty or error will be non-nil. Any non-2xx status
  1265. // code is an error. Response headers are in either
  1266. // *Empty.ServerResponse.Header or (if a response was returned at all)
  1267. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  1268. // check whether the returned error was because http.StatusNotModified
  1269. // was returned.
  1270. func (c *AppsAuthorizedCertificatesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  1271. gensupport.SetOptions(c.urlParams_, opts...)
  1272. res, err := c.doRequest("json")
  1273. if res != nil && res.StatusCode == http.StatusNotModified {
  1274. if res.Body != nil {
  1275. res.Body.Close()
  1276. }
  1277. return nil, &googleapi.Error{
  1278. Code: res.StatusCode,
  1279. Header: res.Header,
  1280. }
  1281. }
  1282. if err != nil {
  1283. return nil, err
  1284. }
  1285. defer googleapi.CloseBody(res)
  1286. if err := googleapi.CheckResponse(res); err != nil {
  1287. return nil, err
  1288. }
  1289. ret := &Empty{
  1290. ServerResponse: googleapi.ServerResponse{
  1291. Header: res.Header,
  1292. HTTPStatusCode: res.StatusCode,
  1293. },
  1294. }
  1295. target := &ret
  1296. if err := gensupport.DecodeResponse(target, res); err != nil {
  1297. return nil, err
  1298. }
  1299. return ret, nil
  1300. // {
  1301. // "description": "Deletes the specified SSL certificate.",
  1302. // "flatPath": "v1alpha/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}",
  1303. // "httpMethod": "DELETE",
  1304. // "id": "appengine.apps.authorizedCertificates.delete",
  1305. // "parameterOrder": [
  1306. // "appsId",
  1307. // "authorizedCertificatesId"
  1308. // ],
  1309. // "parameters": {
  1310. // "appsId": {
  1311. // "description": "Part of `name`. Name of the resource to delete. Example: apps/myapp/authorizedCertificates/12345.",
  1312. // "location": "path",
  1313. // "required": true,
  1314. // "type": "string"
  1315. // },
  1316. // "authorizedCertificatesId": {
  1317. // "description": "Part of `name`. See documentation of `appsId`.",
  1318. // "location": "path",
  1319. // "required": true,
  1320. // "type": "string"
  1321. // }
  1322. // },
  1323. // "path": "v1alpha/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}",
  1324. // "response": {
  1325. // "$ref": "Empty"
  1326. // },
  1327. // "scopes": [
  1328. // "https://www.googleapis.com/auth/cloud-platform"
  1329. // ]
  1330. // }
  1331. }
  1332. // method id "appengine.apps.authorizedCertificates.get":
  1333. type AppsAuthorizedCertificatesGetCall struct {
  1334. s *APIService
  1335. appsId string
  1336. authorizedCertificatesId string
  1337. urlParams_ gensupport.URLParams
  1338. ifNoneMatch_ string
  1339. ctx_ context.Context
  1340. header_ http.Header
  1341. }
  1342. // Get: Gets the specified SSL certificate.
  1343. func (r *AppsAuthorizedCertificatesService) Get(appsId string, authorizedCertificatesId string) *AppsAuthorizedCertificatesGetCall {
  1344. c := &AppsAuthorizedCertificatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1345. c.appsId = appsId
  1346. c.authorizedCertificatesId = authorizedCertificatesId
  1347. return c
  1348. }
  1349. // View sets the optional parameter "view": Controls the set of fields
  1350. // returned in the GET response.
  1351. //
  1352. // Possible values:
  1353. // "BASIC_CERTIFICATE"
  1354. // "FULL_CERTIFICATE"
  1355. func (c *AppsAuthorizedCertificatesGetCall) View(view string) *AppsAuthorizedCertificatesGetCall {
  1356. c.urlParams_.Set("view", view)
  1357. return c
  1358. }
  1359. // Fields allows partial responses to be retrieved. See
  1360. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  1361. // for more information.
  1362. func (c *AppsAuthorizedCertificatesGetCall) Fields(s ...googleapi.Field) *AppsAuthorizedCertificatesGetCall {
  1363. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1364. return c
  1365. }
  1366. // IfNoneMatch sets the optional parameter which makes the operation
  1367. // fail if the object's ETag matches the given value. This is useful for
  1368. // getting updates only after the object has changed since the last
  1369. // request. Use googleapi.IsNotModified to check whether the response
  1370. // error from Do is the result of In-None-Match.
  1371. func (c *AppsAuthorizedCertificatesGetCall) IfNoneMatch(entityTag string) *AppsAuthorizedCertificatesGetCall {
  1372. c.ifNoneMatch_ = entityTag
  1373. return c
  1374. }
  1375. // Context sets the context to be used in this call's Do method. Any
  1376. // pending HTTP request will be aborted if the provided context is
  1377. // canceled.
  1378. func (c *AppsAuthorizedCertificatesGetCall) Context(ctx context.Context) *AppsAuthorizedCertificatesGetCall {
  1379. c.ctx_ = ctx
  1380. return c
  1381. }
  1382. // Header returns an http.Header that can be modified by the caller to
  1383. // add HTTP headers to the request.
  1384. func (c *AppsAuthorizedCertificatesGetCall) Header() http.Header {
  1385. if c.header_ == nil {
  1386. c.header_ = make(http.Header)
  1387. }
  1388. return c.header_
  1389. }
  1390. func (c *AppsAuthorizedCertificatesGetCall) doRequest(alt string) (*http.Response, error) {
  1391. reqHeaders := make(http.Header)
  1392. for k, v := range c.header_ {
  1393. reqHeaders[k] = v
  1394. }
  1395. reqHeaders.Set("User-Agent", c.s.userAgent())
  1396. if c.ifNoneMatch_ != "" {
  1397. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1398. }
  1399. var body io.Reader = nil
  1400. c.urlParams_.Set("alt", alt)
  1401. c.urlParams_.Set("prettyPrint", "false")
  1402. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}")
  1403. urls += "?" + c.urlParams_.Encode()
  1404. req, err := http.NewRequest("GET", urls, body)
  1405. if err != nil {
  1406. return nil, err
  1407. }
  1408. req.Header = reqHeaders
  1409. googleapi.Expand(req.URL, map[string]string{
  1410. "appsId": c.appsId,
  1411. "authorizedCertificatesId": c.authorizedCertificatesId,
  1412. })
  1413. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1414. }
  1415. // Do executes the "appengine.apps.authorizedCertificates.get" call.
  1416. // Exactly one of *AuthorizedCertificate or error will be non-nil. Any
  1417. // non-2xx status code is an error. Response headers are in either
  1418. // *AuthorizedCertificate.ServerResponse.Header or (if a response was
  1419. // returned at all) in error.(*googleapi.Error).Header. Use
  1420. // googleapi.IsNotModified to check whether the returned error was
  1421. // because http.StatusNotModified was returned.
  1422. func (c *AppsAuthorizedCertificatesGetCall) Do(opts ...googleapi.CallOption) (*AuthorizedCertificate, error) {
  1423. gensupport.SetOptions(c.urlParams_, opts...)
  1424. res, err := c.doRequest("json")
  1425. if res != nil && res.StatusCode == http.StatusNotModified {
  1426. if res.Body != nil {
  1427. res.Body.Close()
  1428. }
  1429. return nil, &googleapi.Error{
  1430. Code: res.StatusCode,
  1431. Header: res.Header,
  1432. }
  1433. }
  1434. if err != nil {
  1435. return nil, err
  1436. }
  1437. defer googleapi.CloseBody(res)
  1438. if err := googleapi.CheckResponse(res); err != nil {
  1439. return nil, err
  1440. }
  1441. ret := &AuthorizedCertificate{
  1442. ServerResponse: googleapi.ServerResponse{
  1443. Header: res.Header,
  1444. HTTPStatusCode: res.StatusCode,
  1445. },
  1446. }
  1447. target := &ret
  1448. if err := gensupport.DecodeResponse(target, res); err != nil {
  1449. return nil, err
  1450. }
  1451. return ret, nil
  1452. // {
  1453. // "description": "Gets the specified SSL certificate.",
  1454. // "flatPath": "v1alpha/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}",
  1455. // "httpMethod": "GET",
  1456. // "id": "appengine.apps.authorizedCertificates.get",
  1457. // "parameterOrder": [
  1458. // "appsId",
  1459. // "authorizedCertificatesId"
  1460. // ],
  1461. // "parameters": {
  1462. // "appsId": {
  1463. // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/authorizedCertificates/12345.",
  1464. // "location": "path",
  1465. // "required": true,
  1466. // "type": "string"
  1467. // },
  1468. // "authorizedCertificatesId": {
  1469. // "description": "Part of `name`. See documentation of `appsId`.",
  1470. // "location": "path",
  1471. // "required": true,
  1472. // "type": "string"
  1473. // },
  1474. // "view": {
  1475. // "description": "Controls the set of fields returned in the GET response.",
  1476. // "enum": [
  1477. // "BASIC_CERTIFICATE",
  1478. // "FULL_CERTIFICATE"
  1479. // ],
  1480. // "location": "query",
  1481. // "type": "string"
  1482. // }
  1483. // },
  1484. // "path": "v1alpha/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}",
  1485. // "response": {
  1486. // "$ref": "AuthorizedCertificate"
  1487. // },
  1488. // "scopes": [
  1489. // "https://www.googleapis.com/auth/appengine.admin",
  1490. // "https://www.googleapis.com/auth/cloud-platform",
  1491. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  1492. // ]
  1493. // }
  1494. }
  1495. // method id "appengine.apps.authorizedCertificates.list":
  1496. type AppsAuthorizedCertificatesListCall struct {
  1497. s *APIService
  1498. appsId string
  1499. urlParams_ gensupport.URLParams
  1500. ifNoneMatch_ string
  1501. ctx_ context.Context
  1502. header_ http.Header
  1503. }
  1504. // List: Lists all SSL certificates the user is authorized to
  1505. // administer.
  1506. func (r *AppsAuthorizedCertificatesService) List(appsId string) *AppsAuthorizedCertificatesListCall {
  1507. c := &AppsAuthorizedCertificatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1508. c.appsId = appsId
  1509. return c
  1510. }
  1511. // PageSize sets the optional parameter "pageSize": Maximum results to
  1512. // return per page.
  1513. func (c *AppsAuthorizedCertificatesListCall) PageSize(pageSize int64) *AppsAuthorizedCertificatesListCall {
  1514. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  1515. return c
  1516. }
  1517. // PageToken sets the optional parameter "pageToken": Continuation token
  1518. // for fetching the next page of results.
  1519. func (c *AppsAuthorizedCertificatesListCall) PageToken(pageToken string) *AppsAuthorizedCertificatesListCall {
  1520. c.urlParams_.Set("pageToken", pageToken)
  1521. return c
  1522. }
  1523. // View sets the optional parameter "view": Controls the set of fields
  1524. // returned in the LIST response.
  1525. //
  1526. // Possible values:
  1527. // "BASIC_CERTIFICATE"
  1528. // "FULL_CERTIFICATE"
  1529. func (c *AppsAuthorizedCertificatesListCall) View(view string) *AppsAuthorizedCertificatesListCall {
  1530. c.urlParams_.Set("view", view)
  1531. return c
  1532. }
  1533. // Fields allows partial responses to be retrieved. See
  1534. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  1535. // for more information.
  1536. func (c *AppsAuthorizedCertificatesListCall) Fields(s ...googleapi.Field) *AppsAuthorizedCertificatesListCall {
  1537. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1538. return c
  1539. }
  1540. // IfNoneMatch sets the optional parameter which makes the operation
  1541. // fail if the object's ETag matches the given value. This is useful for
  1542. // getting updates only after the object has changed since the last
  1543. // request. Use googleapi.IsNotModified to check whether the response
  1544. // error from Do is the result of In-None-Match.
  1545. func (c *AppsAuthorizedCertificatesListCall) IfNoneMatch(entityTag string) *AppsAuthorizedCertificatesListCall {
  1546. c.ifNoneMatch_ = entityTag
  1547. return c
  1548. }
  1549. // Context sets the context to be used in this call's Do method. Any
  1550. // pending HTTP request will be aborted if the provided context is
  1551. // canceled.
  1552. func (c *AppsAuthorizedCertificatesListCall) Context(ctx context.Context) *AppsAuthorizedCertificatesListCall {
  1553. c.ctx_ = ctx
  1554. return c
  1555. }
  1556. // Header returns an http.Header that can be modified by the caller to
  1557. // add HTTP headers to the request.
  1558. func (c *AppsAuthorizedCertificatesListCall) Header() http.Header {
  1559. if c.header_ == nil {
  1560. c.header_ = make(http.Header)
  1561. }
  1562. return c.header_
  1563. }
  1564. func (c *AppsAuthorizedCertificatesListCall) doRequest(alt string) (*http.Response, error) {
  1565. reqHeaders := make(http.Header)
  1566. for k, v := range c.header_ {
  1567. reqHeaders[k] = v
  1568. }
  1569. reqHeaders.Set("User-Agent", c.s.userAgent())
  1570. if c.ifNoneMatch_ != "" {
  1571. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1572. }
  1573. var body io.Reader = nil
  1574. c.urlParams_.Set("alt", alt)
  1575. c.urlParams_.Set("prettyPrint", "false")
  1576. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/apps/{appsId}/authorizedCertificates")
  1577. urls += "?" + c.urlParams_.Encode()
  1578. req, err := http.NewRequest("GET", urls, body)
  1579. if err != nil {
  1580. return nil, err
  1581. }
  1582. req.Header = reqHeaders
  1583. googleapi.Expand(req.URL, map[string]string{
  1584. "appsId": c.appsId,
  1585. })
  1586. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1587. }
  1588. // Do executes the "appengine.apps.authorizedCertificates.list" call.
  1589. // Exactly one of *ListAuthorizedCertificatesResponse or error will be
  1590. // non-nil. Any non-2xx status code is an error. Response headers are in
  1591. // either *ListAuthorizedCertificatesResponse.ServerResponse.Header or
  1592. // (if a response was returned at all) in
  1593. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  1594. // whether the returned error was because http.StatusNotModified was
  1595. // returned.
  1596. func (c *AppsAuthorizedCertificatesListCall) Do(opts ...googleapi.CallOption) (*ListAuthorizedCertificatesResponse, error) {
  1597. gensupport.SetOptions(c.urlParams_, opts...)
  1598. res, err := c.doRequest("json")
  1599. if res != nil && res.StatusCode == http.StatusNotModified {
  1600. if res.Body != nil {
  1601. res.Body.Close()
  1602. }
  1603. return nil, &googleapi.Error{
  1604. Code: res.StatusCode,
  1605. Header: res.Header,
  1606. }
  1607. }
  1608. if err != nil {
  1609. return nil, err
  1610. }
  1611. defer googleapi.CloseBody(res)
  1612. if err := googleapi.CheckResponse(res); err != nil {
  1613. return nil, err
  1614. }
  1615. ret := &ListAuthorizedCertificatesResponse{
  1616. ServerResponse: googleapi.ServerResponse{
  1617. Header: res.Header,
  1618. HTTPStatusCode: res.StatusCode,
  1619. },
  1620. }
  1621. target := &ret
  1622. if err := gensupport.DecodeResponse(target, res); err != nil {
  1623. return nil, err
  1624. }
  1625. return ret, nil
  1626. // {
  1627. // "description": "Lists all SSL certificates the user is authorized to administer.",
  1628. // "flatPath": "v1alpha/apps/{appsId}/authorizedCertificates",
  1629. // "httpMethod": "GET",
  1630. // "id": "appengine.apps.authorizedCertificates.list",
  1631. // "parameterOrder": [
  1632. // "appsId"
  1633. // ],
  1634. // "parameters": {
  1635. // "appsId": {
  1636. // "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.",
  1637. // "location": "path",
  1638. // "required": true,
  1639. // "type": "string"
  1640. // },
  1641. // "pageSize": {
  1642. // "description": "Maximum results to return per page.",
  1643. // "format": "int32",
  1644. // "location": "query",
  1645. // "type": "integer"
  1646. // },
  1647. // "pageToken": {
  1648. // "description": "Continuation token for fetching the next page of results.",
  1649. // "location": "query",
  1650. // "type": "string"
  1651. // },
  1652. // "view": {
  1653. // "description": "Controls the set of fields returned in the LIST response.",
  1654. // "enum": [
  1655. // "BASIC_CERTIFICATE",
  1656. // "FULL_CERTIFICATE"
  1657. // ],
  1658. // "location": "query",
  1659. // "type": "string"
  1660. // }
  1661. // },
  1662. // "path": "v1alpha/apps/{appsId}/authorizedCertificates",
  1663. // "response": {
  1664. // "$ref": "ListAuthorizedCertificatesResponse"
  1665. // },
  1666. // "scopes": [
  1667. // "https://www.googleapis.com/auth/appengine.admin",
  1668. // "https://www.googleapis.com/auth/cloud-platform",
  1669. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  1670. // ]
  1671. // }
  1672. }
  1673. // Pages invokes f for each page of results.
  1674. // A non-nil error returned from f will halt the iteration.
  1675. // The provided context supersedes any context provided to the Context method.
  1676. func (c *AppsAuthorizedCertificatesListCall) Pages(ctx context.Context, f func(*ListAuthorizedCertificatesResponse) error) error {
  1677. c.ctx_ = ctx
  1678. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  1679. for {
  1680. x, err := c.Do()
  1681. if err != nil {
  1682. return err
  1683. }
  1684. if err := f(x); err != nil {
  1685. return err
  1686. }
  1687. if x.NextPageToken == "" {
  1688. return nil
  1689. }
  1690. c.PageToken(x.NextPageToken)
  1691. }
  1692. }
  1693. // method id "appengine.apps.authorizedCertificates.patch":
  1694. type AppsAuthorizedCertificatesPatchCall struct {
  1695. s *APIService
  1696. appsId string
  1697. authorizedCertificatesId string
  1698. authorizedcertificate *AuthorizedCertificate
  1699. urlParams_ gensupport.URLParams
  1700. ctx_ context.Context
  1701. header_ http.Header
  1702. }
  1703. // Patch: Updates the specified SSL certificate. To renew a certificate
  1704. // and maintain its existing domain mappings, update certificate_data
  1705. // with a new certificate. The new certificate must be applicable to the
  1706. // same domains as the original certificate. The certificate
  1707. // display_name may also be updated.
  1708. func (r *AppsAuthorizedCertificatesService) Patch(appsId string, authorizedCertificatesId string, authorizedcertificate *AuthorizedCertificate) *AppsAuthorizedCertificatesPatchCall {
  1709. c := &AppsAuthorizedCertificatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1710. c.appsId = appsId
  1711. c.authorizedCertificatesId = authorizedCertificatesId
  1712. c.authorizedcertificate = authorizedcertificate
  1713. return c
  1714. }
  1715. // UpdateMask sets the optional parameter "updateMask": Standard field
  1716. // mask for the set of fields to be updated. Updates are only supported
  1717. // on the certificate_raw_data and display_name fields.
  1718. func (c *AppsAuthorizedCertificatesPatchCall) UpdateMask(updateMask string) *AppsAuthorizedCertificatesPatchCall {
  1719. c.urlParams_.Set("updateMask", updateMask)
  1720. return c
  1721. }
  1722. // Fields allows partial responses to be retrieved. See
  1723. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  1724. // for more information.
  1725. func (c *AppsAuthorizedCertificatesPatchCall) Fields(s ...googleapi.Field) *AppsAuthorizedCertificatesPatchCall {
  1726. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1727. return c
  1728. }
  1729. // Context sets the context to be used in this call's Do method. Any
  1730. // pending HTTP request will be aborted if the provided context is
  1731. // canceled.
  1732. func (c *AppsAuthorizedCertificatesPatchCall) Context(ctx context.Context) *AppsAuthorizedCertificatesPatchCall {
  1733. c.ctx_ = ctx
  1734. return c
  1735. }
  1736. // Header returns an http.Header that can be modified by the caller to
  1737. // add HTTP headers to the request.
  1738. func (c *AppsAuthorizedCertificatesPatchCall) Header() http.Header {
  1739. if c.header_ == nil {
  1740. c.header_ = make(http.Header)
  1741. }
  1742. return c.header_
  1743. }
  1744. func (c *AppsAuthorizedCertificatesPatchCall) doRequest(alt string) (*http.Response, error) {
  1745. reqHeaders := make(http.Header)
  1746. for k, v := range c.header_ {
  1747. reqHeaders[k] = v
  1748. }
  1749. reqHeaders.Set("User-Agent", c.s.userAgent())
  1750. var body io.Reader = nil
  1751. body, err := googleapi.WithoutDataWrapper.JSONReader(c.authorizedcertificate)
  1752. if err != nil {
  1753. return nil, err
  1754. }
  1755. reqHeaders.Set("Content-Type", "application/json")
  1756. c.urlParams_.Set("alt", alt)
  1757. c.urlParams_.Set("prettyPrint", "false")
  1758. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}")
  1759. urls += "?" + c.urlParams_.Encode()
  1760. req, err := http.NewRequest("PATCH", urls, body)
  1761. if err != nil {
  1762. return nil, err
  1763. }
  1764. req.Header = reqHeaders
  1765. googleapi.Expand(req.URL, map[string]string{
  1766. "appsId": c.appsId,
  1767. "authorizedCertificatesId": c.authorizedCertificatesId,
  1768. })
  1769. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1770. }
  1771. // Do executes the "appengine.apps.authorizedCertificates.patch" call.
  1772. // Exactly one of *AuthorizedCertificate or error will be non-nil. Any
  1773. // non-2xx status code is an error. Response headers are in either
  1774. // *AuthorizedCertificate.ServerResponse.Header or (if a response was
  1775. // returned at all) in error.(*googleapi.Error).Header. Use
  1776. // googleapi.IsNotModified to check whether the returned error was
  1777. // because http.StatusNotModified was returned.
  1778. func (c *AppsAuthorizedCertificatesPatchCall) Do(opts ...googleapi.CallOption) (*AuthorizedCertificate, error) {
  1779. gensupport.SetOptions(c.urlParams_, opts...)
  1780. res, err := c.doRequest("json")
  1781. if res != nil && res.StatusCode == http.StatusNotModified {
  1782. if res.Body != nil {
  1783. res.Body.Close()
  1784. }
  1785. return nil, &googleapi.Error{
  1786. Code: res.StatusCode,
  1787. Header: res.Header,
  1788. }
  1789. }
  1790. if err != nil {
  1791. return nil, err
  1792. }
  1793. defer googleapi.CloseBody(res)
  1794. if err := googleapi.CheckResponse(res); err != nil {
  1795. return nil, err
  1796. }
  1797. ret := &AuthorizedCertificate{
  1798. ServerResponse: googleapi.ServerResponse{
  1799. Header: res.Header,
  1800. HTTPStatusCode: res.StatusCode,
  1801. },
  1802. }
  1803. target := &ret
  1804. if err := gensupport.DecodeResponse(target, res); err != nil {
  1805. return nil, err
  1806. }
  1807. return ret, nil
  1808. // {
  1809. // "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.",
  1810. // "flatPath": "v1alpha/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}",
  1811. // "httpMethod": "PATCH",
  1812. // "id": "appengine.apps.authorizedCertificates.patch",
  1813. // "parameterOrder": [
  1814. // "appsId",
  1815. // "authorizedCertificatesId"
  1816. // ],
  1817. // "parameters": {
  1818. // "appsId": {
  1819. // "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/authorizedCertificates/12345.",
  1820. // "location": "path",
  1821. // "required": true,
  1822. // "type": "string"
  1823. // },
  1824. // "authorizedCertificatesId": {
  1825. // "description": "Part of `name`. See documentation of `appsId`.",
  1826. // "location": "path",
  1827. // "required": true,
  1828. // "type": "string"
  1829. // },
  1830. // "updateMask": {
  1831. // "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.",
  1832. // "format": "google-fieldmask",
  1833. // "location": "query",
  1834. // "type": "string"
  1835. // }
  1836. // },
  1837. // "path": "v1alpha/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}",
  1838. // "request": {
  1839. // "$ref": "AuthorizedCertificate"
  1840. // },
  1841. // "response": {
  1842. // "$ref": "AuthorizedCertificate"
  1843. // },
  1844. // "scopes": [
  1845. // "https://www.googleapis.com/auth/cloud-platform"
  1846. // ]
  1847. // }
  1848. }
  1849. // method id "appengine.apps.authorizedDomains.list":
  1850. type AppsAuthorizedDomainsListCall struct {
  1851. s *APIService
  1852. appsId string
  1853. urlParams_ gensupport.URLParams
  1854. ifNoneMatch_ string
  1855. ctx_ context.Context
  1856. header_ http.Header
  1857. }
  1858. // List: Lists all domains the user is authorized to administer.
  1859. func (r *AppsAuthorizedDomainsService) List(appsId string) *AppsAuthorizedDomainsListCall {
  1860. c := &AppsAuthorizedDomainsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1861. c.appsId = appsId
  1862. return c
  1863. }
  1864. // PageSize sets the optional parameter "pageSize": Maximum results to
  1865. // return per page.
  1866. func (c *AppsAuthorizedDomainsListCall) PageSize(pageSize int64) *AppsAuthorizedDomainsListCall {
  1867. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  1868. return c
  1869. }
  1870. // PageToken sets the optional parameter "pageToken": Continuation token
  1871. // for fetching the next page of results.
  1872. func (c *AppsAuthorizedDomainsListCall) PageToken(pageToken string) *AppsAuthorizedDomainsListCall {
  1873. c.urlParams_.Set("pageToken", pageToken)
  1874. return c
  1875. }
  1876. // Fields allows partial responses to be retrieved. See
  1877. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  1878. // for more information.
  1879. func (c *AppsAuthorizedDomainsListCall) Fields(s ...googleapi.Field) *AppsAuthorizedDomainsListCall {
  1880. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1881. return c
  1882. }
  1883. // IfNoneMatch sets the optional parameter which makes the operation
  1884. // fail if the object's ETag matches the given value. This is useful for
  1885. // getting updates only after the object has changed since the last
  1886. // request. Use googleapi.IsNotModified to check whether the response
  1887. // error from Do is the result of In-None-Match.
  1888. func (c *AppsAuthorizedDomainsListCall) IfNoneMatch(entityTag string) *AppsAuthorizedDomainsListCall {
  1889. c.ifNoneMatch_ = entityTag
  1890. return c
  1891. }
  1892. // Context sets the context to be used in this call's Do method. Any
  1893. // pending HTTP request will be aborted if the provided context is
  1894. // canceled.
  1895. func (c *AppsAuthorizedDomainsListCall) Context(ctx context.Context) *AppsAuthorizedDomainsListCall {
  1896. c.ctx_ = ctx
  1897. return c
  1898. }
  1899. // Header returns an http.Header that can be modified by the caller to
  1900. // add HTTP headers to the request.
  1901. func (c *AppsAuthorizedDomainsListCall) Header() http.Header {
  1902. if c.header_ == nil {
  1903. c.header_ = make(http.Header)
  1904. }
  1905. return c.header_
  1906. }
  1907. func (c *AppsAuthorizedDomainsListCall) doRequest(alt string) (*http.Response, error) {
  1908. reqHeaders := make(http.Header)
  1909. for k, v := range c.header_ {
  1910. reqHeaders[k] = v
  1911. }
  1912. reqHeaders.Set("User-Agent", c.s.userAgent())
  1913. if c.ifNoneMatch_ != "" {
  1914. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1915. }
  1916. var body io.Reader = nil
  1917. c.urlParams_.Set("alt", alt)
  1918. c.urlParams_.Set("prettyPrint", "false")
  1919. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/apps/{appsId}/authorizedDomains")
  1920. urls += "?" + c.urlParams_.Encode()
  1921. req, err := http.NewRequest("GET", urls, body)
  1922. if err != nil {
  1923. return nil, err
  1924. }
  1925. req.Header = reqHeaders
  1926. googleapi.Expand(req.URL, map[string]string{
  1927. "appsId": c.appsId,
  1928. })
  1929. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1930. }
  1931. // Do executes the "appengine.apps.authorizedDomains.list" call.
  1932. // Exactly one of *ListAuthorizedDomainsResponse or error will be
  1933. // non-nil. Any non-2xx status code is an error. Response headers are in
  1934. // either *ListAuthorizedDomainsResponse.ServerResponse.Header or (if a
  1935. // response was returned at all) in error.(*googleapi.Error).Header. Use
  1936. // googleapi.IsNotModified to check whether the returned error was
  1937. // because http.StatusNotModified was returned.
  1938. func (c *AppsAuthorizedDomainsListCall) Do(opts ...googleapi.CallOption) (*ListAuthorizedDomainsResponse, error) {
  1939. gensupport.SetOptions(c.urlParams_, opts...)
  1940. res, err := c.doRequest("json")
  1941. if res != nil && res.StatusCode == http.StatusNotModified {
  1942. if res.Body != nil {
  1943. res.Body.Close()
  1944. }
  1945. return nil, &googleapi.Error{
  1946. Code: res.StatusCode,
  1947. Header: res.Header,
  1948. }
  1949. }
  1950. if err != nil {
  1951. return nil, err
  1952. }
  1953. defer googleapi.CloseBody(res)
  1954. if err := googleapi.CheckResponse(res); err != nil {
  1955. return nil, err
  1956. }
  1957. ret := &ListAuthorizedDomainsResponse{
  1958. ServerResponse: googleapi.ServerResponse{
  1959. Header: res.Header,
  1960. HTTPStatusCode: res.StatusCode,
  1961. },
  1962. }
  1963. target := &ret
  1964. if err := gensupport.DecodeResponse(target, res); err != nil {
  1965. return nil, err
  1966. }
  1967. return ret, nil
  1968. // {
  1969. // "description": "Lists all domains the user is authorized to administer.",
  1970. // "flatPath": "v1alpha/apps/{appsId}/authorizedDomains",
  1971. // "httpMethod": "GET",
  1972. // "id": "appengine.apps.authorizedDomains.list",
  1973. // "parameterOrder": [
  1974. // "appsId"
  1975. // ],
  1976. // "parameters": {
  1977. // "appsId": {
  1978. // "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.",
  1979. // "location": "path",
  1980. // "required": true,
  1981. // "type": "string"
  1982. // },
  1983. // "pageSize": {
  1984. // "description": "Maximum results to return per page.",
  1985. // "format": "int32",
  1986. // "location": "query",
  1987. // "type": "integer"
  1988. // },
  1989. // "pageToken": {
  1990. // "description": "Continuation token for fetching the next page of results.",
  1991. // "location": "query",
  1992. // "type": "string"
  1993. // }
  1994. // },
  1995. // "path": "v1alpha/apps/{appsId}/authorizedDomains",
  1996. // "response": {
  1997. // "$ref": "ListAuthorizedDomainsResponse"
  1998. // },
  1999. // "scopes": [
  2000. // "https://www.googleapis.com/auth/appengine.admin",
  2001. // "https://www.googleapis.com/auth/cloud-platform",
  2002. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  2003. // ]
  2004. // }
  2005. }
  2006. // Pages invokes f for each page of results.
  2007. // A non-nil error returned from f will halt the iteration.
  2008. // The provided context supersedes any context provided to the Context method.
  2009. func (c *AppsAuthorizedDomainsListCall) Pages(ctx context.Context, f func(*ListAuthorizedDomainsResponse) error) error {
  2010. c.ctx_ = ctx
  2011. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  2012. for {
  2013. x, err := c.Do()
  2014. if err != nil {
  2015. return err
  2016. }
  2017. if err := f(x); err != nil {
  2018. return err
  2019. }
  2020. if x.NextPageToken == "" {
  2021. return nil
  2022. }
  2023. c.PageToken(x.NextPageToken)
  2024. }
  2025. }
  2026. // method id "appengine.apps.domainMappings.create":
  2027. type AppsDomainMappingsCreateCall struct {
  2028. s *APIService
  2029. appsId string
  2030. domainmapping *DomainMapping
  2031. urlParams_ gensupport.URLParams
  2032. ctx_ context.Context
  2033. header_ http.Header
  2034. }
  2035. // Create: Maps a domain to an application. A user must be authorized to
  2036. // administer a domain in order to map it to an application. For a list
  2037. // of available authorized domains, see
  2038. // AuthorizedDomains.ListAuthorizedDomains.
  2039. func (r *AppsDomainMappingsService) Create(appsId string, domainmapping *DomainMapping) *AppsDomainMappingsCreateCall {
  2040. c := &AppsDomainMappingsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2041. c.appsId = appsId
  2042. c.domainmapping = domainmapping
  2043. return c
  2044. }
  2045. // NoManagedCertificate sets the optional parameter
  2046. // "noManagedCertificate": Whether a managed certificate should be
  2047. // provided by App Engine. If true, a certificate ID must be manaually
  2048. // set in the DomainMapping resource to configure SSL for this domain.
  2049. // If false, a managed certificate will be provisioned and a certificate
  2050. // ID will be automatically populated.
  2051. func (c *AppsDomainMappingsCreateCall) NoManagedCertificate(noManagedCertificate bool) *AppsDomainMappingsCreateCall {
  2052. c.urlParams_.Set("noManagedCertificate", fmt.Sprint(noManagedCertificate))
  2053. return c
  2054. }
  2055. // OverrideStrategy sets the optional parameter "overrideStrategy":
  2056. // Whether the domain creation should override any existing mappings for
  2057. // this domain. By default, overrides are rejected.
  2058. //
  2059. // Possible values:
  2060. // "UNSPECIFIED_DOMAIN_OVERRIDE_STRATEGY"
  2061. // "STRICT"
  2062. // "OVERRIDE"
  2063. func (c *AppsDomainMappingsCreateCall) OverrideStrategy(overrideStrategy string) *AppsDomainMappingsCreateCall {
  2064. c.urlParams_.Set("overrideStrategy", overrideStrategy)
  2065. return c
  2066. }
  2067. // Fields allows partial responses to be retrieved. See
  2068. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2069. // for more information.
  2070. func (c *AppsDomainMappingsCreateCall) Fields(s ...googleapi.Field) *AppsDomainMappingsCreateCall {
  2071. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2072. return c
  2073. }
  2074. // Context sets the context to be used in this call's Do method. Any
  2075. // pending HTTP request will be aborted if the provided context is
  2076. // canceled.
  2077. func (c *AppsDomainMappingsCreateCall) Context(ctx context.Context) *AppsDomainMappingsCreateCall {
  2078. c.ctx_ = ctx
  2079. return c
  2080. }
  2081. // Header returns an http.Header that can be modified by the caller to
  2082. // add HTTP headers to the request.
  2083. func (c *AppsDomainMappingsCreateCall) Header() http.Header {
  2084. if c.header_ == nil {
  2085. c.header_ = make(http.Header)
  2086. }
  2087. return c.header_
  2088. }
  2089. func (c *AppsDomainMappingsCreateCall) doRequest(alt string) (*http.Response, error) {
  2090. reqHeaders := make(http.Header)
  2091. for k, v := range c.header_ {
  2092. reqHeaders[k] = v
  2093. }
  2094. reqHeaders.Set("User-Agent", c.s.userAgent())
  2095. var body io.Reader = nil
  2096. body, err := googleapi.WithoutDataWrapper.JSONReader(c.domainmapping)
  2097. if err != nil {
  2098. return nil, err
  2099. }
  2100. reqHeaders.Set("Content-Type", "application/json")
  2101. c.urlParams_.Set("alt", alt)
  2102. c.urlParams_.Set("prettyPrint", "false")
  2103. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/apps/{appsId}/domainMappings")
  2104. urls += "?" + c.urlParams_.Encode()
  2105. req, err := http.NewRequest("POST", urls, body)
  2106. if err != nil {
  2107. return nil, err
  2108. }
  2109. req.Header = reqHeaders
  2110. googleapi.Expand(req.URL, map[string]string{
  2111. "appsId": c.appsId,
  2112. })
  2113. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2114. }
  2115. // Do executes the "appengine.apps.domainMappings.create" call.
  2116. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  2117. // status code is an error. Response headers are in either
  2118. // *Operation.ServerResponse.Header or (if a response was returned at
  2119. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  2120. // to check whether the returned error was because
  2121. // http.StatusNotModified was returned.
  2122. func (c *AppsDomainMappingsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  2123. gensupport.SetOptions(c.urlParams_, opts...)
  2124. res, err := c.doRequest("json")
  2125. if res != nil && res.StatusCode == http.StatusNotModified {
  2126. if res.Body != nil {
  2127. res.Body.Close()
  2128. }
  2129. return nil, &googleapi.Error{
  2130. Code: res.StatusCode,
  2131. Header: res.Header,
  2132. }
  2133. }
  2134. if err != nil {
  2135. return nil, err
  2136. }
  2137. defer googleapi.CloseBody(res)
  2138. if err := googleapi.CheckResponse(res); err != nil {
  2139. return nil, err
  2140. }
  2141. ret := &Operation{
  2142. ServerResponse: googleapi.ServerResponse{
  2143. Header: res.Header,
  2144. HTTPStatusCode: res.StatusCode,
  2145. },
  2146. }
  2147. target := &ret
  2148. if err := gensupport.DecodeResponse(target, res); err != nil {
  2149. return nil, err
  2150. }
  2151. return ret, nil
  2152. // {
  2153. // "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.",
  2154. // "flatPath": "v1alpha/apps/{appsId}/domainMappings",
  2155. // "httpMethod": "POST",
  2156. // "id": "appengine.apps.domainMappings.create",
  2157. // "parameterOrder": [
  2158. // "appsId"
  2159. // ],
  2160. // "parameters": {
  2161. // "appsId": {
  2162. // "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.",
  2163. // "location": "path",
  2164. // "required": true,
  2165. // "type": "string"
  2166. // },
  2167. // "noManagedCertificate": {
  2168. // "description": "Whether a managed certificate should be provided by App Engine. If true, a certificate ID must be manaually set in the DomainMapping resource to configure SSL for this domain. If false, a managed certificate will be provisioned and a certificate ID will be automatically populated.",
  2169. // "location": "query",
  2170. // "type": "boolean"
  2171. // },
  2172. // "overrideStrategy": {
  2173. // "description": "Whether the domain creation should override any existing mappings for this domain. By default, overrides are rejected.",
  2174. // "enum": [
  2175. // "UNSPECIFIED_DOMAIN_OVERRIDE_STRATEGY",
  2176. // "STRICT",
  2177. // "OVERRIDE"
  2178. // ],
  2179. // "location": "query",
  2180. // "type": "string"
  2181. // }
  2182. // },
  2183. // "path": "v1alpha/apps/{appsId}/domainMappings",
  2184. // "request": {
  2185. // "$ref": "DomainMapping"
  2186. // },
  2187. // "response": {
  2188. // "$ref": "Operation"
  2189. // },
  2190. // "scopes": [
  2191. // "https://www.googleapis.com/auth/cloud-platform"
  2192. // ]
  2193. // }
  2194. }
  2195. // method id "appengine.apps.domainMappings.delete":
  2196. type AppsDomainMappingsDeleteCall struct {
  2197. s *APIService
  2198. appsId string
  2199. domainMappingsId string
  2200. urlParams_ gensupport.URLParams
  2201. ctx_ context.Context
  2202. header_ http.Header
  2203. }
  2204. // Delete: Deletes the specified domain mapping. A user must be
  2205. // authorized to administer the associated domain in order to delete a
  2206. // DomainMapping resource.
  2207. func (r *AppsDomainMappingsService) Delete(appsId string, domainMappingsId string) *AppsDomainMappingsDeleteCall {
  2208. c := &AppsDomainMappingsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2209. c.appsId = appsId
  2210. c.domainMappingsId = domainMappingsId
  2211. return c
  2212. }
  2213. // Fields allows partial responses to be retrieved. See
  2214. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2215. // for more information.
  2216. func (c *AppsDomainMappingsDeleteCall) Fields(s ...googleapi.Field) *AppsDomainMappingsDeleteCall {
  2217. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2218. return c
  2219. }
  2220. // Context sets the context to be used in this call's Do method. Any
  2221. // pending HTTP request will be aborted if the provided context is
  2222. // canceled.
  2223. func (c *AppsDomainMappingsDeleteCall) Context(ctx context.Context) *AppsDomainMappingsDeleteCall {
  2224. c.ctx_ = ctx
  2225. return c
  2226. }
  2227. // Header returns an http.Header that can be modified by the caller to
  2228. // add HTTP headers to the request.
  2229. func (c *AppsDomainMappingsDeleteCall) Header() http.Header {
  2230. if c.header_ == nil {
  2231. c.header_ = make(http.Header)
  2232. }
  2233. return c.header_
  2234. }
  2235. func (c *AppsDomainMappingsDeleteCall) doRequest(alt string) (*http.Response, error) {
  2236. reqHeaders := make(http.Header)
  2237. for k, v := range c.header_ {
  2238. reqHeaders[k] = v
  2239. }
  2240. reqHeaders.Set("User-Agent", c.s.userAgent())
  2241. var body io.Reader = nil
  2242. c.urlParams_.Set("alt", alt)
  2243. c.urlParams_.Set("prettyPrint", "false")
  2244. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/apps/{appsId}/domainMappings/{domainMappingsId}")
  2245. urls += "?" + c.urlParams_.Encode()
  2246. req, err := http.NewRequest("DELETE", urls, body)
  2247. if err != nil {
  2248. return nil, err
  2249. }
  2250. req.Header = reqHeaders
  2251. googleapi.Expand(req.URL, map[string]string{
  2252. "appsId": c.appsId,
  2253. "domainMappingsId": c.domainMappingsId,
  2254. })
  2255. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2256. }
  2257. // Do executes the "appengine.apps.domainMappings.delete" call.
  2258. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  2259. // status code is an error. Response headers are in either
  2260. // *Operation.ServerResponse.Header or (if a response was returned at
  2261. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  2262. // to check whether the returned error was because
  2263. // http.StatusNotModified was returned.
  2264. func (c *AppsDomainMappingsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  2265. gensupport.SetOptions(c.urlParams_, opts...)
  2266. res, err := c.doRequest("json")
  2267. if res != nil && res.StatusCode == http.StatusNotModified {
  2268. if res.Body != nil {
  2269. res.Body.Close()
  2270. }
  2271. return nil, &googleapi.Error{
  2272. Code: res.StatusCode,
  2273. Header: res.Header,
  2274. }
  2275. }
  2276. if err != nil {
  2277. return nil, err
  2278. }
  2279. defer googleapi.CloseBody(res)
  2280. if err := googleapi.CheckResponse(res); err != nil {
  2281. return nil, err
  2282. }
  2283. ret := &Operation{
  2284. ServerResponse: googleapi.ServerResponse{
  2285. Header: res.Header,
  2286. HTTPStatusCode: res.StatusCode,
  2287. },
  2288. }
  2289. target := &ret
  2290. if err := gensupport.DecodeResponse(target, res); err != nil {
  2291. return nil, err
  2292. }
  2293. return ret, nil
  2294. // {
  2295. // "description": "Deletes the specified domain mapping. A user must be authorized to administer the associated domain in order to delete a DomainMapping resource.",
  2296. // "flatPath": "v1alpha/apps/{appsId}/domainMappings/{domainMappingsId}",
  2297. // "httpMethod": "DELETE",
  2298. // "id": "appengine.apps.domainMappings.delete",
  2299. // "parameterOrder": [
  2300. // "appsId",
  2301. // "domainMappingsId"
  2302. // ],
  2303. // "parameters": {
  2304. // "appsId": {
  2305. // "description": "Part of `name`. Name of the resource to delete. Example: apps/myapp/domainMappings/example.com.",
  2306. // "location": "path",
  2307. // "required": true,
  2308. // "type": "string"
  2309. // },
  2310. // "domainMappingsId": {
  2311. // "description": "Part of `name`. See documentation of `appsId`.",
  2312. // "location": "path",
  2313. // "required": true,
  2314. // "type": "string"
  2315. // }
  2316. // },
  2317. // "path": "v1alpha/apps/{appsId}/domainMappings/{domainMappingsId}",
  2318. // "response": {
  2319. // "$ref": "Operation"
  2320. // },
  2321. // "scopes": [
  2322. // "https://www.googleapis.com/auth/cloud-platform"
  2323. // ]
  2324. // }
  2325. }
  2326. // method id "appengine.apps.domainMappings.get":
  2327. type AppsDomainMappingsGetCall struct {
  2328. s *APIService
  2329. appsId string
  2330. domainMappingsId string
  2331. urlParams_ gensupport.URLParams
  2332. ifNoneMatch_ string
  2333. ctx_ context.Context
  2334. header_ http.Header
  2335. }
  2336. // Get: Gets the specified domain mapping.
  2337. func (r *AppsDomainMappingsService) Get(appsId string, domainMappingsId string) *AppsDomainMappingsGetCall {
  2338. c := &AppsDomainMappingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2339. c.appsId = appsId
  2340. c.domainMappingsId = domainMappingsId
  2341. return c
  2342. }
  2343. // Fields allows partial responses to be retrieved. See
  2344. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2345. // for more information.
  2346. func (c *AppsDomainMappingsGetCall) Fields(s ...googleapi.Field) *AppsDomainMappingsGetCall {
  2347. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2348. return c
  2349. }
  2350. // IfNoneMatch sets the optional parameter which makes the operation
  2351. // fail if the object's ETag matches the given value. This is useful for
  2352. // getting updates only after the object has changed since the last
  2353. // request. Use googleapi.IsNotModified to check whether the response
  2354. // error from Do is the result of In-None-Match.
  2355. func (c *AppsDomainMappingsGetCall) IfNoneMatch(entityTag string) *AppsDomainMappingsGetCall {
  2356. c.ifNoneMatch_ = entityTag
  2357. return c
  2358. }
  2359. // Context sets the context to be used in this call's Do method. Any
  2360. // pending HTTP request will be aborted if the provided context is
  2361. // canceled.
  2362. func (c *AppsDomainMappingsGetCall) Context(ctx context.Context) *AppsDomainMappingsGetCall {
  2363. c.ctx_ = ctx
  2364. return c
  2365. }
  2366. // Header returns an http.Header that can be modified by the caller to
  2367. // add HTTP headers to the request.
  2368. func (c *AppsDomainMappingsGetCall) Header() http.Header {
  2369. if c.header_ == nil {
  2370. c.header_ = make(http.Header)
  2371. }
  2372. return c.header_
  2373. }
  2374. func (c *AppsDomainMappingsGetCall) doRequest(alt string) (*http.Response, error) {
  2375. reqHeaders := make(http.Header)
  2376. for k, v := range c.header_ {
  2377. reqHeaders[k] = v
  2378. }
  2379. reqHeaders.Set("User-Agent", c.s.userAgent())
  2380. if c.ifNoneMatch_ != "" {
  2381. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2382. }
  2383. var body io.Reader = nil
  2384. c.urlParams_.Set("alt", alt)
  2385. c.urlParams_.Set("prettyPrint", "false")
  2386. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/apps/{appsId}/domainMappings/{domainMappingsId}")
  2387. urls += "?" + c.urlParams_.Encode()
  2388. req, err := http.NewRequest("GET", urls, body)
  2389. if err != nil {
  2390. return nil, err
  2391. }
  2392. req.Header = reqHeaders
  2393. googleapi.Expand(req.URL, map[string]string{
  2394. "appsId": c.appsId,
  2395. "domainMappingsId": c.domainMappingsId,
  2396. })
  2397. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2398. }
  2399. // Do executes the "appengine.apps.domainMappings.get" call.
  2400. // Exactly one of *DomainMapping or error will be non-nil. Any non-2xx
  2401. // status code is an error. Response headers are in either
  2402. // *DomainMapping.ServerResponse.Header or (if a response was returned
  2403. // at all) in error.(*googleapi.Error).Header. Use
  2404. // googleapi.IsNotModified to check whether the returned error was
  2405. // because http.StatusNotModified was returned.
  2406. func (c *AppsDomainMappingsGetCall) Do(opts ...googleapi.CallOption) (*DomainMapping, error) {
  2407. gensupport.SetOptions(c.urlParams_, opts...)
  2408. res, err := c.doRequest("json")
  2409. if res != nil && res.StatusCode == http.StatusNotModified {
  2410. if res.Body != nil {
  2411. res.Body.Close()
  2412. }
  2413. return nil, &googleapi.Error{
  2414. Code: res.StatusCode,
  2415. Header: res.Header,
  2416. }
  2417. }
  2418. if err != nil {
  2419. return nil, err
  2420. }
  2421. defer googleapi.CloseBody(res)
  2422. if err := googleapi.CheckResponse(res); err != nil {
  2423. return nil, err
  2424. }
  2425. ret := &DomainMapping{
  2426. ServerResponse: googleapi.ServerResponse{
  2427. Header: res.Header,
  2428. HTTPStatusCode: res.StatusCode,
  2429. },
  2430. }
  2431. target := &ret
  2432. if err := gensupport.DecodeResponse(target, res); err != nil {
  2433. return nil, err
  2434. }
  2435. return ret, nil
  2436. // {
  2437. // "description": "Gets the specified domain mapping.",
  2438. // "flatPath": "v1alpha/apps/{appsId}/domainMappings/{domainMappingsId}",
  2439. // "httpMethod": "GET",
  2440. // "id": "appengine.apps.domainMappings.get",
  2441. // "parameterOrder": [
  2442. // "appsId",
  2443. // "domainMappingsId"
  2444. // ],
  2445. // "parameters": {
  2446. // "appsId": {
  2447. // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/domainMappings/example.com.",
  2448. // "location": "path",
  2449. // "required": true,
  2450. // "type": "string"
  2451. // },
  2452. // "domainMappingsId": {
  2453. // "description": "Part of `name`. See documentation of `appsId`.",
  2454. // "location": "path",
  2455. // "required": true,
  2456. // "type": "string"
  2457. // }
  2458. // },
  2459. // "path": "v1alpha/apps/{appsId}/domainMappings/{domainMappingsId}",
  2460. // "response": {
  2461. // "$ref": "DomainMapping"
  2462. // },
  2463. // "scopes": [
  2464. // "https://www.googleapis.com/auth/appengine.admin",
  2465. // "https://www.googleapis.com/auth/cloud-platform",
  2466. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  2467. // ]
  2468. // }
  2469. }
  2470. // method id "appengine.apps.domainMappings.list":
  2471. type AppsDomainMappingsListCall struct {
  2472. s *APIService
  2473. appsId string
  2474. urlParams_ gensupport.URLParams
  2475. ifNoneMatch_ string
  2476. ctx_ context.Context
  2477. header_ http.Header
  2478. }
  2479. // List: Lists the domain mappings on an application.
  2480. func (r *AppsDomainMappingsService) List(appsId string) *AppsDomainMappingsListCall {
  2481. c := &AppsDomainMappingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2482. c.appsId = appsId
  2483. return c
  2484. }
  2485. // PageSize sets the optional parameter "pageSize": Maximum results to
  2486. // return per page.
  2487. func (c *AppsDomainMappingsListCall) PageSize(pageSize int64) *AppsDomainMappingsListCall {
  2488. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  2489. return c
  2490. }
  2491. // PageToken sets the optional parameter "pageToken": Continuation token
  2492. // for fetching the next page of results.
  2493. func (c *AppsDomainMappingsListCall) PageToken(pageToken string) *AppsDomainMappingsListCall {
  2494. c.urlParams_.Set("pageToken", pageToken)
  2495. return c
  2496. }
  2497. // Fields allows partial responses to be retrieved. See
  2498. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2499. // for more information.
  2500. func (c *AppsDomainMappingsListCall) Fields(s ...googleapi.Field) *AppsDomainMappingsListCall {
  2501. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2502. return c
  2503. }
  2504. // IfNoneMatch sets the optional parameter which makes the operation
  2505. // fail if the object's ETag matches the given value. This is useful for
  2506. // getting updates only after the object has changed since the last
  2507. // request. Use googleapi.IsNotModified to check whether the response
  2508. // error from Do is the result of In-None-Match.
  2509. func (c *AppsDomainMappingsListCall) IfNoneMatch(entityTag string) *AppsDomainMappingsListCall {
  2510. c.ifNoneMatch_ = entityTag
  2511. return c
  2512. }
  2513. // Context sets the context to be used in this call's Do method. Any
  2514. // pending HTTP request will be aborted if the provided context is
  2515. // canceled.
  2516. func (c *AppsDomainMappingsListCall) Context(ctx context.Context) *AppsDomainMappingsListCall {
  2517. c.ctx_ = ctx
  2518. return c
  2519. }
  2520. // Header returns an http.Header that can be modified by the caller to
  2521. // add HTTP headers to the request.
  2522. func (c *AppsDomainMappingsListCall) Header() http.Header {
  2523. if c.header_ == nil {
  2524. c.header_ = make(http.Header)
  2525. }
  2526. return c.header_
  2527. }
  2528. func (c *AppsDomainMappingsListCall) doRequest(alt string) (*http.Response, error) {
  2529. reqHeaders := make(http.Header)
  2530. for k, v := range c.header_ {
  2531. reqHeaders[k] = v
  2532. }
  2533. reqHeaders.Set("User-Agent", c.s.userAgent())
  2534. if c.ifNoneMatch_ != "" {
  2535. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2536. }
  2537. var body io.Reader = nil
  2538. c.urlParams_.Set("alt", alt)
  2539. c.urlParams_.Set("prettyPrint", "false")
  2540. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/apps/{appsId}/domainMappings")
  2541. urls += "?" + c.urlParams_.Encode()
  2542. req, err := http.NewRequest("GET", urls, body)
  2543. if err != nil {
  2544. return nil, err
  2545. }
  2546. req.Header = reqHeaders
  2547. googleapi.Expand(req.URL, map[string]string{
  2548. "appsId": c.appsId,
  2549. })
  2550. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2551. }
  2552. // Do executes the "appengine.apps.domainMappings.list" call.
  2553. // Exactly one of *ListDomainMappingsResponse or error will be non-nil.
  2554. // Any non-2xx status code is an error. Response headers are in either
  2555. // *ListDomainMappingsResponse.ServerResponse.Header or (if a response
  2556. // was returned at all) in error.(*googleapi.Error).Header. Use
  2557. // googleapi.IsNotModified to check whether the returned error was
  2558. // because http.StatusNotModified was returned.
  2559. func (c *AppsDomainMappingsListCall) Do(opts ...googleapi.CallOption) (*ListDomainMappingsResponse, error) {
  2560. gensupport.SetOptions(c.urlParams_, opts...)
  2561. res, err := c.doRequest("json")
  2562. if res != nil && res.StatusCode == http.StatusNotModified {
  2563. if res.Body != nil {
  2564. res.Body.Close()
  2565. }
  2566. return nil, &googleapi.Error{
  2567. Code: res.StatusCode,
  2568. Header: res.Header,
  2569. }
  2570. }
  2571. if err != nil {
  2572. return nil, err
  2573. }
  2574. defer googleapi.CloseBody(res)
  2575. if err := googleapi.CheckResponse(res); err != nil {
  2576. return nil, err
  2577. }
  2578. ret := &ListDomainMappingsResponse{
  2579. ServerResponse: googleapi.ServerResponse{
  2580. Header: res.Header,
  2581. HTTPStatusCode: res.StatusCode,
  2582. },
  2583. }
  2584. target := &ret
  2585. if err := gensupport.DecodeResponse(target, res); err != nil {
  2586. return nil, err
  2587. }
  2588. return ret, nil
  2589. // {
  2590. // "description": "Lists the domain mappings on an application.",
  2591. // "flatPath": "v1alpha/apps/{appsId}/domainMappings",
  2592. // "httpMethod": "GET",
  2593. // "id": "appengine.apps.domainMappings.list",
  2594. // "parameterOrder": [
  2595. // "appsId"
  2596. // ],
  2597. // "parameters": {
  2598. // "appsId": {
  2599. // "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.",
  2600. // "location": "path",
  2601. // "required": true,
  2602. // "type": "string"
  2603. // },
  2604. // "pageSize": {
  2605. // "description": "Maximum results to return per page.",
  2606. // "format": "int32",
  2607. // "location": "query",
  2608. // "type": "integer"
  2609. // },
  2610. // "pageToken": {
  2611. // "description": "Continuation token for fetching the next page of results.",
  2612. // "location": "query",
  2613. // "type": "string"
  2614. // }
  2615. // },
  2616. // "path": "v1alpha/apps/{appsId}/domainMappings",
  2617. // "response": {
  2618. // "$ref": "ListDomainMappingsResponse"
  2619. // },
  2620. // "scopes": [
  2621. // "https://www.googleapis.com/auth/appengine.admin",
  2622. // "https://www.googleapis.com/auth/cloud-platform",
  2623. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  2624. // ]
  2625. // }
  2626. }
  2627. // Pages invokes f for each page of results.
  2628. // A non-nil error returned from f will halt the iteration.
  2629. // The provided context supersedes any context provided to the Context method.
  2630. func (c *AppsDomainMappingsListCall) Pages(ctx context.Context, f func(*ListDomainMappingsResponse) error) error {
  2631. c.ctx_ = ctx
  2632. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  2633. for {
  2634. x, err := c.Do()
  2635. if err != nil {
  2636. return err
  2637. }
  2638. if err := f(x); err != nil {
  2639. return err
  2640. }
  2641. if x.NextPageToken == "" {
  2642. return nil
  2643. }
  2644. c.PageToken(x.NextPageToken)
  2645. }
  2646. }
  2647. // method id "appengine.apps.domainMappings.patch":
  2648. type AppsDomainMappingsPatchCall struct {
  2649. s *APIService
  2650. appsId string
  2651. domainMappingsId string
  2652. domainmapping *DomainMapping
  2653. urlParams_ gensupport.URLParams
  2654. ctx_ context.Context
  2655. header_ http.Header
  2656. }
  2657. // Patch: Updates the specified domain mapping. To map an SSL
  2658. // certificate to a domain mapping, update certificate_id to point to an
  2659. // AuthorizedCertificate resource. A user must be authorized to
  2660. // administer the associated domain in order to update a DomainMapping
  2661. // resource.
  2662. func (r *AppsDomainMappingsService) Patch(appsId string, domainMappingsId string, domainmapping *DomainMapping) *AppsDomainMappingsPatchCall {
  2663. c := &AppsDomainMappingsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2664. c.appsId = appsId
  2665. c.domainMappingsId = domainMappingsId
  2666. c.domainmapping = domainmapping
  2667. return c
  2668. }
  2669. // NoManagedCertificate sets the optional parameter
  2670. // "noManagedCertificate": Whether a managed certificate should be
  2671. // provided by App Engine. If true, a certificate ID must be manually
  2672. // set in the DomainMapping resource to configure SSL for this domain.
  2673. // If false, a managed certificate will be provisioned and a certificate
  2674. // ID will be automatically populated. Only applicable if
  2675. // ssl_settings.certificate_id is specified in the update mask.
  2676. func (c *AppsDomainMappingsPatchCall) NoManagedCertificate(noManagedCertificate bool) *AppsDomainMappingsPatchCall {
  2677. c.urlParams_.Set("noManagedCertificate", fmt.Sprint(noManagedCertificate))
  2678. return c
  2679. }
  2680. // UpdateMask sets the optional parameter "updateMask": Standard field
  2681. // mask for the set of fields to be updated.
  2682. func (c *AppsDomainMappingsPatchCall) UpdateMask(updateMask string) *AppsDomainMappingsPatchCall {
  2683. c.urlParams_.Set("updateMask", updateMask)
  2684. return c
  2685. }
  2686. // Fields allows partial responses to be retrieved. See
  2687. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2688. // for more information.
  2689. func (c *AppsDomainMappingsPatchCall) Fields(s ...googleapi.Field) *AppsDomainMappingsPatchCall {
  2690. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2691. return c
  2692. }
  2693. // Context sets the context to be used in this call's Do method. Any
  2694. // pending HTTP request will be aborted if the provided context is
  2695. // canceled.
  2696. func (c *AppsDomainMappingsPatchCall) Context(ctx context.Context) *AppsDomainMappingsPatchCall {
  2697. c.ctx_ = ctx
  2698. return c
  2699. }
  2700. // Header returns an http.Header that can be modified by the caller to
  2701. // add HTTP headers to the request.
  2702. func (c *AppsDomainMappingsPatchCall) Header() http.Header {
  2703. if c.header_ == nil {
  2704. c.header_ = make(http.Header)
  2705. }
  2706. return c.header_
  2707. }
  2708. func (c *AppsDomainMappingsPatchCall) doRequest(alt string) (*http.Response, error) {
  2709. reqHeaders := make(http.Header)
  2710. for k, v := range c.header_ {
  2711. reqHeaders[k] = v
  2712. }
  2713. reqHeaders.Set("User-Agent", c.s.userAgent())
  2714. var body io.Reader = nil
  2715. body, err := googleapi.WithoutDataWrapper.JSONReader(c.domainmapping)
  2716. if err != nil {
  2717. return nil, err
  2718. }
  2719. reqHeaders.Set("Content-Type", "application/json")
  2720. c.urlParams_.Set("alt", alt)
  2721. c.urlParams_.Set("prettyPrint", "false")
  2722. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/apps/{appsId}/domainMappings/{domainMappingsId}")
  2723. urls += "?" + c.urlParams_.Encode()
  2724. req, err := http.NewRequest("PATCH", urls, body)
  2725. if err != nil {
  2726. return nil, err
  2727. }
  2728. req.Header = reqHeaders
  2729. googleapi.Expand(req.URL, map[string]string{
  2730. "appsId": c.appsId,
  2731. "domainMappingsId": c.domainMappingsId,
  2732. })
  2733. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2734. }
  2735. // Do executes the "appengine.apps.domainMappings.patch" call.
  2736. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  2737. // status code is an error. Response headers are in either
  2738. // *Operation.ServerResponse.Header or (if a response was returned at
  2739. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  2740. // to check whether the returned error was because
  2741. // http.StatusNotModified was returned.
  2742. func (c *AppsDomainMappingsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  2743. gensupport.SetOptions(c.urlParams_, opts...)
  2744. res, err := c.doRequest("json")
  2745. if res != nil && res.StatusCode == http.StatusNotModified {
  2746. if res.Body != nil {
  2747. res.Body.Close()
  2748. }
  2749. return nil, &googleapi.Error{
  2750. Code: res.StatusCode,
  2751. Header: res.Header,
  2752. }
  2753. }
  2754. if err != nil {
  2755. return nil, err
  2756. }
  2757. defer googleapi.CloseBody(res)
  2758. if err := googleapi.CheckResponse(res); err != nil {
  2759. return nil, err
  2760. }
  2761. ret := &Operation{
  2762. ServerResponse: googleapi.ServerResponse{
  2763. Header: res.Header,
  2764. HTTPStatusCode: res.StatusCode,
  2765. },
  2766. }
  2767. target := &ret
  2768. if err := gensupport.DecodeResponse(target, res); err != nil {
  2769. return nil, err
  2770. }
  2771. return ret, nil
  2772. // {
  2773. // "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.",
  2774. // "flatPath": "v1alpha/apps/{appsId}/domainMappings/{domainMappingsId}",
  2775. // "httpMethod": "PATCH",
  2776. // "id": "appengine.apps.domainMappings.patch",
  2777. // "parameterOrder": [
  2778. // "appsId",
  2779. // "domainMappingsId"
  2780. // ],
  2781. // "parameters": {
  2782. // "appsId": {
  2783. // "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/domainMappings/example.com.",
  2784. // "location": "path",
  2785. // "required": true,
  2786. // "type": "string"
  2787. // },
  2788. // "domainMappingsId": {
  2789. // "description": "Part of `name`. See documentation of `appsId`.",
  2790. // "location": "path",
  2791. // "required": true,
  2792. // "type": "string"
  2793. // },
  2794. // "noManagedCertificate": {
  2795. // "description": "Whether a managed certificate should be provided by App Engine. If true, a certificate ID must be manually set in the DomainMapping resource to configure SSL for this domain. If false, a managed certificate will be provisioned and a certificate ID will be automatically populated. Only applicable if ssl_settings.certificate_id is specified in the update mask.",
  2796. // "location": "query",
  2797. // "type": "boolean"
  2798. // },
  2799. // "updateMask": {
  2800. // "description": "Standard field mask for the set of fields to be updated.",
  2801. // "format": "google-fieldmask",
  2802. // "location": "query",
  2803. // "type": "string"
  2804. // }
  2805. // },
  2806. // "path": "v1alpha/apps/{appsId}/domainMappings/{domainMappingsId}",
  2807. // "request": {
  2808. // "$ref": "DomainMapping"
  2809. // },
  2810. // "response": {
  2811. // "$ref": "Operation"
  2812. // },
  2813. // "scopes": [
  2814. // "https://www.googleapis.com/auth/cloud-platform"
  2815. // ]
  2816. // }
  2817. }
  2818. // method id "appengine.apps.locations.get":
  2819. type AppsLocationsGetCall struct {
  2820. s *APIService
  2821. appsId string
  2822. locationsId string
  2823. urlParams_ gensupport.URLParams
  2824. ifNoneMatch_ string
  2825. ctx_ context.Context
  2826. header_ http.Header
  2827. }
  2828. // Get: Gets information about a location.
  2829. func (r *AppsLocationsService) Get(appsId string, locationsId string) *AppsLocationsGetCall {
  2830. c := &AppsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2831. c.appsId = appsId
  2832. c.locationsId = locationsId
  2833. return c
  2834. }
  2835. // Fields allows partial responses to be retrieved. See
  2836. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2837. // for more information.
  2838. func (c *AppsLocationsGetCall) Fields(s ...googleapi.Field) *AppsLocationsGetCall {
  2839. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2840. return c
  2841. }
  2842. // IfNoneMatch sets the optional parameter which makes the operation
  2843. // fail if the object's ETag matches the given value. This is useful for
  2844. // getting updates only after the object has changed since the last
  2845. // request. Use googleapi.IsNotModified to check whether the response
  2846. // error from Do is the result of In-None-Match.
  2847. func (c *AppsLocationsGetCall) IfNoneMatch(entityTag string) *AppsLocationsGetCall {
  2848. c.ifNoneMatch_ = entityTag
  2849. return c
  2850. }
  2851. // Context sets the context to be used in this call's Do method. Any
  2852. // pending HTTP request will be aborted if the provided context is
  2853. // canceled.
  2854. func (c *AppsLocationsGetCall) Context(ctx context.Context) *AppsLocationsGetCall {
  2855. c.ctx_ = ctx
  2856. return c
  2857. }
  2858. // Header returns an http.Header that can be modified by the caller to
  2859. // add HTTP headers to the request.
  2860. func (c *AppsLocationsGetCall) Header() http.Header {
  2861. if c.header_ == nil {
  2862. c.header_ = make(http.Header)
  2863. }
  2864. return c.header_
  2865. }
  2866. func (c *AppsLocationsGetCall) doRequest(alt string) (*http.Response, error) {
  2867. reqHeaders := make(http.Header)
  2868. for k, v := range c.header_ {
  2869. reqHeaders[k] = v
  2870. }
  2871. reqHeaders.Set("User-Agent", c.s.userAgent())
  2872. if c.ifNoneMatch_ != "" {
  2873. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2874. }
  2875. var body io.Reader = nil
  2876. c.urlParams_.Set("alt", alt)
  2877. c.urlParams_.Set("prettyPrint", "false")
  2878. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/apps/{appsId}/locations/{locationsId}")
  2879. urls += "?" + c.urlParams_.Encode()
  2880. req, err := http.NewRequest("GET", urls, body)
  2881. if err != nil {
  2882. return nil, err
  2883. }
  2884. req.Header = reqHeaders
  2885. googleapi.Expand(req.URL, map[string]string{
  2886. "appsId": c.appsId,
  2887. "locationsId": c.locationsId,
  2888. })
  2889. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2890. }
  2891. // Do executes the "appengine.apps.locations.get" call.
  2892. // Exactly one of *Location or error will be non-nil. Any non-2xx status
  2893. // code is an error. Response headers are in either
  2894. // *Location.ServerResponse.Header or (if a response was returned at
  2895. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  2896. // to check whether the returned error was because
  2897. // http.StatusNotModified was returned.
  2898. func (c *AppsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) {
  2899. gensupport.SetOptions(c.urlParams_, opts...)
  2900. res, err := c.doRequest("json")
  2901. if res != nil && res.StatusCode == http.StatusNotModified {
  2902. if res.Body != nil {
  2903. res.Body.Close()
  2904. }
  2905. return nil, &googleapi.Error{
  2906. Code: res.StatusCode,
  2907. Header: res.Header,
  2908. }
  2909. }
  2910. if err != nil {
  2911. return nil, err
  2912. }
  2913. defer googleapi.CloseBody(res)
  2914. if err := googleapi.CheckResponse(res); err != nil {
  2915. return nil, err
  2916. }
  2917. ret := &Location{
  2918. ServerResponse: googleapi.ServerResponse{
  2919. Header: res.Header,
  2920. HTTPStatusCode: res.StatusCode,
  2921. },
  2922. }
  2923. target := &ret
  2924. if err := gensupport.DecodeResponse(target, res); err != nil {
  2925. return nil, err
  2926. }
  2927. return ret, nil
  2928. // {
  2929. // "description": "Gets information about a location.",
  2930. // "flatPath": "v1alpha/apps/{appsId}/locations/{locationsId}",
  2931. // "httpMethod": "GET",
  2932. // "id": "appengine.apps.locations.get",
  2933. // "parameterOrder": [
  2934. // "appsId",
  2935. // "locationsId"
  2936. // ],
  2937. // "parameters": {
  2938. // "appsId": {
  2939. // "description": "Part of `name`. Resource name for the location.",
  2940. // "location": "path",
  2941. // "required": true,
  2942. // "type": "string"
  2943. // },
  2944. // "locationsId": {
  2945. // "description": "Part of `name`. See documentation of `appsId`.",
  2946. // "location": "path",
  2947. // "required": true,
  2948. // "type": "string"
  2949. // }
  2950. // },
  2951. // "path": "v1alpha/apps/{appsId}/locations/{locationsId}",
  2952. // "response": {
  2953. // "$ref": "Location"
  2954. // },
  2955. // "scopes": [
  2956. // "https://www.googleapis.com/auth/appengine.admin",
  2957. // "https://www.googleapis.com/auth/cloud-platform",
  2958. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  2959. // ]
  2960. // }
  2961. }
  2962. // method id "appengine.apps.locations.list":
  2963. type AppsLocationsListCall struct {
  2964. s *APIService
  2965. appsId string
  2966. urlParams_ gensupport.URLParams
  2967. ifNoneMatch_ string
  2968. ctx_ context.Context
  2969. header_ http.Header
  2970. }
  2971. // List: Lists information about the supported locations for this
  2972. // service.
  2973. func (r *AppsLocationsService) List(appsId string) *AppsLocationsListCall {
  2974. c := &AppsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2975. c.appsId = appsId
  2976. return c
  2977. }
  2978. // Filter sets the optional parameter "filter": The standard list
  2979. // filter.
  2980. func (c *AppsLocationsListCall) Filter(filter string) *AppsLocationsListCall {
  2981. c.urlParams_.Set("filter", filter)
  2982. return c
  2983. }
  2984. // PageSize sets the optional parameter "pageSize": The standard list
  2985. // page size.
  2986. func (c *AppsLocationsListCall) PageSize(pageSize int64) *AppsLocationsListCall {
  2987. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  2988. return c
  2989. }
  2990. // PageToken sets the optional parameter "pageToken": The standard list
  2991. // page token.
  2992. func (c *AppsLocationsListCall) PageToken(pageToken string) *AppsLocationsListCall {
  2993. c.urlParams_.Set("pageToken", pageToken)
  2994. return c
  2995. }
  2996. // Fields allows partial responses to be retrieved. See
  2997. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2998. // for more information.
  2999. func (c *AppsLocationsListCall) Fields(s ...googleapi.Field) *AppsLocationsListCall {
  3000. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3001. return c
  3002. }
  3003. // IfNoneMatch sets the optional parameter which makes the operation
  3004. // fail if the object's ETag matches the given value. This is useful for
  3005. // getting updates only after the object has changed since the last
  3006. // request. Use googleapi.IsNotModified to check whether the response
  3007. // error from Do is the result of In-None-Match.
  3008. func (c *AppsLocationsListCall) IfNoneMatch(entityTag string) *AppsLocationsListCall {
  3009. c.ifNoneMatch_ = entityTag
  3010. return c
  3011. }
  3012. // Context sets the context to be used in this call's Do method. Any
  3013. // pending HTTP request will be aborted if the provided context is
  3014. // canceled.
  3015. func (c *AppsLocationsListCall) Context(ctx context.Context) *AppsLocationsListCall {
  3016. c.ctx_ = ctx
  3017. return c
  3018. }
  3019. // Header returns an http.Header that can be modified by the caller to
  3020. // add HTTP headers to the request.
  3021. func (c *AppsLocationsListCall) Header() http.Header {
  3022. if c.header_ == nil {
  3023. c.header_ = make(http.Header)
  3024. }
  3025. return c.header_
  3026. }
  3027. func (c *AppsLocationsListCall) doRequest(alt string) (*http.Response, error) {
  3028. reqHeaders := make(http.Header)
  3029. for k, v := range c.header_ {
  3030. reqHeaders[k] = v
  3031. }
  3032. reqHeaders.Set("User-Agent", c.s.userAgent())
  3033. if c.ifNoneMatch_ != "" {
  3034. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3035. }
  3036. var body io.Reader = nil
  3037. c.urlParams_.Set("alt", alt)
  3038. c.urlParams_.Set("prettyPrint", "false")
  3039. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/apps/{appsId}/locations")
  3040. urls += "?" + c.urlParams_.Encode()
  3041. req, err := http.NewRequest("GET", urls, body)
  3042. if err != nil {
  3043. return nil, err
  3044. }
  3045. req.Header = reqHeaders
  3046. googleapi.Expand(req.URL, map[string]string{
  3047. "appsId": c.appsId,
  3048. })
  3049. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3050. }
  3051. // Do executes the "appengine.apps.locations.list" call.
  3052. // Exactly one of *ListLocationsResponse or error will be non-nil. Any
  3053. // non-2xx status code is an error. Response headers are in either
  3054. // *ListLocationsResponse.ServerResponse.Header or (if a response was
  3055. // returned at all) in error.(*googleapi.Error).Header. Use
  3056. // googleapi.IsNotModified to check whether the returned error was
  3057. // because http.StatusNotModified was returned.
  3058. func (c *AppsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) {
  3059. gensupport.SetOptions(c.urlParams_, opts...)
  3060. res, err := c.doRequest("json")
  3061. if res != nil && res.StatusCode == http.StatusNotModified {
  3062. if res.Body != nil {
  3063. res.Body.Close()
  3064. }
  3065. return nil, &googleapi.Error{
  3066. Code: res.StatusCode,
  3067. Header: res.Header,
  3068. }
  3069. }
  3070. if err != nil {
  3071. return nil, err
  3072. }
  3073. defer googleapi.CloseBody(res)
  3074. if err := googleapi.CheckResponse(res); err != nil {
  3075. return nil, err
  3076. }
  3077. ret := &ListLocationsResponse{
  3078. ServerResponse: googleapi.ServerResponse{
  3079. Header: res.Header,
  3080. HTTPStatusCode: res.StatusCode,
  3081. },
  3082. }
  3083. target := &ret
  3084. if err := gensupport.DecodeResponse(target, res); err != nil {
  3085. return nil, err
  3086. }
  3087. return ret, nil
  3088. // {
  3089. // "description": "Lists information about the supported locations for this service.",
  3090. // "flatPath": "v1alpha/apps/{appsId}/locations",
  3091. // "httpMethod": "GET",
  3092. // "id": "appengine.apps.locations.list",
  3093. // "parameterOrder": [
  3094. // "appsId"
  3095. // ],
  3096. // "parameters": {
  3097. // "appsId": {
  3098. // "description": "Part of `name`. The resource that owns the locations collection, if applicable.",
  3099. // "location": "path",
  3100. // "required": true,
  3101. // "type": "string"
  3102. // },
  3103. // "filter": {
  3104. // "description": "The standard list filter.",
  3105. // "location": "query",
  3106. // "type": "string"
  3107. // },
  3108. // "pageSize": {
  3109. // "description": "The standard list page size.",
  3110. // "format": "int32",
  3111. // "location": "query",
  3112. // "type": "integer"
  3113. // },
  3114. // "pageToken": {
  3115. // "description": "The standard list page token.",
  3116. // "location": "query",
  3117. // "type": "string"
  3118. // }
  3119. // },
  3120. // "path": "v1alpha/apps/{appsId}/locations",
  3121. // "response": {
  3122. // "$ref": "ListLocationsResponse"
  3123. // },
  3124. // "scopes": [
  3125. // "https://www.googleapis.com/auth/appengine.admin",
  3126. // "https://www.googleapis.com/auth/cloud-platform",
  3127. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  3128. // ]
  3129. // }
  3130. }
  3131. // Pages invokes f for each page of results.
  3132. // A non-nil error returned from f will halt the iteration.
  3133. // The provided context supersedes any context provided to the Context method.
  3134. func (c *AppsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error {
  3135. c.ctx_ = ctx
  3136. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  3137. for {
  3138. x, err := c.Do()
  3139. if err != nil {
  3140. return err
  3141. }
  3142. if err := f(x); err != nil {
  3143. return err
  3144. }
  3145. if x.NextPageToken == "" {
  3146. return nil
  3147. }
  3148. c.PageToken(x.NextPageToken)
  3149. }
  3150. }
  3151. // method id "appengine.apps.operations.get":
  3152. type AppsOperationsGetCall struct {
  3153. s *APIService
  3154. appsId string
  3155. operationsId string
  3156. urlParams_ gensupport.URLParams
  3157. ifNoneMatch_ string
  3158. ctx_ context.Context
  3159. header_ http.Header
  3160. }
  3161. // Get: Gets the latest state of a long-running operation. Clients can
  3162. // use this method to poll the operation result at intervals as
  3163. // recommended by the API service.
  3164. func (r *AppsOperationsService) Get(appsId string, operationsId string) *AppsOperationsGetCall {
  3165. c := &AppsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3166. c.appsId = appsId
  3167. c.operationsId = operationsId
  3168. return c
  3169. }
  3170. // Fields allows partial responses to be retrieved. See
  3171. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3172. // for more information.
  3173. func (c *AppsOperationsGetCall) Fields(s ...googleapi.Field) *AppsOperationsGetCall {
  3174. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3175. return c
  3176. }
  3177. // IfNoneMatch sets the optional parameter which makes the operation
  3178. // fail if the object's ETag matches the given value. This is useful for
  3179. // getting updates only after the object has changed since the last
  3180. // request. Use googleapi.IsNotModified to check whether the response
  3181. // error from Do is the result of In-None-Match.
  3182. func (c *AppsOperationsGetCall) IfNoneMatch(entityTag string) *AppsOperationsGetCall {
  3183. c.ifNoneMatch_ = entityTag
  3184. return c
  3185. }
  3186. // Context sets the context to be used in this call's Do method. Any
  3187. // pending HTTP request will be aborted if the provided context is
  3188. // canceled.
  3189. func (c *AppsOperationsGetCall) Context(ctx context.Context) *AppsOperationsGetCall {
  3190. c.ctx_ = ctx
  3191. return c
  3192. }
  3193. // Header returns an http.Header that can be modified by the caller to
  3194. // add HTTP headers to the request.
  3195. func (c *AppsOperationsGetCall) Header() http.Header {
  3196. if c.header_ == nil {
  3197. c.header_ = make(http.Header)
  3198. }
  3199. return c.header_
  3200. }
  3201. func (c *AppsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
  3202. reqHeaders := make(http.Header)
  3203. for k, v := range c.header_ {
  3204. reqHeaders[k] = v
  3205. }
  3206. reqHeaders.Set("User-Agent", c.s.userAgent())
  3207. if c.ifNoneMatch_ != "" {
  3208. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3209. }
  3210. var body io.Reader = nil
  3211. c.urlParams_.Set("alt", alt)
  3212. c.urlParams_.Set("prettyPrint", "false")
  3213. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/apps/{appsId}/operations/{operationsId}")
  3214. urls += "?" + c.urlParams_.Encode()
  3215. req, err := http.NewRequest("GET", urls, body)
  3216. if err != nil {
  3217. return nil, err
  3218. }
  3219. req.Header = reqHeaders
  3220. googleapi.Expand(req.URL, map[string]string{
  3221. "appsId": c.appsId,
  3222. "operationsId": c.operationsId,
  3223. })
  3224. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3225. }
  3226. // Do executes the "appengine.apps.operations.get" call.
  3227. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  3228. // status code is an error. Response headers are in either
  3229. // *Operation.ServerResponse.Header or (if a response was returned at
  3230. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  3231. // to check whether the returned error was because
  3232. // http.StatusNotModified was returned.
  3233. func (c *AppsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3234. gensupport.SetOptions(c.urlParams_, opts...)
  3235. res, err := c.doRequest("json")
  3236. if res != nil && res.StatusCode == http.StatusNotModified {
  3237. if res.Body != nil {
  3238. res.Body.Close()
  3239. }
  3240. return nil, &googleapi.Error{
  3241. Code: res.StatusCode,
  3242. Header: res.Header,
  3243. }
  3244. }
  3245. if err != nil {
  3246. return nil, err
  3247. }
  3248. defer googleapi.CloseBody(res)
  3249. if err := googleapi.CheckResponse(res); err != nil {
  3250. return nil, err
  3251. }
  3252. ret := &Operation{
  3253. ServerResponse: googleapi.ServerResponse{
  3254. Header: res.Header,
  3255. HTTPStatusCode: res.StatusCode,
  3256. },
  3257. }
  3258. target := &ret
  3259. if err := gensupport.DecodeResponse(target, res); err != nil {
  3260. return nil, err
  3261. }
  3262. return ret, nil
  3263. // {
  3264. // "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.",
  3265. // "flatPath": "v1alpha/apps/{appsId}/operations/{operationsId}",
  3266. // "httpMethod": "GET",
  3267. // "id": "appengine.apps.operations.get",
  3268. // "parameterOrder": [
  3269. // "appsId",
  3270. // "operationsId"
  3271. // ],
  3272. // "parameters": {
  3273. // "appsId": {
  3274. // "description": "Part of `name`. The name of the operation resource.",
  3275. // "location": "path",
  3276. // "required": true,
  3277. // "type": "string"
  3278. // },
  3279. // "operationsId": {
  3280. // "description": "Part of `name`. See documentation of `appsId`.",
  3281. // "location": "path",
  3282. // "required": true,
  3283. // "type": "string"
  3284. // }
  3285. // },
  3286. // "path": "v1alpha/apps/{appsId}/operations/{operationsId}",
  3287. // "response": {
  3288. // "$ref": "Operation"
  3289. // },
  3290. // "scopes": [
  3291. // "https://www.googleapis.com/auth/appengine.admin",
  3292. // "https://www.googleapis.com/auth/cloud-platform",
  3293. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  3294. // ]
  3295. // }
  3296. }
  3297. // method id "appengine.apps.operations.list":
  3298. type AppsOperationsListCall struct {
  3299. s *APIService
  3300. appsId string
  3301. urlParams_ gensupport.URLParams
  3302. ifNoneMatch_ string
  3303. ctx_ context.Context
  3304. header_ http.Header
  3305. }
  3306. // List: Lists operations that match the specified filter in the
  3307. // request. If the server doesn't support this method, it returns
  3308. // UNIMPLEMENTED.NOTE: the name binding allows API services to override
  3309. // the binding to use different resource name schemes, such as
  3310. // users/*/operations. To override the binding, API services can add a
  3311. // binding such as "/v1/{name=users/*}/operations" to their service
  3312. // configuration. For backwards compatibility, the default name includes
  3313. // the operations collection id, however overriding users must ensure
  3314. // the name binding is the parent resource, without the operations
  3315. // collection id.
  3316. func (r *AppsOperationsService) List(appsId string) *AppsOperationsListCall {
  3317. c := &AppsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3318. c.appsId = appsId
  3319. return c
  3320. }
  3321. // Filter sets the optional parameter "filter": The standard list
  3322. // filter.
  3323. func (c *AppsOperationsListCall) Filter(filter string) *AppsOperationsListCall {
  3324. c.urlParams_.Set("filter", filter)
  3325. return c
  3326. }
  3327. // PageSize sets the optional parameter "pageSize": The standard list
  3328. // page size.
  3329. func (c *AppsOperationsListCall) PageSize(pageSize int64) *AppsOperationsListCall {
  3330. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  3331. return c
  3332. }
  3333. // PageToken sets the optional parameter "pageToken": The standard list
  3334. // page token.
  3335. func (c *AppsOperationsListCall) PageToken(pageToken string) *AppsOperationsListCall {
  3336. c.urlParams_.Set("pageToken", pageToken)
  3337. return c
  3338. }
  3339. // Fields allows partial responses to be retrieved. See
  3340. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3341. // for more information.
  3342. func (c *AppsOperationsListCall) Fields(s ...googleapi.Field) *AppsOperationsListCall {
  3343. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3344. return c
  3345. }
  3346. // IfNoneMatch sets the optional parameter which makes the operation
  3347. // fail if the object's ETag matches the given value. This is useful for
  3348. // getting updates only after the object has changed since the last
  3349. // request. Use googleapi.IsNotModified to check whether the response
  3350. // error from Do is the result of In-None-Match.
  3351. func (c *AppsOperationsListCall) IfNoneMatch(entityTag string) *AppsOperationsListCall {
  3352. c.ifNoneMatch_ = entityTag
  3353. return c
  3354. }
  3355. // Context sets the context to be used in this call's Do method. Any
  3356. // pending HTTP request will be aborted if the provided context is
  3357. // canceled.
  3358. func (c *AppsOperationsListCall) Context(ctx context.Context) *AppsOperationsListCall {
  3359. c.ctx_ = ctx
  3360. return c
  3361. }
  3362. // Header returns an http.Header that can be modified by the caller to
  3363. // add HTTP headers to the request.
  3364. func (c *AppsOperationsListCall) Header() http.Header {
  3365. if c.header_ == nil {
  3366. c.header_ = make(http.Header)
  3367. }
  3368. return c.header_
  3369. }
  3370. func (c *AppsOperationsListCall) doRequest(alt string) (*http.Response, error) {
  3371. reqHeaders := make(http.Header)
  3372. for k, v := range c.header_ {
  3373. reqHeaders[k] = v
  3374. }
  3375. reqHeaders.Set("User-Agent", c.s.userAgent())
  3376. if c.ifNoneMatch_ != "" {
  3377. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3378. }
  3379. var body io.Reader = nil
  3380. c.urlParams_.Set("alt", alt)
  3381. c.urlParams_.Set("prettyPrint", "false")
  3382. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/apps/{appsId}/operations")
  3383. urls += "?" + c.urlParams_.Encode()
  3384. req, err := http.NewRequest("GET", urls, body)
  3385. if err != nil {
  3386. return nil, err
  3387. }
  3388. req.Header = reqHeaders
  3389. googleapi.Expand(req.URL, map[string]string{
  3390. "appsId": c.appsId,
  3391. })
  3392. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3393. }
  3394. // Do executes the "appengine.apps.operations.list" call.
  3395. // Exactly one of *ListOperationsResponse or error will be non-nil. Any
  3396. // non-2xx status code is an error. Response headers are in either
  3397. // *ListOperationsResponse.ServerResponse.Header or (if a response was
  3398. // returned at all) in error.(*googleapi.Error).Header. Use
  3399. // googleapi.IsNotModified to check whether the returned error was
  3400. // because http.StatusNotModified was returned.
  3401. func (c *AppsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
  3402. gensupport.SetOptions(c.urlParams_, opts...)
  3403. res, err := c.doRequest("json")
  3404. if res != nil && res.StatusCode == http.StatusNotModified {
  3405. if res.Body != nil {
  3406. res.Body.Close()
  3407. }
  3408. return nil, &googleapi.Error{
  3409. Code: res.StatusCode,
  3410. Header: res.Header,
  3411. }
  3412. }
  3413. if err != nil {
  3414. return nil, err
  3415. }
  3416. defer googleapi.CloseBody(res)
  3417. if err := googleapi.CheckResponse(res); err != nil {
  3418. return nil, err
  3419. }
  3420. ret := &ListOperationsResponse{
  3421. ServerResponse: googleapi.ServerResponse{
  3422. Header: res.Header,
  3423. HTTPStatusCode: res.StatusCode,
  3424. },
  3425. }
  3426. target := &ret
  3427. if err := gensupport.DecodeResponse(target, res); err != nil {
  3428. return nil, err
  3429. }
  3430. return ret, nil
  3431. // {
  3432. // "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.",
  3433. // "flatPath": "v1alpha/apps/{appsId}/operations",
  3434. // "httpMethod": "GET",
  3435. // "id": "appengine.apps.operations.list",
  3436. // "parameterOrder": [
  3437. // "appsId"
  3438. // ],
  3439. // "parameters": {
  3440. // "appsId": {
  3441. // "description": "Part of `name`. The name of the operation's parent resource.",
  3442. // "location": "path",
  3443. // "required": true,
  3444. // "type": "string"
  3445. // },
  3446. // "filter": {
  3447. // "description": "The standard list filter.",
  3448. // "location": "query",
  3449. // "type": "string"
  3450. // },
  3451. // "pageSize": {
  3452. // "description": "The standard list page size.",
  3453. // "format": "int32",
  3454. // "location": "query",
  3455. // "type": "integer"
  3456. // },
  3457. // "pageToken": {
  3458. // "description": "The standard list page token.",
  3459. // "location": "query",
  3460. // "type": "string"
  3461. // }
  3462. // },
  3463. // "path": "v1alpha/apps/{appsId}/operations",
  3464. // "response": {
  3465. // "$ref": "ListOperationsResponse"
  3466. // },
  3467. // "scopes": [
  3468. // "https://www.googleapis.com/auth/appengine.admin",
  3469. // "https://www.googleapis.com/auth/cloud-platform",
  3470. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  3471. // ]
  3472. // }
  3473. }
  3474. // Pages invokes f for each page of results.
  3475. // A non-nil error returned from f will halt the iteration.
  3476. // The provided context supersedes any context provided to the Context method.
  3477. func (c *AppsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
  3478. c.ctx_ = ctx
  3479. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  3480. for {
  3481. x, err := c.Do()
  3482. if err != nil {
  3483. return err
  3484. }
  3485. if err := f(x); err != nil {
  3486. return err
  3487. }
  3488. if x.NextPageToken == "" {
  3489. return nil
  3490. }
  3491. c.PageToken(x.NextPageToken)
  3492. }
  3493. }