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.
 
 
 

3814 lines
138 KiB

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