Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 
 

1101 Zeilen
39 KiB

  1. // Copyright 2019 Google LLC.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. // Code generated file. DO NOT EDIT.
  5. // Package bigtableadmin provides access to the Cloud Bigtable Admin API.
  6. //
  7. // For product documentation, see: https://cloud.google.com/bigtable/
  8. //
  9. // Creating a client
  10. //
  11. // Usage example:
  12. //
  13. // import "google.golang.org/api/bigtableadmin/v1"
  14. // ...
  15. // ctx := context.Background()
  16. // bigtableadminService, err := bigtableadmin.NewService(ctx)
  17. //
  18. // In this example, Google Application Default Credentials are used for authentication.
  19. //
  20. // For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
  21. //
  22. // Other authentication options
  23. //
  24. // To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
  25. //
  26. // bigtableadminService, err := bigtableadmin.NewService(ctx, option.WithAPIKey("AIza..."))
  27. //
  28. // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
  29. //
  30. // config := &oauth2.Config{...}
  31. // // ...
  32. // token, err := config.Exchange(ctx, ...)
  33. // bigtableadminService, err := bigtableadmin.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
  34. //
  35. // See https://godoc.org/google.golang.org/api/option/ for details on options.
  36. package bigtableadmin // import "google.golang.org/api/bigtableadmin/v1"
  37. import (
  38. "bytes"
  39. "context"
  40. "encoding/json"
  41. "errors"
  42. "fmt"
  43. "io"
  44. "net/http"
  45. "net/url"
  46. "strconv"
  47. "strings"
  48. gensupport "google.golang.org/api/gensupport"
  49. googleapi "google.golang.org/api/googleapi"
  50. option "google.golang.org/api/option"
  51. htransport "google.golang.org/api/transport/http"
  52. )
  53. // Always reference these packages, just in case the auto-generated code
  54. // below doesn't.
  55. var _ = bytes.NewBuffer
  56. var _ = strconv.Itoa
  57. var _ = fmt.Sprintf
  58. var _ = json.NewDecoder
  59. var _ = io.Copy
  60. var _ = url.Parse
  61. var _ = gensupport.MarshalJSON
  62. var _ = googleapi.Version
  63. var _ = errors.New
  64. var _ = strings.Replace
  65. var _ = context.Canceled
  66. const apiId = "bigtableadmin:v1"
  67. const apiName = "bigtableadmin"
  68. const apiVersion = "v1"
  69. const basePath = "https://bigtableadmin.googleapis.com/"
  70. // NewService creates a new Service.
  71. func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
  72. client, endpoint, err := htransport.NewClient(ctx, opts...)
  73. if err != nil {
  74. return nil, err
  75. }
  76. s, err := New(client)
  77. if err != nil {
  78. return nil, err
  79. }
  80. if endpoint != "" {
  81. s.BasePath = endpoint
  82. }
  83. return s, nil
  84. }
  85. // New creates a new Service. It uses the provided http.Client for requests.
  86. //
  87. // Deprecated: please use NewService instead.
  88. // To provide a custom HTTP client, use option.WithHTTPClient.
  89. // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
  90. func New(client *http.Client) (*Service, error) {
  91. if client == nil {
  92. return nil, errors.New("client is nil")
  93. }
  94. s := &Service{client: client, BasePath: basePath}
  95. s.Projects = NewProjectsService(s)
  96. return s, nil
  97. }
  98. type Service struct {
  99. client *http.Client
  100. BasePath string // API endpoint base URL
  101. UserAgent string // optional additional User-Agent fragment
  102. Projects *ProjectsService
  103. }
  104. func (s *Service) userAgent() string {
  105. if s.UserAgent == "" {
  106. return googleapi.UserAgent
  107. }
  108. return googleapi.UserAgent + " " + s.UserAgent
  109. }
  110. func NewProjectsService(s *Service) *ProjectsService {
  111. rs := &ProjectsService{s: s}
  112. rs.Locations = NewProjectsLocationsService(s)
  113. return rs
  114. }
  115. type ProjectsService struct {
  116. s *Service
  117. Locations *ProjectsLocationsService
  118. }
  119. func NewProjectsLocationsService(s *Service) *ProjectsLocationsService {
  120. rs := &ProjectsLocationsService{s: s}
  121. return rs
  122. }
  123. type ProjectsLocationsService struct {
  124. s *Service
  125. }
  126. // Cluster: A resizable group of nodes in a particular cloud location,
  127. // capable
  128. // of serving all Tables in the parent
  129. // Instance.
  130. type Cluster struct {
  131. // DefaultStorageType: (`CreationOnly`)
  132. // The type of storage used by this cluster to serve its
  133. // parent instance's tables, unless explicitly overridden.
  134. //
  135. // Possible values:
  136. // "STORAGE_TYPE_UNSPECIFIED" - The user did not specify a storage
  137. // type.
  138. // "SSD" - Flash (SSD) storage should be used.
  139. // "HDD" - Magnetic drive (HDD) storage should be used.
  140. DefaultStorageType string `json:"defaultStorageType,omitempty"`
  141. // Location: (`CreationOnly`)
  142. // The location where this cluster's nodes and storage reside. For
  143. // best
  144. // performance, clients should be located as close as possible to
  145. // this
  146. // cluster. Currently only zones are supported, so values should be of
  147. // the
  148. // form `projects/<project>/locations/<zone>`.
  149. Location string `json:"location,omitempty"`
  150. // Name: (`OutputOnly`)
  151. // The unique name of the cluster. Values are of the
  152. // form
  153. // `projects/<project>/instances/<instance>/clusters/a-z*`.
  154. Name string `json:"name,omitempty"`
  155. // ServeNodes: The number of nodes allocated to this cluster. More nodes
  156. // enable higher
  157. // throughput and more consistent performance.
  158. ServeNodes int64 `json:"serveNodes,omitempty"`
  159. // State: (`OutputOnly`)
  160. // The current state of the cluster.
  161. //
  162. // Possible values:
  163. // "STATE_NOT_KNOWN" - The state of the cluster could not be
  164. // determined.
  165. // "READY" - The cluster has been successfully created and is ready to
  166. // serve requests.
  167. // "CREATING" - The cluster is currently being created, and may be
  168. // destroyed
  169. // if the creation process encounters an error.
  170. // A cluster may not be able to serve requests while being created.
  171. // "RESIZING" - The cluster is currently being resized, and may revert
  172. // to its previous
  173. // node count if the process encounters an error.
  174. // A cluster is still capable of serving requests while being
  175. // resized,
  176. // but may exhibit performance as if its number of allocated nodes
  177. // is
  178. // between the starting and requested states.
  179. // "DISABLED" - The cluster has no backing nodes. The data (tables)
  180. // still
  181. // exist, but no operations can be performed on the cluster.
  182. State string `json:"state,omitempty"`
  183. // ForceSendFields is a list of field names (e.g. "DefaultStorageType")
  184. // to unconditionally include in API requests. By default, fields with
  185. // empty values are omitted from API requests. However, any non-pointer,
  186. // non-interface field appearing in ForceSendFields will be sent to the
  187. // server regardless of whether the field is empty or not. This may be
  188. // used to include empty fields in Patch requests.
  189. ForceSendFields []string `json:"-"`
  190. // NullFields is a list of field names (e.g. "DefaultStorageType") to
  191. // include in API requests with the JSON null value. By default, fields
  192. // with empty values are omitted from API requests. However, any field
  193. // with an empty value appearing in NullFields will be sent to the
  194. // server as null. It is an error if a field in this list has a
  195. // non-empty value. This may be used to include null fields in Patch
  196. // requests.
  197. NullFields []string `json:"-"`
  198. }
  199. func (s *Cluster) MarshalJSON() ([]byte, error) {
  200. type NoMethod Cluster
  201. raw := NoMethod(*s)
  202. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  203. }
  204. // CreateClusterMetadata: The metadata for the Operation returned by
  205. // CreateCluster.
  206. type CreateClusterMetadata struct {
  207. // FinishTime: The time at which the operation failed or was completed
  208. // successfully.
  209. FinishTime string `json:"finishTime,omitempty"`
  210. // OriginalRequest: The request that prompted the initiation of this
  211. // CreateCluster operation.
  212. OriginalRequest *CreateClusterRequest `json:"originalRequest,omitempty"`
  213. // RequestTime: The time at which the original request was received.
  214. RequestTime string `json:"requestTime,omitempty"`
  215. // Tables: Keys: the full `name` of each table that existed in the
  216. // instance when
  217. // CreateCluster was first called,
  218. // i.e.
  219. // `projects/<project>/instances/<instance>/tables/<table>`. Any table
  220. // added
  221. // to the instance by a later API call will be created in the new
  222. // cluster by
  223. // that API call, not this one.
  224. //
  225. // Values: information on how much of a table's data has been copied to
  226. // the
  227. // newly-created cluster so far.
  228. Tables map[string]TableProgress `json:"tables,omitempty"`
  229. // ForceSendFields is a list of field names (e.g. "FinishTime") to
  230. // unconditionally include in API requests. By default, fields with
  231. // empty values are omitted from API requests. However, any non-pointer,
  232. // non-interface field appearing in ForceSendFields will be sent to the
  233. // server regardless of whether the field is empty or not. This may be
  234. // used to include empty fields in Patch requests.
  235. ForceSendFields []string `json:"-"`
  236. // NullFields is a list of field names (e.g. "FinishTime") to include in
  237. // API requests with the JSON null value. By default, fields with empty
  238. // values are omitted from API requests. However, any field with an
  239. // empty value appearing in NullFields will be sent to the server as
  240. // null. It is an error if a field in this list has a non-empty value.
  241. // This may be used to include null fields in Patch requests.
  242. NullFields []string `json:"-"`
  243. }
  244. func (s *CreateClusterMetadata) MarshalJSON() ([]byte, error) {
  245. type NoMethod CreateClusterMetadata
  246. raw := NoMethod(*s)
  247. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  248. }
  249. // CreateClusterRequest: Request message for
  250. // BigtableInstanceAdmin.CreateCluster.
  251. type CreateClusterRequest struct {
  252. // Cluster: The cluster to be created.
  253. // Fields marked `OutputOnly` must be left blank.
  254. Cluster *Cluster `json:"cluster,omitempty"`
  255. // ClusterId: The ID to be used when referring to the new cluster within
  256. // its instance,
  257. // e.g., just `mycluster` rather
  258. // than
  259. // `projects/myproject/instances/myinstance/clusters/mycluster`.
  260. ClusterId string `json:"clusterId,omitempty"`
  261. // Parent: The unique name of the instance in which to create the new
  262. // cluster.
  263. // Values are of the form
  264. // `projects/<project>/instances/<instance>`.
  265. Parent string `json:"parent,omitempty"`
  266. // ForceSendFields is a list of field names (e.g. "Cluster") to
  267. // unconditionally include in API requests. By default, fields with
  268. // empty values are omitted from API requests. However, any non-pointer,
  269. // non-interface field appearing in ForceSendFields will be sent to the
  270. // server regardless of whether the field is empty or not. This may be
  271. // used to include empty fields in Patch requests.
  272. ForceSendFields []string `json:"-"`
  273. // NullFields is a list of field names (e.g. "Cluster") to include in
  274. // API requests with the JSON null value. By default, fields with empty
  275. // values are omitted from API requests. However, any field with an
  276. // empty value appearing in NullFields will be sent to the server as
  277. // null. It is an error if a field in this list has a non-empty value.
  278. // This may be used to include null fields in Patch requests.
  279. NullFields []string `json:"-"`
  280. }
  281. func (s *CreateClusterRequest) MarshalJSON() ([]byte, error) {
  282. type NoMethod CreateClusterRequest
  283. raw := NoMethod(*s)
  284. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  285. }
  286. // CreateInstanceMetadata: The metadata for the Operation returned by
  287. // CreateInstance.
  288. type CreateInstanceMetadata struct {
  289. // FinishTime: The time at which the operation failed or was completed
  290. // successfully.
  291. FinishTime string `json:"finishTime,omitempty"`
  292. // OriginalRequest: The request that prompted the initiation of this
  293. // CreateInstance operation.
  294. OriginalRequest *CreateInstanceRequest `json:"originalRequest,omitempty"`
  295. // RequestTime: The time at which the original request was received.
  296. RequestTime string `json:"requestTime,omitempty"`
  297. // ForceSendFields is a list of field names (e.g. "FinishTime") 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. "FinishTime") to include in
  305. // API requests with the JSON null value. By default, fields with empty
  306. // values are omitted from API requests. However, any field with an
  307. // 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 *CreateInstanceMetadata) MarshalJSON() ([]byte, error) {
  313. type NoMethod CreateInstanceMetadata
  314. raw := NoMethod(*s)
  315. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  316. }
  317. // CreateInstanceRequest: Request message for
  318. // BigtableInstanceAdmin.CreateInstance.
  319. type CreateInstanceRequest struct {
  320. // Clusters: The clusters to be created within the instance, mapped by
  321. // desired
  322. // cluster ID, e.g., just `mycluster` rather
  323. // than
  324. // `projects/myproject/instances/myinstance/clusters/mycluster`.
  325. // Fie
  326. // lds marked `OutputOnly` must be left blank.
  327. // Currently, at most two clusters can be specified.
  328. Clusters map[string]Cluster `json:"clusters,omitempty"`
  329. // Instance: The instance to create.
  330. // Fields marked `OutputOnly` must be left blank.
  331. Instance *Instance `json:"instance,omitempty"`
  332. // InstanceId: The ID to be used when referring to the new instance
  333. // within its project,
  334. // e.g., just `myinstance` rather
  335. // than
  336. // `projects/myproject/instances/myinstance`.
  337. InstanceId string `json:"instanceId,omitempty"`
  338. // Parent: The unique name of the project in which to create the new
  339. // instance.
  340. // Values are of the form `projects/<project>`.
  341. Parent string `json:"parent,omitempty"`
  342. // ForceSendFields is a list of field names (e.g. "Clusters") to
  343. // unconditionally include in API requests. By default, fields with
  344. // empty values are omitted from API requests. However, any non-pointer,
  345. // non-interface field appearing in ForceSendFields will be sent to the
  346. // server regardless of whether the field is empty or not. This may be
  347. // used to include empty fields in Patch requests.
  348. ForceSendFields []string `json:"-"`
  349. // NullFields is a list of field names (e.g. "Clusters") to include in
  350. // API requests with the JSON null value. By default, fields with empty
  351. // values are omitted from API requests. However, any field with an
  352. // empty value appearing in NullFields will be sent to the server as
  353. // null. It is an error if a field in this list has a non-empty value.
  354. // This may be used to include null fields in Patch requests.
  355. NullFields []string `json:"-"`
  356. }
  357. func (s *CreateInstanceRequest) MarshalJSON() ([]byte, error) {
  358. type NoMethod CreateInstanceRequest
  359. raw := NoMethod(*s)
  360. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  361. }
  362. // Instance: A collection of Bigtable Tables and
  363. // the resources that serve them.
  364. // All tables in an instance are served from all
  365. // Clusters in the instance.
  366. type Instance struct {
  367. // DisplayName: The descriptive name for this instance as it appears in
  368. // UIs.
  369. // Can be changed at any time, but should be kept globally unique
  370. // to avoid confusion.
  371. DisplayName string `json:"displayName,omitempty"`
  372. // Labels: Labels are a flexible and lightweight mechanism for
  373. // organizing cloud
  374. // resources into groups that reflect a customer's organizational needs
  375. // and
  376. // deployment strategies. They can be used to filter resources and
  377. // aggregate
  378. // metrics.
  379. //
  380. // * Label keys must be between 1 and 63 characters long and must
  381. // conform to
  382. // the regular expression: `\p{Ll}\p{Lo}{0,62}`.
  383. // * Label values must be between 0 and 63 characters long and must
  384. // conform to
  385. // the regular expression: `[\p{Ll}\p{Lo}\p{N}_-]{0,63}`.
  386. // * No more than 64 labels can be associated with a given resource.
  387. // * Keys and values must both be under 128 bytes.
  388. Labels map[string]string `json:"labels,omitempty"`
  389. // Name: (`OutputOnly`)
  390. // The unique name of the instance. Values are of the
  391. // form
  392. // `projects/<project>/instances/a-z+[a-z0-9]`.
  393. Name string `json:"name,omitempty"`
  394. // State: (`OutputOnly`)
  395. // The current state of the instance.
  396. //
  397. // Possible values:
  398. // "STATE_NOT_KNOWN" - The state of the instance could not be
  399. // determined.
  400. // "READY" - The instance has been successfully created and can serve
  401. // requests
  402. // to its tables.
  403. // "CREATING" - The instance is currently being created, and may be
  404. // destroyed
  405. // if the creation process encounters an error.
  406. State string `json:"state,omitempty"`
  407. // Type: The type of the instance. Defaults to `PRODUCTION`.
  408. //
  409. // Possible values:
  410. // "TYPE_UNSPECIFIED" - The type of the instance is unspecified. If
  411. // set when creating an
  412. // instance, a `PRODUCTION` instance will be created. If set when
  413. // updating
  414. // an instance, the type will be left unchanged.
  415. // "PRODUCTION" - An instance meant for production use. `serve_nodes`
  416. // must be set
  417. // on the cluster.
  418. // "DEVELOPMENT" - The instance is meant for development and testing
  419. // purposes only; it has
  420. // no performance or uptime guarantees and is not covered by SLA.
  421. // After a development instance is created, it can be upgraded
  422. // by
  423. // updating the instance to type `PRODUCTION`. An instance created
  424. // as a production instance cannot be changed to a development
  425. // instance.
  426. // When creating a development instance, `serve_nodes` on the cluster
  427. // must
  428. // not be set.
  429. Type string `json:"type,omitempty"`
  430. // ForceSendFields is a list of field names (e.g. "DisplayName") to
  431. // unconditionally include in API requests. By default, fields with
  432. // empty values are omitted from API requests. However, any non-pointer,
  433. // non-interface field appearing in ForceSendFields will be sent to the
  434. // server regardless of whether the field is empty or not. This may be
  435. // used to include empty fields in Patch requests.
  436. ForceSendFields []string `json:"-"`
  437. // NullFields is a list of field names (e.g. "DisplayName") to include
  438. // in API requests with the JSON null value. By default, fields with
  439. // empty values are omitted from API requests. However, any field with
  440. // an empty value appearing in NullFields will be sent to the server as
  441. // null. It is an error if a field in this list has a non-empty value.
  442. // This may be used to include null fields in Patch requests.
  443. NullFields []string `json:"-"`
  444. }
  445. func (s *Instance) MarshalJSON() ([]byte, error) {
  446. type NoMethod Instance
  447. raw := NoMethod(*s)
  448. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  449. }
  450. // ListLocationsResponse: The response message for
  451. // Locations.ListLocations.
  452. type ListLocationsResponse struct {
  453. // Locations: A list of locations that matches the specified filter in
  454. // the request.
  455. Locations []*Location `json:"locations,omitempty"`
  456. // NextPageToken: The standard List next-page token.
  457. NextPageToken string `json:"nextPageToken,omitempty"`
  458. // ServerResponse contains the HTTP response code and headers from the
  459. // server.
  460. googleapi.ServerResponse `json:"-"`
  461. // ForceSendFields is a list of field names (e.g. "Locations") to
  462. // unconditionally include in API requests. By default, fields with
  463. // empty values are omitted from API requests. However, any non-pointer,
  464. // non-interface field appearing in ForceSendFields will be sent to the
  465. // server regardless of whether the field is empty or not. This may be
  466. // used to include empty fields in Patch requests.
  467. ForceSendFields []string `json:"-"`
  468. // NullFields is a list of field names (e.g. "Locations") to include in
  469. // API requests with the JSON null value. By default, fields with empty
  470. // values are omitted from API requests. However, any field with an
  471. // empty value appearing in NullFields will be sent to the server as
  472. // null. It is an error if a field in this list has a non-empty value.
  473. // This may be used to include null fields in Patch requests.
  474. NullFields []string `json:"-"`
  475. }
  476. func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) {
  477. type NoMethod ListLocationsResponse
  478. raw := NoMethod(*s)
  479. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  480. }
  481. // Location: A resource that represents Google Cloud Platform location.
  482. type Location struct {
  483. // DisplayName: The friendly name for this location, typically a nearby
  484. // city name.
  485. // For example, "Tokyo".
  486. DisplayName string `json:"displayName,omitempty"`
  487. // Labels: Cross-service attributes for the location. For example
  488. //
  489. // {"cloud.googleapis.com/region": "us-east1"}
  490. Labels map[string]string `json:"labels,omitempty"`
  491. // LocationId: The canonical id for this location. For example:
  492. // "us-east1".
  493. LocationId string `json:"locationId,omitempty"`
  494. // Metadata: Service-specific metadata. For example the available
  495. // capacity at the given
  496. // location.
  497. Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  498. // Name: Resource name for the location, which may vary between
  499. // implementations.
  500. // For example: "projects/example-project/locations/us-east1"
  501. Name string `json:"name,omitempty"`
  502. // ServerResponse contains the HTTP response code and headers from the
  503. // server.
  504. googleapi.ServerResponse `json:"-"`
  505. // ForceSendFields is a list of field names (e.g. "DisplayName") to
  506. // unconditionally include in API requests. By default, fields with
  507. // empty values are omitted from API requests. However, any non-pointer,
  508. // non-interface field appearing in ForceSendFields will be sent to the
  509. // server regardless of whether the field is empty or not. This may be
  510. // used to include empty fields in Patch requests.
  511. ForceSendFields []string `json:"-"`
  512. // NullFields is a list of field names (e.g. "DisplayName") to include
  513. // in API requests with the JSON null value. By default, fields with
  514. // empty values are omitted from API requests. However, any field with
  515. // an empty value appearing in NullFields will be sent to the server as
  516. // null. It is an error if a field in this list has a non-empty value.
  517. // This may be used to include null fields in Patch requests.
  518. NullFields []string `json:"-"`
  519. }
  520. func (s *Location) MarshalJSON() ([]byte, error) {
  521. type NoMethod Location
  522. raw := NoMethod(*s)
  523. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  524. }
  525. // PartialUpdateInstanceRequest: Request message for
  526. // BigtableInstanceAdmin.PartialUpdateInstance.
  527. type PartialUpdateInstanceRequest struct {
  528. // Instance: The Instance which will (partially) replace the current
  529. // value.
  530. Instance *Instance `json:"instance,omitempty"`
  531. // UpdateMask: The subset of Instance fields which should be
  532. // replaced.
  533. // Must be explicitly set.
  534. UpdateMask string `json:"updateMask,omitempty"`
  535. // ForceSendFields is a list of field names (e.g. "Instance") to
  536. // unconditionally include in API requests. By default, fields with
  537. // empty values are omitted from API requests. However, any non-pointer,
  538. // non-interface field appearing in ForceSendFields will be sent to the
  539. // server regardless of whether the field is empty or not. This may be
  540. // used to include empty fields in Patch requests.
  541. ForceSendFields []string `json:"-"`
  542. // NullFields is a list of field names (e.g. "Instance") to include in
  543. // API requests with the JSON null value. By default, fields with empty
  544. // values are omitted from API requests. However, any field with an
  545. // empty value appearing in NullFields will be sent to the server as
  546. // null. It is an error if a field in this list has a non-empty value.
  547. // This may be used to include null fields in Patch requests.
  548. NullFields []string `json:"-"`
  549. }
  550. func (s *PartialUpdateInstanceRequest) MarshalJSON() ([]byte, error) {
  551. type NoMethod PartialUpdateInstanceRequest
  552. raw := NoMethod(*s)
  553. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  554. }
  555. // TableProgress: Progress info for copying a table's data to the new
  556. // cluster.
  557. type TableProgress struct {
  558. // EstimatedCopiedBytes: Estimate of the number of bytes copied so far
  559. // for this table.
  560. // This will eventually reach 'estimated_size_bytes' unless the table
  561. // copy
  562. // is CANCELLED.
  563. EstimatedCopiedBytes int64 `json:"estimatedCopiedBytes,omitempty,string"`
  564. // EstimatedSizeBytes: Estimate of the size of the table to be copied.
  565. EstimatedSizeBytes int64 `json:"estimatedSizeBytes,omitempty,string"`
  566. // Possible values:
  567. // "STATE_UNSPECIFIED"
  568. // "PENDING" - The table has not yet begun copying to the new cluster.
  569. // "COPYING" - The table is actively being copied to the new cluster.
  570. // "COMPLETED" - The table has been fully copied to the new cluster.
  571. // "CANCELLED" - The table was deleted before it finished copying to
  572. // the new cluster.
  573. // Note that tables deleted after completion will stay marked
  574. // as
  575. // COMPLETED, not CANCELLED.
  576. State string `json:"state,omitempty"`
  577. // ForceSendFields is a list of field names (e.g.
  578. // "EstimatedCopiedBytes") to unconditionally include in API requests.
  579. // By default, fields with empty values are omitted from API requests.
  580. // However, any non-pointer, non-interface field appearing in
  581. // ForceSendFields will be sent to the server regardless of whether the
  582. // field is empty or not. This may be used to include empty fields in
  583. // Patch requests.
  584. ForceSendFields []string `json:"-"`
  585. // NullFields is a list of field names (e.g. "EstimatedCopiedBytes") to
  586. // include in API requests with the JSON null value. By default, fields
  587. // with empty values are omitted from API requests. However, any field
  588. // with an empty value appearing in NullFields will be sent to the
  589. // server as null. It is an error if a field in this list has a
  590. // non-empty value. This may be used to include null fields in Patch
  591. // requests.
  592. NullFields []string `json:"-"`
  593. }
  594. func (s *TableProgress) MarshalJSON() ([]byte, error) {
  595. type NoMethod TableProgress
  596. raw := NoMethod(*s)
  597. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  598. }
  599. // UpdateAppProfileMetadata: The metadata for the Operation returned by
  600. // UpdateAppProfile.
  601. type UpdateAppProfileMetadata struct {
  602. }
  603. // UpdateClusterMetadata: The metadata for the Operation returned by
  604. // UpdateCluster.
  605. type UpdateClusterMetadata struct {
  606. // FinishTime: The time at which the operation failed or was completed
  607. // successfully.
  608. FinishTime string `json:"finishTime,omitempty"`
  609. // OriginalRequest: The request that prompted the initiation of this
  610. // UpdateCluster operation.
  611. OriginalRequest *Cluster `json:"originalRequest,omitempty"`
  612. // RequestTime: The time at which the original request was received.
  613. RequestTime string `json:"requestTime,omitempty"`
  614. // ForceSendFields is a list of field names (e.g. "FinishTime") to
  615. // unconditionally include in API requests. By default, fields with
  616. // empty values are omitted from API requests. However, any non-pointer,
  617. // non-interface field appearing in ForceSendFields will be sent to the
  618. // server regardless of whether the field is empty or not. This may be
  619. // used to include empty fields in Patch requests.
  620. ForceSendFields []string `json:"-"`
  621. // NullFields is a list of field names (e.g. "FinishTime") to include in
  622. // API requests with the JSON null value. By default, fields with empty
  623. // values are omitted from API requests. However, any field with an
  624. // empty value appearing in NullFields will be sent to the server as
  625. // null. It is an error if a field in this list has a non-empty value.
  626. // This may be used to include null fields in Patch requests.
  627. NullFields []string `json:"-"`
  628. }
  629. func (s *UpdateClusterMetadata) MarshalJSON() ([]byte, error) {
  630. type NoMethod UpdateClusterMetadata
  631. raw := NoMethod(*s)
  632. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  633. }
  634. // UpdateInstanceMetadata: The metadata for the Operation returned by
  635. // UpdateInstance.
  636. type UpdateInstanceMetadata struct {
  637. // FinishTime: The time at which the operation failed or was completed
  638. // successfully.
  639. FinishTime string `json:"finishTime,omitempty"`
  640. // OriginalRequest: The request that prompted the initiation of this
  641. // UpdateInstance operation.
  642. OriginalRequest *PartialUpdateInstanceRequest `json:"originalRequest,omitempty"`
  643. // RequestTime: The time at which the original request was received.
  644. RequestTime string `json:"requestTime,omitempty"`
  645. // ForceSendFields is a list of field names (e.g. "FinishTime") to
  646. // unconditionally include in API requests. By default, fields with
  647. // empty values are omitted from API requests. However, any non-pointer,
  648. // non-interface field appearing in ForceSendFields will be sent to the
  649. // server regardless of whether the field is empty or not. This may be
  650. // used to include empty fields in Patch requests.
  651. ForceSendFields []string `json:"-"`
  652. // NullFields is a list of field names (e.g. "FinishTime") to include in
  653. // API requests with the JSON null value. By default, fields with empty
  654. // values are omitted from API requests. However, any field with an
  655. // empty value appearing in NullFields will be sent to the server as
  656. // null. It is an error if a field in this list has a non-empty value.
  657. // This may be used to include null fields in Patch requests.
  658. NullFields []string `json:"-"`
  659. }
  660. func (s *UpdateInstanceMetadata) MarshalJSON() ([]byte, error) {
  661. type NoMethod UpdateInstanceMetadata
  662. raw := NoMethod(*s)
  663. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  664. }
  665. // method id "bigtableadmin.projects.locations.get":
  666. type ProjectsLocationsGetCall struct {
  667. s *Service
  668. name string
  669. urlParams_ gensupport.URLParams
  670. ifNoneMatch_ string
  671. ctx_ context.Context
  672. header_ http.Header
  673. }
  674. // Get: Gets information about a location.
  675. func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall {
  676. c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  677. c.name = name
  678. return c
  679. }
  680. // Fields allows partial responses to be retrieved. See
  681. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  682. // for more information.
  683. func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall {
  684. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  685. return c
  686. }
  687. // IfNoneMatch sets the optional parameter which makes the operation
  688. // fail if the object's ETag matches the given value. This is useful for
  689. // getting updates only after the object has changed since the last
  690. // request. Use googleapi.IsNotModified to check whether the response
  691. // error from Do is the result of In-None-Match.
  692. func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall {
  693. c.ifNoneMatch_ = entityTag
  694. return c
  695. }
  696. // Context sets the context to be used in this call's Do method. Any
  697. // pending HTTP request will be aborted if the provided context is
  698. // canceled.
  699. func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall {
  700. c.ctx_ = ctx
  701. return c
  702. }
  703. // Header returns an http.Header that can be modified by the caller to
  704. // add HTTP headers to the request.
  705. func (c *ProjectsLocationsGetCall) Header() http.Header {
  706. if c.header_ == nil {
  707. c.header_ = make(http.Header)
  708. }
  709. return c.header_
  710. }
  711. func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) {
  712. reqHeaders := make(http.Header)
  713. for k, v := range c.header_ {
  714. reqHeaders[k] = v
  715. }
  716. reqHeaders.Set("User-Agent", c.s.userAgent())
  717. if c.ifNoneMatch_ != "" {
  718. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  719. }
  720. var body io.Reader = nil
  721. c.urlParams_.Set("alt", alt)
  722. c.urlParams_.Set("prettyPrint", "false")
  723. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  724. urls += "?" + c.urlParams_.Encode()
  725. req, err := http.NewRequest("GET", urls, body)
  726. if err != nil {
  727. return nil, err
  728. }
  729. req.Header = reqHeaders
  730. googleapi.Expand(req.URL, map[string]string{
  731. "name": c.name,
  732. })
  733. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  734. }
  735. // Do executes the "bigtableadmin.projects.locations.get" call.
  736. // Exactly one of *Location or error will be non-nil. Any non-2xx status
  737. // code is an error. Response headers are in either
  738. // *Location.ServerResponse.Header or (if a response was returned at
  739. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  740. // to check whether the returned error was because
  741. // http.StatusNotModified was returned.
  742. func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) {
  743. gensupport.SetOptions(c.urlParams_, opts...)
  744. res, err := c.doRequest("json")
  745. if res != nil && res.StatusCode == http.StatusNotModified {
  746. if res.Body != nil {
  747. res.Body.Close()
  748. }
  749. return nil, &googleapi.Error{
  750. Code: res.StatusCode,
  751. Header: res.Header,
  752. }
  753. }
  754. if err != nil {
  755. return nil, err
  756. }
  757. defer googleapi.CloseBody(res)
  758. if err := googleapi.CheckResponse(res); err != nil {
  759. return nil, err
  760. }
  761. ret := &Location{
  762. ServerResponse: googleapi.ServerResponse{
  763. Header: res.Header,
  764. HTTPStatusCode: res.StatusCode,
  765. },
  766. }
  767. target := &ret
  768. if err := gensupport.DecodeResponse(target, res); err != nil {
  769. return nil, err
  770. }
  771. return ret, nil
  772. // {
  773. // "description": "Gets information about a location.",
  774. // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}",
  775. // "httpMethod": "GET",
  776. // "id": "bigtableadmin.projects.locations.get",
  777. // "parameterOrder": [
  778. // "name"
  779. // ],
  780. // "parameters": {
  781. // "name": {
  782. // "description": "Resource name for the location.",
  783. // "location": "path",
  784. // "pattern": "^projects/[^/]+/locations/[^/]+$",
  785. // "required": true,
  786. // "type": "string"
  787. // }
  788. // },
  789. // "path": "v1/{+name}",
  790. // "response": {
  791. // "$ref": "Location"
  792. // }
  793. // }
  794. }
  795. // method id "bigtableadmin.projects.locations.list":
  796. type ProjectsLocationsListCall struct {
  797. s *Service
  798. name string
  799. urlParams_ gensupport.URLParams
  800. ifNoneMatch_ string
  801. ctx_ context.Context
  802. header_ http.Header
  803. }
  804. // List: Lists information about the supported locations for this
  805. // service.
  806. func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall {
  807. c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  808. c.name = name
  809. return c
  810. }
  811. // Filter sets the optional parameter "filter": The standard list
  812. // filter.
  813. func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall {
  814. c.urlParams_.Set("filter", filter)
  815. return c
  816. }
  817. // PageSize sets the optional parameter "pageSize": The standard list
  818. // page size.
  819. func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall {
  820. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  821. return c
  822. }
  823. // PageToken sets the optional parameter "pageToken": The standard list
  824. // page token.
  825. func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall {
  826. c.urlParams_.Set("pageToken", pageToken)
  827. return c
  828. }
  829. // Fields allows partial responses to be retrieved. See
  830. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  831. // for more information.
  832. func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall {
  833. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  834. return c
  835. }
  836. // IfNoneMatch sets the optional parameter which makes the operation
  837. // fail if the object's ETag matches the given value. This is useful for
  838. // getting updates only after the object has changed since the last
  839. // request. Use googleapi.IsNotModified to check whether the response
  840. // error from Do is the result of In-None-Match.
  841. func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall {
  842. c.ifNoneMatch_ = entityTag
  843. return c
  844. }
  845. // Context sets the context to be used in this call's Do method. Any
  846. // pending HTTP request will be aborted if the provided context is
  847. // canceled.
  848. func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall {
  849. c.ctx_ = ctx
  850. return c
  851. }
  852. // Header returns an http.Header that can be modified by the caller to
  853. // add HTTP headers to the request.
  854. func (c *ProjectsLocationsListCall) Header() http.Header {
  855. if c.header_ == nil {
  856. c.header_ = make(http.Header)
  857. }
  858. return c.header_
  859. }
  860. func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) {
  861. reqHeaders := make(http.Header)
  862. for k, v := range c.header_ {
  863. reqHeaders[k] = v
  864. }
  865. reqHeaders.Set("User-Agent", c.s.userAgent())
  866. if c.ifNoneMatch_ != "" {
  867. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  868. }
  869. var body io.Reader = nil
  870. c.urlParams_.Set("alt", alt)
  871. c.urlParams_.Set("prettyPrint", "false")
  872. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/locations")
  873. urls += "?" + c.urlParams_.Encode()
  874. req, err := http.NewRequest("GET", urls, body)
  875. if err != nil {
  876. return nil, err
  877. }
  878. req.Header = reqHeaders
  879. googleapi.Expand(req.URL, map[string]string{
  880. "name": c.name,
  881. })
  882. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  883. }
  884. // Do executes the "bigtableadmin.projects.locations.list" call.
  885. // Exactly one of *ListLocationsResponse or error will be non-nil. Any
  886. // non-2xx status code is an error. Response headers are in either
  887. // *ListLocationsResponse.ServerResponse.Header or (if a response was
  888. // returned at all) in error.(*googleapi.Error).Header. Use
  889. // googleapi.IsNotModified to check whether the returned error was
  890. // because http.StatusNotModified was returned.
  891. func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) {
  892. gensupport.SetOptions(c.urlParams_, opts...)
  893. res, err := c.doRequest("json")
  894. if res != nil && res.StatusCode == http.StatusNotModified {
  895. if res.Body != nil {
  896. res.Body.Close()
  897. }
  898. return nil, &googleapi.Error{
  899. Code: res.StatusCode,
  900. Header: res.Header,
  901. }
  902. }
  903. if err != nil {
  904. return nil, err
  905. }
  906. defer googleapi.CloseBody(res)
  907. if err := googleapi.CheckResponse(res); err != nil {
  908. return nil, err
  909. }
  910. ret := &ListLocationsResponse{
  911. ServerResponse: googleapi.ServerResponse{
  912. Header: res.Header,
  913. HTTPStatusCode: res.StatusCode,
  914. },
  915. }
  916. target := &ret
  917. if err := gensupport.DecodeResponse(target, res); err != nil {
  918. return nil, err
  919. }
  920. return ret, nil
  921. // {
  922. // "description": "Lists information about the supported locations for this service.",
  923. // "flatPath": "v1/projects/{projectsId}/locations",
  924. // "httpMethod": "GET",
  925. // "id": "bigtableadmin.projects.locations.list",
  926. // "parameterOrder": [
  927. // "name"
  928. // ],
  929. // "parameters": {
  930. // "filter": {
  931. // "description": "The standard list filter.",
  932. // "location": "query",
  933. // "type": "string"
  934. // },
  935. // "name": {
  936. // "description": "The resource that owns the locations collection, if applicable.",
  937. // "location": "path",
  938. // "pattern": "^projects/[^/]+$",
  939. // "required": true,
  940. // "type": "string"
  941. // },
  942. // "pageSize": {
  943. // "description": "The standard list page size.",
  944. // "format": "int32",
  945. // "location": "query",
  946. // "type": "integer"
  947. // },
  948. // "pageToken": {
  949. // "description": "The standard list page token.",
  950. // "location": "query",
  951. // "type": "string"
  952. // }
  953. // },
  954. // "path": "v1/{+name}/locations",
  955. // "response": {
  956. // "$ref": "ListLocationsResponse"
  957. // }
  958. // }
  959. }
  960. // Pages invokes f for each page of results.
  961. // A non-nil error returned from f will halt the iteration.
  962. // The provided context supersedes any context provided to the Context method.
  963. func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error {
  964. c.ctx_ = ctx
  965. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  966. for {
  967. x, err := c.Do()
  968. if err != nil {
  969. return err
  970. }
  971. if err := f(x); err != nil {
  972. return err
  973. }
  974. if x.NextPageToken == "" {
  975. return nil
  976. }
  977. c.PageToken(x.NextPageToken)
  978. }
  979. }