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.
 
 
 

7311 lines
257 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/v2"
  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. // By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes:
  25. //
  26. // bigtableadminService, err := bigtableadmin.NewService(ctx, option.WithScopes(bigtableadmin.CloudPlatformReadOnlyScope))
  27. //
  28. // To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
  29. //
  30. // bigtableadminService, err := bigtableadmin.NewService(ctx, option.WithAPIKey("AIza..."))
  31. //
  32. // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
  33. //
  34. // config := &oauth2.Config{...}
  35. // // ...
  36. // token, err := config.Exchange(ctx, ...)
  37. // bigtableadminService, err := bigtableadmin.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
  38. //
  39. // See https://godoc.org/google.golang.org/api/option/ for details on options.
  40. package bigtableadmin // import "google.golang.org/api/bigtableadmin/v2"
  41. import (
  42. "bytes"
  43. "context"
  44. "encoding/json"
  45. "errors"
  46. "fmt"
  47. "io"
  48. "net/http"
  49. "net/url"
  50. "strconv"
  51. "strings"
  52. gensupport "google.golang.org/api/gensupport"
  53. googleapi "google.golang.org/api/googleapi"
  54. option "google.golang.org/api/option"
  55. htransport "google.golang.org/api/transport/http"
  56. )
  57. // Always reference these packages, just in case the auto-generated code
  58. // below doesn't.
  59. var _ = bytes.NewBuffer
  60. var _ = strconv.Itoa
  61. var _ = fmt.Sprintf
  62. var _ = json.NewDecoder
  63. var _ = io.Copy
  64. var _ = url.Parse
  65. var _ = gensupport.MarshalJSON
  66. var _ = googleapi.Version
  67. var _ = errors.New
  68. var _ = strings.Replace
  69. var _ = context.Canceled
  70. const apiId = "bigtableadmin:v2"
  71. const apiName = "bigtableadmin"
  72. const apiVersion = "v2"
  73. const basePath = "https://bigtableadmin.googleapis.com/"
  74. // OAuth2 scopes used by this API.
  75. const (
  76. // Administer your Cloud Bigtable tables and clusters
  77. BigtableAdminScope = "https://www.googleapis.com/auth/bigtable.admin"
  78. // Administer your Cloud Bigtable clusters
  79. BigtableAdminClusterScope = "https://www.googleapis.com/auth/bigtable.admin.cluster"
  80. // Administer your Cloud Bigtable clusters
  81. BigtableAdminInstanceScope = "https://www.googleapis.com/auth/bigtable.admin.instance"
  82. // Administer your Cloud Bigtable tables
  83. BigtableAdminTableScope = "https://www.googleapis.com/auth/bigtable.admin.table"
  84. // Administer your Cloud Bigtable tables and clusters
  85. CloudBigtableAdminScope = "https://www.googleapis.com/auth/cloud-bigtable.admin"
  86. // Administer your Cloud Bigtable clusters
  87. CloudBigtableAdminClusterScope = "https://www.googleapis.com/auth/cloud-bigtable.admin.cluster"
  88. // Administer your Cloud Bigtable tables
  89. CloudBigtableAdminTableScope = "https://www.googleapis.com/auth/cloud-bigtable.admin.table"
  90. // View and manage your data across Google Cloud Platform services
  91. CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
  92. // View your data across Google Cloud Platform services
  93. CloudPlatformReadOnlyScope = "https://www.googleapis.com/auth/cloud-platform.read-only"
  94. )
  95. // NewService creates a new Service.
  96. func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
  97. scopesOption := option.WithScopes(
  98. "https://www.googleapis.com/auth/bigtable.admin",
  99. "https://www.googleapis.com/auth/bigtable.admin.cluster",
  100. "https://www.googleapis.com/auth/bigtable.admin.instance",
  101. "https://www.googleapis.com/auth/bigtable.admin.table",
  102. "https://www.googleapis.com/auth/cloud-bigtable.admin",
  103. "https://www.googleapis.com/auth/cloud-bigtable.admin.cluster",
  104. "https://www.googleapis.com/auth/cloud-bigtable.admin.table",
  105. "https://www.googleapis.com/auth/cloud-platform",
  106. "https://www.googleapis.com/auth/cloud-platform.read-only",
  107. )
  108. // NOTE: prepend, so we don't override user-specified scopes.
  109. opts = append([]option.ClientOption{scopesOption}, opts...)
  110. client, endpoint, err := htransport.NewClient(ctx, opts...)
  111. if err != nil {
  112. return nil, err
  113. }
  114. s, err := New(client)
  115. if err != nil {
  116. return nil, err
  117. }
  118. if endpoint != "" {
  119. s.BasePath = endpoint
  120. }
  121. return s, nil
  122. }
  123. // New creates a new Service. It uses the provided http.Client for requests.
  124. //
  125. // Deprecated: please use NewService instead.
  126. // To provide a custom HTTP client, use option.WithHTTPClient.
  127. // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
  128. func New(client *http.Client) (*Service, error) {
  129. if client == nil {
  130. return nil, errors.New("client is nil")
  131. }
  132. s := &Service{client: client, BasePath: basePath}
  133. s.Operations = NewOperationsService(s)
  134. s.Projects = NewProjectsService(s)
  135. return s, nil
  136. }
  137. type Service struct {
  138. client *http.Client
  139. BasePath string // API endpoint base URL
  140. UserAgent string // optional additional User-Agent fragment
  141. Operations *OperationsService
  142. Projects *ProjectsService
  143. }
  144. func (s *Service) userAgent() string {
  145. if s.UserAgent == "" {
  146. return googleapi.UserAgent
  147. }
  148. return googleapi.UserAgent + " " + s.UserAgent
  149. }
  150. func NewOperationsService(s *Service) *OperationsService {
  151. rs := &OperationsService{s: s}
  152. rs.Projects = NewOperationsProjectsService(s)
  153. return rs
  154. }
  155. type OperationsService struct {
  156. s *Service
  157. Projects *OperationsProjectsService
  158. }
  159. func NewOperationsProjectsService(s *Service) *OperationsProjectsService {
  160. rs := &OperationsProjectsService{s: s}
  161. rs.Operations = NewOperationsProjectsOperationsService(s)
  162. return rs
  163. }
  164. type OperationsProjectsService struct {
  165. s *Service
  166. Operations *OperationsProjectsOperationsService
  167. }
  168. func NewOperationsProjectsOperationsService(s *Service) *OperationsProjectsOperationsService {
  169. rs := &OperationsProjectsOperationsService{s: s}
  170. return rs
  171. }
  172. type OperationsProjectsOperationsService struct {
  173. s *Service
  174. }
  175. func NewProjectsService(s *Service) *ProjectsService {
  176. rs := &ProjectsService{s: s}
  177. rs.Instances = NewProjectsInstancesService(s)
  178. return rs
  179. }
  180. type ProjectsService struct {
  181. s *Service
  182. Instances *ProjectsInstancesService
  183. }
  184. func NewProjectsInstancesService(s *Service) *ProjectsInstancesService {
  185. rs := &ProjectsInstancesService{s: s}
  186. rs.AppProfiles = NewProjectsInstancesAppProfilesService(s)
  187. rs.Clusters = NewProjectsInstancesClustersService(s)
  188. rs.Tables = NewProjectsInstancesTablesService(s)
  189. return rs
  190. }
  191. type ProjectsInstancesService struct {
  192. s *Service
  193. AppProfiles *ProjectsInstancesAppProfilesService
  194. Clusters *ProjectsInstancesClustersService
  195. Tables *ProjectsInstancesTablesService
  196. }
  197. func NewProjectsInstancesAppProfilesService(s *Service) *ProjectsInstancesAppProfilesService {
  198. rs := &ProjectsInstancesAppProfilesService{s: s}
  199. return rs
  200. }
  201. type ProjectsInstancesAppProfilesService struct {
  202. s *Service
  203. }
  204. func NewProjectsInstancesClustersService(s *Service) *ProjectsInstancesClustersService {
  205. rs := &ProjectsInstancesClustersService{s: s}
  206. return rs
  207. }
  208. type ProjectsInstancesClustersService struct {
  209. s *Service
  210. }
  211. func NewProjectsInstancesTablesService(s *Service) *ProjectsInstancesTablesService {
  212. rs := &ProjectsInstancesTablesService{s: s}
  213. return rs
  214. }
  215. type ProjectsInstancesTablesService struct {
  216. s *Service
  217. }
  218. // AppProfile: A configuration object describing how Cloud Bigtable
  219. // should treat traffic
  220. // from a particular end user application.
  221. type AppProfile struct {
  222. // Description: Optional long form description of the use case for this
  223. // AppProfile.
  224. Description string `json:"description,omitempty"`
  225. // Etag: Strongly validated etag for optimistic concurrency control.
  226. // Preserve the
  227. // value returned from `GetAppProfile` when calling `UpdateAppProfile`
  228. // to
  229. // fail the request if there has been a modification in the mean time.
  230. // The
  231. // `update_mask` of the request need not include `etag` for this
  232. // protection
  233. // to apply.
  234. // See [Wikipedia](https://en.wikipedia.org/wiki/HTTP_ETag) and
  235. // [RFC 7232](https://tools.ietf.org/html/rfc7232#section-2.3) for
  236. // more
  237. // details.
  238. Etag string `json:"etag,omitempty"`
  239. // MultiClusterRoutingUseAny: Use a multi-cluster routing policy that
  240. // may pick any cluster.
  241. MultiClusterRoutingUseAny *MultiClusterRoutingUseAny `json:"multiClusterRoutingUseAny,omitempty"`
  242. // Name: (`OutputOnly`)
  243. // The unique name of the app profile. Values are of the
  244. // form
  245. // `projects/<project>/instances/<instance>/appProfiles/_a-zA-Z0-9*`
  246. // .
  247. Name string `json:"name,omitempty"`
  248. // SingleClusterRouting: Use a single-cluster routing policy.
  249. SingleClusterRouting *SingleClusterRouting `json:"singleClusterRouting,omitempty"`
  250. // ServerResponse contains the HTTP response code and headers from the
  251. // server.
  252. googleapi.ServerResponse `json:"-"`
  253. // ForceSendFields is a list of field names (e.g. "Description") to
  254. // unconditionally include in API requests. By default, fields with
  255. // empty values are omitted from API requests. However, any non-pointer,
  256. // non-interface field appearing in ForceSendFields will be sent to the
  257. // server regardless of whether the field is empty or not. This may be
  258. // used to include empty fields in Patch requests.
  259. ForceSendFields []string `json:"-"`
  260. // NullFields is a list of field names (e.g. "Description") to include
  261. // in API requests with the JSON null value. By default, fields with
  262. // empty values are omitted from API requests. However, any field with
  263. // an empty value appearing in NullFields will be sent to the server as
  264. // null. It is an error if a field in this list has a non-empty value.
  265. // This may be used to include null fields in Patch requests.
  266. NullFields []string `json:"-"`
  267. }
  268. func (s *AppProfile) MarshalJSON() ([]byte, error) {
  269. type NoMethod AppProfile
  270. raw := NoMethod(*s)
  271. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  272. }
  273. // AuditConfig: Specifies the audit configuration for a service.
  274. // The configuration determines which permission types are logged, and
  275. // what
  276. // identities, if any, are exempted from logging.
  277. // An AuditConfig must have one or more AuditLogConfigs.
  278. //
  279. // If there are AuditConfigs for both `allServices` and a specific
  280. // service,
  281. // the union of the two AuditConfigs is used for that service: the
  282. // log_types
  283. // specified in each AuditConfig are enabled, and the exempted_members
  284. // in each
  285. // AuditLogConfig are exempted.
  286. //
  287. // Example Policy with multiple AuditConfigs:
  288. //
  289. // {
  290. // "audit_configs": [
  291. // {
  292. // "service": "allServices"
  293. // "audit_log_configs": [
  294. // {
  295. // "log_type": "DATA_READ",
  296. // "exempted_members": [
  297. // "user:foo@gmail.com"
  298. // ]
  299. // },
  300. // {
  301. // "log_type": "DATA_WRITE",
  302. // },
  303. // {
  304. // "log_type": "ADMIN_READ",
  305. // }
  306. // ]
  307. // },
  308. // {
  309. // "service": "fooservice.googleapis.com"
  310. // "audit_log_configs": [
  311. // {
  312. // "log_type": "DATA_READ",
  313. // },
  314. // {
  315. // "log_type": "DATA_WRITE",
  316. // "exempted_members": [
  317. // "user:bar@gmail.com"
  318. // ]
  319. // }
  320. // ]
  321. // }
  322. // ]
  323. // }
  324. //
  325. // For fooservice, this policy enables DATA_READ, DATA_WRITE and
  326. // ADMIN_READ
  327. // logging. It also exempts foo@gmail.com from DATA_READ logging,
  328. // and
  329. // bar@gmail.com from DATA_WRITE logging.
  330. type AuditConfig struct {
  331. // AuditLogConfigs: The configuration for logging of each type of
  332. // permission.
  333. AuditLogConfigs []*AuditLogConfig `json:"auditLogConfigs,omitempty"`
  334. // Service: Specifies a service that will be enabled for audit
  335. // logging.
  336. // For example, `storage.googleapis.com`,
  337. // `cloudsql.googleapis.com`.
  338. // `allServices` is a special value that covers all services.
  339. Service string `json:"service,omitempty"`
  340. // ForceSendFields is a list of field names (e.g. "AuditLogConfigs") to
  341. // unconditionally include in API requests. By default, fields with
  342. // empty values are omitted from API requests. However, any non-pointer,
  343. // non-interface field appearing in ForceSendFields will be sent to the
  344. // server regardless of whether the field is empty or not. This may be
  345. // used to include empty fields in Patch requests.
  346. ForceSendFields []string `json:"-"`
  347. // NullFields is a list of field names (e.g. "AuditLogConfigs") to
  348. // include in API requests with the JSON null value. By default, fields
  349. // with empty values are omitted from API requests. However, any field
  350. // with an empty value appearing in NullFields will be sent to the
  351. // server as null. It is an error if a field in this list has a
  352. // non-empty value. This may be used to include null fields in Patch
  353. // requests.
  354. NullFields []string `json:"-"`
  355. }
  356. func (s *AuditConfig) MarshalJSON() ([]byte, error) {
  357. type NoMethod AuditConfig
  358. raw := NoMethod(*s)
  359. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  360. }
  361. // AuditLogConfig: Provides the configuration for logging a type of
  362. // permissions.
  363. // Example:
  364. //
  365. // {
  366. // "audit_log_configs": [
  367. // {
  368. // "log_type": "DATA_READ",
  369. // "exempted_members": [
  370. // "user:foo@gmail.com"
  371. // ]
  372. // },
  373. // {
  374. // "log_type": "DATA_WRITE",
  375. // }
  376. // ]
  377. // }
  378. //
  379. // This enables 'DATA_READ' and 'DATA_WRITE' logging, while
  380. // exempting
  381. // foo@gmail.com from DATA_READ logging.
  382. type AuditLogConfig struct {
  383. // ExemptedMembers: Specifies the identities that do not cause logging
  384. // for this type of
  385. // permission.
  386. // Follows the same format of Binding.members.
  387. ExemptedMembers []string `json:"exemptedMembers,omitempty"`
  388. // LogType: The log type that this config enables.
  389. //
  390. // Possible values:
  391. // "LOG_TYPE_UNSPECIFIED" - Default case. Should never be this.
  392. // "ADMIN_READ" - Admin reads. Example: CloudIAM getIamPolicy
  393. // "DATA_WRITE" - Data writes. Example: CloudSQL Users create
  394. // "DATA_READ" - Data reads. Example: CloudSQL Users list
  395. LogType string `json:"logType,omitempty"`
  396. // ForceSendFields is a list of field names (e.g. "ExemptedMembers") to
  397. // unconditionally include in API requests. By default, fields with
  398. // empty values are omitted from API requests. However, any non-pointer,
  399. // non-interface field appearing in ForceSendFields will be sent to the
  400. // server regardless of whether the field is empty or not. This may be
  401. // used to include empty fields in Patch requests.
  402. ForceSendFields []string `json:"-"`
  403. // NullFields is a list of field names (e.g. "ExemptedMembers") to
  404. // include in API requests with the JSON null value. By default, fields
  405. // with empty values are omitted from API requests. However, any field
  406. // with an empty value appearing in NullFields will be sent to the
  407. // server as null. It is an error if a field in this list has a
  408. // non-empty value. This may be used to include null fields in Patch
  409. // requests.
  410. NullFields []string `json:"-"`
  411. }
  412. func (s *AuditLogConfig) MarshalJSON() ([]byte, error) {
  413. type NoMethod AuditLogConfig
  414. raw := NoMethod(*s)
  415. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  416. }
  417. // Binding: Associates `members` with a `role`.
  418. type Binding struct {
  419. // Condition: Unimplemented. The condition that is associated with this
  420. // binding.
  421. // NOTE: an unsatisfied condition will not allow user access via
  422. // current
  423. // binding. Different bindings, including their conditions, are
  424. // examined
  425. // independently.
  426. Condition *Expr `json:"condition,omitempty"`
  427. // Members: Specifies the identities requesting access for a Cloud
  428. // Platform resource.
  429. // `members` can have the following values:
  430. //
  431. // * `allUsers`: A special identifier that represents anyone who is
  432. // on the internet; with or without a Google account.
  433. //
  434. // * `allAuthenticatedUsers`: A special identifier that represents
  435. // anyone
  436. // who is authenticated with a Google account or a service
  437. // account.
  438. //
  439. // * `user:{emailid}`: An email address that represents a specific
  440. // Google
  441. // account. For example, `alice@gmail.com` .
  442. //
  443. //
  444. // * `serviceAccount:{emailid}`: An email address that represents a
  445. // service
  446. // account. For example,
  447. // `my-other-app@appspot.gserviceaccount.com`.
  448. //
  449. // * `group:{emailid}`: An email address that represents a Google
  450. // group.
  451. // For example, `admins@example.com`.
  452. //
  453. //
  454. // * `domain:{domain}`: The G Suite domain (primary) that represents all
  455. // the
  456. // users of that domain. For example, `google.com` or
  457. // `example.com`.
  458. //
  459. //
  460. Members []string `json:"members,omitempty"`
  461. // Role: Role that is assigned to `members`.
  462. // For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
  463. Role string `json:"role,omitempty"`
  464. // ForceSendFields is a list of field names (e.g. "Condition") to
  465. // unconditionally include in API requests. By default, fields with
  466. // empty values are omitted from API requests. However, any non-pointer,
  467. // non-interface field appearing in ForceSendFields will be sent to the
  468. // server regardless of whether the field is empty or not. This may be
  469. // used to include empty fields in Patch requests.
  470. ForceSendFields []string `json:"-"`
  471. // NullFields is a list of field names (e.g. "Condition") to include in
  472. // API requests with the JSON null value. By default, fields with empty
  473. // values are omitted from API requests. However, any field with an
  474. // empty value appearing in NullFields will be sent to the server as
  475. // null. It is an error if a field in this list has a non-empty value.
  476. // This may be used to include null fields in Patch requests.
  477. NullFields []string `json:"-"`
  478. }
  479. func (s *Binding) MarshalJSON() ([]byte, error) {
  480. type NoMethod Binding
  481. raw := NoMethod(*s)
  482. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  483. }
  484. // CheckConsistencyRequest: Request message
  485. // for
  486. // google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency
  487. type CheckConsistencyRequest struct {
  488. // ConsistencyToken: The token created using GenerateConsistencyToken
  489. // for the Table.
  490. ConsistencyToken string `json:"consistencyToken,omitempty"`
  491. // ForceSendFields is a list of field names (e.g. "ConsistencyToken") to
  492. // unconditionally include in API requests. By default, fields with
  493. // empty values are omitted from API requests. However, any non-pointer,
  494. // non-interface field appearing in ForceSendFields will be sent to the
  495. // server regardless of whether the field is empty or not. This may be
  496. // used to include empty fields in Patch requests.
  497. ForceSendFields []string `json:"-"`
  498. // NullFields is a list of field names (e.g. "ConsistencyToken") to
  499. // include in API requests with the JSON null value. By default, fields
  500. // with empty values are omitted from API requests. However, any field
  501. // with an empty value appearing in NullFields will be sent to the
  502. // server as null. It is an error if a field in this list has a
  503. // non-empty value. This may be used to include null fields in Patch
  504. // requests.
  505. NullFields []string `json:"-"`
  506. }
  507. func (s *CheckConsistencyRequest) MarshalJSON() ([]byte, error) {
  508. type NoMethod CheckConsistencyRequest
  509. raw := NoMethod(*s)
  510. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  511. }
  512. // CheckConsistencyResponse: Response message
  513. // for
  514. // google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency
  515. type CheckConsistencyResponse struct {
  516. // Consistent: True only if the token is consistent. A token is
  517. // consistent if replication
  518. // has caught up with the restrictions specified in the request.
  519. Consistent bool `json:"consistent,omitempty"`
  520. // ServerResponse contains the HTTP response code and headers from the
  521. // server.
  522. googleapi.ServerResponse `json:"-"`
  523. // ForceSendFields is a list of field names (e.g. "Consistent") to
  524. // unconditionally include in API requests. By default, fields with
  525. // empty values are omitted from API requests. However, any non-pointer,
  526. // non-interface field appearing in ForceSendFields will be sent to the
  527. // server regardless of whether the field is empty or not. This may be
  528. // used to include empty fields in Patch requests.
  529. ForceSendFields []string `json:"-"`
  530. // NullFields is a list of field names (e.g. "Consistent") to include in
  531. // API requests with the JSON null value. By default, fields with empty
  532. // values are omitted from API requests. However, any field with an
  533. // empty value appearing in NullFields will be sent to the server as
  534. // null. It is an error if a field in this list has a non-empty value.
  535. // This may be used to include null fields in Patch requests.
  536. NullFields []string `json:"-"`
  537. }
  538. func (s *CheckConsistencyResponse) MarshalJSON() ([]byte, error) {
  539. type NoMethod CheckConsistencyResponse
  540. raw := NoMethod(*s)
  541. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  542. }
  543. // Cluster: A resizable group of nodes in a particular cloud location,
  544. // capable
  545. // of serving all Tables in the parent
  546. // Instance.
  547. type Cluster struct {
  548. // DefaultStorageType: (`CreationOnly`)
  549. // The type of storage used by this cluster to serve its
  550. // parent instance's tables, unless explicitly overridden.
  551. //
  552. // Possible values:
  553. // "STORAGE_TYPE_UNSPECIFIED" - The user did not specify a storage
  554. // type.
  555. // "SSD" - Flash (SSD) storage should be used.
  556. // "HDD" - Magnetic drive (HDD) storage should be used.
  557. DefaultStorageType string `json:"defaultStorageType,omitempty"`
  558. // Location: (`CreationOnly`)
  559. // The location where this cluster's nodes and storage reside. For
  560. // best
  561. // performance, clients should be located as close as possible to
  562. // this
  563. // cluster. Currently only zones are supported, so values should be of
  564. // the
  565. // form `projects/<project>/locations/<zone>`.
  566. Location string `json:"location,omitempty"`
  567. // Name: (`OutputOnly`)
  568. // The unique name of the cluster. Values are of the
  569. // form
  570. // `projects/<project>/instances/<instance>/clusters/a-z*`.
  571. Name string `json:"name,omitempty"`
  572. // ServeNodes: The number of nodes allocated to this cluster. More nodes
  573. // enable higher
  574. // throughput and more consistent performance.
  575. ServeNodes int64 `json:"serveNodes,omitempty"`
  576. // State: (`OutputOnly`)
  577. // The current state of the cluster.
  578. //
  579. // Possible values:
  580. // "STATE_NOT_KNOWN" - The state of the cluster could not be
  581. // determined.
  582. // "READY" - The cluster has been successfully created and is ready to
  583. // serve requests.
  584. // "CREATING" - The cluster is currently being created, and may be
  585. // destroyed
  586. // if the creation process encounters an error.
  587. // A cluster may not be able to serve requests while being created.
  588. // "RESIZING" - The cluster is currently being resized, and may revert
  589. // to its previous
  590. // node count if the process encounters an error.
  591. // A cluster is still capable of serving requests while being
  592. // resized,
  593. // but may exhibit performance as if its number of allocated nodes
  594. // is
  595. // between the starting and requested states.
  596. // "DISABLED" - The cluster has no backing nodes. The data (tables)
  597. // still
  598. // exist, but no operations can be performed on the cluster.
  599. State string `json:"state,omitempty"`
  600. // ServerResponse contains the HTTP response code and headers from the
  601. // server.
  602. googleapi.ServerResponse `json:"-"`
  603. // ForceSendFields is a list of field names (e.g. "DefaultStorageType")
  604. // to unconditionally include in API requests. By default, fields with
  605. // empty values are omitted from API requests. However, any non-pointer,
  606. // non-interface field appearing in ForceSendFields will be sent to the
  607. // server regardless of whether the field is empty or not. This may be
  608. // used to include empty fields in Patch requests.
  609. ForceSendFields []string `json:"-"`
  610. // NullFields is a list of field names (e.g. "DefaultStorageType") to
  611. // include in API requests with the JSON null value. By default, fields
  612. // with empty values are omitted from API requests. However, any field
  613. // with an empty value appearing in NullFields will be sent to the
  614. // server as null. It is an error if a field in this list has a
  615. // non-empty value. This may be used to include null fields in Patch
  616. // requests.
  617. NullFields []string `json:"-"`
  618. }
  619. func (s *Cluster) MarshalJSON() ([]byte, error) {
  620. type NoMethod Cluster
  621. raw := NoMethod(*s)
  622. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  623. }
  624. // ClusterState: The state of a table's data in a particular cluster.
  625. type ClusterState struct {
  626. // ReplicationState: Output only.
  627. // The state of replication for the table in this cluster.
  628. //
  629. // Possible values:
  630. // "STATE_NOT_KNOWN" - The replication state of the table is unknown
  631. // in this cluster.
  632. // "INITIALIZING" - The cluster was recently created, and the table
  633. // must finish copying
  634. // over pre-existing data from other clusters before it can
  635. // begin
  636. // receiving live replication updates and serving Data API requests.
  637. // "PLANNED_MAINTENANCE" - The table is temporarily unable to serve
  638. // Data API requests from this
  639. // cluster due to planned internal maintenance.
  640. // "UNPLANNED_MAINTENANCE" - The table is temporarily unable to serve
  641. // Data API requests from this
  642. // cluster due to unplanned or emergency maintenance.
  643. // "READY" - The table can serve Data API requests from this cluster.
  644. // Depending on
  645. // replication delay, reads may not immediately reflect the state of
  646. // the
  647. // table in other clusters.
  648. ReplicationState string `json:"replicationState,omitempty"`
  649. // ForceSendFields is a list of field names (e.g. "ReplicationState") to
  650. // unconditionally include in API requests. By default, fields with
  651. // empty values are omitted from API requests. However, any non-pointer,
  652. // non-interface field appearing in ForceSendFields will be sent to the
  653. // server regardless of whether the field is empty or not. This may be
  654. // used to include empty fields in Patch requests.
  655. ForceSendFields []string `json:"-"`
  656. // NullFields is a list of field names (e.g. "ReplicationState") to
  657. // include in API requests with the JSON null value. By default, fields
  658. // with empty values are omitted from API requests. However, any field
  659. // with an empty value appearing in NullFields will be sent to the
  660. // server as null. It is an error if a field in this list has a
  661. // non-empty value. This may be used to include null fields in Patch
  662. // requests.
  663. NullFields []string `json:"-"`
  664. }
  665. func (s *ClusterState) MarshalJSON() ([]byte, error) {
  666. type NoMethod ClusterState
  667. raw := NoMethod(*s)
  668. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  669. }
  670. // ColumnFamily: A set of columns within a table which share a common
  671. // configuration.
  672. type ColumnFamily struct {
  673. // GcRule: Garbage collection rule specified as a protobuf.
  674. // Must serialize to at most 500 bytes.
  675. //
  676. // NOTE: Garbage collection executes opportunistically in the
  677. // background, and
  678. // so it's possible for reads to return a cell even if it matches the
  679. // active
  680. // GC expression for its family.
  681. GcRule *GcRule `json:"gcRule,omitempty"`
  682. // ForceSendFields is a list of field names (e.g. "GcRule") to
  683. // unconditionally include in API requests. By default, fields with
  684. // empty values are omitted from API requests. However, any non-pointer,
  685. // non-interface field appearing in ForceSendFields will be sent to the
  686. // server regardless of whether the field is empty or not. This may be
  687. // used to include empty fields in Patch requests.
  688. ForceSendFields []string `json:"-"`
  689. // NullFields is a list of field names (e.g. "GcRule") to include in API
  690. // requests with the JSON null value. By default, fields with empty
  691. // values are omitted from API requests. However, any field with an
  692. // empty value appearing in NullFields will be sent to the server as
  693. // null. It is an error if a field in this list has a non-empty value.
  694. // This may be used to include null fields in Patch requests.
  695. NullFields []string `json:"-"`
  696. }
  697. func (s *ColumnFamily) MarshalJSON() ([]byte, error) {
  698. type NoMethod ColumnFamily
  699. raw := NoMethod(*s)
  700. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  701. }
  702. // CreateClusterMetadata: The metadata for the Operation returned by
  703. // CreateCluster.
  704. type CreateClusterMetadata struct {
  705. // FinishTime: The time at which the operation failed or was completed
  706. // successfully.
  707. FinishTime string `json:"finishTime,omitempty"`
  708. // OriginalRequest: The request that prompted the initiation of this
  709. // CreateCluster operation.
  710. OriginalRequest *CreateClusterRequest `json:"originalRequest,omitempty"`
  711. // RequestTime: The time at which the original request was received.
  712. RequestTime string `json:"requestTime,omitempty"`
  713. // Tables: Keys: the full `name` of each table that existed in the
  714. // instance when
  715. // CreateCluster was first called,
  716. // i.e.
  717. // `projects/<project>/instances/<instance>/tables/<table>`. Any table
  718. // added
  719. // to the instance by a later API call will be created in the new
  720. // cluster by
  721. // that API call, not this one.
  722. //
  723. // Values: information on how much of a table's data has been copied to
  724. // the
  725. // newly-created cluster so far.
  726. Tables map[string]TableProgress `json:"tables,omitempty"`
  727. // ForceSendFields is a list of field names (e.g. "FinishTime") to
  728. // unconditionally include in API requests. By default, fields with
  729. // empty values are omitted from API requests. However, any non-pointer,
  730. // non-interface field appearing in ForceSendFields will be sent to the
  731. // server regardless of whether the field is empty or not. This may be
  732. // used to include empty fields in Patch requests.
  733. ForceSendFields []string `json:"-"`
  734. // NullFields is a list of field names (e.g. "FinishTime") to include in
  735. // API requests with the JSON null value. By default, fields with empty
  736. // values are omitted from API requests. However, any field with an
  737. // empty value appearing in NullFields will be sent to the server as
  738. // null. It is an error if a field in this list has a non-empty value.
  739. // This may be used to include null fields in Patch requests.
  740. NullFields []string `json:"-"`
  741. }
  742. func (s *CreateClusterMetadata) MarshalJSON() ([]byte, error) {
  743. type NoMethod CreateClusterMetadata
  744. raw := NoMethod(*s)
  745. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  746. }
  747. // CreateClusterRequest: Request message for
  748. // BigtableInstanceAdmin.CreateCluster.
  749. type CreateClusterRequest struct {
  750. // Cluster: The cluster to be created.
  751. // Fields marked `OutputOnly` must be left blank.
  752. Cluster *Cluster `json:"cluster,omitempty"`
  753. // ClusterId: The ID to be used when referring to the new cluster within
  754. // its instance,
  755. // e.g., just `mycluster` rather
  756. // than
  757. // `projects/myproject/instances/myinstance/clusters/mycluster`.
  758. ClusterId string `json:"clusterId,omitempty"`
  759. // Parent: The unique name of the instance in which to create the new
  760. // cluster.
  761. // Values are of the form
  762. // `projects/<project>/instances/<instance>`.
  763. Parent string `json:"parent,omitempty"`
  764. // ForceSendFields is a list of field names (e.g. "Cluster") to
  765. // unconditionally include in API requests. By default, fields with
  766. // empty values are omitted from API requests. However, any non-pointer,
  767. // non-interface field appearing in ForceSendFields will be sent to the
  768. // server regardless of whether the field is empty or not. This may be
  769. // used to include empty fields in Patch requests.
  770. ForceSendFields []string `json:"-"`
  771. // NullFields is a list of field names (e.g. "Cluster") to include in
  772. // API requests with the JSON null value. By default, fields with empty
  773. // values are omitted from API requests. However, any field with an
  774. // empty value appearing in NullFields will be sent to the server as
  775. // null. It is an error if a field in this list has a non-empty value.
  776. // This may be used to include null fields in Patch requests.
  777. NullFields []string `json:"-"`
  778. }
  779. func (s *CreateClusterRequest) MarshalJSON() ([]byte, error) {
  780. type NoMethod CreateClusterRequest
  781. raw := NoMethod(*s)
  782. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  783. }
  784. // CreateInstanceMetadata: The metadata for the Operation returned by
  785. // CreateInstance.
  786. type CreateInstanceMetadata struct {
  787. // FinishTime: The time at which the operation failed or was completed
  788. // successfully.
  789. FinishTime string `json:"finishTime,omitempty"`
  790. // OriginalRequest: The request that prompted the initiation of this
  791. // CreateInstance operation.
  792. OriginalRequest *CreateInstanceRequest `json:"originalRequest,omitempty"`
  793. // RequestTime: The time at which the original request was received.
  794. RequestTime string `json:"requestTime,omitempty"`
  795. // ForceSendFields is a list of field names (e.g. "FinishTime") to
  796. // unconditionally include in API requests. By default, fields with
  797. // empty values are omitted from API requests. However, any non-pointer,
  798. // non-interface field appearing in ForceSendFields will be sent to the
  799. // server regardless of whether the field is empty or not. This may be
  800. // used to include empty fields in Patch requests.
  801. ForceSendFields []string `json:"-"`
  802. // NullFields is a list of field names (e.g. "FinishTime") to include in
  803. // API requests with the JSON null value. By default, fields with empty
  804. // values are omitted from API requests. However, any field with an
  805. // empty value appearing in NullFields will be sent to the server as
  806. // null. It is an error if a field in this list has a non-empty value.
  807. // This may be used to include null fields in Patch requests.
  808. NullFields []string `json:"-"`
  809. }
  810. func (s *CreateInstanceMetadata) MarshalJSON() ([]byte, error) {
  811. type NoMethod CreateInstanceMetadata
  812. raw := NoMethod(*s)
  813. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  814. }
  815. // CreateInstanceRequest: Request message for
  816. // BigtableInstanceAdmin.CreateInstance.
  817. type CreateInstanceRequest struct {
  818. // Clusters: The clusters to be created within the instance, mapped by
  819. // desired
  820. // cluster ID, e.g., just `mycluster` rather
  821. // than
  822. // `projects/myproject/instances/myinstance/clusters/mycluster`.
  823. // Fie
  824. // lds marked `OutputOnly` must be left blank.
  825. // Currently, at most two clusters can be specified.
  826. Clusters map[string]Cluster `json:"clusters,omitempty"`
  827. // Instance: The instance to create.
  828. // Fields marked `OutputOnly` must be left blank.
  829. Instance *Instance `json:"instance,omitempty"`
  830. // InstanceId: The ID to be used when referring to the new instance
  831. // within its project,
  832. // e.g., just `myinstance` rather
  833. // than
  834. // `projects/myproject/instances/myinstance`.
  835. InstanceId string `json:"instanceId,omitempty"`
  836. // Parent: The unique name of the project in which to create the new
  837. // instance.
  838. // Values are of the form `projects/<project>`.
  839. Parent string `json:"parent,omitempty"`
  840. // ForceSendFields is a list of field names (e.g. "Clusters") to
  841. // unconditionally include in API requests. By default, fields with
  842. // empty values are omitted from API requests. However, any non-pointer,
  843. // non-interface field appearing in ForceSendFields will be sent to the
  844. // server regardless of whether the field is empty or not. This may be
  845. // used to include empty fields in Patch requests.
  846. ForceSendFields []string `json:"-"`
  847. // NullFields is a list of field names (e.g. "Clusters") to include in
  848. // API requests with the JSON null value. By default, fields with empty
  849. // values are omitted from API requests. However, any field with an
  850. // empty value appearing in NullFields will be sent to the server as
  851. // null. It is an error if a field in this list has a non-empty value.
  852. // This may be used to include null fields in Patch requests.
  853. NullFields []string `json:"-"`
  854. }
  855. func (s *CreateInstanceRequest) MarshalJSON() ([]byte, error) {
  856. type NoMethod CreateInstanceRequest
  857. raw := NoMethod(*s)
  858. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  859. }
  860. // CreateTableRequest: Request message
  861. // for
  862. // google.bigtable.admin.v2.BigtableTableAdmin.CreateTable
  863. type CreateTableRequest struct {
  864. // InitialSplits: The optional list of row keys that will be used to
  865. // initially split the
  866. // table into several tablets (tablets are similar to HBase
  867. // regions).
  868. // Given two split keys, `s1` and `s2`, three tablets will be
  869. // created,
  870. // spanning the key ranges: `[, s1), [s1, s2), [s2, )`.
  871. //
  872. // Example:
  873. //
  874. // * Row keys := `["a", "apple", "custom", "customer_1", "customer_2",`
  875. // "other", "zz"]`
  876. // * initial_split_keys := `["apple", "customer_1", "customer_2",
  877. // "other"]`
  878. // * Key assignment:
  879. // - Tablet 1 `[, apple) => {"a"}.`
  880. // - Tablet 2 `[apple, customer_1) => {"apple", "custom"}.`
  881. // - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.`
  882. // - Tablet 4 `[customer_2, other) => {"customer_2"}.`
  883. // - Tablet 5 `[other, ) => {"other", "zz"}.`
  884. InitialSplits []*Split `json:"initialSplits,omitempty"`
  885. // Table: The Table to create.
  886. Table *Table `json:"table,omitempty"`
  887. // TableId: The name by which the new table should be referred to within
  888. // the parent
  889. // instance, e.g., `foobar` rather than `<parent>/tables/foobar`.
  890. TableId string `json:"tableId,omitempty"`
  891. // ForceSendFields is a list of field names (e.g. "InitialSplits") to
  892. // unconditionally include in API requests. By default, fields with
  893. // empty values are omitted from API requests. However, any non-pointer,
  894. // non-interface field appearing in ForceSendFields will be sent to the
  895. // server regardless of whether the field is empty or not. This may be
  896. // used to include empty fields in Patch requests.
  897. ForceSendFields []string `json:"-"`
  898. // NullFields is a list of field names (e.g. "InitialSplits") to include
  899. // in API requests with the JSON null value. By default, fields with
  900. // empty values are omitted from API requests. However, any field with
  901. // an empty value appearing in NullFields will be sent to the server as
  902. // null. It is an error if a field in this list has a non-empty value.
  903. // This may be used to include null fields in Patch requests.
  904. NullFields []string `json:"-"`
  905. }
  906. func (s *CreateTableRequest) MarshalJSON() ([]byte, error) {
  907. type NoMethod CreateTableRequest
  908. raw := NoMethod(*s)
  909. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  910. }
  911. // DropRowRangeRequest: Request message
  912. // for
  913. // google.bigtable.admin.v2.BigtableTableAdmin.DropRowRange
  914. type DropRowRangeRequest struct {
  915. // DeleteAllDataFromTable: Delete all rows in the table. Setting this to
  916. // false is a no-op.
  917. DeleteAllDataFromTable bool `json:"deleteAllDataFromTable,omitempty"`
  918. // RowKeyPrefix: Delete all rows that start with this row key prefix.
  919. // Prefix cannot be
  920. // zero length.
  921. RowKeyPrefix string `json:"rowKeyPrefix,omitempty"`
  922. // ForceSendFields is a list of field names (e.g.
  923. // "DeleteAllDataFromTable") to unconditionally include in API requests.
  924. // By default, fields with empty values are omitted from API requests.
  925. // However, any non-pointer, non-interface field appearing in
  926. // ForceSendFields will be sent to the server regardless of whether the
  927. // field is empty or not. This may be used to include empty fields in
  928. // Patch requests.
  929. ForceSendFields []string `json:"-"`
  930. // NullFields is a list of field names (e.g. "DeleteAllDataFromTable")
  931. // to include in API requests with the JSON null value. By default,
  932. // fields with empty values are omitted from API requests. However, any
  933. // field with an empty value appearing in NullFields will be sent to the
  934. // server as null. It is an error if a field in this list has a
  935. // non-empty value. This may be used to include null fields in Patch
  936. // requests.
  937. NullFields []string `json:"-"`
  938. }
  939. func (s *DropRowRangeRequest) MarshalJSON() ([]byte, error) {
  940. type NoMethod DropRowRangeRequest
  941. raw := NoMethod(*s)
  942. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  943. }
  944. // Empty: A generic empty message that you can re-use to avoid defining
  945. // duplicated
  946. // empty messages in your APIs. A typical example is to use it as the
  947. // request
  948. // or the response type of an API method. For instance:
  949. //
  950. // service Foo {
  951. // rpc Bar(google.protobuf.Empty) returns
  952. // (google.protobuf.Empty);
  953. // }
  954. //
  955. // The JSON representation for `Empty` is empty JSON object `{}`.
  956. type Empty struct {
  957. // ServerResponse contains the HTTP response code and headers from the
  958. // server.
  959. googleapi.ServerResponse `json:"-"`
  960. }
  961. // Expr: Represents an expression text. Example:
  962. //
  963. // title: "User account presence"
  964. // description: "Determines whether the request has a user account"
  965. // expression: "size(request.user) > 0"
  966. type Expr struct {
  967. // Description: An optional description of the expression. This is a
  968. // longer text which
  969. // describes the expression, e.g. when hovered over it in a UI.
  970. Description string `json:"description,omitempty"`
  971. // Expression: Textual representation of an expression in
  972. // Common Expression Language syntax.
  973. //
  974. // The application context of the containing message determines
  975. // which
  976. // well-known feature set of CEL is supported.
  977. Expression string `json:"expression,omitempty"`
  978. // Location: An optional string indicating the location of the
  979. // expression for error
  980. // reporting, e.g. a file name and a position in the file.
  981. Location string `json:"location,omitempty"`
  982. // Title: An optional title for the expression, i.e. a short string
  983. // describing
  984. // its purpose. This can be used e.g. in UIs which allow to enter
  985. // the
  986. // expression.
  987. Title string `json:"title,omitempty"`
  988. // ForceSendFields is a list of field names (e.g. "Description") to
  989. // unconditionally include in API requests. By default, fields with
  990. // empty values are omitted from API requests. However, any non-pointer,
  991. // non-interface field appearing in ForceSendFields will be sent to the
  992. // server regardless of whether the field is empty or not. This may be
  993. // used to include empty fields in Patch requests.
  994. ForceSendFields []string `json:"-"`
  995. // NullFields is a list of field names (e.g. "Description") to include
  996. // in API requests with the JSON null value. By default, fields with
  997. // empty values are omitted from API requests. However, any field with
  998. // an empty value appearing in NullFields will be sent to the server as
  999. // null. It is an error if a field in this list has a non-empty value.
  1000. // This may be used to include null fields in Patch requests.
  1001. NullFields []string `json:"-"`
  1002. }
  1003. func (s *Expr) MarshalJSON() ([]byte, error) {
  1004. type NoMethod Expr
  1005. raw := NoMethod(*s)
  1006. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1007. }
  1008. // GcRule: Rule for determining which cells to delete during garbage
  1009. // collection.
  1010. type GcRule struct {
  1011. // Intersection: Delete cells that would be deleted by every nested
  1012. // rule.
  1013. Intersection *Intersection `json:"intersection,omitempty"`
  1014. // MaxAge: Delete cells in a column older than the given age.
  1015. // Values must be at least one millisecond, and will be truncated
  1016. // to
  1017. // microsecond granularity.
  1018. MaxAge string `json:"maxAge,omitempty"`
  1019. // MaxNumVersions: Delete all cells in a column except the most recent
  1020. // N.
  1021. MaxNumVersions int64 `json:"maxNumVersions,omitempty"`
  1022. // Union: Delete cells that would be deleted by any nested rule.
  1023. Union *Union `json:"union,omitempty"`
  1024. // ForceSendFields is a list of field names (e.g. "Intersection") to
  1025. // unconditionally include in API requests. By default, fields with
  1026. // empty values are omitted from API requests. However, any non-pointer,
  1027. // non-interface field appearing in ForceSendFields will be sent to the
  1028. // server regardless of whether the field is empty or not. This may be
  1029. // used to include empty fields in Patch requests.
  1030. ForceSendFields []string `json:"-"`
  1031. // NullFields is a list of field names (e.g. "Intersection") to include
  1032. // in API requests with the JSON null value. By default, fields with
  1033. // empty values are omitted from API requests. However, any field with
  1034. // an empty value appearing in NullFields will be sent to the server as
  1035. // null. It is an error if a field in this list has a non-empty value.
  1036. // This may be used to include null fields in Patch requests.
  1037. NullFields []string `json:"-"`
  1038. }
  1039. func (s *GcRule) MarshalJSON() ([]byte, error) {
  1040. type NoMethod GcRule
  1041. raw := NoMethod(*s)
  1042. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1043. }
  1044. // GenerateConsistencyTokenRequest: Request message
  1045. // for
  1046. // google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyTok
  1047. // en
  1048. type GenerateConsistencyTokenRequest struct {
  1049. }
  1050. // GenerateConsistencyTokenResponse: Response message
  1051. // for
  1052. // google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyTok
  1053. // en
  1054. type GenerateConsistencyTokenResponse struct {
  1055. // ConsistencyToken: The generated consistency token.
  1056. ConsistencyToken string `json:"consistencyToken,omitempty"`
  1057. // ServerResponse contains the HTTP response code and headers from the
  1058. // server.
  1059. googleapi.ServerResponse `json:"-"`
  1060. // ForceSendFields is a list of field names (e.g. "ConsistencyToken") to
  1061. // unconditionally include in API requests. By default, fields with
  1062. // empty values are omitted from API requests. However, any non-pointer,
  1063. // non-interface field appearing in ForceSendFields will be sent to the
  1064. // server regardless of whether the field is empty or not. This may be
  1065. // used to include empty fields in Patch requests.
  1066. ForceSendFields []string `json:"-"`
  1067. // NullFields is a list of field names (e.g. "ConsistencyToken") to
  1068. // include in API requests with the JSON null value. By default, fields
  1069. // with empty values are omitted from API requests. However, any field
  1070. // with an empty value appearing in NullFields will be sent to the
  1071. // server as null. It is an error if a field in this list has a
  1072. // non-empty value. This may be used to include null fields in Patch
  1073. // requests.
  1074. NullFields []string `json:"-"`
  1075. }
  1076. func (s *GenerateConsistencyTokenResponse) MarshalJSON() ([]byte, error) {
  1077. type NoMethod GenerateConsistencyTokenResponse
  1078. raw := NoMethod(*s)
  1079. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1080. }
  1081. // GetIamPolicyRequest: Request message for `GetIamPolicy` method.
  1082. type GetIamPolicyRequest struct {
  1083. }
  1084. // Instance: A collection of Bigtable Tables and
  1085. // the resources that serve them.
  1086. // All tables in an instance are served from all
  1087. // Clusters in the instance.
  1088. type Instance struct {
  1089. // DisplayName: The descriptive name for this instance as it appears in
  1090. // UIs.
  1091. // Can be changed at any time, but should be kept globally unique
  1092. // to avoid confusion.
  1093. DisplayName string `json:"displayName,omitempty"`
  1094. // Labels: Labels are a flexible and lightweight mechanism for
  1095. // organizing cloud
  1096. // resources into groups that reflect a customer's organizational needs
  1097. // and
  1098. // deployment strategies. They can be used to filter resources and
  1099. // aggregate
  1100. // metrics.
  1101. //
  1102. // * Label keys must be between 1 and 63 characters long and must
  1103. // conform to
  1104. // the regular expression: `\p{Ll}\p{Lo}{0,62}`.
  1105. // * Label values must be between 0 and 63 characters long and must
  1106. // conform to
  1107. // the regular expression: `[\p{Ll}\p{Lo}\p{N}_-]{0,63}`.
  1108. // * No more than 64 labels can be associated with a given resource.
  1109. // * Keys and values must both be under 128 bytes.
  1110. Labels map[string]string `json:"labels,omitempty"`
  1111. // Name: (`OutputOnly`)
  1112. // The unique name of the instance. Values are of the
  1113. // form
  1114. // `projects/<project>/instances/a-z+[a-z0-9]`.
  1115. Name string `json:"name,omitempty"`
  1116. // State: (`OutputOnly`)
  1117. // The current state of the instance.
  1118. //
  1119. // Possible values:
  1120. // "STATE_NOT_KNOWN" - The state of the instance could not be
  1121. // determined.
  1122. // "READY" - The instance has been successfully created and can serve
  1123. // requests
  1124. // to its tables.
  1125. // "CREATING" - The instance is currently being created, and may be
  1126. // destroyed
  1127. // if the creation process encounters an error.
  1128. State string `json:"state,omitempty"`
  1129. // Type: The type of the instance. Defaults to `PRODUCTION`.
  1130. //
  1131. // Possible values:
  1132. // "TYPE_UNSPECIFIED" - The type of the instance is unspecified. If
  1133. // set when creating an
  1134. // instance, a `PRODUCTION` instance will be created. If set when
  1135. // updating
  1136. // an instance, the type will be left unchanged.
  1137. // "PRODUCTION" - An instance meant for production use. `serve_nodes`
  1138. // must be set
  1139. // on the cluster.
  1140. // "DEVELOPMENT" - The instance is meant for development and testing
  1141. // purposes only; it has
  1142. // no performance or uptime guarantees and is not covered by SLA.
  1143. // After a development instance is created, it can be upgraded
  1144. // by
  1145. // updating the instance to type `PRODUCTION`. An instance created
  1146. // as a production instance cannot be changed to a development
  1147. // instance.
  1148. // When creating a development instance, `serve_nodes` on the cluster
  1149. // must
  1150. // not be set.
  1151. Type string `json:"type,omitempty"`
  1152. // ServerResponse contains the HTTP response code and headers from the
  1153. // server.
  1154. googleapi.ServerResponse `json:"-"`
  1155. // ForceSendFields is a list of field names (e.g. "DisplayName") to
  1156. // unconditionally include in API requests. By default, fields with
  1157. // empty values are omitted from API requests. However, any non-pointer,
  1158. // non-interface field appearing in ForceSendFields will be sent to the
  1159. // server regardless of whether the field is empty or not. This may be
  1160. // used to include empty fields in Patch requests.
  1161. ForceSendFields []string `json:"-"`
  1162. // NullFields is a list of field names (e.g. "DisplayName") to include
  1163. // in API requests with the JSON null value. By default, fields with
  1164. // empty values are omitted from API requests. However, any field with
  1165. // an empty value appearing in NullFields will be sent to the server as
  1166. // null. It is an error if a field in this list has a non-empty value.
  1167. // This may be used to include null fields in Patch requests.
  1168. NullFields []string `json:"-"`
  1169. }
  1170. func (s *Instance) MarshalJSON() ([]byte, error) {
  1171. type NoMethod Instance
  1172. raw := NoMethod(*s)
  1173. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1174. }
  1175. // Intersection: A GcRule which deletes cells matching all of the given
  1176. // rules.
  1177. type Intersection struct {
  1178. // Rules: Only delete cells which would be deleted by every element of
  1179. // `rules`.
  1180. Rules []*GcRule `json:"rules,omitempty"`
  1181. // ForceSendFields is a list of field names (e.g. "Rules") to
  1182. // unconditionally include in API requests. By default, fields with
  1183. // empty values are omitted from API requests. However, any non-pointer,
  1184. // non-interface field appearing in ForceSendFields will be sent to the
  1185. // server regardless of whether the field is empty or not. This may be
  1186. // used to include empty fields in Patch requests.
  1187. ForceSendFields []string `json:"-"`
  1188. // NullFields is a list of field names (e.g. "Rules") to include in API
  1189. // requests with the JSON null value. By default, fields with empty
  1190. // values are omitted from API requests. However, any field with an
  1191. // empty value appearing in NullFields will be sent to the server as
  1192. // null. It is an error if a field in this list has a non-empty value.
  1193. // This may be used to include null fields in Patch requests.
  1194. NullFields []string `json:"-"`
  1195. }
  1196. func (s *Intersection) MarshalJSON() ([]byte, error) {
  1197. type NoMethod Intersection
  1198. raw := NoMethod(*s)
  1199. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1200. }
  1201. // ListAppProfilesResponse: Response message for
  1202. // BigtableInstanceAdmin.ListAppProfiles.
  1203. type ListAppProfilesResponse struct {
  1204. // AppProfiles: The list of requested app profiles.
  1205. AppProfiles []*AppProfile `json:"appProfiles,omitempty"`
  1206. // FailedLocations: Locations from which AppProfile information could
  1207. // not be retrieved,
  1208. // due to an outage or some other transient condition.
  1209. // AppProfiles from these locations may be missing from
  1210. // `app_profiles`.
  1211. // Values are of the form `projects/<project>/locations/<zone_id>`
  1212. FailedLocations []string `json:"failedLocations,omitempty"`
  1213. // NextPageToken: Set if not all app profiles could be returned in a
  1214. // single response.
  1215. // Pass this value to `page_token` in another request to get the
  1216. // next
  1217. // page of results.
  1218. NextPageToken string `json:"nextPageToken,omitempty"`
  1219. // ServerResponse contains the HTTP response code and headers from the
  1220. // server.
  1221. googleapi.ServerResponse `json:"-"`
  1222. // ForceSendFields is a list of field names (e.g. "AppProfiles") to
  1223. // unconditionally include in API requests. By default, fields with
  1224. // empty values are omitted from API requests. However, any non-pointer,
  1225. // non-interface field appearing in ForceSendFields will be sent to the
  1226. // server regardless of whether the field is empty or not. This may be
  1227. // used to include empty fields in Patch requests.
  1228. ForceSendFields []string `json:"-"`
  1229. // NullFields is a list of field names (e.g. "AppProfiles") to include
  1230. // in API requests with the JSON null value. By default, fields with
  1231. // empty values are omitted from API requests. However, any field with
  1232. // an empty value appearing in NullFields will be sent to the server as
  1233. // null. It is an error if a field in this list has a non-empty value.
  1234. // This may be used to include null fields in Patch requests.
  1235. NullFields []string `json:"-"`
  1236. }
  1237. func (s *ListAppProfilesResponse) MarshalJSON() ([]byte, error) {
  1238. type NoMethod ListAppProfilesResponse
  1239. raw := NoMethod(*s)
  1240. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1241. }
  1242. // ListClustersResponse: Response message for
  1243. // BigtableInstanceAdmin.ListClusters.
  1244. type ListClustersResponse struct {
  1245. // Clusters: The list of requested clusters.
  1246. Clusters []*Cluster `json:"clusters,omitempty"`
  1247. // FailedLocations: Locations from which Cluster information could not
  1248. // be retrieved,
  1249. // due to an outage or some other transient condition.
  1250. // Clusters from these locations may be missing from `clusters`,
  1251. // or may only have partial information returned.
  1252. // Values are of the form `projects/<project>/locations/<zone_id>`
  1253. FailedLocations []string `json:"failedLocations,omitempty"`
  1254. // NextPageToken: DEPRECATED: This field is unused and ignored.
  1255. NextPageToken string `json:"nextPageToken,omitempty"`
  1256. // ServerResponse contains the HTTP response code and headers from the
  1257. // server.
  1258. googleapi.ServerResponse `json:"-"`
  1259. // ForceSendFields is a list of field names (e.g. "Clusters") to
  1260. // unconditionally include in API requests. By default, fields with
  1261. // empty values are omitted from API requests. However, any non-pointer,
  1262. // non-interface field appearing in ForceSendFields will be sent to the
  1263. // server regardless of whether the field is empty or not. This may be
  1264. // used to include empty fields in Patch requests.
  1265. ForceSendFields []string `json:"-"`
  1266. // NullFields is a list of field names (e.g. "Clusters") to include in
  1267. // API requests with the JSON null value. By default, fields with empty
  1268. // values are omitted from API requests. However, any field with an
  1269. // empty value appearing in NullFields will be sent to the server as
  1270. // null. It is an error if a field in this list has a non-empty value.
  1271. // This may be used to include null fields in Patch requests.
  1272. NullFields []string `json:"-"`
  1273. }
  1274. func (s *ListClustersResponse) MarshalJSON() ([]byte, error) {
  1275. type NoMethod ListClustersResponse
  1276. raw := NoMethod(*s)
  1277. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1278. }
  1279. // ListInstancesResponse: Response message for
  1280. // BigtableInstanceAdmin.ListInstances.
  1281. type ListInstancesResponse struct {
  1282. // FailedLocations: Locations from which Instance information could not
  1283. // be retrieved,
  1284. // due to an outage or some other transient condition.
  1285. // Instances whose Clusters are all in one of the failed locations
  1286. // may be missing from `instances`, and Instances with at least
  1287. // one
  1288. // Cluster in a failed location may only have partial information
  1289. // returned.
  1290. // Values are of the form `projects/<project>/locations/<zone_id>`
  1291. FailedLocations []string `json:"failedLocations,omitempty"`
  1292. // Instances: The list of requested instances.
  1293. Instances []*Instance `json:"instances,omitempty"`
  1294. // NextPageToken: DEPRECATED: This field is unused and ignored.
  1295. NextPageToken string `json:"nextPageToken,omitempty"`
  1296. // ServerResponse contains the HTTP response code and headers from the
  1297. // server.
  1298. googleapi.ServerResponse `json:"-"`
  1299. // ForceSendFields is a list of field names (e.g. "FailedLocations") to
  1300. // unconditionally include in API requests. By default, fields with
  1301. // empty values are omitted from API requests. However, any non-pointer,
  1302. // non-interface field appearing in ForceSendFields will be sent to the
  1303. // server regardless of whether the field is empty or not. This may be
  1304. // used to include empty fields in Patch requests.
  1305. ForceSendFields []string `json:"-"`
  1306. // NullFields is a list of field names (e.g. "FailedLocations") to
  1307. // include in API requests with the JSON null value. By default, fields
  1308. // with empty values are omitted from API requests. However, any field
  1309. // with an empty value appearing in NullFields will be sent to the
  1310. // server as null. It is an error if a field in this list has a
  1311. // non-empty value. This may be used to include null fields in Patch
  1312. // requests.
  1313. NullFields []string `json:"-"`
  1314. }
  1315. func (s *ListInstancesResponse) MarshalJSON() ([]byte, error) {
  1316. type NoMethod ListInstancesResponse
  1317. raw := NoMethod(*s)
  1318. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1319. }
  1320. // ListOperationsResponse: The response message for
  1321. // Operations.ListOperations.
  1322. type ListOperationsResponse struct {
  1323. // NextPageToken: The standard List next-page token.
  1324. NextPageToken string `json:"nextPageToken,omitempty"`
  1325. // Operations: A list of operations that matches the specified filter in
  1326. // the request.
  1327. Operations []*Operation `json:"operations,omitempty"`
  1328. // ServerResponse contains the HTTP response code and headers from the
  1329. // server.
  1330. googleapi.ServerResponse `json:"-"`
  1331. // ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1332. // unconditionally include in API requests. By default, fields with
  1333. // empty values are omitted from API requests. However, any non-pointer,
  1334. // non-interface field appearing in ForceSendFields will be sent to the
  1335. // server regardless of whether the field is empty or not. This may be
  1336. // used to include empty fields in Patch requests.
  1337. ForceSendFields []string `json:"-"`
  1338. // NullFields is a list of field names (e.g. "NextPageToken") to include
  1339. // in API requests with the JSON null value. By default, fields with
  1340. // empty values are omitted from API requests. However, any field with
  1341. // an empty value appearing in NullFields will be sent to the server as
  1342. // null. It is an error if a field in this list has a non-empty value.
  1343. // This may be used to include null fields in Patch requests.
  1344. NullFields []string `json:"-"`
  1345. }
  1346. func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) {
  1347. type NoMethod ListOperationsResponse
  1348. raw := NoMethod(*s)
  1349. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1350. }
  1351. // ListTablesResponse: Response message
  1352. // for
  1353. // google.bigtable.admin.v2.BigtableTableAdmin.ListTables
  1354. type ListTablesResponse struct {
  1355. // NextPageToken: Set if not all tables could be returned in a single
  1356. // response.
  1357. // Pass this value to `page_token` in another request to get the
  1358. // next
  1359. // page of results.
  1360. NextPageToken string `json:"nextPageToken,omitempty"`
  1361. // Tables: The tables present in the requested instance.
  1362. Tables []*Table `json:"tables,omitempty"`
  1363. // ServerResponse contains the HTTP response code and headers from the
  1364. // server.
  1365. googleapi.ServerResponse `json:"-"`
  1366. // ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1367. // unconditionally include in API requests. By default, fields with
  1368. // empty values are omitted from API requests. However, any non-pointer,
  1369. // non-interface field appearing in ForceSendFields will be sent to the
  1370. // server regardless of whether the field is empty or not. This may be
  1371. // used to include empty fields in Patch requests.
  1372. ForceSendFields []string `json:"-"`
  1373. // NullFields is a list of field names (e.g. "NextPageToken") to include
  1374. // in API requests with the JSON null value. By default, fields with
  1375. // empty values are omitted from API requests. However, any field with
  1376. // an empty value appearing in NullFields will be sent to the server as
  1377. // null. It is an error if a field in this list has a non-empty value.
  1378. // This may be used to include null fields in Patch requests.
  1379. NullFields []string `json:"-"`
  1380. }
  1381. func (s *ListTablesResponse) MarshalJSON() ([]byte, error) {
  1382. type NoMethod ListTablesResponse
  1383. raw := NoMethod(*s)
  1384. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1385. }
  1386. // Modification: A create, update, or delete of a particular column
  1387. // family.
  1388. type Modification struct {
  1389. // Create: Create a new column family with the specified schema, or fail
  1390. // if
  1391. // one already exists with the given ID.
  1392. Create *ColumnFamily `json:"create,omitempty"`
  1393. // Drop: Drop (delete) the column family with the given ID, or fail if
  1394. // no such
  1395. // family exists.
  1396. Drop bool `json:"drop,omitempty"`
  1397. // Id: The ID of the column family to be modified.
  1398. Id string `json:"id,omitempty"`
  1399. // Update: Update an existing column family to the specified schema, or
  1400. // fail
  1401. // if no column family exists with the given ID.
  1402. Update *ColumnFamily `json:"update,omitempty"`
  1403. // ForceSendFields is a list of field names (e.g. "Create") to
  1404. // unconditionally include in API requests. By default, fields with
  1405. // empty values are omitted from API requests. However, any non-pointer,
  1406. // non-interface field appearing in ForceSendFields will be sent to the
  1407. // server regardless of whether the field is empty or not. This may be
  1408. // used to include empty fields in Patch requests.
  1409. ForceSendFields []string `json:"-"`
  1410. // NullFields is a list of field names (e.g. "Create") to include in API
  1411. // requests with the JSON null value. By default, fields with empty
  1412. // values are omitted from API requests. However, any field with an
  1413. // empty value appearing in NullFields will be sent to the server as
  1414. // null. It is an error if a field in this list has a non-empty value.
  1415. // This may be used to include null fields in Patch requests.
  1416. NullFields []string `json:"-"`
  1417. }
  1418. func (s *Modification) MarshalJSON() ([]byte, error) {
  1419. type NoMethod Modification
  1420. raw := NoMethod(*s)
  1421. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1422. }
  1423. // ModifyColumnFamiliesRequest: Request message
  1424. // for
  1425. // google.bigtable.admin.v2.BigtableTableAdmin.ModifyColumnFamilies
  1426. type ModifyColumnFamiliesRequest struct {
  1427. // Modifications: Modifications to be atomically applied to the
  1428. // specified table's families.
  1429. // Entries are applied in order, meaning that earlier modifications can
  1430. // be
  1431. // masked by later ones (in the case of repeated updates to the same
  1432. // family,
  1433. // for example).
  1434. Modifications []*Modification `json:"modifications,omitempty"`
  1435. // ForceSendFields is a list of field names (e.g. "Modifications") to
  1436. // unconditionally include in API requests. By default, fields with
  1437. // empty values are omitted from API requests. However, any non-pointer,
  1438. // non-interface field appearing in ForceSendFields will be sent to the
  1439. // server regardless of whether the field is empty or not. This may be
  1440. // used to include empty fields in Patch requests.
  1441. ForceSendFields []string `json:"-"`
  1442. // NullFields is a list of field names (e.g. "Modifications") to include
  1443. // in API requests with the JSON null value. By default, fields with
  1444. // empty values are omitted from API requests. However, any field with
  1445. // an empty value appearing in NullFields will be sent to the server as
  1446. // null. It is an error if a field in this list has a non-empty value.
  1447. // This may be used to include null fields in Patch requests.
  1448. NullFields []string `json:"-"`
  1449. }
  1450. func (s *ModifyColumnFamiliesRequest) MarshalJSON() ([]byte, error) {
  1451. type NoMethod ModifyColumnFamiliesRequest
  1452. raw := NoMethod(*s)
  1453. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1454. }
  1455. // MultiClusterRoutingUseAny: Read/write requests may be routed to any
  1456. // cluster in the instance, and will
  1457. // fail over to another cluster in the event of transient errors or
  1458. // delays.
  1459. // Choosing this option sacrifices read-your-writes consistency to
  1460. // improve
  1461. // availability.
  1462. type MultiClusterRoutingUseAny struct {
  1463. }
  1464. // Operation: This resource represents a long-running operation that is
  1465. // the result of a
  1466. // network API call.
  1467. type Operation struct {
  1468. // Done: If the value is `false`, it means the operation is still in
  1469. // progress.
  1470. // If `true`, the operation is completed, and either `error` or
  1471. // `response` is
  1472. // available.
  1473. Done bool `json:"done,omitempty"`
  1474. // Error: The error result of the operation in case of failure or
  1475. // cancellation.
  1476. Error *Status `json:"error,omitempty"`
  1477. // Metadata: Service-specific metadata associated with the operation.
  1478. // It typically
  1479. // contains progress information and common metadata such as create
  1480. // time.
  1481. // Some services might not provide such metadata. Any method that
  1482. // returns a
  1483. // long-running operation should document the metadata type, if any.
  1484. Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  1485. // Name: The server-assigned name, which is only unique within the same
  1486. // service that
  1487. // originally returns it. If you use the default HTTP mapping,
  1488. // the
  1489. // `name` should have the format of `operations/some/unique/name`.
  1490. Name string `json:"name,omitempty"`
  1491. // Response: The normal response of the operation in case of success.
  1492. // If the original
  1493. // method returns no data on success, such as `Delete`, the response
  1494. // is
  1495. // `google.protobuf.Empty`. If the original method is
  1496. // standard
  1497. // `Get`/`Create`/`Update`, the response should be the resource. For
  1498. // other
  1499. // methods, the response should have the type `XxxResponse`, where
  1500. // `Xxx`
  1501. // is the original method name. For example, if the original method
  1502. // name
  1503. // is `TakeSnapshot()`, the inferred response type
  1504. // is
  1505. // `TakeSnapshotResponse`.
  1506. Response googleapi.RawMessage `json:"response,omitempty"`
  1507. // ServerResponse contains the HTTP response code and headers from the
  1508. // server.
  1509. googleapi.ServerResponse `json:"-"`
  1510. // ForceSendFields is a list of field names (e.g. "Done") to
  1511. // unconditionally include in API requests. By default, fields with
  1512. // empty values are omitted from API requests. However, any non-pointer,
  1513. // non-interface field appearing in ForceSendFields will be sent to the
  1514. // server regardless of whether the field is empty or not. This may be
  1515. // used to include empty fields in Patch requests.
  1516. ForceSendFields []string `json:"-"`
  1517. // NullFields is a list of field names (e.g. "Done") to include in API
  1518. // requests with the JSON null value. By default, fields with empty
  1519. // values are omitted from API requests. However, any field with an
  1520. // empty value appearing in NullFields will be sent to the server as
  1521. // null. It is an error if a field in this list has a non-empty value.
  1522. // This may be used to include null fields in Patch requests.
  1523. NullFields []string `json:"-"`
  1524. }
  1525. func (s *Operation) MarshalJSON() ([]byte, error) {
  1526. type NoMethod Operation
  1527. raw := NoMethod(*s)
  1528. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1529. }
  1530. // PartialUpdateInstanceRequest: Request message for
  1531. // BigtableInstanceAdmin.PartialUpdateInstance.
  1532. type PartialUpdateInstanceRequest struct {
  1533. // Instance: The Instance which will (partially) replace the current
  1534. // value.
  1535. Instance *Instance `json:"instance,omitempty"`
  1536. // UpdateMask: The subset of Instance fields which should be
  1537. // replaced.
  1538. // Must be explicitly set.
  1539. UpdateMask string `json:"updateMask,omitempty"`
  1540. // ForceSendFields is a list of field names (e.g. "Instance") to
  1541. // unconditionally include in API requests. By default, fields with
  1542. // empty values are omitted from API requests. However, any non-pointer,
  1543. // non-interface field appearing in ForceSendFields will be sent to the
  1544. // server regardless of whether the field is empty or not. This may be
  1545. // used to include empty fields in Patch requests.
  1546. ForceSendFields []string `json:"-"`
  1547. // NullFields is a list of field names (e.g. "Instance") to include in
  1548. // API requests with the JSON null value. By default, fields with empty
  1549. // values are omitted from API requests. However, any field with an
  1550. // empty value appearing in NullFields will be sent to the server as
  1551. // null. It is an error if a field in this list has a non-empty value.
  1552. // This may be used to include null fields in Patch requests.
  1553. NullFields []string `json:"-"`
  1554. }
  1555. func (s *PartialUpdateInstanceRequest) MarshalJSON() ([]byte, error) {
  1556. type NoMethod PartialUpdateInstanceRequest
  1557. raw := NoMethod(*s)
  1558. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1559. }
  1560. // Policy: Defines an Identity and Access Management (IAM) policy. It is
  1561. // used to
  1562. // specify access control policies for Cloud Platform resources.
  1563. //
  1564. //
  1565. // A `Policy` consists of a list of `bindings`. A `binding` binds a list
  1566. // of
  1567. // `members` to a `role`, where the members can be user accounts, Google
  1568. // groups,
  1569. // Google domains, and service accounts. A `role` is a named list of
  1570. // permissions
  1571. // defined by IAM.
  1572. //
  1573. // **JSON Example**
  1574. //
  1575. // {
  1576. // "bindings": [
  1577. // {
  1578. // "role": "roles/owner",
  1579. // "members": [
  1580. // "user:mike@example.com",
  1581. // "group:admins@example.com",
  1582. // "domain:google.com",
  1583. //
  1584. // "serviceAccount:my-other-app@appspot.gserviceaccount.com"
  1585. // ]
  1586. // },
  1587. // {
  1588. // "role": "roles/viewer",
  1589. // "members": ["user:sean@example.com"]
  1590. // }
  1591. // ]
  1592. // }
  1593. //
  1594. // **YAML Example**
  1595. //
  1596. // bindings:
  1597. // - members:
  1598. // - user:mike@example.com
  1599. // - group:admins@example.com
  1600. // - domain:google.com
  1601. // - serviceAccount:my-other-app@appspot.gserviceaccount.com
  1602. // role: roles/owner
  1603. // - members:
  1604. // - user:sean@example.com
  1605. // role: roles/viewer
  1606. //
  1607. //
  1608. // For a description of IAM and its features, see the
  1609. // [IAM developer's guide](https://cloud.google.com/iam/docs).
  1610. type Policy struct {
  1611. // AuditConfigs: Specifies cloud audit logging configuration for this
  1612. // policy.
  1613. AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"`
  1614. // Bindings: Associates a list of `members` to a `role`.
  1615. // `bindings` with no members will result in an error.
  1616. Bindings []*Binding `json:"bindings,omitempty"`
  1617. // Etag: `etag` is used for optimistic concurrency control as a way to
  1618. // help
  1619. // prevent simultaneous updates of a policy from overwriting each
  1620. // other.
  1621. // It is strongly suggested that systems make use of the `etag` in
  1622. // the
  1623. // read-modify-write cycle to perform policy updates in order to avoid
  1624. // race
  1625. // conditions: An `etag` is returned in the response to `getIamPolicy`,
  1626. // and
  1627. // systems are expected to put that etag in the request to
  1628. // `setIamPolicy` to
  1629. // ensure that their change will be applied to the same version of the
  1630. // policy.
  1631. //
  1632. // If no `etag` is provided in the call to `setIamPolicy`, then the
  1633. // existing
  1634. // policy is overwritten blindly.
  1635. Etag string `json:"etag,omitempty"`
  1636. // Version: Deprecated.
  1637. Version int64 `json:"version,omitempty"`
  1638. // ServerResponse contains the HTTP response code and headers from the
  1639. // server.
  1640. googleapi.ServerResponse `json:"-"`
  1641. // ForceSendFields is a list of field names (e.g. "AuditConfigs") to
  1642. // unconditionally include in API requests. By default, fields with
  1643. // empty values are omitted from API requests. However, any non-pointer,
  1644. // non-interface field appearing in ForceSendFields will be sent to the
  1645. // server regardless of whether the field is empty or not. This may be
  1646. // used to include empty fields in Patch requests.
  1647. ForceSendFields []string `json:"-"`
  1648. // NullFields is a list of field names (e.g. "AuditConfigs") to include
  1649. // in API requests with the JSON null value. By default, fields with
  1650. // empty values are omitted from API requests. However, any field with
  1651. // an empty value appearing in NullFields will be sent to the server as
  1652. // null. It is an error if a field in this list has a non-empty value.
  1653. // This may be used to include null fields in Patch requests.
  1654. NullFields []string `json:"-"`
  1655. }
  1656. func (s *Policy) MarshalJSON() ([]byte, error) {
  1657. type NoMethod Policy
  1658. raw := NoMethod(*s)
  1659. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1660. }
  1661. // SetIamPolicyRequest: Request message for `SetIamPolicy` method.
  1662. type SetIamPolicyRequest struct {
  1663. // Policy: REQUIRED: The complete policy to be applied to the
  1664. // `resource`. The size of
  1665. // the policy is limited to a few 10s of KB. An empty policy is a
  1666. // valid policy but certain Cloud Platform services (such as
  1667. // Projects)
  1668. // might reject them.
  1669. Policy *Policy `json:"policy,omitempty"`
  1670. // UpdateMask: OPTIONAL: A FieldMask specifying which fields of the
  1671. // policy to modify. Only
  1672. // the fields in the mask will be modified. If no mask is provided,
  1673. // the
  1674. // following default mask is used:
  1675. // paths: "bindings, etag"
  1676. // This field is only used by Cloud IAM.
  1677. UpdateMask string `json:"updateMask,omitempty"`
  1678. // ForceSendFields is a list of field names (e.g. "Policy") to
  1679. // unconditionally include in API requests. By default, fields with
  1680. // empty values are omitted from API requests. However, any non-pointer,
  1681. // non-interface field appearing in ForceSendFields will be sent to the
  1682. // server regardless of whether the field is empty or not. This may be
  1683. // used to include empty fields in Patch requests.
  1684. ForceSendFields []string `json:"-"`
  1685. // NullFields is a list of field names (e.g. "Policy") to include in API
  1686. // requests with the JSON null value. By default, fields with empty
  1687. // values are omitted from API requests. However, any field with an
  1688. // empty value appearing in NullFields will be sent to the server as
  1689. // null. It is an error if a field in this list has a non-empty value.
  1690. // This may be used to include null fields in Patch requests.
  1691. NullFields []string `json:"-"`
  1692. }
  1693. func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) {
  1694. type NoMethod SetIamPolicyRequest
  1695. raw := NoMethod(*s)
  1696. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1697. }
  1698. // SingleClusterRouting: Unconditionally routes all read/write requests
  1699. // to a specific cluster.
  1700. // This option preserves read-your-writes consistency, but does not
  1701. // improve
  1702. // availability.
  1703. type SingleClusterRouting struct {
  1704. // AllowTransactionalWrites: Whether or not `CheckAndMutateRow` and
  1705. // `ReadModifyWriteRow` requests are
  1706. // allowed by this app profile. It is unsafe to send these requests
  1707. // to
  1708. // the same table/row/column in multiple clusters.
  1709. AllowTransactionalWrites bool `json:"allowTransactionalWrites,omitempty"`
  1710. // ClusterId: The cluster to which read/write requests should be routed.
  1711. ClusterId string `json:"clusterId,omitempty"`
  1712. // ForceSendFields is a list of field names (e.g.
  1713. // "AllowTransactionalWrites") to unconditionally include in API
  1714. // requests. By default, fields with empty values are omitted from API
  1715. // requests. However, any non-pointer, non-interface field appearing in
  1716. // ForceSendFields will be sent to the server regardless of whether the
  1717. // field is empty or not. This may be used to include empty fields in
  1718. // Patch requests.
  1719. ForceSendFields []string `json:"-"`
  1720. // NullFields is a list of field names (e.g. "AllowTransactionalWrites")
  1721. // to include in API requests with the JSON null value. By default,
  1722. // fields with empty values are omitted from API requests. However, any
  1723. // field with an empty value appearing in NullFields will be sent to the
  1724. // server as null. It is an error if a field in this list has a
  1725. // non-empty value. This may be used to include null fields in Patch
  1726. // requests.
  1727. NullFields []string `json:"-"`
  1728. }
  1729. func (s *SingleClusterRouting) MarshalJSON() ([]byte, error) {
  1730. type NoMethod SingleClusterRouting
  1731. raw := NoMethod(*s)
  1732. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1733. }
  1734. // Split: An initial split point for a newly created table.
  1735. type Split struct {
  1736. // Key: Row key to use as an initial tablet boundary.
  1737. Key string `json:"key,omitempty"`
  1738. // ForceSendFields is a list of field names (e.g. "Key") to
  1739. // unconditionally include in API requests. By default, fields with
  1740. // empty values are omitted from API requests. However, any non-pointer,
  1741. // non-interface field appearing in ForceSendFields will be sent to the
  1742. // server regardless of whether the field is empty or not. This may be
  1743. // used to include empty fields in Patch requests.
  1744. ForceSendFields []string `json:"-"`
  1745. // NullFields is a list of field names (e.g. "Key") to include in API
  1746. // requests with the JSON null value. By default, fields with empty
  1747. // values are omitted from API requests. However, any field with an
  1748. // empty value appearing in NullFields will be sent to the server as
  1749. // null. It is an error if a field in this list has a non-empty value.
  1750. // This may be used to include null fields in Patch requests.
  1751. NullFields []string `json:"-"`
  1752. }
  1753. func (s *Split) MarshalJSON() ([]byte, error) {
  1754. type NoMethod Split
  1755. raw := NoMethod(*s)
  1756. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1757. }
  1758. // Status: The `Status` type defines a logical error model that is
  1759. // suitable for different
  1760. // programming environments, including REST APIs and RPC APIs. It is
  1761. // used by
  1762. // [gRPC](https://github.com/grpc). The error model is designed to
  1763. // be:
  1764. //
  1765. // - Simple to use and understand for most users
  1766. // - Flexible enough to meet unexpected needs
  1767. //
  1768. // # Overview
  1769. //
  1770. // The `Status` message contains three pieces of data: error code, error
  1771. // message,
  1772. // and error details. The error code should be an enum value
  1773. // of
  1774. // google.rpc.Code, but it may accept additional error codes if needed.
  1775. // The
  1776. // error message should be a developer-facing English message that
  1777. // helps
  1778. // developers *understand* and *resolve* the error. If a localized
  1779. // user-facing
  1780. // error message is needed, put the localized message in the error
  1781. // details or
  1782. // localize it in the client. The optional error details may contain
  1783. // arbitrary
  1784. // information about the error. There is a predefined set of error
  1785. // detail types
  1786. // in the package `google.rpc` that can be used for common error
  1787. // conditions.
  1788. //
  1789. // # Language mapping
  1790. //
  1791. // The `Status` message is the logical representation of the error
  1792. // model, but it
  1793. // is not necessarily the actual wire format. When the `Status` message
  1794. // is
  1795. // exposed in different client libraries and different wire protocols,
  1796. // it can be
  1797. // mapped differently. For example, it will likely be mapped to some
  1798. // exceptions
  1799. // in Java, but more likely mapped to some error codes in C.
  1800. //
  1801. // # Other uses
  1802. //
  1803. // The error model and the `Status` message can be used in a variety
  1804. // of
  1805. // environments, either with or without APIs, to provide a
  1806. // consistent developer experience across different
  1807. // environments.
  1808. //
  1809. // Example uses of this error model include:
  1810. //
  1811. // - Partial errors. If a service needs to return partial errors to the
  1812. // client,
  1813. // it may embed the `Status` in the normal response to indicate the
  1814. // partial
  1815. // errors.
  1816. //
  1817. // - Workflow errors. A typical workflow has multiple steps. Each step
  1818. // may
  1819. // have a `Status` message for error reporting.
  1820. //
  1821. // - Batch operations. If a client uses batch request and batch
  1822. // response, the
  1823. // `Status` message should be used directly inside batch response,
  1824. // one for
  1825. // each error sub-response.
  1826. //
  1827. // - Asynchronous operations. If an API call embeds asynchronous
  1828. // operation
  1829. // results in its response, the status of those operations should
  1830. // be
  1831. // represented directly using the `Status` message.
  1832. //
  1833. // - Logging. If some API errors are stored in logs, the message
  1834. // `Status` could
  1835. // be used directly after any stripping needed for security/privacy
  1836. // reasons.
  1837. type Status struct {
  1838. // Code: The status code, which should be an enum value of
  1839. // google.rpc.Code.
  1840. Code int64 `json:"code,omitempty"`
  1841. // Details: A list of messages that carry the error details. There is a
  1842. // common set of
  1843. // message types for APIs to use.
  1844. Details []googleapi.RawMessage `json:"details,omitempty"`
  1845. // Message: A developer-facing error message, which should be in
  1846. // English. Any
  1847. // user-facing error message should be localized and sent in
  1848. // the
  1849. // google.rpc.Status.details field, or localized by the client.
  1850. Message string `json:"message,omitempty"`
  1851. // ForceSendFields is a list of field names (e.g. "Code") to
  1852. // unconditionally include in API requests. By default, fields with
  1853. // empty values are omitted from API requests. However, any non-pointer,
  1854. // non-interface field appearing in ForceSendFields will be sent to the
  1855. // server regardless of whether the field is empty or not. This may be
  1856. // used to include empty fields in Patch requests.
  1857. ForceSendFields []string `json:"-"`
  1858. // NullFields is a list of field names (e.g. "Code") to include in API
  1859. // requests with the JSON null value. By default, fields with empty
  1860. // values are omitted from API requests. However, any field with an
  1861. // empty value appearing in NullFields will be sent to the server as
  1862. // null. It is an error if a field in this list has a non-empty value.
  1863. // This may be used to include null fields in Patch requests.
  1864. NullFields []string `json:"-"`
  1865. }
  1866. func (s *Status) MarshalJSON() ([]byte, error) {
  1867. type NoMethod Status
  1868. raw := NoMethod(*s)
  1869. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1870. }
  1871. // Table: A collection of user data indexed by row, column, and
  1872. // timestamp.
  1873. // Each table is served using the resources of its parent cluster.
  1874. type Table struct {
  1875. // ClusterStates: Output only.
  1876. // Map from cluster ID to per-cluster table state.
  1877. // If it could not be determined whether or not the table has data in
  1878. // a
  1879. // particular cluster (for example, if its zone is unavailable),
  1880. // then
  1881. // there will be an entry for the cluster with UNKNOWN
  1882. // `replication_status`.
  1883. // Views: `REPLICATION_VIEW`, `FULL`
  1884. ClusterStates map[string]ClusterState `json:"clusterStates,omitempty"`
  1885. // ColumnFamilies: (`CreationOnly`)
  1886. // The column families configured for this table, mapped by column
  1887. // family ID.
  1888. // Views: `SCHEMA_VIEW`, `FULL`
  1889. ColumnFamilies map[string]ColumnFamily `json:"columnFamilies,omitempty"`
  1890. // Granularity: (`CreationOnly`)
  1891. // The granularity (i.e. `MILLIS`) at which timestamps are stored
  1892. // in
  1893. // this table. Timestamps not matching the granularity will be
  1894. // rejected.
  1895. // If unspecified at creation time, the value will be set to
  1896. // `MILLIS`.
  1897. // Views: `SCHEMA_VIEW`, `FULL`.
  1898. //
  1899. // Possible values:
  1900. // "TIMESTAMP_GRANULARITY_UNSPECIFIED" - The user did not specify a
  1901. // granularity. Should not be returned.
  1902. // When specified during table creation, MILLIS will be used.
  1903. // "MILLIS" - The table keeps data versioned at a granularity of 1ms.
  1904. Granularity string `json:"granularity,omitempty"`
  1905. // Name: Output only.
  1906. // The unique name of the table. Values are of the
  1907. // form
  1908. // `projects/<project>/instances/<instance>/tables/_a-zA-Z0-9*`.
  1909. // Vie
  1910. // ws: `NAME_ONLY`, `SCHEMA_VIEW`, `REPLICATION_VIEW`, `FULL`
  1911. Name string `json:"name,omitempty"`
  1912. // ServerResponse contains the HTTP response code and headers from the
  1913. // server.
  1914. googleapi.ServerResponse `json:"-"`
  1915. // ForceSendFields is a list of field names (e.g. "ClusterStates") to
  1916. // unconditionally include in API requests. By default, fields with
  1917. // empty values are omitted from API requests. However, any non-pointer,
  1918. // non-interface field appearing in ForceSendFields will be sent to the
  1919. // server regardless of whether the field is empty or not. This may be
  1920. // used to include empty fields in Patch requests.
  1921. ForceSendFields []string `json:"-"`
  1922. // NullFields is a list of field names (e.g. "ClusterStates") to include
  1923. // in API requests with the JSON null value. By default, fields with
  1924. // empty values are omitted from API requests. However, any field with
  1925. // an empty value appearing in NullFields will be sent to the server as
  1926. // null. It is an error if a field in this list has a non-empty value.
  1927. // This may be used to include null fields in Patch requests.
  1928. NullFields []string `json:"-"`
  1929. }
  1930. func (s *Table) MarshalJSON() ([]byte, error) {
  1931. type NoMethod Table
  1932. raw := NoMethod(*s)
  1933. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1934. }
  1935. // TableProgress: Progress info for copying a table's data to the new
  1936. // cluster.
  1937. type TableProgress struct {
  1938. // EstimatedCopiedBytes: Estimate of the number of bytes copied so far
  1939. // for this table.
  1940. // This will eventually reach 'estimated_size_bytes' unless the table
  1941. // copy
  1942. // is CANCELLED.
  1943. EstimatedCopiedBytes int64 `json:"estimatedCopiedBytes,omitempty,string"`
  1944. // EstimatedSizeBytes: Estimate of the size of the table to be copied.
  1945. EstimatedSizeBytes int64 `json:"estimatedSizeBytes,omitempty,string"`
  1946. // Possible values:
  1947. // "STATE_UNSPECIFIED"
  1948. // "PENDING" - The table has not yet begun copying to the new cluster.
  1949. // "COPYING" - The table is actively being copied to the new cluster.
  1950. // "COMPLETED" - The table has been fully copied to the new cluster.
  1951. // "CANCELLED" - The table was deleted before it finished copying to
  1952. // the new cluster.
  1953. // Note that tables deleted after completion will stay marked
  1954. // as
  1955. // COMPLETED, not CANCELLED.
  1956. State string `json:"state,omitempty"`
  1957. // ForceSendFields is a list of field names (e.g.
  1958. // "EstimatedCopiedBytes") to unconditionally include in API requests.
  1959. // By default, fields with empty values are omitted from API requests.
  1960. // However, any non-pointer, non-interface field appearing in
  1961. // ForceSendFields will be sent to the server regardless of whether the
  1962. // field is empty or not. This may be used to include empty fields in
  1963. // Patch requests.
  1964. ForceSendFields []string `json:"-"`
  1965. // NullFields is a list of field names (e.g. "EstimatedCopiedBytes") to
  1966. // include in API requests with the JSON null value. By default, fields
  1967. // with empty values are omitted from API requests. However, any field
  1968. // with an empty value appearing in NullFields will be sent to the
  1969. // server as null. It is an error if a field in this list has a
  1970. // non-empty value. This may be used to include null fields in Patch
  1971. // requests.
  1972. NullFields []string `json:"-"`
  1973. }
  1974. func (s *TableProgress) MarshalJSON() ([]byte, error) {
  1975. type NoMethod TableProgress
  1976. raw := NoMethod(*s)
  1977. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1978. }
  1979. // TestIamPermissionsRequest: Request message for `TestIamPermissions`
  1980. // method.
  1981. type TestIamPermissionsRequest struct {
  1982. // Permissions: The set of permissions to check for the `resource`.
  1983. // Permissions with
  1984. // wildcards (such as '*' or 'storage.*') are not allowed. For
  1985. // more
  1986. // information see
  1987. // [IAM
  1988. // Overview](https://cloud.google.com/iam/docs/overview#permissions).
  1989. Permissions []string `json:"permissions,omitempty"`
  1990. // ForceSendFields is a list of field names (e.g. "Permissions") to
  1991. // unconditionally include in API requests. By default, fields with
  1992. // empty values are omitted from API requests. However, any non-pointer,
  1993. // non-interface field appearing in ForceSendFields will be sent to the
  1994. // server regardless of whether the field is empty or not. This may be
  1995. // used to include empty fields in Patch requests.
  1996. ForceSendFields []string `json:"-"`
  1997. // NullFields is a list of field names (e.g. "Permissions") to include
  1998. // in API requests with the JSON null value. By default, fields with
  1999. // empty values are omitted from API requests. However, any field with
  2000. // an empty value appearing in NullFields will be sent to the server as
  2001. // null. It is an error if a field in this list has a non-empty value.
  2002. // This may be used to include null fields in Patch requests.
  2003. NullFields []string `json:"-"`
  2004. }
  2005. func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) {
  2006. type NoMethod TestIamPermissionsRequest
  2007. raw := NoMethod(*s)
  2008. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2009. }
  2010. // TestIamPermissionsResponse: Response message for `TestIamPermissions`
  2011. // method.
  2012. type TestIamPermissionsResponse struct {
  2013. // Permissions: A subset of `TestPermissionsRequest.permissions` that
  2014. // the caller is
  2015. // allowed.
  2016. Permissions []string `json:"permissions,omitempty"`
  2017. // ServerResponse contains the HTTP response code and headers from the
  2018. // server.
  2019. googleapi.ServerResponse `json:"-"`
  2020. // ForceSendFields is a list of field names (e.g. "Permissions") to
  2021. // unconditionally include in API requests. By default, fields with
  2022. // empty values are omitted from API requests. However, any non-pointer,
  2023. // non-interface field appearing in ForceSendFields will be sent to the
  2024. // server regardless of whether the field is empty or not. This may be
  2025. // used to include empty fields in Patch requests.
  2026. ForceSendFields []string `json:"-"`
  2027. // NullFields is a list of field names (e.g. "Permissions") to include
  2028. // in API requests with the JSON null value. By default, fields with
  2029. // empty values are omitted from API requests. However, any field with
  2030. // an empty value appearing in NullFields will be sent to the server as
  2031. // null. It is an error if a field in this list has a non-empty value.
  2032. // This may be used to include null fields in Patch requests.
  2033. NullFields []string `json:"-"`
  2034. }
  2035. func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) {
  2036. type NoMethod TestIamPermissionsResponse
  2037. raw := NoMethod(*s)
  2038. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2039. }
  2040. // Union: A GcRule which deletes cells matching any of the given rules.
  2041. type Union struct {
  2042. // Rules: Delete cells which would be deleted by any element of `rules`.
  2043. Rules []*GcRule `json:"rules,omitempty"`
  2044. // ForceSendFields is a list of field names (e.g. "Rules") to
  2045. // unconditionally include in API requests. By default, fields with
  2046. // empty values are omitted from API requests. However, any non-pointer,
  2047. // non-interface field appearing in ForceSendFields will be sent to the
  2048. // server regardless of whether the field is empty or not. This may be
  2049. // used to include empty fields in Patch requests.
  2050. ForceSendFields []string `json:"-"`
  2051. // NullFields is a list of field names (e.g. "Rules") to include in API
  2052. // requests with the JSON null value. By default, fields with empty
  2053. // values are omitted from API requests. However, any field with an
  2054. // empty value appearing in NullFields will be sent to the server as
  2055. // null. It is an error if a field in this list has a non-empty value.
  2056. // This may be used to include null fields in Patch requests.
  2057. NullFields []string `json:"-"`
  2058. }
  2059. func (s *Union) MarshalJSON() ([]byte, error) {
  2060. type NoMethod Union
  2061. raw := NoMethod(*s)
  2062. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2063. }
  2064. // UpdateAppProfileMetadata: The metadata for the Operation returned by
  2065. // UpdateAppProfile.
  2066. type UpdateAppProfileMetadata struct {
  2067. }
  2068. // UpdateClusterMetadata: The metadata for the Operation returned by
  2069. // UpdateCluster.
  2070. type UpdateClusterMetadata struct {
  2071. // FinishTime: The time at which the operation failed or was completed
  2072. // successfully.
  2073. FinishTime string `json:"finishTime,omitempty"`
  2074. // OriginalRequest: The request that prompted the initiation of this
  2075. // UpdateCluster operation.
  2076. OriginalRequest *Cluster `json:"originalRequest,omitempty"`
  2077. // RequestTime: The time at which the original request was received.
  2078. RequestTime string `json:"requestTime,omitempty"`
  2079. // ForceSendFields is a list of field names (e.g. "FinishTime") to
  2080. // unconditionally include in API requests. By default, fields with
  2081. // empty values are omitted from API requests. However, any non-pointer,
  2082. // non-interface field appearing in ForceSendFields will be sent to the
  2083. // server regardless of whether the field is empty or not. This may be
  2084. // used to include empty fields in Patch requests.
  2085. ForceSendFields []string `json:"-"`
  2086. // NullFields is a list of field names (e.g. "FinishTime") to include in
  2087. // API requests with the JSON null value. By default, fields with empty
  2088. // values are omitted from API requests. However, any field with an
  2089. // empty value appearing in NullFields will be sent to the server as
  2090. // null. It is an error if a field in this list has a non-empty value.
  2091. // This may be used to include null fields in Patch requests.
  2092. NullFields []string `json:"-"`
  2093. }
  2094. func (s *UpdateClusterMetadata) MarshalJSON() ([]byte, error) {
  2095. type NoMethod UpdateClusterMetadata
  2096. raw := NoMethod(*s)
  2097. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2098. }
  2099. // UpdateInstanceMetadata: The metadata for the Operation returned by
  2100. // UpdateInstance.
  2101. type UpdateInstanceMetadata struct {
  2102. // FinishTime: The time at which the operation failed or was completed
  2103. // successfully.
  2104. FinishTime string `json:"finishTime,omitempty"`
  2105. // OriginalRequest: The request that prompted the initiation of this
  2106. // UpdateInstance operation.
  2107. OriginalRequest *PartialUpdateInstanceRequest `json:"originalRequest,omitempty"`
  2108. // RequestTime: The time at which the original request was received.
  2109. RequestTime string `json:"requestTime,omitempty"`
  2110. // ForceSendFields is a list of field names (e.g. "FinishTime") to
  2111. // unconditionally include in API requests. By default, fields with
  2112. // empty values are omitted from API requests. However, any non-pointer,
  2113. // non-interface field appearing in ForceSendFields will be sent to the
  2114. // server regardless of whether the field is empty or not. This may be
  2115. // used to include empty fields in Patch requests.
  2116. ForceSendFields []string `json:"-"`
  2117. // NullFields is a list of field names (e.g. "FinishTime") to include in
  2118. // API requests with the JSON null value. By default, fields with empty
  2119. // values are omitted from API requests. However, any field with an
  2120. // empty value appearing in NullFields will be sent to the server as
  2121. // null. It is an error if a field in this list has a non-empty value.
  2122. // This may be used to include null fields in Patch requests.
  2123. NullFields []string `json:"-"`
  2124. }
  2125. func (s *UpdateInstanceMetadata) MarshalJSON() ([]byte, error) {
  2126. type NoMethod UpdateInstanceMetadata
  2127. raw := NoMethod(*s)
  2128. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2129. }
  2130. // method id "bigtableadmin.operations.cancel":
  2131. type OperationsCancelCall struct {
  2132. s *Service
  2133. name string
  2134. urlParams_ gensupport.URLParams
  2135. ctx_ context.Context
  2136. header_ http.Header
  2137. }
  2138. // Cancel: Starts asynchronous cancellation on a long-running operation.
  2139. // The server
  2140. // makes a best effort to cancel the operation, but success is
  2141. // not
  2142. // guaranteed. If the server doesn't support this method, it
  2143. // returns
  2144. // `google.rpc.Code.UNIMPLEMENTED`. Clients can
  2145. // use
  2146. // Operations.GetOperation or
  2147. // other methods to check whether the cancellation succeeded or whether
  2148. // the
  2149. // operation completed despite cancellation. On successful
  2150. // cancellation,
  2151. // the operation is not deleted; instead, it becomes an operation
  2152. // with
  2153. // an Operation.error value with a google.rpc.Status.code of
  2154. // 1,
  2155. // corresponding to `Code.CANCELLED`.
  2156. func (r *OperationsService) Cancel(name string) *OperationsCancelCall {
  2157. c := &OperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2158. c.name = name
  2159. return c
  2160. }
  2161. // Fields allows partial responses to be retrieved. See
  2162. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2163. // for more information.
  2164. func (c *OperationsCancelCall) Fields(s ...googleapi.Field) *OperationsCancelCall {
  2165. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2166. return c
  2167. }
  2168. // Context sets the context to be used in this call's Do method. Any
  2169. // pending HTTP request will be aborted if the provided context is
  2170. // canceled.
  2171. func (c *OperationsCancelCall) Context(ctx context.Context) *OperationsCancelCall {
  2172. c.ctx_ = ctx
  2173. return c
  2174. }
  2175. // Header returns an http.Header that can be modified by the caller to
  2176. // add HTTP headers to the request.
  2177. func (c *OperationsCancelCall) Header() http.Header {
  2178. if c.header_ == nil {
  2179. c.header_ = make(http.Header)
  2180. }
  2181. return c.header_
  2182. }
  2183. func (c *OperationsCancelCall) doRequest(alt string) (*http.Response, error) {
  2184. reqHeaders := make(http.Header)
  2185. for k, v := range c.header_ {
  2186. reqHeaders[k] = v
  2187. }
  2188. reqHeaders.Set("User-Agent", c.s.userAgent())
  2189. var body io.Reader = nil
  2190. c.urlParams_.Set("alt", alt)
  2191. c.urlParams_.Set("prettyPrint", "false")
  2192. urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:cancel")
  2193. urls += "?" + c.urlParams_.Encode()
  2194. req, err := http.NewRequest("POST", urls, body)
  2195. if err != nil {
  2196. return nil, err
  2197. }
  2198. req.Header = reqHeaders
  2199. googleapi.Expand(req.URL, map[string]string{
  2200. "name": c.name,
  2201. })
  2202. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2203. }
  2204. // Do executes the "bigtableadmin.operations.cancel" call.
  2205. // Exactly one of *Empty or error will be non-nil. Any non-2xx status
  2206. // code is an error. Response headers are in either
  2207. // *Empty.ServerResponse.Header or (if a response was returned at all)
  2208. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  2209. // check whether the returned error was because http.StatusNotModified
  2210. // was returned.
  2211. func (c *OperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  2212. gensupport.SetOptions(c.urlParams_, opts...)
  2213. res, err := c.doRequest("json")
  2214. if res != nil && res.StatusCode == http.StatusNotModified {
  2215. if res.Body != nil {
  2216. res.Body.Close()
  2217. }
  2218. return nil, &googleapi.Error{
  2219. Code: res.StatusCode,
  2220. Header: res.Header,
  2221. }
  2222. }
  2223. if err != nil {
  2224. return nil, err
  2225. }
  2226. defer googleapi.CloseBody(res)
  2227. if err := googleapi.CheckResponse(res); err != nil {
  2228. return nil, err
  2229. }
  2230. ret := &Empty{
  2231. ServerResponse: googleapi.ServerResponse{
  2232. Header: res.Header,
  2233. HTTPStatusCode: res.StatusCode,
  2234. },
  2235. }
  2236. target := &ret
  2237. if err := gensupport.DecodeResponse(target, res); err != nil {
  2238. return nil, err
  2239. }
  2240. return ret, nil
  2241. // {
  2242. // "description": "Starts asynchronous cancellation on a long-running operation. The server\nmakes a best effort to cancel the operation, but success is not\nguaranteed. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`. Clients can use\nOperations.GetOperation or\nother methods to check whether the cancellation succeeded or whether the\noperation completed despite cancellation. On successful cancellation,\nthe operation is not deleted; instead, it becomes an operation with\nan Operation.error value with a google.rpc.Status.code of 1,\ncorresponding to `Code.CANCELLED`.",
  2243. // "flatPath": "v2/operations/{operationsId}:cancel",
  2244. // "httpMethod": "POST",
  2245. // "id": "bigtableadmin.operations.cancel",
  2246. // "parameterOrder": [
  2247. // "name"
  2248. // ],
  2249. // "parameters": {
  2250. // "name": {
  2251. // "description": "The name of the operation resource to be cancelled.",
  2252. // "location": "path",
  2253. // "pattern": "^operations/.+$",
  2254. // "required": true,
  2255. // "type": "string"
  2256. // }
  2257. // },
  2258. // "path": "v2/{+name}:cancel",
  2259. // "response": {
  2260. // "$ref": "Empty"
  2261. // },
  2262. // "scopes": [
  2263. // "https://www.googleapis.com/auth/bigtable.admin",
  2264. // "https://www.googleapis.com/auth/bigtable.admin.cluster",
  2265. // "https://www.googleapis.com/auth/bigtable.admin.instance",
  2266. // "https://www.googleapis.com/auth/cloud-bigtable.admin",
  2267. // "https://www.googleapis.com/auth/cloud-bigtable.admin.cluster",
  2268. // "https://www.googleapis.com/auth/cloud-platform"
  2269. // ]
  2270. // }
  2271. }
  2272. // method id "bigtableadmin.operations.delete":
  2273. type OperationsDeleteCall struct {
  2274. s *Service
  2275. name string
  2276. urlParams_ gensupport.URLParams
  2277. ctx_ context.Context
  2278. header_ http.Header
  2279. }
  2280. // Delete: Deletes a long-running operation. This method indicates that
  2281. // the client is
  2282. // no longer interested in the operation result. It does not cancel
  2283. // the
  2284. // operation. If the server doesn't support this method, it
  2285. // returns
  2286. // `google.rpc.Code.UNIMPLEMENTED`.
  2287. func (r *OperationsService) Delete(name string) *OperationsDeleteCall {
  2288. c := &OperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2289. c.name = name
  2290. return c
  2291. }
  2292. // Fields allows partial responses to be retrieved. See
  2293. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2294. // for more information.
  2295. func (c *OperationsDeleteCall) Fields(s ...googleapi.Field) *OperationsDeleteCall {
  2296. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2297. return c
  2298. }
  2299. // Context sets the context to be used in this call's Do method. Any
  2300. // pending HTTP request will be aborted if the provided context is
  2301. // canceled.
  2302. func (c *OperationsDeleteCall) Context(ctx context.Context) *OperationsDeleteCall {
  2303. c.ctx_ = ctx
  2304. return c
  2305. }
  2306. // Header returns an http.Header that can be modified by the caller to
  2307. // add HTTP headers to the request.
  2308. func (c *OperationsDeleteCall) Header() http.Header {
  2309. if c.header_ == nil {
  2310. c.header_ = make(http.Header)
  2311. }
  2312. return c.header_
  2313. }
  2314. func (c *OperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
  2315. reqHeaders := make(http.Header)
  2316. for k, v := range c.header_ {
  2317. reqHeaders[k] = v
  2318. }
  2319. reqHeaders.Set("User-Agent", c.s.userAgent())
  2320. var body io.Reader = nil
  2321. c.urlParams_.Set("alt", alt)
  2322. c.urlParams_.Set("prettyPrint", "false")
  2323. urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
  2324. urls += "?" + c.urlParams_.Encode()
  2325. req, err := http.NewRequest("DELETE", urls, body)
  2326. if err != nil {
  2327. return nil, err
  2328. }
  2329. req.Header = reqHeaders
  2330. googleapi.Expand(req.URL, map[string]string{
  2331. "name": c.name,
  2332. })
  2333. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2334. }
  2335. // Do executes the "bigtableadmin.operations.delete" call.
  2336. // Exactly one of *Empty or error will be non-nil. Any non-2xx status
  2337. // code is an error. Response headers are in either
  2338. // *Empty.ServerResponse.Header or (if a response was returned at all)
  2339. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  2340. // check whether the returned error was because http.StatusNotModified
  2341. // was returned.
  2342. func (c *OperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  2343. gensupport.SetOptions(c.urlParams_, opts...)
  2344. res, err := c.doRequest("json")
  2345. if res != nil && res.StatusCode == http.StatusNotModified {
  2346. if res.Body != nil {
  2347. res.Body.Close()
  2348. }
  2349. return nil, &googleapi.Error{
  2350. Code: res.StatusCode,
  2351. Header: res.Header,
  2352. }
  2353. }
  2354. if err != nil {
  2355. return nil, err
  2356. }
  2357. defer googleapi.CloseBody(res)
  2358. if err := googleapi.CheckResponse(res); err != nil {
  2359. return nil, err
  2360. }
  2361. ret := &Empty{
  2362. ServerResponse: googleapi.ServerResponse{
  2363. Header: res.Header,
  2364. HTTPStatusCode: res.StatusCode,
  2365. },
  2366. }
  2367. target := &ret
  2368. if err := gensupport.DecodeResponse(target, res); err != nil {
  2369. return nil, err
  2370. }
  2371. return ret, nil
  2372. // {
  2373. // "description": "Deletes a long-running operation. This method indicates that the client is\nno longer interested in the operation result. It does not cancel the\noperation. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`.",
  2374. // "flatPath": "v2/operations/{operationsId}",
  2375. // "httpMethod": "DELETE",
  2376. // "id": "bigtableadmin.operations.delete",
  2377. // "parameterOrder": [
  2378. // "name"
  2379. // ],
  2380. // "parameters": {
  2381. // "name": {
  2382. // "description": "The name of the operation resource to be deleted.",
  2383. // "location": "path",
  2384. // "pattern": "^operations/.+$",
  2385. // "required": true,
  2386. // "type": "string"
  2387. // }
  2388. // },
  2389. // "path": "v2/{+name}",
  2390. // "response": {
  2391. // "$ref": "Empty"
  2392. // },
  2393. // "scopes": [
  2394. // "https://www.googleapis.com/auth/bigtable.admin",
  2395. // "https://www.googleapis.com/auth/bigtable.admin.cluster",
  2396. // "https://www.googleapis.com/auth/bigtable.admin.instance",
  2397. // "https://www.googleapis.com/auth/cloud-bigtable.admin",
  2398. // "https://www.googleapis.com/auth/cloud-bigtable.admin.cluster",
  2399. // "https://www.googleapis.com/auth/cloud-platform"
  2400. // ]
  2401. // }
  2402. }
  2403. // method id "bigtableadmin.operations.get":
  2404. type OperationsGetCall struct {
  2405. s *Service
  2406. name string
  2407. urlParams_ gensupport.URLParams
  2408. ifNoneMatch_ string
  2409. ctx_ context.Context
  2410. header_ http.Header
  2411. }
  2412. // Get: Gets the latest state of a long-running operation. Clients can
  2413. // use this
  2414. // method to poll the operation result at intervals as recommended by
  2415. // the API
  2416. // service.
  2417. func (r *OperationsService) Get(name string) *OperationsGetCall {
  2418. c := &OperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2419. c.name = name
  2420. return c
  2421. }
  2422. // Fields allows partial responses to be retrieved. See
  2423. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2424. // for more information.
  2425. func (c *OperationsGetCall) Fields(s ...googleapi.Field) *OperationsGetCall {
  2426. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2427. return c
  2428. }
  2429. // IfNoneMatch sets the optional parameter which makes the operation
  2430. // fail if the object's ETag matches the given value. This is useful for
  2431. // getting updates only after the object has changed since the last
  2432. // request. Use googleapi.IsNotModified to check whether the response
  2433. // error from Do is the result of In-None-Match.
  2434. func (c *OperationsGetCall) IfNoneMatch(entityTag string) *OperationsGetCall {
  2435. c.ifNoneMatch_ = entityTag
  2436. return c
  2437. }
  2438. // Context sets the context to be used in this call's Do method. Any
  2439. // pending HTTP request will be aborted if the provided context is
  2440. // canceled.
  2441. func (c *OperationsGetCall) Context(ctx context.Context) *OperationsGetCall {
  2442. c.ctx_ = ctx
  2443. return c
  2444. }
  2445. // Header returns an http.Header that can be modified by the caller to
  2446. // add HTTP headers to the request.
  2447. func (c *OperationsGetCall) Header() http.Header {
  2448. if c.header_ == nil {
  2449. c.header_ = make(http.Header)
  2450. }
  2451. return c.header_
  2452. }
  2453. func (c *OperationsGetCall) doRequest(alt string) (*http.Response, error) {
  2454. reqHeaders := make(http.Header)
  2455. for k, v := range c.header_ {
  2456. reqHeaders[k] = v
  2457. }
  2458. reqHeaders.Set("User-Agent", c.s.userAgent())
  2459. if c.ifNoneMatch_ != "" {
  2460. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2461. }
  2462. var body io.Reader = nil
  2463. c.urlParams_.Set("alt", alt)
  2464. c.urlParams_.Set("prettyPrint", "false")
  2465. urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
  2466. urls += "?" + c.urlParams_.Encode()
  2467. req, err := http.NewRequest("GET", urls, body)
  2468. if err != nil {
  2469. return nil, err
  2470. }
  2471. req.Header = reqHeaders
  2472. googleapi.Expand(req.URL, map[string]string{
  2473. "name": c.name,
  2474. })
  2475. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2476. }
  2477. // Do executes the "bigtableadmin.operations.get" call.
  2478. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  2479. // status code is an error. Response headers are in either
  2480. // *Operation.ServerResponse.Header or (if a response was returned at
  2481. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  2482. // to check whether the returned error was because
  2483. // http.StatusNotModified was returned.
  2484. func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  2485. gensupport.SetOptions(c.urlParams_, opts...)
  2486. res, err := c.doRequest("json")
  2487. if res != nil && res.StatusCode == http.StatusNotModified {
  2488. if res.Body != nil {
  2489. res.Body.Close()
  2490. }
  2491. return nil, &googleapi.Error{
  2492. Code: res.StatusCode,
  2493. Header: res.Header,
  2494. }
  2495. }
  2496. if err != nil {
  2497. return nil, err
  2498. }
  2499. defer googleapi.CloseBody(res)
  2500. if err := googleapi.CheckResponse(res); err != nil {
  2501. return nil, err
  2502. }
  2503. ret := &Operation{
  2504. ServerResponse: googleapi.ServerResponse{
  2505. Header: res.Header,
  2506. HTTPStatusCode: res.StatusCode,
  2507. },
  2508. }
  2509. target := &ret
  2510. if err := gensupport.DecodeResponse(target, res); err != nil {
  2511. return nil, err
  2512. }
  2513. return ret, nil
  2514. // {
  2515. // "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice.",
  2516. // "flatPath": "v2/operations/{operationsId}",
  2517. // "httpMethod": "GET",
  2518. // "id": "bigtableadmin.operations.get",
  2519. // "parameterOrder": [
  2520. // "name"
  2521. // ],
  2522. // "parameters": {
  2523. // "name": {
  2524. // "description": "The name of the operation resource.",
  2525. // "location": "path",
  2526. // "pattern": "^operations/.+$",
  2527. // "required": true,
  2528. // "type": "string"
  2529. // }
  2530. // },
  2531. // "path": "v2/{+name}",
  2532. // "response": {
  2533. // "$ref": "Operation"
  2534. // },
  2535. // "scopes": [
  2536. // "https://www.googleapis.com/auth/bigtable.admin",
  2537. // "https://www.googleapis.com/auth/bigtable.admin.cluster",
  2538. // "https://www.googleapis.com/auth/bigtable.admin.instance",
  2539. // "https://www.googleapis.com/auth/cloud-bigtable.admin",
  2540. // "https://www.googleapis.com/auth/cloud-bigtable.admin.cluster",
  2541. // "https://www.googleapis.com/auth/cloud-platform",
  2542. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  2543. // ]
  2544. // }
  2545. }
  2546. // method id "bigtableadmin.operations.projects.operations.list":
  2547. type OperationsProjectsOperationsListCall struct {
  2548. s *Service
  2549. name string
  2550. urlParams_ gensupport.URLParams
  2551. ifNoneMatch_ string
  2552. ctx_ context.Context
  2553. header_ http.Header
  2554. }
  2555. // List: Lists operations that match the specified filter in the
  2556. // request. If the
  2557. // server doesn't support this method, it returns
  2558. // `UNIMPLEMENTED`.
  2559. //
  2560. // NOTE: the `name` binding allows API services to override the
  2561. // binding
  2562. // to use different resource name schemes, such as `users/*/operations`.
  2563. // To
  2564. // override the binding, API services can add a binding such
  2565. // as
  2566. // "/v1/{name=users/*}/operations" to their service configuration.
  2567. // For backwards compatibility, the default name includes the
  2568. // operations
  2569. // collection id, however overriding users must ensure the name
  2570. // binding
  2571. // is the parent resource, without the operations collection id.
  2572. func (r *OperationsProjectsOperationsService) List(name string) *OperationsProjectsOperationsListCall {
  2573. c := &OperationsProjectsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2574. c.name = name
  2575. return c
  2576. }
  2577. // Filter sets the optional parameter "filter": The standard list
  2578. // filter.
  2579. func (c *OperationsProjectsOperationsListCall) Filter(filter string) *OperationsProjectsOperationsListCall {
  2580. c.urlParams_.Set("filter", filter)
  2581. return c
  2582. }
  2583. // PageSize sets the optional parameter "pageSize": The standard list
  2584. // page size.
  2585. func (c *OperationsProjectsOperationsListCall) PageSize(pageSize int64) *OperationsProjectsOperationsListCall {
  2586. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  2587. return c
  2588. }
  2589. // PageToken sets the optional parameter "pageToken": The standard list
  2590. // page token.
  2591. func (c *OperationsProjectsOperationsListCall) PageToken(pageToken string) *OperationsProjectsOperationsListCall {
  2592. c.urlParams_.Set("pageToken", pageToken)
  2593. return c
  2594. }
  2595. // Fields allows partial responses to be retrieved. See
  2596. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2597. // for more information.
  2598. func (c *OperationsProjectsOperationsListCall) Fields(s ...googleapi.Field) *OperationsProjectsOperationsListCall {
  2599. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2600. return c
  2601. }
  2602. // IfNoneMatch sets the optional parameter which makes the operation
  2603. // fail if the object's ETag matches the given value. This is useful for
  2604. // getting updates only after the object has changed since the last
  2605. // request. Use googleapi.IsNotModified to check whether the response
  2606. // error from Do is the result of In-None-Match.
  2607. func (c *OperationsProjectsOperationsListCall) IfNoneMatch(entityTag string) *OperationsProjectsOperationsListCall {
  2608. c.ifNoneMatch_ = entityTag
  2609. return c
  2610. }
  2611. // Context sets the context to be used in this call's Do method. Any
  2612. // pending HTTP request will be aborted if the provided context is
  2613. // canceled.
  2614. func (c *OperationsProjectsOperationsListCall) Context(ctx context.Context) *OperationsProjectsOperationsListCall {
  2615. c.ctx_ = ctx
  2616. return c
  2617. }
  2618. // Header returns an http.Header that can be modified by the caller to
  2619. // add HTTP headers to the request.
  2620. func (c *OperationsProjectsOperationsListCall) Header() http.Header {
  2621. if c.header_ == nil {
  2622. c.header_ = make(http.Header)
  2623. }
  2624. return c.header_
  2625. }
  2626. func (c *OperationsProjectsOperationsListCall) doRequest(alt string) (*http.Response, error) {
  2627. reqHeaders := make(http.Header)
  2628. for k, v := range c.header_ {
  2629. reqHeaders[k] = v
  2630. }
  2631. reqHeaders.Set("User-Agent", c.s.userAgent())
  2632. if c.ifNoneMatch_ != "" {
  2633. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2634. }
  2635. var body io.Reader = nil
  2636. c.urlParams_.Set("alt", alt)
  2637. c.urlParams_.Set("prettyPrint", "false")
  2638. urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/operations")
  2639. urls += "?" + c.urlParams_.Encode()
  2640. req, err := http.NewRequest("GET", urls, body)
  2641. if err != nil {
  2642. return nil, err
  2643. }
  2644. req.Header = reqHeaders
  2645. googleapi.Expand(req.URL, map[string]string{
  2646. "name": c.name,
  2647. })
  2648. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2649. }
  2650. // Do executes the "bigtableadmin.operations.projects.operations.list" call.
  2651. // Exactly one of *ListOperationsResponse or error will be non-nil. Any
  2652. // non-2xx status code is an error. Response headers are in either
  2653. // *ListOperationsResponse.ServerResponse.Header or (if a response was
  2654. // returned at all) in error.(*googleapi.Error).Header. Use
  2655. // googleapi.IsNotModified to check whether the returned error was
  2656. // because http.StatusNotModified was returned.
  2657. func (c *OperationsProjectsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
  2658. gensupport.SetOptions(c.urlParams_, opts...)
  2659. res, err := c.doRequest("json")
  2660. if res != nil && res.StatusCode == http.StatusNotModified {
  2661. if res.Body != nil {
  2662. res.Body.Close()
  2663. }
  2664. return nil, &googleapi.Error{
  2665. Code: res.StatusCode,
  2666. Header: res.Header,
  2667. }
  2668. }
  2669. if err != nil {
  2670. return nil, err
  2671. }
  2672. defer googleapi.CloseBody(res)
  2673. if err := googleapi.CheckResponse(res); err != nil {
  2674. return nil, err
  2675. }
  2676. ret := &ListOperationsResponse{
  2677. ServerResponse: googleapi.ServerResponse{
  2678. Header: res.Header,
  2679. HTTPStatusCode: res.StatusCode,
  2680. },
  2681. }
  2682. target := &ret
  2683. if err := gensupport.DecodeResponse(target, res); err != nil {
  2684. return nil, err
  2685. }
  2686. return ret, nil
  2687. // {
  2688. // "description": "Lists operations that match the specified filter in the request. If the\nserver doesn't support this method, it returns `UNIMPLEMENTED`.\n\nNOTE: the `name` binding allows API services to override the binding\nto use different resource name schemes, such as `users/*/operations`. To\noverride the binding, API services can add a binding such as\n`\"/v1/{name=users/*}/operations\"` to their service configuration.\nFor backwards compatibility, the default name includes the operations\ncollection id, however overriding users must ensure the name binding\nis the parent resource, without the operations collection id.",
  2689. // "flatPath": "v2/operations/projects/{projectsId}/operations",
  2690. // "httpMethod": "GET",
  2691. // "id": "bigtableadmin.operations.projects.operations.list",
  2692. // "parameterOrder": [
  2693. // "name"
  2694. // ],
  2695. // "parameters": {
  2696. // "filter": {
  2697. // "description": "The standard list filter.",
  2698. // "location": "query",
  2699. // "type": "string"
  2700. // },
  2701. // "name": {
  2702. // "description": "The name of the operation's parent resource.",
  2703. // "location": "path",
  2704. // "pattern": "^operations/projects/.+$",
  2705. // "required": true,
  2706. // "type": "string"
  2707. // },
  2708. // "pageSize": {
  2709. // "description": "The standard list page size.",
  2710. // "format": "int32",
  2711. // "location": "query",
  2712. // "type": "integer"
  2713. // },
  2714. // "pageToken": {
  2715. // "description": "The standard list page token.",
  2716. // "location": "query",
  2717. // "type": "string"
  2718. // }
  2719. // },
  2720. // "path": "v2/{+name}/operations",
  2721. // "response": {
  2722. // "$ref": "ListOperationsResponse"
  2723. // },
  2724. // "scopes": [
  2725. // "https://www.googleapis.com/auth/bigtable.admin",
  2726. // "https://www.googleapis.com/auth/bigtable.admin.cluster",
  2727. // "https://www.googleapis.com/auth/bigtable.admin.instance",
  2728. // "https://www.googleapis.com/auth/cloud-bigtable.admin",
  2729. // "https://www.googleapis.com/auth/cloud-bigtable.admin.cluster",
  2730. // "https://www.googleapis.com/auth/cloud-platform",
  2731. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  2732. // ]
  2733. // }
  2734. }
  2735. // Pages invokes f for each page of results.
  2736. // A non-nil error returned from f will halt the iteration.
  2737. // The provided context supersedes any context provided to the Context method.
  2738. func (c *OperationsProjectsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
  2739. c.ctx_ = ctx
  2740. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  2741. for {
  2742. x, err := c.Do()
  2743. if err != nil {
  2744. return err
  2745. }
  2746. if err := f(x); err != nil {
  2747. return err
  2748. }
  2749. if x.NextPageToken == "" {
  2750. return nil
  2751. }
  2752. c.PageToken(x.NextPageToken)
  2753. }
  2754. }
  2755. // method id "bigtableadmin.projects.instances.create":
  2756. type ProjectsInstancesCreateCall struct {
  2757. s *Service
  2758. parent string
  2759. createinstancerequest *CreateInstanceRequest
  2760. urlParams_ gensupport.URLParams
  2761. ctx_ context.Context
  2762. header_ http.Header
  2763. }
  2764. // Create: Create an instance within a project.
  2765. func (r *ProjectsInstancesService) Create(parent string, createinstancerequest *CreateInstanceRequest) *ProjectsInstancesCreateCall {
  2766. c := &ProjectsInstancesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2767. c.parent = parent
  2768. c.createinstancerequest = createinstancerequest
  2769. return c
  2770. }
  2771. // Fields allows partial responses to be retrieved. See
  2772. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2773. // for more information.
  2774. func (c *ProjectsInstancesCreateCall) Fields(s ...googleapi.Field) *ProjectsInstancesCreateCall {
  2775. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2776. return c
  2777. }
  2778. // Context sets the context to be used in this call's Do method. Any
  2779. // pending HTTP request will be aborted if the provided context is
  2780. // canceled.
  2781. func (c *ProjectsInstancesCreateCall) Context(ctx context.Context) *ProjectsInstancesCreateCall {
  2782. c.ctx_ = ctx
  2783. return c
  2784. }
  2785. // Header returns an http.Header that can be modified by the caller to
  2786. // add HTTP headers to the request.
  2787. func (c *ProjectsInstancesCreateCall) Header() http.Header {
  2788. if c.header_ == nil {
  2789. c.header_ = make(http.Header)
  2790. }
  2791. return c.header_
  2792. }
  2793. func (c *ProjectsInstancesCreateCall) doRequest(alt string) (*http.Response, error) {
  2794. reqHeaders := make(http.Header)
  2795. for k, v := range c.header_ {
  2796. reqHeaders[k] = v
  2797. }
  2798. reqHeaders.Set("User-Agent", c.s.userAgent())
  2799. var body io.Reader = nil
  2800. body, err := googleapi.WithoutDataWrapper.JSONReader(c.createinstancerequest)
  2801. if err != nil {
  2802. return nil, err
  2803. }
  2804. reqHeaders.Set("Content-Type", "application/json")
  2805. c.urlParams_.Set("alt", alt)
  2806. c.urlParams_.Set("prettyPrint", "false")
  2807. urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/instances")
  2808. urls += "?" + c.urlParams_.Encode()
  2809. req, err := http.NewRequest("POST", urls, body)
  2810. if err != nil {
  2811. return nil, err
  2812. }
  2813. req.Header = reqHeaders
  2814. googleapi.Expand(req.URL, map[string]string{
  2815. "parent": c.parent,
  2816. })
  2817. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2818. }
  2819. // Do executes the "bigtableadmin.projects.instances.create" call.
  2820. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  2821. // status code is an error. Response headers are in either
  2822. // *Operation.ServerResponse.Header or (if a response was returned at
  2823. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  2824. // to check whether the returned error was because
  2825. // http.StatusNotModified was returned.
  2826. func (c *ProjectsInstancesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  2827. gensupport.SetOptions(c.urlParams_, opts...)
  2828. res, err := c.doRequest("json")
  2829. if res != nil && res.StatusCode == http.StatusNotModified {
  2830. if res.Body != nil {
  2831. res.Body.Close()
  2832. }
  2833. return nil, &googleapi.Error{
  2834. Code: res.StatusCode,
  2835. Header: res.Header,
  2836. }
  2837. }
  2838. if err != nil {
  2839. return nil, err
  2840. }
  2841. defer googleapi.CloseBody(res)
  2842. if err := googleapi.CheckResponse(res); err != nil {
  2843. return nil, err
  2844. }
  2845. ret := &Operation{
  2846. ServerResponse: googleapi.ServerResponse{
  2847. Header: res.Header,
  2848. HTTPStatusCode: res.StatusCode,
  2849. },
  2850. }
  2851. target := &ret
  2852. if err := gensupport.DecodeResponse(target, res); err != nil {
  2853. return nil, err
  2854. }
  2855. return ret, nil
  2856. // {
  2857. // "description": "Create an instance within a project.",
  2858. // "flatPath": "v2/projects/{projectsId}/instances",
  2859. // "httpMethod": "POST",
  2860. // "id": "bigtableadmin.projects.instances.create",
  2861. // "parameterOrder": [
  2862. // "parent"
  2863. // ],
  2864. // "parameters": {
  2865. // "parent": {
  2866. // "description": "The unique name of the project in which to create the new instance.\nValues are of the form `projects/\u003cproject\u003e`.",
  2867. // "location": "path",
  2868. // "pattern": "^projects/[^/]+$",
  2869. // "required": true,
  2870. // "type": "string"
  2871. // }
  2872. // },
  2873. // "path": "v2/{+parent}/instances",
  2874. // "request": {
  2875. // "$ref": "CreateInstanceRequest"
  2876. // },
  2877. // "response": {
  2878. // "$ref": "Operation"
  2879. // },
  2880. // "scopes": [
  2881. // "https://www.googleapis.com/auth/bigtable.admin",
  2882. // "https://www.googleapis.com/auth/bigtable.admin.cluster",
  2883. // "https://www.googleapis.com/auth/bigtable.admin.instance",
  2884. // "https://www.googleapis.com/auth/cloud-bigtable.admin",
  2885. // "https://www.googleapis.com/auth/cloud-bigtable.admin.cluster",
  2886. // "https://www.googleapis.com/auth/cloud-platform"
  2887. // ]
  2888. // }
  2889. }
  2890. // method id "bigtableadmin.projects.instances.delete":
  2891. type ProjectsInstancesDeleteCall struct {
  2892. s *Service
  2893. name string
  2894. urlParams_ gensupport.URLParams
  2895. ctx_ context.Context
  2896. header_ http.Header
  2897. }
  2898. // Delete: Delete an instance from a project.
  2899. func (r *ProjectsInstancesService) Delete(name string) *ProjectsInstancesDeleteCall {
  2900. c := &ProjectsInstancesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2901. c.name = name
  2902. return c
  2903. }
  2904. // Fields allows partial responses to be retrieved. See
  2905. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2906. // for more information.
  2907. func (c *ProjectsInstancesDeleteCall) Fields(s ...googleapi.Field) *ProjectsInstancesDeleteCall {
  2908. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2909. return c
  2910. }
  2911. // Context sets the context to be used in this call's Do method. Any
  2912. // pending HTTP request will be aborted if the provided context is
  2913. // canceled.
  2914. func (c *ProjectsInstancesDeleteCall) Context(ctx context.Context) *ProjectsInstancesDeleteCall {
  2915. c.ctx_ = ctx
  2916. return c
  2917. }
  2918. // Header returns an http.Header that can be modified by the caller to
  2919. // add HTTP headers to the request.
  2920. func (c *ProjectsInstancesDeleteCall) Header() http.Header {
  2921. if c.header_ == nil {
  2922. c.header_ = make(http.Header)
  2923. }
  2924. return c.header_
  2925. }
  2926. func (c *ProjectsInstancesDeleteCall) doRequest(alt string) (*http.Response, error) {
  2927. reqHeaders := make(http.Header)
  2928. for k, v := range c.header_ {
  2929. reqHeaders[k] = v
  2930. }
  2931. reqHeaders.Set("User-Agent", c.s.userAgent())
  2932. var body io.Reader = nil
  2933. c.urlParams_.Set("alt", alt)
  2934. c.urlParams_.Set("prettyPrint", "false")
  2935. urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
  2936. urls += "?" + c.urlParams_.Encode()
  2937. req, err := http.NewRequest("DELETE", urls, body)
  2938. if err != nil {
  2939. return nil, err
  2940. }
  2941. req.Header = reqHeaders
  2942. googleapi.Expand(req.URL, map[string]string{
  2943. "name": c.name,
  2944. })
  2945. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2946. }
  2947. // Do executes the "bigtableadmin.projects.instances.delete" call.
  2948. // Exactly one of *Empty or error will be non-nil. Any non-2xx status
  2949. // code is an error. Response headers are in either
  2950. // *Empty.ServerResponse.Header or (if a response was returned at all)
  2951. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  2952. // check whether the returned error was because http.StatusNotModified
  2953. // was returned.
  2954. func (c *ProjectsInstancesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  2955. gensupport.SetOptions(c.urlParams_, opts...)
  2956. res, err := c.doRequest("json")
  2957. if res != nil && res.StatusCode == http.StatusNotModified {
  2958. if res.Body != nil {
  2959. res.Body.Close()
  2960. }
  2961. return nil, &googleapi.Error{
  2962. Code: res.StatusCode,
  2963. Header: res.Header,
  2964. }
  2965. }
  2966. if err != nil {
  2967. return nil, err
  2968. }
  2969. defer googleapi.CloseBody(res)
  2970. if err := googleapi.CheckResponse(res); err != nil {
  2971. return nil, err
  2972. }
  2973. ret := &Empty{
  2974. ServerResponse: googleapi.ServerResponse{
  2975. Header: res.Header,
  2976. HTTPStatusCode: res.StatusCode,
  2977. },
  2978. }
  2979. target := &ret
  2980. if err := gensupport.DecodeResponse(target, res); err != nil {
  2981. return nil, err
  2982. }
  2983. return ret, nil
  2984. // {
  2985. // "description": "Delete an instance from a project.",
  2986. // "flatPath": "v2/projects/{projectsId}/instances/{instancesId}",
  2987. // "httpMethod": "DELETE",
  2988. // "id": "bigtableadmin.projects.instances.delete",
  2989. // "parameterOrder": [
  2990. // "name"
  2991. // ],
  2992. // "parameters": {
  2993. // "name": {
  2994. // "description": "The unique name of the instance to be deleted.\nValues are of the form `projects/\u003cproject\u003e/instances/\u003cinstance\u003e`.",
  2995. // "location": "path",
  2996. // "pattern": "^projects/[^/]+/instances/[^/]+$",
  2997. // "required": true,
  2998. // "type": "string"
  2999. // }
  3000. // },
  3001. // "path": "v2/{+name}",
  3002. // "response": {
  3003. // "$ref": "Empty"
  3004. // },
  3005. // "scopes": [
  3006. // "https://www.googleapis.com/auth/bigtable.admin",
  3007. // "https://www.googleapis.com/auth/bigtable.admin.cluster",
  3008. // "https://www.googleapis.com/auth/bigtable.admin.instance",
  3009. // "https://www.googleapis.com/auth/cloud-bigtable.admin",
  3010. // "https://www.googleapis.com/auth/cloud-bigtable.admin.cluster",
  3011. // "https://www.googleapis.com/auth/cloud-platform"
  3012. // ]
  3013. // }
  3014. }
  3015. // method id "bigtableadmin.projects.instances.get":
  3016. type ProjectsInstancesGetCall struct {
  3017. s *Service
  3018. name string
  3019. urlParams_ gensupport.URLParams
  3020. ifNoneMatch_ string
  3021. ctx_ context.Context
  3022. header_ http.Header
  3023. }
  3024. // Get: Gets information about an instance.
  3025. func (r *ProjectsInstancesService) Get(name string) *ProjectsInstancesGetCall {
  3026. c := &ProjectsInstancesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3027. c.name = name
  3028. return c
  3029. }
  3030. // Fields allows partial responses to be retrieved. See
  3031. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3032. // for more information.
  3033. func (c *ProjectsInstancesGetCall) Fields(s ...googleapi.Field) *ProjectsInstancesGetCall {
  3034. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3035. return c
  3036. }
  3037. // IfNoneMatch sets the optional parameter which makes the operation
  3038. // fail if the object's ETag matches the given value. This is useful for
  3039. // getting updates only after the object has changed since the last
  3040. // request. Use googleapi.IsNotModified to check whether the response
  3041. // error from Do is the result of In-None-Match.
  3042. func (c *ProjectsInstancesGetCall) IfNoneMatch(entityTag string) *ProjectsInstancesGetCall {
  3043. c.ifNoneMatch_ = entityTag
  3044. return c
  3045. }
  3046. // Context sets the context to be used in this call's Do method. Any
  3047. // pending HTTP request will be aborted if the provided context is
  3048. // canceled.
  3049. func (c *ProjectsInstancesGetCall) Context(ctx context.Context) *ProjectsInstancesGetCall {
  3050. c.ctx_ = ctx
  3051. return c
  3052. }
  3053. // Header returns an http.Header that can be modified by the caller to
  3054. // add HTTP headers to the request.
  3055. func (c *ProjectsInstancesGetCall) Header() http.Header {
  3056. if c.header_ == nil {
  3057. c.header_ = make(http.Header)
  3058. }
  3059. return c.header_
  3060. }
  3061. func (c *ProjectsInstancesGetCall) doRequest(alt string) (*http.Response, error) {
  3062. reqHeaders := make(http.Header)
  3063. for k, v := range c.header_ {
  3064. reqHeaders[k] = v
  3065. }
  3066. reqHeaders.Set("User-Agent", c.s.userAgent())
  3067. if c.ifNoneMatch_ != "" {
  3068. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3069. }
  3070. var body io.Reader = nil
  3071. c.urlParams_.Set("alt", alt)
  3072. c.urlParams_.Set("prettyPrint", "false")
  3073. urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
  3074. urls += "?" + c.urlParams_.Encode()
  3075. req, err := http.NewRequest("GET", urls, body)
  3076. if err != nil {
  3077. return nil, err
  3078. }
  3079. req.Header = reqHeaders
  3080. googleapi.Expand(req.URL, map[string]string{
  3081. "name": c.name,
  3082. })
  3083. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3084. }
  3085. // Do executes the "bigtableadmin.projects.instances.get" call.
  3086. // Exactly one of *Instance or error will be non-nil. Any non-2xx status
  3087. // code is an error. Response headers are in either
  3088. // *Instance.ServerResponse.Header or (if a response was returned at
  3089. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  3090. // to check whether the returned error was because
  3091. // http.StatusNotModified was returned.
  3092. func (c *ProjectsInstancesGetCall) Do(opts ...googleapi.CallOption) (*Instance, error) {
  3093. gensupport.SetOptions(c.urlParams_, opts...)
  3094. res, err := c.doRequest("json")
  3095. if res != nil && res.StatusCode == http.StatusNotModified {
  3096. if res.Body != nil {
  3097. res.Body.Close()
  3098. }
  3099. return nil, &googleapi.Error{
  3100. Code: res.StatusCode,
  3101. Header: res.Header,
  3102. }
  3103. }
  3104. if err != nil {
  3105. return nil, err
  3106. }
  3107. defer googleapi.CloseBody(res)
  3108. if err := googleapi.CheckResponse(res); err != nil {
  3109. return nil, err
  3110. }
  3111. ret := &Instance{
  3112. ServerResponse: googleapi.ServerResponse{
  3113. Header: res.Header,
  3114. HTTPStatusCode: res.StatusCode,
  3115. },
  3116. }
  3117. target := &ret
  3118. if err := gensupport.DecodeResponse(target, res); err != nil {
  3119. return nil, err
  3120. }
  3121. return ret, nil
  3122. // {
  3123. // "description": "Gets information about an instance.",
  3124. // "flatPath": "v2/projects/{projectsId}/instances/{instancesId}",
  3125. // "httpMethod": "GET",
  3126. // "id": "bigtableadmin.projects.instances.get",
  3127. // "parameterOrder": [
  3128. // "name"
  3129. // ],
  3130. // "parameters": {
  3131. // "name": {
  3132. // "description": "The unique name of the requested instance. Values are of the form\n`projects/\u003cproject\u003e/instances/\u003cinstance\u003e`.",
  3133. // "location": "path",
  3134. // "pattern": "^projects/[^/]+/instances/[^/]+$",
  3135. // "required": true,
  3136. // "type": "string"
  3137. // }
  3138. // },
  3139. // "path": "v2/{+name}",
  3140. // "response": {
  3141. // "$ref": "Instance"
  3142. // },
  3143. // "scopes": [
  3144. // "https://www.googleapis.com/auth/bigtable.admin",
  3145. // "https://www.googleapis.com/auth/bigtable.admin.cluster",
  3146. // "https://www.googleapis.com/auth/bigtable.admin.instance",
  3147. // "https://www.googleapis.com/auth/cloud-bigtable.admin",
  3148. // "https://www.googleapis.com/auth/cloud-bigtable.admin.cluster",
  3149. // "https://www.googleapis.com/auth/cloud-platform",
  3150. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  3151. // ]
  3152. // }
  3153. }
  3154. // method id "bigtableadmin.projects.instances.getIamPolicy":
  3155. type ProjectsInstancesGetIamPolicyCall struct {
  3156. s *Service
  3157. resource string
  3158. getiampolicyrequest *GetIamPolicyRequest
  3159. urlParams_ gensupport.URLParams
  3160. ctx_ context.Context
  3161. header_ http.Header
  3162. }
  3163. // GetIamPolicy: Gets the access control policy for an instance
  3164. // resource. Returns an empty
  3165. // policy if an instance exists but does not have a policy set.
  3166. func (r *ProjectsInstancesService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *ProjectsInstancesGetIamPolicyCall {
  3167. c := &ProjectsInstancesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3168. c.resource = resource
  3169. c.getiampolicyrequest = getiampolicyrequest
  3170. return c
  3171. }
  3172. // Fields allows partial responses to be retrieved. See
  3173. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3174. // for more information.
  3175. func (c *ProjectsInstancesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsInstancesGetIamPolicyCall {
  3176. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3177. return c
  3178. }
  3179. // Context sets the context to be used in this call's Do method. Any
  3180. // pending HTTP request will be aborted if the provided context is
  3181. // canceled.
  3182. func (c *ProjectsInstancesGetIamPolicyCall) Context(ctx context.Context) *ProjectsInstancesGetIamPolicyCall {
  3183. c.ctx_ = ctx
  3184. return c
  3185. }
  3186. // Header returns an http.Header that can be modified by the caller to
  3187. // add HTTP headers to the request.
  3188. func (c *ProjectsInstancesGetIamPolicyCall) Header() http.Header {
  3189. if c.header_ == nil {
  3190. c.header_ = make(http.Header)
  3191. }
  3192. return c.header_
  3193. }
  3194. func (c *ProjectsInstancesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  3195. reqHeaders := make(http.Header)
  3196. for k, v := range c.header_ {
  3197. reqHeaders[k] = v
  3198. }
  3199. reqHeaders.Set("User-Agent", c.s.userAgent())
  3200. var body io.Reader = nil
  3201. body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest)
  3202. if err != nil {
  3203. return nil, err
  3204. }
  3205. reqHeaders.Set("Content-Type", "application/json")
  3206. c.urlParams_.Set("alt", alt)
  3207. c.urlParams_.Set("prettyPrint", "false")
  3208. urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+resource}:getIamPolicy")
  3209. urls += "?" + c.urlParams_.Encode()
  3210. req, err := http.NewRequest("POST", urls, body)
  3211. if err != nil {
  3212. return nil, err
  3213. }
  3214. req.Header = reqHeaders
  3215. googleapi.Expand(req.URL, map[string]string{
  3216. "resource": c.resource,
  3217. })
  3218. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3219. }
  3220. // Do executes the "bigtableadmin.projects.instances.getIamPolicy" call.
  3221. // Exactly one of *Policy or error will be non-nil. Any non-2xx status
  3222. // code is an error. Response headers are in either
  3223. // *Policy.ServerResponse.Header or (if a response was returned at all)
  3224. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3225. // check whether the returned error was because http.StatusNotModified
  3226. // was returned.
  3227. func (c *ProjectsInstancesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  3228. gensupport.SetOptions(c.urlParams_, opts...)
  3229. res, err := c.doRequest("json")
  3230. if res != nil && res.StatusCode == http.StatusNotModified {
  3231. if res.Body != nil {
  3232. res.Body.Close()
  3233. }
  3234. return nil, &googleapi.Error{
  3235. Code: res.StatusCode,
  3236. Header: res.Header,
  3237. }
  3238. }
  3239. if err != nil {
  3240. return nil, err
  3241. }
  3242. defer googleapi.CloseBody(res)
  3243. if err := googleapi.CheckResponse(res); err != nil {
  3244. return nil, err
  3245. }
  3246. ret := &Policy{
  3247. ServerResponse: googleapi.ServerResponse{
  3248. Header: res.Header,
  3249. HTTPStatusCode: res.StatusCode,
  3250. },
  3251. }
  3252. target := &ret
  3253. if err := gensupport.DecodeResponse(target, res); err != nil {
  3254. return nil, err
  3255. }
  3256. return ret, nil
  3257. // {
  3258. // "description": "Gets the access control policy for an instance resource. Returns an empty\npolicy if an instance exists but does not have a policy set.",
  3259. // "flatPath": "v2/projects/{projectsId}/instances/{instancesId}:getIamPolicy",
  3260. // "httpMethod": "POST",
  3261. // "id": "bigtableadmin.projects.instances.getIamPolicy",
  3262. // "parameterOrder": [
  3263. // "resource"
  3264. // ],
  3265. // "parameters": {
  3266. // "resource": {
  3267. // "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.",
  3268. // "location": "path",
  3269. // "pattern": "^projects/[^/]+/instances/[^/]+$",
  3270. // "required": true,
  3271. // "type": "string"
  3272. // }
  3273. // },
  3274. // "path": "v2/{+resource}:getIamPolicy",
  3275. // "request": {
  3276. // "$ref": "GetIamPolicyRequest"
  3277. // },
  3278. // "response": {
  3279. // "$ref": "Policy"
  3280. // },
  3281. // "scopes": [
  3282. // "https://www.googleapis.com/auth/bigtable.admin",
  3283. // "https://www.googleapis.com/auth/bigtable.admin.cluster",
  3284. // "https://www.googleapis.com/auth/bigtable.admin.instance",
  3285. // "https://www.googleapis.com/auth/cloud-bigtable.admin",
  3286. // "https://www.googleapis.com/auth/cloud-bigtable.admin.cluster",
  3287. // "https://www.googleapis.com/auth/cloud-platform"
  3288. // ]
  3289. // }
  3290. }
  3291. // method id "bigtableadmin.projects.instances.list":
  3292. type ProjectsInstancesListCall struct {
  3293. s *Service
  3294. parent string
  3295. urlParams_ gensupport.URLParams
  3296. ifNoneMatch_ string
  3297. ctx_ context.Context
  3298. header_ http.Header
  3299. }
  3300. // List: Lists information about instances in a project.
  3301. func (r *ProjectsInstancesService) List(parent string) *ProjectsInstancesListCall {
  3302. c := &ProjectsInstancesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3303. c.parent = parent
  3304. return c
  3305. }
  3306. // PageToken sets the optional parameter "pageToken": DEPRECATED: This
  3307. // field is unused and ignored.
  3308. func (c *ProjectsInstancesListCall) PageToken(pageToken string) *ProjectsInstancesListCall {
  3309. c.urlParams_.Set("pageToken", pageToken)
  3310. return c
  3311. }
  3312. // Fields allows partial responses to be retrieved. See
  3313. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3314. // for more information.
  3315. func (c *ProjectsInstancesListCall) Fields(s ...googleapi.Field) *ProjectsInstancesListCall {
  3316. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3317. return c
  3318. }
  3319. // IfNoneMatch sets the optional parameter which makes the operation
  3320. // fail if the object's ETag matches the given value. This is useful for
  3321. // getting updates only after the object has changed since the last
  3322. // request. Use googleapi.IsNotModified to check whether the response
  3323. // error from Do is the result of In-None-Match.
  3324. func (c *ProjectsInstancesListCall) IfNoneMatch(entityTag string) *ProjectsInstancesListCall {
  3325. c.ifNoneMatch_ = entityTag
  3326. return c
  3327. }
  3328. // Context sets the context to be used in this call's Do method. Any
  3329. // pending HTTP request will be aborted if the provided context is
  3330. // canceled.
  3331. func (c *ProjectsInstancesListCall) Context(ctx context.Context) *ProjectsInstancesListCall {
  3332. c.ctx_ = ctx
  3333. return c
  3334. }
  3335. // Header returns an http.Header that can be modified by the caller to
  3336. // add HTTP headers to the request.
  3337. func (c *ProjectsInstancesListCall) Header() http.Header {
  3338. if c.header_ == nil {
  3339. c.header_ = make(http.Header)
  3340. }
  3341. return c.header_
  3342. }
  3343. func (c *ProjectsInstancesListCall) doRequest(alt string) (*http.Response, error) {
  3344. reqHeaders := make(http.Header)
  3345. for k, v := range c.header_ {
  3346. reqHeaders[k] = v
  3347. }
  3348. reqHeaders.Set("User-Agent", c.s.userAgent())
  3349. if c.ifNoneMatch_ != "" {
  3350. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3351. }
  3352. var body io.Reader = nil
  3353. c.urlParams_.Set("alt", alt)
  3354. c.urlParams_.Set("prettyPrint", "false")
  3355. urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/instances")
  3356. urls += "?" + c.urlParams_.Encode()
  3357. req, err := http.NewRequest("GET", urls, body)
  3358. if err != nil {
  3359. return nil, err
  3360. }
  3361. req.Header = reqHeaders
  3362. googleapi.Expand(req.URL, map[string]string{
  3363. "parent": c.parent,
  3364. })
  3365. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3366. }
  3367. // Do executes the "bigtableadmin.projects.instances.list" call.
  3368. // Exactly one of *ListInstancesResponse or error will be non-nil. Any
  3369. // non-2xx status code is an error. Response headers are in either
  3370. // *ListInstancesResponse.ServerResponse.Header or (if a response was
  3371. // returned at all) in error.(*googleapi.Error).Header. Use
  3372. // googleapi.IsNotModified to check whether the returned error was
  3373. // because http.StatusNotModified was returned.
  3374. func (c *ProjectsInstancesListCall) Do(opts ...googleapi.CallOption) (*ListInstancesResponse, error) {
  3375. gensupport.SetOptions(c.urlParams_, opts...)
  3376. res, err := c.doRequest("json")
  3377. if res != nil && res.StatusCode == http.StatusNotModified {
  3378. if res.Body != nil {
  3379. res.Body.Close()
  3380. }
  3381. return nil, &googleapi.Error{
  3382. Code: res.StatusCode,
  3383. Header: res.Header,
  3384. }
  3385. }
  3386. if err != nil {
  3387. return nil, err
  3388. }
  3389. defer googleapi.CloseBody(res)
  3390. if err := googleapi.CheckResponse(res); err != nil {
  3391. return nil, err
  3392. }
  3393. ret := &ListInstancesResponse{
  3394. ServerResponse: googleapi.ServerResponse{
  3395. Header: res.Header,
  3396. HTTPStatusCode: res.StatusCode,
  3397. },
  3398. }
  3399. target := &ret
  3400. if err := gensupport.DecodeResponse(target, res); err != nil {
  3401. return nil, err
  3402. }
  3403. return ret, nil
  3404. // {
  3405. // "description": "Lists information about instances in a project.",
  3406. // "flatPath": "v2/projects/{projectsId}/instances",
  3407. // "httpMethod": "GET",
  3408. // "id": "bigtableadmin.projects.instances.list",
  3409. // "parameterOrder": [
  3410. // "parent"
  3411. // ],
  3412. // "parameters": {
  3413. // "pageToken": {
  3414. // "description": "DEPRECATED: This field is unused and ignored.",
  3415. // "location": "query",
  3416. // "type": "string"
  3417. // },
  3418. // "parent": {
  3419. // "description": "The unique name of the project for which a list of instances is requested.\nValues are of the form `projects/\u003cproject\u003e`.",
  3420. // "location": "path",
  3421. // "pattern": "^projects/[^/]+$",
  3422. // "required": true,
  3423. // "type": "string"
  3424. // }
  3425. // },
  3426. // "path": "v2/{+parent}/instances",
  3427. // "response": {
  3428. // "$ref": "ListInstancesResponse"
  3429. // },
  3430. // "scopes": [
  3431. // "https://www.googleapis.com/auth/bigtable.admin",
  3432. // "https://www.googleapis.com/auth/bigtable.admin.cluster",
  3433. // "https://www.googleapis.com/auth/bigtable.admin.instance",
  3434. // "https://www.googleapis.com/auth/cloud-bigtable.admin",
  3435. // "https://www.googleapis.com/auth/cloud-bigtable.admin.cluster",
  3436. // "https://www.googleapis.com/auth/cloud-platform",
  3437. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  3438. // ]
  3439. // }
  3440. }
  3441. // Pages invokes f for each page of results.
  3442. // A non-nil error returned from f will halt the iteration.
  3443. // The provided context supersedes any context provided to the Context method.
  3444. func (c *ProjectsInstancesListCall) Pages(ctx context.Context, f func(*ListInstancesResponse) error) error {
  3445. c.ctx_ = ctx
  3446. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  3447. for {
  3448. x, err := c.Do()
  3449. if err != nil {
  3450. return err
  3451. }
  3452. if err := f(x); err != nil {
  3453. return err
  3454. }
  3455. if x.NextPageToken == "" {
  3456. return nil
  3457. }
  3458. c.PageToken(x.NextPageToken)
  3459. }
  3460. }
  3461. // method id "bigtableadmin.projects.instances.partialUpdateInstance":
  3462. type ProjectsInstancesPartialUpdateInstanceCall struct {
  3463. s *Service
  3464. name string
  3465. instance *Instance
  3466. urlParams_ gensupport.URLParams
  3467. ctx_ context.Context
  3468. header_ http.Header
  3469. }
  3470. // PartialUpdateInstance: Partially updates an instance within a
  3471. // project. This method can modify all
  3472. // fields of an Instance and is the preferred way to update an Instance.
  3473. func (r *ProjectsInstancesService) PartialUpdateInstance(name string, instance *Instance) *ProjectsInstancesPartialUpdateInstanceCall {
  3474. c := &ProjectsInstancesPartialUpdateInstanceCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3475. c.name = name
  3476. c.instance = instance
  3477. return c
  3478. }
  3479. // UpdateMask sets the optional parameter "updateMask": The subset of
  3480. // Instance fields which should be replaced.
  3481. // Must be explicitly set.
  3482. func (c *ProjectsInstancesPartialUpdateInstanceCall) UpdateMask(updateMask string) *ProjectsInstancesPartialUpdateInstanceCall {
  3483. c.urlParams_.Set("updateMask", updateMask)
  3484. return c
  3485. }
  3486. // Fields allows partial responses to be retrieved. See
  3487. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3488. // for more information.
  3489. func (c *ProjectsInstancesPartialUpdateInstanceCall) Fields(s ...googleapi.Field) *ProjectsInstancesPartialUpdateInstanceCall {
  3490. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3491. return c
  3492. }
  3493. // Context sets the context to be used in this call's Do method. Any
  3494. // pending HTTP request will be aborted if the provided context is
  3495. // canceled.
  3496. func (c *ProjectsInstancesPartialUpdateInstanceCall) Context(ctx context.Context) *ProjectsInstancesPartialUpdateInstanceCall {
  3497. c.ctx_ = ctx
  3498. return c
  3499. }
  3500. // Header returns an http.Header that can be modified by the caller to
  3501. // add HTTP headers to the request.
  3502. func (c *ProjectsInstancesPartialUpdateInstanceCall) Header() http.Header {
  3503. if c.header_ == nil {
  3504. c.header_ = make(http.Header)
  3505. }
  3506. return c.header_
  3507. }
  3508. func (c *ProjectsInstancesPartialUpdateInstanceCall) doRequest(alt string) (*http.Response, error) {
  3509. reqHeaders := make(http.Header)
  3510. for k, v := range c.header_ {
  3511. reqHeaders[k] = v
  3512. }
  3513. reqHeaders.Set("User-Agent", c.s.userAgent())
  3514. var body io.Reader = nil
  3515. body, err := googleapi.WithoutDataWrapper.JSONReader(c.instance)
  3516. if err != nil {
  3517. return nil, err
  3518. }
  3519. reqHeaders.Set("Content-Type", "application/json")
  3520. c.urlParams_.Set("alt", alt)
  3521. c.urlParams_.Set("prettyPrint", "false")
  3522. urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
  3523. urls += "?" + c.urlParams_.Encode()
  3524. req, err := http.NewRequest("PATCH", urls, body)
  3525. if err != nil {
  3526. return nil, err
  3527. }
  3528. req.Header = reqHeaders
  3529. googleapi.Expand(req.URL, map[string]string{
  3530. "name": c.name,
  3531. })
  3532. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3533. }
  3534. // Do executes the "bigtableadmin.projects.instances.partialUpdateInstance" call.
  3535. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  3536. // status code is an error. Response headers are in either
  3537. // *Operation.ServerResponse.Header or (if a response was returned at
  3538. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  3539. // to check whether the returned error was because
  3540. // http.StatusNotModified was returned.
  3541. func (c *ProjectsInstancesPartialUpdateInstanceCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3542. gensupport.SetOptions(c.urlParams_, opts...)
  3543. res, err := c.doRequest("json")
  3544. if res != nil && res.StatusCode == http.StatusNotModified {
  3545. if res.Body != nil {
  3546. res.Body.Close()
  3547. }
  3548. return nil, &googleapi.Error{
  3549. Code: res.StatusCode,
  3550. Header: res.Header,
  3551. }
  3552. }
  3553. if err != nil {
  3554. return nil, err
  3555. }
  3556. defer googleapi.CloseBody(res)
  3557. if err := googleapi.CheckResponse(res); err != nil {
  3558. return nil, err
  3559. }
  3560. ret := &Operation{
  3561. ServerResponse: googleapi.ServerResponse{
  3562. Header: res.Header,
  3563. HTTPStatusCode: res.StatusCode,
  3564. },
  3565. }
  3566. target := &ret
  3567. if err := gensupport.DecodeResponse(target, res); err != nil {
  3568. return nil, err
  3569. }
  3570. return ret, nil
  3571. // {
  3572. // "description": "Partially updates an instance within a project. This method can modify all\nfields of an Instance and is the preferred way to update an Instance.",
  3573. // "flatPath": "v2/projects/{projectsId}/instances/{instancesId}",
  3574. // "httpMethod": "PATCH",
  3575. // "id": "bigtableadmin.projects.instances.partialUpdateInstance",
  3576. // "parameterOrder": [
  3577. // "name"
  3578. // ],
  3579. // "parameters": {
  3580. // "name": {
  3581. // "description": "(`OutputOnly`)\nThe unique name of the instance. Values are of the form\n`projects/\u003cproject\u003e/instances/a-z+[a-z0-9]`.",
  3582. // "location": "path",
  3583. // "pattern": "^projects/[^/]+/instances/[^/]+$",
  3584. // "required": true,
  3585. // "type": "string"
  3586. // },
  3587. // "updateMask": {
  3588. // "description": "The subset of Instance fields which should be replaced.\nMust be explicitly set.",
  3589. // "format": "google-fieldmask",
  3590. // "location": "query",
  3591. // "type": "string"
  3592. // }
  3593. // },
  3594. // "path": "v2/{+name}",
  3595. // "request": {
  3596. // "$ref": "Instance"
  3597. // },
  3598. // "response": {
  3599. // "$ref": "Operation"
  3600. // },
  3601. // "scopes": [
  3602. // "https://www.googleapis.com/auth/bigtable.admin",
  3603. // "https://www.googleapis.com/auth/bigtable.admin.cluster",
  3604. // "https://www.googleapis.com/auth/bigtable.admin.instance",
  3605. // "https://www.googleapis.com/auth/cloud-bigtable.admin",
  3606. // "https://www.googleapis.com/auth/cloud-bigtable.admin.cluster",
  3607. // "https://www.googleapis.com/auth/cloud-platform"
  3608. // ]
  3609. // }
  3610. }
  3611. // method id "bigtableadmin.projects.instances.setIamPolicy":
  3612. type ProjectsInstancesSetIamPolicyCall struct {
  3613. s *Service
  3614. resource string
  3615. setiampolicyrequest *SetIamPolicyRequest
  3616. urlParams_ gensupport.URLParams
  3617. ctx_ context.Context
  3618. header_ http.Header
  3619. }
  3620. // SetIamPolicy: Sets the access control policy on an instance resource.
  3621. // Replaces any
  3622. // existing policy.
  3623. func (r *ProjectsInstancesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsInstancesSetIamPolicyCall {
  3624. c := &ProjectsInstancesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3625. c.resource = resource
  3626. c.setiampolicyrequest = setiampolicyrequest
  3627. return c
  3628. }
  3629. // Fields allows partial responses to be retrieved. See
  3630. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3631. // for more information.
  3632. func (c *ProjectsInstancesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsInstancesSetIamPolicyCall {
  3633. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3634. return c
  3635. }
  3636. // Context sets the context to be used in this call's Do method. Any
  3637. // pending HTTP request will be aborted if the provided context is
  3638. // canceled.
  3639. func (c *ProjectsInstancesSetIamPolicyCall) Context(ctx context.Context) *ProjectsInstancesSetIamPolicyCall {
  3640. c.ctx_ = ctx
  3641. return c
  3642. }
  3643. // Header returns an http.Header that can be modified by the caller to
  3644. // add HTTP headers to the request.
  3645. func (c *ProjectsInstancesSetIamPolicyCall) Header() http.Header {
  3646. if c.header_ == nil {
  3647. c.header_ = make(http.Header)
  3648. }
  3649. return c.header_
  3650. }
  3651. func (c *ProjectsInstancesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  3652. reqHeaders := make(http.Header)
  3653. for k, v := range c.header_ {
  3654. reqHeaders[k] = v
  3655. }
  3656. reqHeaders.Set("User-Agent", c.s.userAgent())
  3657. var body io.Reader = nil
  3658. body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
  3659. if err != nil {
  3660. return nil, err
  3661. }
  3662. reqHeaders.Set("Content-Type", "application/json")
  3663. c.urlParams_.Set("alt", alt)
  3664. c.urlParams_.Set("prettyPrint", "false")
  3665. urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+resource}:setIamPolicy")
  3666. urls += "?" + c.urlParams_.Encode()
  3667. req, err := http.NewRequest("POST", urls, body)
  3668. if err != nil {
  3669. return nil, err
  3670. }
  3671. req.Header = reqHeaders
  3672. googleapi.Expand(req.URL, map[string]string{
  3673. "resource": c.resource,
  3674. })
  3675. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3676. }
  3677. // Do executes the "bigtableadmin.projects.instances.setIamPolicy" call.
  3678. // Exactly one of *Policy or error will be non-nil. Any non-2xx status
  3679. // code is an error. Response headers are in either
  3680. // *Policy.ServerResponse.Header or (if a response was returned at all)
  3681. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3682. // check whether the returned error was because http.StatusNotModified
  3683. // was returned.
  3684. func (c *ProjectsInstancesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  3685. gensupport.SetOptions(c.urlParams_, opts...)
  3686. res, err := c.doRequest("json")
  3687. if res != nil && res.StatusCode == http.StatusNotModified {
  3688. if res.Body != nil {
  3689. res.Body.Close()
  3690. }
  3691. return nil, &googleapi.Error{
  3692. Code: res.StatusCode,
  3693. Header: res.Header,
  3694. }
  3695. }
  3696. if err != nil {
  3697. return nil, err
  3698. }
  3699. defer googleapi.CloseBody(res)
  3700. if err := googleapi.CheckResponse(res); err != nil {
  3701. return nil, err
  3702. }
  3703. ret := &Policy{
  3704. ServerResponse: googleapi.ServerResponse{
  3705. Header: res.Header,
  3706. HTTPStatusCode: res.StatusCode,
  3707. },
  3708. }
  3709. target := &ret
  3710. if err := gensupport.DecodeResponse(target, res); err != nil {
  3711. return nil, err
  3712. }
  3713. return ret, nil
  3714. // {
  3715. // "description": "Sets the access control policy on an instance resource. Replaces any\nexisting policy.",
  3716. // "flatPath": "v2/projects/{projectsId}/instances/{instancesId}:setIamPolicy",
  3717. // "httpMethod": "POST",
  3718. // "id": "bigtableadmin.projects.instances.setIamPolicy",
  3719. // "parameterOrder": [
  3720. // "resource"
  3721. // ],
  3722. // "parameters": {
  3723. // "resource": {
  3724. // "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.",
  3725. // "location": "path",
  3726. // "pattern": "^projects/[^/]+/instances/[^/]+$",
  3727. // "required": true,
  3728. // "type": "string"
  3729. // }
  3730. // },
  3731. // "path": "v2/{+resource}:setIamPolicy",
  3732. // "request": {
  3733. // "$ref": "SetIamPolicyRequest"
  3734. // },
  3735. // "response": {
  3736. // "$ref": "Policy"
  3737. // },
  3738. // "scopes": [
  3739. // "https://www.googleapis.com/auth/bigtable.admin",
  3740. // "https://www.googleapis.com/auth/bigtable.admin.cluster",
  3741. // "https://www.googleapis.com/auth/bigtable.admin.instance",
  3742. // "https://www.googleapis.com/auth/cloud-bigtable.admin",
  3743. // "https://www.googleapis.com/auth/cloud-bigtable.admin.cluster",
  3744. // "https://www.googleapis.com/auth/cloud-platform"
  3745. // ]
  3746. // }
  3747. }
  3748. // method id "bigtableadmin.projects.instances.testIamPermissions":
  3749. type ProjectsInstancesTestIamPermissionsCall struct {
  3750. s *Service
  3751. resource string
  3752. testiampermissionsrequest *TestIamPermissionsRequest
  3753. urlParams_ gensupport.URLParams
  3754. ctx_ context.Context
  3755. header_ http.Header
  3756. }
  3757. // TestIamPermissions: Returns permissions that the caller has on the
  3758. // specified instance resource.
  3759. func (r *ProjectsInstancesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsInstancesTestIamPermissionsCall {
  3760. c := &ProjectsInstancesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3761. c.resource = resource
  3762. c.testiampermissionsrequest = testiampermissionsrequest
  3763. return c
  3764. }
  3765. // Fields allows partial responses to be retrieved. See
  3766. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3767. // for more information.
  3768. func (c *ProjectsInstancesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsInstancesTestIamPermissionsCall {
  3769. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3770. return c
  3771. }
  3772. // Context sets the context to be used in this call's Do method. Any
  3773. // pending HTTP request will be aborted if the provided context is
  3774. // canceled.
  3775. func (c *ProjectsInstancesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsInstancesTestIamPermissionsCall {
  3776. c.ctx_ = ctx
  3777. return c
  3778. }
  3779. // Header returns an http.Header that can be modified by the caller to
  3780. // add HTTP headers to the request.
  3781. func (c *ProjectsInstancesTestIamPermissionsCall) Header() http.Header {
  3782. if c.header_ == nil {
  3783. c.header_ = make(http.Header)
  3784. }
  3785. return c.header_
  3786. }
  3787. func (c *ProjectsInstancesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
  3788. reqHeaders := make(http.Header)
  3789. for k, v := range c.header_ {
  3790. reqHeaders[k] = v
  3791. }
  3792. reqHeaders.Set("User-Agent", c.s.userAgent())
  3793. var body io.Reader = nil
  3794. body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
  3795. if err != nil {
  3796. return nil, err
  3797. }
  3798. reqHeaders.Set("Content-Type", "application/json")
  3799. c.urlParams_.Set("alt", alt)
  3800. c.urlParams_.Set("prettyPrint", "false")
  3801. urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+resource}:testIamPermissions")
  3802. urls += "?" + c.urlParams_.Encode()
  3803. req, err := http.NewRequest("POST", urls, body)
  3804. if err != nil {
  3805. return nil, err
  3806. }
  3807. req.Header = reqHeaders
  3808. googleapi.Expand(req.URL, map[string]string{
  3809. "resource": c.resource,
  3810. })
  3811. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3812. }
  3813. // Do executes the "bigtableadmin.projects.instances.testIamPermissions" call.
  3814. // Exactly one of *TestIamPermissionsResponse or error will be non-nil.
  3815. // Any non-2xx status code is an error. Response headers are in either
  3816. // *TestIamPermissionsResponse.ServerResponse.Header or (if a response
  3817. // was returned at all) in error.(*googleapi.Error).Header. Use
  3818. // googleapi.IsNotModified to check whether the returned error was
  3819. // because http.StatusNotModified was returned.
  3820. func (c *ProjectsInstancesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
  3821. gensupport.SetOptions(c.urlParams_, opts...)
  3822. res, err := c.doRequest("json")
  3823. if res != nil && res.StatusCode == http.StatusNotModified {
  3824. if res.Body != nil {
  3825. res.Body.Close()
  3826. }
  3827. return nil, &googleapi.Error{
  3828. Code: res.StatusCode,
  3829. Header: res.Header,
  3830. }
  3831. }
  3832. if err != nil {
  3833. return nil, err
  3834. }
  3835. defer googleapi.CloseBody(res)
  3836. if err := googleapi.CheckResponse(res); err != nil {
  3837. return nil, err
  3838. }
  3839. ret := &TestIamPermissionsResponse{
  3840. ServerResponse: googleapi.ServerResponse{
  3841. Header: res.Header,
  3842. HTTPStatusCode: res.StatusCode,
  3843. },
  3844. }
  3845. target := &ret
  3846. if err := gensupport.DecodeResponse(target, res); err != nil {
  3847. return nil, err
  3848. }
  3849. return ret, nil
  3850. // {
  3851. // "description": "Returns permissions that the caller has on the specified instance resource.",
  3852. // "flatPath": "v2/projects/{projectsId}/instances/{instancesId}:testIamPermissions",
  3853. // "httpMethod": "POST",
  3854. // "id": "bigtableadmin.projects.instances.testIamPermissions",
  3855. // "parameterOrder": [
  3856. // "resource"
  3857. // ],
  3858. // "parameters": {
  3859. // "resource": {
  3860. // "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.",
  3861. // "location": "path",
  3862. // "pattern": "^projects/[^/]+/instances/[^/]+$",
  3863. // "required": true,
  3864. // "type": "string"
  3865. // }
  3866. // },
  3867. // "path": "v2/{+resource}:testIamPermissions",
  3868. // "request": {
  3869. // "$ref": "TestIamPermissionsRequest"
  3870. // },
  3871. // "response": {
  3872. // "$ref": "TestIamPermissionsResponse"
  3873. // },
  3874. // "scopes": [
  3875. // "https://www.googleapis.com/auth/bigtable.admin",
  3876. // "https://www.googleapis.com/auth/bigtable.admin.cluster",
  3877. // "https://www.googleapis.com/auth/bigtable.admin.instance",
  3878. // "https://www.googleapis.com/auth/cloud-bigtable.admin",
  3879. // "https://www.googleapis.com/auth/cloud-bigtable.admin.cluster",
  3880. // "https://www.googleapis.com/auth/cloud-platform"
  3881. // ]
  3882. // }
  3883. }
  3884. // method id "bigtableadmin.projects.instances.update":
  3885. type ProjectsInstancesUpdateCall struct {
  3886. s *Service
  3887. name string
  3888. instance *Instance
  3889. urlParams_ gensupport.URLParams
  3890. ctx_ context.Context
  3891. header_ http.Header
  3892. }
  3893. // Update: Updates an instance within a project. This method updates
  3894. // only the display
  3895. // name and type for an Instance. To update other Instance properties,
  3896. // such as
  3897. // labels, use PartialUpdateInstance.
  3898. func (r *ProjectsInstancesService) Update(name string, instance *Instance) *ProjectsInstancesUpdateCall {
  3899. c := &ProjectsInstancesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3900. c.name = name
  3901. c.instance = instance
  3902. return c
  3903. }
  3904. // Fields allows partial responses to be retrieved. See
  3905. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3906. // for more information.
  3907. func (c *ProjectsInstancesUpdateCall) Fields(s ...googleapi.Field) *ProjectsInstancesUpdateCall {
  3908. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3909. return c
  3910. }
  3911. // Context sets the context to be used in this call's Do method. Any
  3912. // pending HTTP request will be aborted if the provided context is
  3913. // canceled.
  3914. func (c *ProjectsInstancesUpdateCall) Context(ctx context.Context) *ProjectsInstancesUpdateCall {
  3915. c.ctx_ = ctx
  3916. return c
  3917. }
  3918. // Header returns an http.Header that can be modified by the caller to
  3919. // add HTTP headers to the request.
  3920. func (c *ProjectsInstancesUpdateCall) Header() http.Header {
  3921. if c.header_ == nil {
  3922. c.header_ = make(http.Header)
  3923. }
  3924. return c.header_
  3925. }
  3926. func (c *ProjectsInstancesUpdateCall) doRequest(alt string) (*http.Response, error) {
  3927. reqHeaders := make(http.Header)
  3928. for k, v := range c.header_ {
  3929. reqHeaders[k] = v
  3930. }
  3931. reqHeaders.Set("User-Agent", c.s.userAgent())
  3932. var body io.Reader = nil
  3933. body, err := googleapi.WithoutDataWrapper.JSONReader(c.instance)
  3934. if err != nil {
  3935. return nil, err
  3936. }
  3937. reqHeaders.Set("Content-Type", "application/json")
  3938. c.urlParams_.Set("alt", alt)
  3939. c.urlParams_.Set("prettyPrint", "false")
  3940. urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
  3941. urls += "?" + c.urlParams_.Encode()
  3942. req, err := http.NewRequest("PUT", urls, body)
  3943. if err != nil {
  3944. return nil, err
  3945. }
  3946. req.Header = reqHeaders
  3947. googleapi.Expand(req.URL, map[string]string{
  3948. "name": c.name,
  3949. })
  3950. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3951. }
  3952. // Do executes the "bigtableadmin.projects.instances.update" call.
  3953. // Exactly one of *Instance or error will be non-nil. Any non-2xx status
  3954. // code is an error. Response headers are in either
  3955. // *Instance.ServerResponse.Header or (if a response was returned at
  3956. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  3957. // to check whether the returned error was because
  3958. // http.StatusNotModified was returned.
  3959. func (c *ProjectsInstancesUpdateCall) Do(opts ...googleapi.CallOption) (*Instance, error) {
  3960. gensupport.SetOptions(c.urlParams_, opts...)
  3961. res, err := c.doRequest("json")
  3962. if res != nil && res.StatusCode == http.StatusNotModified {
  3963. if res.Body != nil {
  3964. res.Body.Close()
  3965. }
  3966. return nil, &googleapi.Error{
  3967. Code: res.StatusCode,
  3968. Header: res.Header,
  3969. }
  3970. }
  3971. if err != nil {
  3972. return nil, err
  3973. }
  3974. defer googleapi.CloseBody(res)
  3975. if err := googleapi.CheckResponse(res); err != nil {
  3976. return nil, err
  3977. }
  3978. ret := &Instance{
  3979. ServerResponse: googleapi.ServerResponse{
  3980. Header: res.Header,
  3981. HTTPStatusCode: res.StatusCode,
  3982. },
  3983. }
  3984. target := &ret
  3985. if err := gensupport.DecodeResponse(target, res); err != nil {
  3986. return nil, err
  3987. }
  3988. return ret, nil
  3989. // {
  3990. // "description": "Updates an instance within a project. This method updates only the display\nname and type for an Instance. To update other Instance properties, such as\nlabels, use PartialUpdateInstance.",
  3991. // "flatPath": "v2/projects/{projectsId}/instances/{instancesId}",
  3992. // "httpMethod": "PUT",
  3993. // "id": "bigtableadmin.projects.instances.update",
  3994. // "parameterOrder": [
  3995. // "name"
  3996. // ],
  3997. // "parameters": {
  3998. // "name": {
  3999. // "description": "(`OutputOnly`)\nThe unique name of the instance. Values are of the form\n`projects/\u003cproject\u003e/instances/a-z+[a-z0-9]`.",
  4000. // "location": "path",
  4001. // "pattern": "^projects/[^/]+/instances/[^/]+$",
  4002. // "required": true,
  4003. // "type": "string"
  4004. // }
  4005. // },
  4006. // "path": "v2/{+name}",
  4007. // "request": {
  4008. // "$ref": "Instance"
  4009. // },
  4010. // "response": {
  4011. // "$ref": "Instance"
  4012. // },
  4013. // "scopes": [
  4014. // "https://www.googleapis.com/auth/bigtable.admin",
  4015. // "https://www.googleapis.com/auth/bigtable.admin.cluster",
  4016. // "https://www.googleapis.com/auth/bigtable.admin.instance",
  4017. // "https://www.googleapis.com/auth/cloud-bigtable.admin",
  4018. // "https://www.googleapis.com/auth/cloud-bigtable.admin.cluster",
  4019. // "https://www.googleapis.com/auth/cloud-platform"
  4020. // ]
  4021. // }
  4022. }
  4023. // method id "bigtableadmin.projects.instances.appProfiles.create":
  4024. type ProjectsInstancesAppProfilesCreateCall struct {
  4025. s *Service
  4026. parent string
  4027. appprofile *AppProfile
  4028. urlParams_ gensupport.URLParams
  4029. ctx_ context.Context
  4030. header_ http.Header
  4031. }
  4032. // Create: Creates an app profile within an instance.
  4033. func (r *ProjectsInstancesAppProfilesService) Create(parent string, appprofile *AppProfile) *ProjectsInstancesAppProfilesCreateCall {
  4034. c := &ProjectsInstancesAppProfilesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4035. c.parent = parent
  4036. c.appprofile = appprofile
  4037. return c
  4038. }
  4039. // AppProfileId sets the optional parameter "appProfileId": The ID to be
  4040. // used when referring to the new app profile within its
  4041. // instance, e.g., just `myprofile` rather
  4042. // than
  4043. // `projects/myproject/instances/myinstance/appProfiles/myprofile`.
  4044. func (c *ProjectsInstancesAppProfilesCreateCall) AppProfileId(appProfileId string) *ProjectsInstancesAppProfilesCreateCall {
  4045. c.urlParams_.Set("appProfileId", appProfileId)
  4046. return c
  4047. }
  4048. // IgnoreWarnings sets the optional parameter "ignoreWarnings": If true,
  4049. // ignore safety checks when creating the app profile.
  4050. func (c *ProjectsInstancesAppProfilesCreateCall) IgnoreWarnings(ignoreWarnings bool) *ProjectsInstancesAppProfilesCreateCall {
  4051. c.urlParams_.Set("ignoreWarnings", fmt.Sprint(ignoreWarnings))
  4052. return c
  4053. }
  4054. // Fields allows partial responses to be retrieved. See
  4055. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4056. // for more information.
  4057. func (c *ProjectsInstancesAppProfilesCreateCall) Fields(s ...googleapi.Field) *ProjectsInstancesAppProfilesCreateCall {
  4058. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4059. return c
  4060. }
  4061. // Context sets the context to be used in this call's Do method. Any
  4062. // pending HTTP request will be aborted if the provided context is
  4063. // canceled.
  4064. func (c *ProjectsInstancesAppProfilesCreateCall) Context(ctx context.Context) *ProjectsInstancesAppProfilesCreateCall {
  4065. c.ctx_ = ctx
  4066. return c
  4067. }
  4068. // Header returns an http.Header that can be modified by the caller to
  4069. // add HTTP headers to the request.
  4070. func (c *ProjectsInstancesAppProfilesCreateCall) Header() http.Header {
  4071. if c.header_ == nil {
  4072. c.header_ = make(http.Header)
  4073. }
  4074. return c.header_
  4075. }
  4076. func (c *ProjectsInstancesAppProfilesCreateCall) doRequest(alt string) (*http.Response, error) {
  4077. reqHeaders := make(http.Header)
  4078. for k, v := range c.header_ {
  4079. reqHeaders[k] = v
  4080. }
  4081. reqHeaders.Set("User-Agent", c.s.userAgent())
  4082. var body io.Reader = nil
  4083. body, err := googleapi.WithoutDataWrapper.JSONReader(c.appprofile)
  4084. if err != nil {
  4085. return nil, err
  4086. }
  4087. reqHeaders.Set("Content-Type", "application/json")
  4088. c.urlParams_.Set("alt", alt)
  4089. c.urlParams_.Set("prettyPrint", "false")
  4090. urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/appProfiles")
  4091. urls += "?" + c.urlParams_.Encode()
  4092. req, err := http.NewRequest("POST", urls, body)
  4093. if err != nil {
  4094. return nil, err
  4095. }
  4096. req.Header = reqHeaders
  4097. googleapi.Expand(req.URL, map[string]string{
  4098. "parent": c.parent,
  4099. })
  4100. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4101. }
  4102. // Do executes the "bigtableadmin.projects.instances.appProfiles.create" call.
  4103. // Exactly one of *AppProfile or error will be non-nil. Any non-2xx
  4104. // status code is an error. Response headers are in either
  4105. // *AppProfile.ServerResponse.Header or (if a response was returned at
  4106. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  4107. // to check whether the returned error was because
  4108. // http.StatusNotModified was returned.
  4109. func (c *ProjectsInstancesAppProfilesCreateCall) Do(opts ...googleapi.CallOption) (*AppProfile, error) {
  4110. gensupport.SetOptions(c.urlParams_, opts...)
  4111. res, err := c.doRequest("json")
  4112. if res != nil && res.StatusCode == http.StatusNotModified {
  4113. if res.Body != nil {
  4114. res.Body.Close()
  4115. }
  4116. return nil, &googleapi.Error{
  4117. Code: res.StatusCode,
  4118. Header: res.Header,
  4119. }
  4120. }
  4121. if err != nil {
  4122. return nil, err
  4123. }
  4124. defer googleapi.CloseBody(res)
  4125. if err := googleapi.CheckResponse(res); err != nil {
  4126. return nil, err
  4127. }
  4128. ret := &AppProfile{
  4129. ServerResponse: googleapi.ServerResponse{
  4130. Header: res.Header,
  4131. HTTPStatusCode: res.StatusCode,
  4132. },
  4133. }
  4134. target := &ret
  4135. if err := gensupport.DecodeResponse(target, res); err != nil {
  4136. return nil, err
  4137. }
  4138. return ret, nil
  4139. // {
  4140. // "description": "Creates an app profile within an instance.",
  4141. // "flatPath": "v2/projects/{projectsId}/instances/{instancesId}/appProfiles",
  4142. // "httpMethod": "POST",
  4143. // "id": "bigtableadmin.projects.instances.appProfiles.create",
  4144. // "parameterOrder": [
  4145. // "parent"
  4146. // ],
  4147. // "parameters": {
  4148. // "appProfileId": {
  4149. // "description": "The ID to be used when referring to the new app profile within its\ninstance, e.g., just `myprofile` rather than\n`projects/myproject/instances/myinstance/appProfiles/myprofile`.",
  4150. // "location": "query",
  4151. // "type": "string"
  4152. // },
  4153. // "ignoreWarnings": {
  4154. // "description": "If true, ignore safety checks when creating the app profile.",
  4155. // "location": "query",
  4156. // "type": "boolean"
  4157. // },
  4158. // "parent": {
  4159. // "description": "The unique name of the instance in which to create the new app profile.\nValues are of the form\n`projects/\u003cproject\u003e/instances/\u003cinstance\u003e`.",
  4160. // "location": "path",
  4161. // "pattern": "^projects/[^/]+/instances/[^/]+$",
  4162. // "required": true,
  4163. // "type": "string"
  4164. // }
  4165. // },
  4166. // "path": "v2/{+parent}/appProfiles",
  4167. // "request": {
  4168. // "$ref": "AppProfile"
  4169. // },
  4170. // "response": {
  4171. // "$ref": "AppProfile"
  4172. // },
  4173. // "scopes": [
  4174. // "https://www.googleapis.com/auth/bigtable.admin",
  4175. // "https://www.googleapis.com/auth/bigtable.admin.cluster",
  4176. // "https://www.googleapis.com/auth/bigtable.admin.instance",
  4177. // "https://www.googleapis.com/auth/cloud-bigtable.admin",
  4178. // "https://www.googleapis.com/auth/cloud-bigtable.admin.cluster",
  4179. // "https://www.googleapis.com/auth/cloud-platform"
  4180. // ]
  4181. // }
  4182. }
  4183. // method id "bigtableadmin.projects.instances.appProfiles.delete":
  4184. type ProjectsInstancesAppProfilesDeleteCall struct {
  4185. s *Service
  4186. name string
  4187. urlParams_ gensupport.URLParams
  4188. ctx_ context.Context
  4189. header_ http.Header
  4190. }
  4191. // Delete: Deletes an app profile from an instance.
  4192. func (r *ProjectsInstancesAppProfilesService) Delete(name string) *ProjectsInstancesAppProfilesDeleteCall {
  4193. c := &ProjectsInstancesAppProfilesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4194. c.name = name
  4195. return c
  4196. }
  4197. // IgnoreWarnings sets the optional parameter "ignoreWarnings": If true,
  4198. // ignore safety checks when deleting the app profile.
  4199. func (c *ProjectsInstancesAppProfilesDeleteCall) IgnoreWarnings(ignoreWarnings bool) *ProjectsInstancesAppProfilesDeleteCall {
  4200. c.urlParams_.Set("ignoreWarnings", fmt.Sprint(ignoreWarnings))
  4201. return c
  4202. }
  4203. // Fields allows partial responses to be retrieved. See
  4204. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4205. // for more information.
  4206. func (c *ProjectsInstancesAppProfilesDeleteCall) Fields(s ...googleapi.Field) *ProjectsInstancesAppProfilesDeleteCall {
  4207. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4208. return c
  4209. }
  4210. // Context sets the context to be used in this call's Do method. Any
  4211. // pending HTTP request will be aborted if the provided context is
  4212. // canceled.
  4213. func (c *ProjectsInstancesAppProfilesDeleteCall) Context(ctx context.Context) *ProjectsInstancesAppProfilesDeleteCall {
  4214. c.ctx_ = ctx
  4215. return c
  4216. }
  4217. // Header returns an http.Header that can be modified by the caller to
  4218. // add HTTP headers to the request.
  4219. func (c *ProjectsInstancesAppProfilesDeleteCall) Header() http.Header {
  4220. if c.header_ == nil {
  4221. c.header_ = make(http.Header)
  4222. }
  4223. return c.header_
  4224. }
  4225. func (c *ProjectsInstancesAppProfilesDeleteCall) doRequest(alt string) (*http.Response, error) {
  4226. reqHeaders := make(http.Header)
  4227. for k, v := range c.header_ {
  4228. reqHeaders[k] = v
  4229. }
  4230. reqHeaders.Set("User-Agent", c.s.userAgent())
  4231. var body io.Reader = nil
  4232. c.urlParams_.Set("alt", alt)
  4233. c.urlParams_.Set("prettyPrint", "false")
  4234. urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
  4235. urls += "?" + c.urlParams_.Encode()
  4236. req, err := http.NewRequest("DELETE", urls, body)
  4237. if err != nil {
  4238. return nil, err
  4239. }
  4240. req.Header = reqHeaders
  4241. googleapi.Expand(req.URL, map[string]string{
  4242. "name": c.name,
  4243. })
  4244. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4245. }
  4246. // Do executes the "bigtableadmin.projects.instances.appProfiles.delete" call.
  4247. // Exactly one of *Empty or error will be non-nil. Any non-2xx status
  4248. // code is an error. Response headers are in either
  4249. // *Empty.ServerResponse.Header or (if a response was returned at all)
  4250. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  4251. // check whether the returned error was because http.StatusNotModified
  4252. // was returned.
  4253. func (c *ProjectsInstancesAppProfilesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  4254. gensupport.SetOptions(c.urlParams_, opts...)
  4255. res, err := c.doRequest("json")
  4256. if res != nil && res.StatusCode == http.StatusNotModified {
  4257. if res.Body != nil {
  4258. res.Body.Close()
  4259. }
  4260. return nil, &googleapi.Error{
  4261. Code: res.StatusCode,
  4262. Header: res.Header,
  4263. }
  4264. }
  4265. if err != nil {
  4266. return nil, err
  4267. }
  4268. defer googleapi.CloseBody(res)
  4269. if err := googleapi.CheckResponse(res); err != nil {
  4270. return nil, err
  4271. }
  4272. ret := &Empty{
  4273. ServerResponse: googleapi.ServerResponse{
  4274. Header: res.Header,
  4275. HTTPStatusCode: res.StatusCode,
  4276. },
  4277. }
  4278. target := &ret
  4279. if err := gensupport.DecodeResponse(target, res); err != nil {
  4280. return nil, err
  4281. }
  4282. return ret, nil
  4283. // {
  4284. // "description": "Deletes an app profile from an instance.",
  4285. // "flatPath": "v2/projects/{projectsId}/instances/{instancesId}/appProfiles/{appProfilesId}",
  4286. // "httpMethod": "DELETE",
  4287. // "id": "bigtableadmin.projects.instances.appProfiles.delete",
  4288. // "parameterOrder": [
  4289. // "name"
  4290. // ],
  4291. // "parameters": {
  4292. // "ignoreWarnings": {
  4293. // "description": "If true, ignore safety checks when deleting the app profile.",
  4294. // "location": "query",
  4295. // "type": "boolean"
  4296. // },
  4297. // "name": {
  4298. // "description": "The unique name of the app profile to be deleted. Values are of the form\n`projects/\u003cproject\u003e/instances/\u003cinstance\u003e/appProfiles/\u003capp_profile\u003e`.",
  4299. // "location": "path",
  4300. // "pattern": "^projects/[^/]+/instances/[^/]+/appProfiles/[^/]+$",
  4301. // "required": true,
  4302. // "type": "string"
  4303. // }
  4304. // },
  4305. // "path": "v2/{+name}",
  4306. // "response": {
  4307. // "$ref": "Empty"
  4308. // },
  4309. // "scopes": [
  4310. // "https://www.googleapis.com/auth/bigtable.admin",
  4311. // "https://www.googleapis.com/auth/bigtable.admin.cluster",
  4312. // "https://www.googleapis.com/auth/bigtable.admin.instance",
  4313. // "https://www.googleapis.com/auth/cloud-bigtable.admin",
  4314. // "https://www.googleapis.com/auth/cloud-bigtable.admin.cluster",
  4315. // "https://www.googleapis.com/auth/cloud-platform"
  4316. // ]
  4317. // }
  4318. }
  4319. // method id "bigtableadmin.projects.instances.appProfiles.get":
  4320. type ProjectsInstancesAppProfilesGetCall struct {
  4321. s *Service
  4322. name string
  4323. urlParams_ gensupport.URLParams
  4324. ifNoneMatch_ string
  4325. ctx_ context.Context
  4326. header_ http.Header
  4327. }
  4328. // Get: Gets information about an app profile.
  4329. func (r *ProjectsInstancesAppProfilesService) Get(name string) *ProjectsInstancesAppProfilesGetCall {
  4330. c := &ProjectsInstancesAppProfilesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4331. c.name = name
  4332. return c
  4333. }
  4334. // Fields allows partial responses to be retrieved. See
  4335. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4336. // for more information.
  4337. func (c *ProjectsInstancesAppProfilesGetCall) Fields(s ...googleapi.Field) *ProjectsInstancesAppProfilesGetCall {
  4338. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4339. return c
  4340. }
  4341. // IfNoneMatch sets the optional parameter which makes the operation
  4342. // fail if the object's ETag matches the given value. This is useful for
  4343. // getting updates only after the object has changed since the last
  4344. // request. Use googleapi.IsNotModified to check whether the response
  4345. // error from Do is the result of In-None-Match.
  4346. func (c *ProjectsInstancesAppProfilesGetCall) IfNoneMatch(entityTag string) *ProjectsInstancesAppProfilesGetCall {
  4347. c.ifNoneMatch_ = entityTag
  4348. return c
  4349. }
  4350. // Context sets the context to be used in this call's Do method. Any
  4351. // pending HTTP request will be aborted if the provided context is
  4352. // canceled.
  4353. func (c *ProjectsInstancesAppProfilesGetCall) Context(ctx context.Context) *ProjectsInstancesAppProfilesGetCall {
  4354. c.ctx_ = ctx
  4355. return c
  4356. }
  4357. // Header returns an http.Header that can be modified by the caller to
  4358. // add HTTP headers to the request.
  4359. func (c *ProjectsInstancesAppProfilesGetCall) Header() http.Header {
  4360. if c.header_ == nil {
  4361. c.header_ = make(http.Header)
  4362. }
  4363. return c.header_
  4364. }
  4365. func (c *ProjectsInstancesAppProfilesGetCall) doRequest(alt string) (*http.Response, error) {
  4366. reqHeaders := make(http.Header)
  4367. for k, v := range c.header_ {
  4368. reqHeaders[k] = v
  4369. }
  4370. reqHeaders.Set("User-Agent", c.s.userAgent())
  4371. if c.ifNoneMatch_ != "" {
  4372. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4373. }
  4374. var body io.Reader = nil
  4375. c.urlParams_.Set("alt", alt)
  4376. c.urlParams_.Set("prettyPrint", "false")
  4377. urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
  4378. urls += "?" + c.urlParams_.Encode()
  4379. req, err := http.NewRequest("GET", urls, body)
  4380. if err != nil {
  4381. return nil, err
  4382. }
  4383. req.Header = reqHeaders
  4384. googleapi.Expand(req.URL, map[string]string{
  4385. "name": c.name,
  4386. })
  4387. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4388. }
  4389. // Do executes the "bigtableadmin.projects.instances.appProfiles.get" call.
  4390. // Exactly one of *AppProfile or error will be non-nil. Any non-2xx
  4391. // status code is an error. Response headers are in either
  4392. // *AppProfile.ServerResponse.Header or (if a response was returned at
  4393. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  4394. // to check whether the returned error was because
  4395. // http.StatusNotModified was returned.
  4396. func (c *ProjectsInstancesAppProfilesGetCall) Do(opts ...googleapi.CallOption) (*AppProfile, error) {
  4397. gensupport.SetOptions(c.urlParams_, opts...)
  4398. res, err := c.doRequest("json")
  4399. if res != nil && res.StatusCode == http.StatusNotModified {
  4400. if res.Body != nil {
  4401. res.Body.Close()
  4402. }
  4403. return nil, &googleapi.Error{
  4404. Code: res.StatusCode,
  4405. Header: res.Header,
  4406. }
  4407. }
  4408. if err != nil {
  4409. return nil, err
  4410. }
  4411. defer googleapi.CloseBody(res)
  4412. if err := googleapi.CheckResponse(res); err != nil {
  4413. return nil, err
  4414. }
  4415. ret := &AppProfile{
  4416. ServerResponse: googleapi.ServerResponse{
  4417. Header: res.Header,
  4418. HTTPStatusCode: res.StatusCode,
  4419. },
  4420. }
  4421. target := &ret
  4422. if err := gensupport.DecodeResponse(target, res); err != nil {
  4423. return nil, err
  4424. }
  4425. return ret, nil
  4426. // {
  4427. // "description": "Gets information about an app profile.",
  4428. // "flatPath": "v2/projects/{projectsId}/instances/{instancesId}/appProfiles/{appProfilesId}",
  4429. // "httpMethod": "GET",
  4430. // "id": "bigtableadmin.projects.instances.appProfiles.get",
  4431. // "parameterOrder": [
  4432. // "name"
  4433. // ],
  4434. // "parameters": {
  4435. // "name": {
  4436. // "description": "The unique name of the requested app profile. Values are of the form\n`projects/\u003cproject\u003e/instances/\u003cinstance\u003e/appProfiles/\u003capp_profile\u003e`.",
  4437. // "location": "path",
  4438. // "pattern": "^projects/[^/]+/instances/[^/]+/appProfiles/[^/]+$",
  4439. // "required": true,
  4440. // "type": "string"
  4441. // }
  4442. // },
  4443. // "path": "v2/{+name}",
  4444. // "response": {
  4445. // "$ref": "AppProfile"
  4446. // },
  4447. // "scopes": [
  4448. // "https://www.googleapis.com/auth/bigtable.admin",
  4449. // "https://www.googleapis.com/auth/bigtable.admin.cluster",
  4450. // "https://www.googleapis.com/auth/bigtable.admin.instance",
  4451. // "https://www.googleapis.com/auth/cloud-bigtable.admin",
  4452. // "https://www.googleapis.com/auth/cloud-bigtable.admin.cluster",
  4453. // "https://www.googleapis.com/auth/cloud-platform"
  4454. // ]
  4455. // }
  4456. }
  4457. // method id "bigtableadmin.projects.instances.appProfiles.list":
  4458. type ProjectsInstancesAppProfilesListCall struct {
  4459. s *Service
  4460. parent string
  4461. urlParams_ gensupport.URLParams
  4462. ifNoneMatch_ string
  4463. ctx_ context.Context
  4464. header_ http.Header
  4465. }
  4466. // List: Lists information about app profiles in an instance.
  4467. func (r *ProjectsInstancesAppProfilesService) List(parent string) *ProjectsInstancesAppProfilesListCall {
  4468. c := &ProjectsInstancesAppProfilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4469. c.parent = parent
  4470. return c
  4471. }
  4472. // PageSize sets the optional parameter "pageSize": Maximum number of
  4473. // results per page.
  4474. // CURRENTLY UNIMPLEMENTED AND IGNORED.
  4475. func (c *ProjectsInstancesAppProfilesListCall) PageSize(pageSize int64) *ProjectsInstancesAppProfilesListCall {
  4476. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  4477. return c
  4478. }
  4479. // PageToken sets the optional parameter "pageToken": The value of
  4480. // `next_page_token` returned by a previous call.
  4481. func (c *ProjectsInstancesAppProfilesListCall) PageToken(pageToken string) *ProjectsInstancesAppProfilesListCall {
  4482. c.urlParams_.Set("pageToken", pageToken)
  4483. return c
  4484. }
  4485. // Fields allows partial responses to be retrieved. See
  4486. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4487. // for more information.
  4488. func (c *ProjectsInstancesAppProfilesListCall) Fields(s ...googleapi.Field) *ProjectsInstancesAppProfilesListCall {
  4489. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4490. return c
  4491. }
  4492. // IfNoneMatch sets the optional parameter which makes the operation
  4493. // fail if the object's ETag matches the given value. This is useful for
  4494. // getting updates only after the object has changed since the last
  4495. // request. Use googleapi.IsNotModified to check whether the response
  4496. // error from Do is the result of In-None-Match.
  4497. func (c *ProjectsInstancesAppProfilesListCall) IfNoneMatch(entityTag string) *ProjectsInstancesAppProfilesListCall {
  4498. c.ifNoneMatch_ = entityTag
  4499. return c
  4500. }
  4501. // Context sets the context to be used in this call's Do method. Any
  4502. // pending HTTP request will be aborted if the provided context is
  4503. // canceled.
  4504. func (c *ProjectsInstancesAppProfilesListCall) Context(ctx context.Context) *ProjectsInstancesAppProfilesListCall {
  4505. c.ctx_ = ctx
  4506. return c
  4507. }
  4508. // Header returns an http.Header that can be modified by the caller to
  4509. // add HTTP headers to the request.
  4510. func (c *ProjectsInstancesAppProfilesListCall) Header() http.Header {
  4511. if c.header_ == nil {
  4512. c.header_ = make(http.Header)
  4513. }
  4514. return c.header_
  4515. }
  4516. func (c *ProjectsInstancesAppProfilesListCall) doRequest(alt string) (*http.Response, error) {
  4517. reqHeaders := make(http.Header)
  4518. for k, v := range c.header_ {
  4519. reqHeaders[k] = v
  4520. }
  4521. reqHeaders.Set("User-Agent", c.s.userAgent())
  4522. if c.ifNoneMatch_ != "" {
  4523. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4524. }
  4525. var body io.Reader = nil
  4526. c.urlParams_.Set("alt", alt)
  4527. c.urlParams_.Set("prettyPrint", "false")
  4528. urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/appProfiles")
  4529. urls += "?" + c.urlParams_.Encode()
  4530. req, err := http.NewRequest("GET", urls, body)
  4531. if err != nil {
  4532. return nil, err
  4533. }
  4534. req.Header = reqHeaders
  4535. googleapi.Expand(req.URL, map[string]string{
  4536. "parent": c.parent,
  4537. })
  4538. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4539. }
  4540. // Do executes the "bigtableadmin.projects.instances.appProfiles.list" call.
  4541. // Exactly one of *ListAppProfilesResponse or error will be non-nil. Any
  4542. // non-2xx status code is an error. Response headers are in either
  4543. // *ListAppProfilesResponse.ServerResponse.Header or (if a response was
  4544. // returned at all) in error.(*googleapi.Error).Header. Use
  4545. // googleapi.IsNotModified to check whether the returned error was
  4546. // because http.StatusNotModified was returned.
  4547. func (c *ProjectsInstancesAppProfilesListCall) Do(opts ...googleapi.CallOption) (*ListAppProfilesResponse, error) {
  4548. gensupport.SetOptions(c.urlParams_, opts...)
  4549. res, err := c.doRequest("json")
  4550. if res != nil && res.StatusCode == http.StatusNotModified {
  4551. if res.Body != nil {
  4552. res.Body.Close()
  4553. }
  4554. return nil, &googleapi.Error{
  4555. Code: res.StatusCode,
  4556. Header: res.Header,
  4557. }
  4558. }
  4559. if err != nil {
  4560. return nil, err
  4561. }
  4562. defer googleapi.CloseBody(res)
  4563. if err := googleapi.CheckResponse(res); err != nil {
  4564. return nil, err
  4565. }
  4566. ret := &ListAppProfilesResponse{
  4567. ServerResponse: googleapi.ServerResponse{
  4568. Header: res.Header,
  4569. HTTPStatusCode: res.StatusCode,
  4570. },
  4571. }
  4572. target := &ret
  4573. if err := gensupport.DecodeResponse(target, res); err != nil {
  4574. return nil, err
  4575. }
  4576. return ret, nil
  4577. // {
  4578. // "description": "Lists information about app profiles in an instance.",
  4579. // "flatPath": "v2/projects/{projectsId}/instances/{instancesId}/appProfiles",
  4580. // "httpMethod": "GET",
  4581. // "id": "bigtableadmin.projects.instances.appProfiles.list",
  4582. // "parameterOrder": [
  4583. // "parent"
  4584. // ],
  4585. // "parameters": {
  4586. // "pageSize": {
  4587. // "description": "Maximum number of results per page.\nCURRENTLY UNIMPLEMENTED AND IGNORED.",
  4588. // "format": "int32",
  4589. // "location": "query",
  4590. // "type": "integer"
  4591. // },
  4592. // "pageToken": {
  4593. // "description": "The value of `next_page_token` returned by a previous call.",
  4594. // "location": "query",
  4595. // "type": "string"
  4596. // },
  4597. // "parent": {
  4598. // "description": "The unique name of the instance for which a list of app profiles is\nrequested. Values are of the form\n`projects/\u003cproject\u003e/instances/\u003cinstance\u003e`.\nUse `\u003cinstance\u003e = '-'` to list AppProfiles for all Instances in a project,\ne.g., `projects/myproject/instances/-`.",
  4599. // "location": "path",
  4600. // "pattern": "^projects/[^/]+/instances/[^/]+$",
  4601. // "required": true,
  4602. // "type": "string"
  4603. // }
  4604. // },
  4605. // "path": "v2/{+parent}/appProfiles",
  4606. // "response": {
  4607. // "$ref": "ListAppProfilesResponse"
  4608. // },
  4609. // "scopes": [
  4610. // "https://www.googleapis.com/auth/bigtable.admin",
  4611. // "https://www.googleapis.com/auth/bigtable.admin.cluster",
  4612. // "https://www.googleapis.com/auth/bigtable.admin.instance",
  4613. // "https://www.googleapis.com/auth/cloud-bigtable.admin",
  4614. // "https://www.googleapis.com/auth/cloud-bigtable.admin.cluster",
  4615. // "https://www.googleapis.com/auth/cloud-platform"
  4616. // ]
  4617. // }
  4618. }
  4619. // Pages invokes f for each page of results.
  4620. // A non-nil error returned from f will halt the iteration.
  4621. // The provided context supersedes any context provided to the Context method.
  4622. func (c *ProjectsInstancesAppProfilesListCall) Pages(ctx context.Context, f func(*ListAppProfilesResponse) error) error {
  4623. c.ctx_ = ctx
  4624. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  4625. for {
  4626. x, err := c.Do()
  4627. if err != nil {
  4628. return err
  4629. }
  4630. if err := f(x); err != nil {
  4631. return err
  4632. }
  4633. if x.NextPageToken == "" {
  4634. return nil
  4635. }
  4636. c.PageToken(x.NextPageToken)
  4637. }
  4638. }
  4639. // method id "bigtableadmin.projects.instances.appProfiles.patch":
  4640. type ProjectsInstancesAppProfilesPatchCall struct {
  4641. s *Service
  4642. name string
  4643. appprofile *AppProfile
  4644. urlParams_ gensupport.URLParams
  4645. ctx_ context.Context
  4646. header_ http.Header
  4647. }
  4648. // Patch: Updates an app profile within an instance.
  4649. func (r *ProjectsInstancesAppProfilesService) Patch(name string, appprofile *AppProfile) *ProjectsInstancesAppProfilesPatchCall {
  4650. c := &ProjectsInstancesAppProfilesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4651. c.name = name
  4652. c.appprofile = appprofile
  4653. return c
  4654. }
  4655. // IgnoreWarnings sets the optional parameter "ignoreWarnings": If true,
  4656. // ignore safety checks when updating the app profile.
  4657. func (c *ProjectsInstancesAppProfilesPatchCall) IgnoreWarnings(ignoreWarnings bool) *ProjectsInstancesAppProfilesPatchCall {
  4658. c.urlParams_.Set("ignoreWarnings", fmt.Sprint(ignoreWarnings))
  4659. return c
  4660. }
  4661. // UpdateMask sets the optional parameter "updateMask": The subset of
  4662. // app profile fields which should be replaced.
  4663. // If unset, all fields will be replaced.
  4664. func (c *ProjectsInstancesAppProfilesPatchCall) UpdateMask(updateMask string) *ProjectsInstancesAppProfilesPatchCall {
  4665. c.urlParams_.Set("updateMask", updateMask)
  4666. return c
  4667. }
  4668. // Fields allows partial responses to be retrieved. See
  4669. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4670. // for more information.
  4671. func (c *ProjectsInstancesAppProfilesPatchCall) Fields(s ...googleapi.Field) *ProjectsInstancesAppProfilesPatchCall {
  4672. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4673. return c
  4674. }
  4675. // Context sets the context to be used in this call's Do method. Any
  4676. // pending HTTP request will be aborted if the provided context is
  4677. // canceled.
  4678. func (c *ProjectsInstancesAppProfilesPatchCall) Context(ctx context.Context) *ProjectsInstancesAppProfilesPatchCall {
  4679. c.ctx_ = ctx
  4680. return c
  4681. }
  4682. // Header returns an http.Header that can be modified by the caller to
  4683. // add HTTP headers to the request.
  4684. func (c *ProjectsInstancesAppProfilesPatchCall) Header() http.Header {
  4685. if c.header_ == nil {
  4686. c.header_ = make(http.Header)
  4687. }
  4688. return c.header_
  4689. }
  4690. func (c *ProjectsInstancesAppProfilesPatchCall) doRequest(alt string) (*http.Response, error) {
  4691. reqHeaders := make(http.Header)
  4692. for k, v := range c.header_ {
  4693. reqHeaders[k] = v
  4694. }
  4695. reqHeaders.Set("User-Agent", c.s.userAgent())
  4696. var body io.Reader = nil
  4697. body, err := googleapi.WithoutDataWrapper.JSONReader(c.appprofile)
  4698. if err != nil {
  4699. return nil, err
  4700. }
  4701. reqHeaders.Set("Content-Type", "application/json")
  4702. c.urlParams_.Set("alt", alt)
  4703. c.urlParams_.Set("prettyPrint", "false")
  4704. urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
  4705. urls += "?" + c.urlParams_.Encode()
  4706. req, err := http.NewRequest("PATCH", urls, body)
  4707. if err != nil {
  4708. return nil, err
  4709. }
  4710. req.Header = reqHeaders
  4711. googleapi.Expand(req.URL, map[string]string{
  4712. "name": c.name,
  4713. })
  4714. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4715. }
  4716. // Do executes the "bigtableadmin.projects.instances.appProfiles.patch" call.
  4717. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  4718. // status code is an error. Response headers are in either
  4719. // *Operation.ServerResponse.Header or (if a response was returned at
  4720. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  4721. // to check whether the returned error was because
  4722. // http.StatusNotModified was returned.
  4723. func (c *ProjectsInstancesAppProfilesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4724. gensupport.SetOptions(c.urlParams_, opts...)
  4725. res, err := c.doRequest("json")
  4726. if res != nil && res.StatusCode == http.StatusNotModified {
  4727. if res.Body != nil {
  4728. res.Body.Close()
  4729. }
  4730. return nil, &googleapi.Error{
  4731. Code: res.StatusCode,
  4732. Header: res.Header,
  4733. }
  4734. }
  4735. if err != nil {
  4736. return nil, err
  4737. }
  4738. defer googleapi.CloseBody(res)
  4739. if err := googleapi.CheckResponse(res); err != nil {
  4740. return nil, err
  4741. }
  4742. ret := &Operation{
  4743. ServerResponse: googleapi.ServerResponse{
  4744. Header: res.Header,
  4745. HTTPStatusCode: res.StatusCode,
  4746. },
  4747. }
  4748. target := &ret
  4749. if err := gensupport.DecodeResponse(target, res); err != nil {
  4750. return nil, err
  4751. }
  4752. return ret, nil
  4753. // {
  4754. // "description": "Updates an app profile within an instance.",
  4755. // "flatPath": "v2/projects/{projectsId}/instances/{instancesId}/appProfiles/{appProfilesId}",
  4756. // "httpMethod": "PATCH",
  4757. // "id": "bigtableadmin.projects.instances.appProfiles.patch",
  4758. // "parameterOrder": [
  4759. // "name"
  4760. // ],
  4761. // "parameters": {
  4762. // "ignoreWarnings": {
  4763. // "description": "If true, ignore safety checks when updating the app profile.",
  4764. // "location": "query",
  4765. // "type": "boolean"
  4766. // },
  4767. // "name": {
  4768. // "description": "(`OutputOnly`)\nThe unique name of the app profile. Values are of the form\n`projects/\u003cproject\u003e/instances/\u003cinstance\u003e/appProfiles/_a-zA-Z0-9*`.",
  4769. // "location": "path",
  4770. // "pattern": "^projects/[^/]+/instances/[^/]+/appProfiles/[^/]+$",
  4771. // "required": true,
  4772. // "type": "string"
  4773. // },
  4774. // "updateMask": {
  4775. // "description": "The subset of app profile fields which should be replaced.\nIf unset, all fields will be replaced.",
  4776. // "format": "google-fieldmask",
  4777. // "location": "query",
  4778. // "type": "string"
  4779. // }
  4780. // },
  4781. // "path": "v2/{+name}",
  4782. // "request": {
  4783. // "$ref": "AppProfile"
  4784. // },
  4785. // "response": {
  4786. // "$ref": "Operation"
  4787. // },
  4788. // "scopes": [
  4789. // "https://www.googleapis.com/auth/bigtable.admin",
  4790. // "https://www.googleapis.com/auth/bigtable.admin.cluster",
  4791. // "https://www.googleapis.com/auth/bigtable.admin.instance",
  4792. // "https://www.googleapis.com/auth/cloud-bigtable.admin",
  4793. // "https://www.googleapis.com/auth/cloud-bigtable.admin.cluster",
  4794. // "https://www.googleapis.com/auth/cloud-platform"
  4795. // ]
  4796. // }
  4797. }
  4798. // method id "bigtableadmin.projects.instances.clusters.create":
  4799. type ProjectsInstancesClustersCreateCall struct {
  4800. s *Service
  4801. parent string
  4802. cluster *Cluster
  4803. urlParams_ gensupport.URLParams
  4804. ctx_ context.Context
  4805. header_ http.Header
  4806. }
  4807. // Create: Creates a cluster within an instance.
  4808. func (r *ProjectsInstancesClustersService) Create(parent string, cluster *Cluster) *ProjectsInstancesClustersCreateCall {
  4809. c := &ProjectsInstancesClustersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4810. c.parent = parent
  4811. c.cluster = cluster
  4812. return c
  4813. }
  4814. // ClusterId sets the optional parameter "clusterId": The ID to be used
  4815. // when referring to the new cluster within its instance,
  4816. // e.g., just `mycluster` rather
  4817. // than
  4818. // `projects/myproject/instances/myinstance/clusters/mycluster`.
  4819. func (c *ProjectsInstancesClustersCreateCall) ClusterId(clusterId string) *ProjectsInstancesClustersCreateCall {
  4820. c.urlParams_.Set("clusterId", clusterId)
  4821. return c
  4822. }
  4823. // Fields allows partial responses to be retrieved. See
  4824. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4825. // for more information.
  4826. func (c *ProjectsInstancesClustersCreateCall) Fields(s ...googleapi.Field) *ProjectsInstancesClustersCreateCall {
  4827. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4828. return c
  4829. }
  4830. // Context sets the context to be used in this call's Do method. Any
  4831. // pending HTTP request will be aborted if the provided context is
  4832. // canceled.
  4833. func (c *ProjectsInstancesClustersCreateCall) Context(ctx context.Context) *ProjectsInstancesClustersCreateCall {
  4834. c.ctx_ = ctx
  4835. return c
  4836. }
  4837. // Header returns an http.Header that can be modified by the caller to
  4838. // add HTTP headers to the request.
  4839. func (c *ProjectsInstancesClustersCreateCall) Header() http.Header {
  4840. if c.header_ == nil {
  4841. c.header_ = make(http.Header)
  4842. }
  4843. return c.header_
  4844. }
  4845. func (c *ProjectsInstancesClustersCreateCall) doRequest(alt string) (*http.Response, error) {
  4846. reqHeaders := make(http.Header)
  4847. for k, v := range c.header_ {
  4848. reqHeaders[k] = v
  4849. }
  4850. reqHeaders.Set("User-Agent", c.s.userAgent())
  4851. var body io.Reader = nil
  4852. body, err := googleapi.WithoutDataWrapper.JSONReader(c.cluster)
  4853. if err != nil {
  4854. return nil, err
  4855. }
  4856. reqHeaders.Set("Content-Type", "application/json")
  4857. c.urlParams_.Set("alt", alt)
  4858. c.urlParams_.Set("prettyPrint", "false")
  4859. urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/clusters")
  4860. urls += "?" + c.urlParams_.Encode()
  4861. req, err := http.NewRequest("POST", urls, body)
  4862. if err != nil {
  4863. return nil, err
  4864. }
  4865. req.Header = reqHeaders
  4866. googleapi.Expand(req.URL, map[string]string{
  4867. "parent": c.parent,
  4868. })
  4869. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4870. }
  4871. // Do executes the "bigtableadmin.projects.instances.clusters.create" call.
  4872. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  4873. // status code is an error. Response headers are in either
  4874. // *Operation.ServerResponse.Header or (if a response was returned at
  4875. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  4876. // to check whether the returned error was because
  4877. // http.StatusNotModified was returned.
  4878. func (c *ProjectsInstancesClustersCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4879. gensupport.SetOptions(c.urlParams_, opts...)
  4880. res, err := c.doRequest("json")
  4881. if res != nil && res.StatusCode == http.StatusNotModified {
  4882. if res.Body != nil {
  4883. res.Body.Close()
  4884. }
  4885. return nil, &googleapi.Error{
  4886. Code: res.StatusCode,
  4887. Header: res.Header,
  4888. }
  4889. }
  4890. if err != nil {
  4891. return nil, err
  4892. }
  4893. defer googleapi.CloseBody(res)
  4894. if err := googleapi.CheckResponse(res); err != nil {
  4895. return nil, err
  4896. }
  4897. ret := &Operation{
  4898. ServerResponse: googleapi.ServerResponse{
  4899. Header: res.Header,
  4900. HTTPStatusCode: res.StatusCode,
  4901. },
  4902. }
  4903. target := &ret
  4904. if err := gensupport.DecodeResponse(target, res); err != nil {
  4905. return nil, err
  4906. }
  4907. return ret, nil
  4908. // {
  4909. // "description": "Creates a cluster within an instance.",
  4910. // "flatPath": "v2/projects/{projectsId}/instances/{instancesId}/clusters",
  4911. // "httpMethod": "POST",
  4912. // "id": "bigtableadmin.projects.instances.clusters.create",
  4913. // "parameterOrder": [
  4914. // "parent"
  4915. // ],
  4916. // "parameters": {
  4917. // "clusterId": {
  4918. // "description": "The ID to be used when referring to the new cluster within its instance,\ne.g., just `mycluster` rather than\n`projects/myproject/instances/myinstance/clusters/mycluster`.",
  4919. // "location": "query",
  4920. // "type": "string"
  4921. // },
  4922. // "parent": {
  4923. // "description": "The unique name of the instance in which to create the new cluster.\nValues are of the form\n`projects/\u003cproject\u003e/instances/\u003cinstance\u003e`.",
  4924. // "location": "path",
  4925. // "pattern": "^projects/[^/]+/instances/[^/]+$",
  4926. // "required": true,
  4927. // "type": "string"
  4928. // }
  4929. // },
  4930. // "path": "v2/{+parent}/clusters",
  4931. // "request": {
  4932. // "$ref": "Cluster"
  4933. // },
  4934. // "response": {
  4935. // "$ref": "Operation"
  4936. // },
  4937. // "scopes": [
  4938. // "https://www.googleapis.com/auth/bigtable.admin",
  4939. // "https://www.googleapis.com/auth/bigtable.admin.cluster",
  4940. // "https://www.googleapis.com/auth/bigtable.admin.instance",
  4941. // "https://www.googleapis.com/auth/cloud-bigtable.admin",
  4942. // "https://www.googleapis.com/auth/cloud-bigtable.admin.cluster",
  4943. // "https://www.googleapis.com/auth/cloud-platform"
  4944. // ]
  4945. // }
  4946. }
  4947. // method id "bigtableadmin.projects.instances.clusters.delete":
  4948. type ProjectsInstancesClustersDeleteCall struct {
  4949. s *Service
  4950. name string
  4951. urlParams_ gensupport.URLParams
  4952. ctx_ context.Context
  4953. header_ http.Header
  4954. }
  4955. // Delete: Deletes a cluster from an instance.
  4956. func (r *ProjectsInstancesClustersService) Delete(name string) *ProjectsInstancesClustersDeleteCall {
  4957. c := &ProjectsInstancesClustersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4958. c.name = name
  4959. return c
  4960. }
  4961. // Fields allows partial responses to be retrieved. See
  4962. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4963. // for more information.
  4964. func (c *ProjectsInstancesClustersDeleteCall) Fields(s ...googleapi.Field) *ProjectsInstancesClustersDeleteCall {
  4965. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4966. return c
  4967. }
  4968. // Context sets the context to be used in this call's Do method. Any
  4969. // pending HTTP request will be aborted if the provided context is
  4970. // canceled.
  4971. func (c *ProjectsInstancesClustersDeleteCall) Context(ctx context.Context) *ProjectsInstancesClustersDeleteCall {
  4972. c.ctx_ = ctx
  4973. return c
  4974. }
  4975. // Header returns an http.Header that can be modified by the caller to
  4976. // add HTTP headers to the request.
  4977. func (c *ProjectsInstancesClustersDeleteCall) Header() http.Header {
  4978. if c.header_ == nil {
  4979. c.header_ = make(http.Header)
  4980. }
  4981. return c.header_
  4982. }
  4983. func (c *ProjectsInstancesClustersDeleteCall) doRequest(alt string) (*http.Response, error) {
  4984. reqHeaders := make(http.Header)
  4985. for k, v := range c.header_ {
  4986. reqHeaders[k] = v
  4987. }
  4988. reqHeaders.Set("User-Agent", c.s.userAgent())
  4989. var body io.Reader = nil
  4990. c.urlParams_.Set("alt", alt)
  4991. c.urlParams_.Set("prettyPrint", "false")
  4992. urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
  4993. urls += "?" + c.urlParams_.Encode()
  4994. req, err := http.NewRequest("DELETE", urls, body)
  4995. if err != nil {
  4996. return nil, err
  4997. }
  4998. req.Header = reqHeaders
  4999. googleapi.Expand(req.URL, map[string]string{
  5000. "name": c.name,
  5001. })
  5002. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5003. }
  5004. // Do executes the "bigtableadmin.projects.instances.clusters.delete" call.
  5005. // Exactly one of *Empty or error will be non-nil. Any non-2xx status
  5006. // code is an error. Response headers are in either
  5007. // *Empty.ServerResponse.Header or (if a response was returned at all)
  5008. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  5009. // check whether the returned error was because http.StatusNotModified
  5010. // was returned.
  5011. func (c *ProjectsInstancesClustersDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  5012. gensupport.SetOptions(c.urlParams_, opts...)
  5013. res, err := c.doRequest("json")
  5014. if res != nil && res.StatusCode == http.StatusNotModified {
  5015. if res.Body != nil {
  5016. res.Body.Close()
  5017. }
  5018. return nil, &googleapi.Error{
  5019. Code: res.StatusCode,
  5020. Header: res.Header,
  5021. }
  5022. }
  5023. if err != nil {
  5024. return nil, err
  5025. }
  5026. defer googleapi.CloseBody(res)
  5027. if err := googleapi.CheckResponse(res); err != nil {
  5028. return nil, err
  5029. }
  5030. ret := &Empty{
  5031. ServerResponse: googleapi.ServerResponse{
  5032. Header: res.Header,
  5033. HTTPStatusCode: res.StatusCode,
  5034. },
  5035. }
  5036. target := &ret
  5037. if err := gensupport.DecodeResponse(target, res); err != nil {
  5038. return nil, err
  5039. }
  5040. return ret, nil
  5041. // {
  5042. // "description": "Deletes a cluster from an instance.",
  5043. // "flatPath": "v2/projects/{projectsId}/instances/{instancesId}/clusters/{clustersId}",
  5044. // "httpMethod": "DELETE",
  5045. // "id": "bigtableadmin.projects.instances.clusters.delete",
  5046. // "parameterOrder": [
  5047. // "name"
  5048. // ],
  5049. // "parameters": {
  5050. // "name": {
  5051. // "description": "The unique name of the cluster to be deleted. Values are of the form\n`projects/\u003cproject\u003e/instances/\u003cinstance\u003e/clusters/\u003ccluster\u003e`.",
  5052. // "location": "path",
  5053. // "pattern": "^projects/[^/]+/instances/[^/]+/clusters/[^/]+$",
  5054. // "required": true,
  5055. // "type": "string"
  5056. // }
  5057. // },
  5058. // "path": "v2/{+name}",
  5059. // "response": {
  5060. // "$ref": "Empty"
  5061. // },
  5062. // "scopes": [
  5063. // "https://www.googleapis.com/auth/bigtable.admin",
  5064. // "https://www.googleapis.com/auth/bigtable.admin.cluster",
  5065. // "https://www.googleapis.com/auth/bigtable.admin.instance",
  5066. // "https://www.googleapis.com/auth/cloud-bigtable.admin",
  5067. // "https://www.googleapis.com/auth/cloud-bigtable.admin.cluster",
  5068. // "https://www.googleapis.com/auth/cloud-platform"
  5069. // ]
  5070. // }
  5071. }
  5072. // method id "bigtableadmin.projects.instances.clusters.get":
  5073. type ProjectsInstancesClustersGetCall struct {
  5074. s *Service
  5075. name string
  5076. urlParams_ gensupport.URLParams
  5077. ifNoneMatch_ string
  5078. ctx_ context.Context
  5079. header_ http.Header
  5080. }
  5081. // Get: Gets information about a cluster.
  5082. func (r *ProjectsInstancesClustersService) Get(name string) *ProjectsInstancesClustersGetCall {
  5083. c := &ProjectsInstancesClustersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5084. c.name = name
  5085. return c
  5086. }
  5087. // Fields allows partial responses to be retrieved. See
  5088. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5089. // for more information.
  5090. func (c *ProjectsInstancesClustersGetCall) Fields(s ...googleapi.Field) *ProjectsInstancesClustersGetCall {
  5091. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5092. return c
  5093. }
  5094. // IfNoneMatch sets the optional parameter which makes the operation
  5095. // fail if the object's ETag matches the given value. This is useful for
  5096. // getting updates only after the object has changed since the last
  5097. // request. Use googleapi.IsNotModified to check whether the response
  5098. // error from Do is the result of In-None-Match.
  5099. func (c *ProjectsInstancesClustersGetCall) IfNoneMatch(entityTag string) *ProjectsInstancesClustersGetCall {
  5100. c.ifNoneMatch_ = entityTag
  5101. return c
  5102. }
  5103. // Context sets the context to be used in this call's Do method. Any
  5104. // pending HTTP request will be aborted if the provided context is
  5105. // canceled.
  5106. func (c *ProjectsInstancesClustersGetCall) Context(ctx context.Context) *ProjectsInstancesClustersGetCall {
  5107. c.ctx_ = ctx
  5108. return c
  5109. }
  5110. // Header returns an http.Header that can be modified by the caller to
  5111. // add HTTP headers to the request.
  5112. func (c *ProjectsInstancesClustersGetCall) Header() http.Header {
  5113. if c.header_ == nil {
  5114. c.header_ = make(http.Header)
  5115. }
  5116. return c.header_
  5117. }
  5118. func (c *ProjectsInstancesClustersGetCall) doRequest(alt string) (*http.Response, error) {
  5119. reqHeaders := make(http.Header)
  5120. for k, v := range c.header_ {
  5121. reqHeaders[k] = v
  5122. }
  5123. reqHeaders.Set("User-Agent", c.s.userAgent())
  5124. if c.ifNoneMatch_ != "" {
  5125. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5126. }
  5127. var body io.Reader = nil
  5128. c.urlParams_.Set("alt", alt)
  5129. c.urlParams_.Set("prettyPrint", "false")
  5130. urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
  5131. urls += "?" + c.urlParams_.Encode()
  5132. req, err := http.NewRequest("GET", urls, body)
  5133. if err != nil {
  5134. return nil, err
  5135. }
  5136. req.Header = reqHeaders
  5137. googleapi.Expand(req.URL, map[string]string{
  5138. "name": c.name,
  5139. })
  5140. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5141. }
  5142. // Do executes the "bigtableadmin.projects.instances.clusters.get" call.
  5143. // Exactly one of *Cluster or error will be non-nil. Any non-2xx status
  5144. // code is an error. Response headers are in either
  5145. // *Cluster.ServerResponse.Header or (if a response was returned at all)
  5146. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  5147. // check whether the returned error was because http.StatusNotModified
  5148. // was returned.
  5149. func (c *ProjectsInstancesClustersGetCall) Do(opts ...googleapi.CallOption) (*Cluster, error) {
  5150. gensupport.SetOptions(c.urlParams_, opts...)
  5151. res, err := c.doRequest("json")
  5152. if res != nil && res.StatusCode == http.StatusNotModified {
  5153. if res.Body != nil {
  5154. res.Body.Close()
  5155. }
  5156. return nil, &googleapi.Error{
  5157. Code: res.StatusCode,
  5158. Header: res.Header,
  5159. }
  5160. }
  5161. if err != nil {
  5162. return nil, err
  5163. }
  5164. defer googleapi.CloseBody(res)
  5165. if err := googleapi.CheckResponse(res); err != nil {
  5166. return nil, err
  5167. }
  5168. ret := &Cluster{
  5169. ServerResponse: googleapi.ServerResponse{
  5170. Header: res.Header,
  5171. HTTPStatusCode: res.StatusCode,
  5172. },
  5173. }
  5174. target := &ret
  5175. if err := gensupport.DecodeResponse(target, res); err != nil {
  5176. return nil, err
  5177. }
  5178. return ret, nil
  5179. // {
  5180. // "description": "Gets information about a cluster.",
  5181. // "flatPath": "v2/projects/{projectsId}/instances/{instancesId}/clusters/{clustersId}",
  5182. // "httpMethod": "GET",
  5183. // "id": "bigtableadmin.projects.instances.clusters.get",
  5184. // "parameterOrder": [
  5185. // "name"
  5186. // ],
  5187. // "parameters": {
  5188. // "name": {
  5189. // "description": "The unique name of the requested cluster. Values are of the form\n`projects/\u003cproject\u003e/instances/\u003cinstance\u003e/clusters/\u003ccluster\u003e`.",
  5190. // "location": "path",
  5191. // "pattern": "^projects/[^/]+/instances/[^/]+/clusters/[^/]+$",
  5192. // "required": true,
  5193. // "type": "string"
  5194. // }
  5195. // },
  5196. // "path": "v2/{+name}",
  5197. // "response": {
  5198. // "$ref": "Cluster"
  5199. // },
  5200. // "scopes": [
  5201. // "https://www.googleapis.com/auth/bigtable.admin",
  5202. // "https://www.googleapis.com/auth/bigtable.admin.cluster",
  5203. // "https://www.googleapis.com/auth/bigtable.admin.instance",
  5204. // "https://www.googleapis.com/auth/cloud-bigtable.admin",
  5205. // "https://www.googleapis.com/auth/cloud-bigtable.admin.cluster",
  5206. // "https://www.googleapis.com/auth/cloud-platform",
  5207. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  5208. // ]
  5209. // }
  5210. }
  5211. // method id "bigtableadmin.projects.instances.clusters.list":
  5212. type ProjectsInstancesClustersListCall struct {
  5213. s *Service
  5214. parent string
  5215. urlParams_ gensupport.URLParams
  5216. ifNoneMatch_ string
  5217. ctx_ context.Context
  5218. header_ http.Header
  5219. }
  5220. // List: Lists information about clusters in an instance.
  5221. func (r *ProjectsInstancesClustersService) List(parent string) *ProjectsInstancesClustersListCall {
  5222. c := &ProjectsInstancesClustersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5223. c.parent = parent
  5224. return c
  5225. }
  5226. // PageToken sets the optional parameter "pageToken": DEPRECATED: This
  5227. // field is unused and ignored.
  5228. func (c *ProjectsInstancesClustersListCall) PageToken(pageToken string) *ProjectsInstancesClustersListCall {
  5229. c.urlParams_.Set("pageToken", pageToken)
  5230. return c
  5231. }
  5232. // Fields allows partial responses to be retrieved. See
  5233. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5234. // for more information.
  5235. func (c *ProjectsInstancesClustersListCall) Fields(s ...googleapi.Field) *ProjectsInstancesClustersListCall {
  5236. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5237. return c
  5238. }
  5239. // IfNoneMatch sets the optional parameter which makes the operation
  5240. // fail if the object's ETag matches the given value. This is useful for
  5241. // getting updates only after the object has changed since the last
  5242. // request. Use googleapi.IsNotModified to check whether the response
  5243. // error from Do is the result of In-None-Match.
  5244. func (c *ProjectsInstancesClustersListCall) IfNoneMatch(entityTag string) *ProjectsInstancesClustersListCall {
  5245. c.ifNoneMatch_ = entityTag
  5246. return c
  5247. }
  5248. // Context sets the context to be used in this call's Do method. Any
  5249. // pending HTTP request will be aborted if the provided context is
  5250. // canceled.
  5251. func (c *ProjectsInstancesClustersListCall) Context(ctx context.Context) *ProjectsInstancesClustersListCall {
  5252. c.ctx_ = ctx
  5253. return c
  5254. }
  5255. // Header returns an http.Header that can be modified by the caller to
  5256. // add HTTP headers to the request.
  5257. func (c *ProjectsInstancesClustersListCall) Header() http.Header {
  5258. if c.header_ == nil {
  5259. c.header_ = make(http.Header)
  5260. }
  5261. return c.header_
  5262. }
  5263. func (c *ProjectsInstancesClustersListCall) doRequest(alt string) (*http.Response, error) {
  5264. reqHeaders := make(http.Header)
  5265. for k, v := range c.header_ {
  5266. reqHeaders[k] = v
  5267. }
  5268. reqHeaders.Set("User-Agent", c.s.userAgent())
  5269. if c.ifNoneMatch_ != "" {
  5270. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5271. }
  5272. var body io.Reader = nil
  5273. c.urlParams_.Set("alt", alt)
  5274. c.urlParams_.Set("prettyPrint", "false")
  5275. urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/clusters")
  5276. urls += "?" + c.urlParams_.Encode()
  5277. req, err := http.NewRequest("GET", urls, body)
  5278. if err != nil {
  5279. return nil, err
  5280. }
  5281. req.Header = reqHeaders
  5282. googleapi.Expand(req.URL, map[string]string{
  5283. "parent": c.parent,
  5284. })
  5285. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5286. }
  5287. // Do executes the "bigtableadmin.projects.instances.clusters.list" call.
  5288. // Exactly one of *ListClustersResponse or error will be non-nil. Any
  5289. // non-2xx status code is an error. Response headers are in either
  5290. // *ListClustersResponse.ServerResponse.Header or (if a response was
  5291. // returned at all) in error.(*googleapi.Error).Header. Use
  5292. // googleapi.IsNotModified to check whether the returned error was
  5293. // because http.StatusNotModified was returned.
  5294. func (c *ProjectsInstancesClustersListCall) Do(opts ...googleapi.CallOption) (*ListClustersResponse, error) {
  5295. gensupport.SetOptions(c.urlParams_, opts...)
  5296. res, err := c.doRequest("json")
  5297. if res != nil && res.StatusCode == http.StatusNotModified {
  5298. if res.Body != nil {
  5299. res.Body.Close()
  5300. }
  5301. return nil, &googleapi.Error{
  5302. Code: res.StatusCode,
  5303. Header: res.Header,
  5304. }
  5305. }
  5306. if err != nil {
  5307. return nil, err
  5308. }
  5309. defer googleapi.CloseBody(res)
  5310. if err := googleapi.CheckResponse(res); err != nil {
  5311. return nil, err
  5312. }
  5313. ret := &ListClustersResponse{
  5314. ServerResponse: googleapi.ServerResponse{
  5315. Header: res.Header,
  5316. HTTPStatusCode: res.StatusCode,
  5317. },
  5318. }
  5319. target := &ret
  5320. if err := gensupport.DecodeResponse(target, res); err != nil {
  5321. return nil, err
  5322. }
  5323. return ret, nil
  5324. // {
  5325. // "description": "Lists information about clusters in an instance.",
  5326. // "flatPath": "v2/projects/{projectsId}/instances/{instancesId}/clusters",
  5327. // "httpMethod": "GET",
  5328. // "id": "bigtableadmin.projects.instances.clusters.list",
  5329. // "parameterOrder": [
  5330. // "parent"
  5331. // ],
  5332. // "parameters": {
  5333. // "pageToken": {
  5334. // "description": "DEPRECATED: This field is unused and ignored.",
  5335. // "location": "query",
  5336. // "type": "string"
  5337. // },
  5338. // "parent": {
  5339. // "description": "The unique name of the instance for which a list of clusters is requested.\nValues are of the form `projects/\u003cproject\u003e/instances/\u003cinstance\u003e`.\nUse `\u003cinstance\u003e = '-'` to list Clusters for all Instances in a project,\ne.g., `projects/myproject/instances/-`.",
  5340. // "location": "path",
  5341. // "pattern": "^projects/[^/]+/instances/[^/]+$",
  5342. // "required": true,
  5343. // "type": "string"
  5344. // }
  5345. // },
  5346. // "path": "v2/{+parent}/clusters",
  5347. // "response": {
  5348. // "$ref": "ListClustersResponse"
  5349. // },
  5350. // "scopes": [
  5351. // "https://www.googleapis.com/auth/bigtable.admin",
  5352. // "https://www.googleapis.com/auth/bigtable.admin.cluster",
  5353. // "https://www.googleapis.com/auth/bigtable.admin.instance",
  5354. // "https://www.googleapis.com/auth/cloud-bigtable.admin",
  5355. // "https://www.googleapis.com/auth/cloud-bigtable.admin.cluster",
  5356. // "https://www.googleapis.com/auth/cloud-platform",
  5357. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  5358. // ]
  5359. // }
  5360. }
  5361. // Pages invokes f for each page of results.
  5362. // A non-nil error returned from f will halt the iteration.
  5363. // The provided context supersedes any context provided to the Context method.
  5364. func (c *ProjectsInstancesClustersListCall) Pages(ctx context.Context, f func(*ListClustersResponse) error) error {
  5365. c.ctx_ = ctx
  5366. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  5367. for {
  5368. x, err := c.Do()
  5369. if err != nil {
  5370. return err
  5371. }
  5372. if err := f(x); err != nil {
  5373. return err
  5374. }
  5375. if x.NextPageToken == "" {
  5376. return nil
  5377. }
  5378. c.PageToken(x.NextPageToken)
  5379. }
  5380. }
  5381. // method id "bigtableadmin.projects.instances.clusters.update":
  5382. type ProjectsInstancesClustersUpdateCall struct {
  5383. s *Service
  5384. name string
  5385. cluster *Cluster
  5386. urlParams_ gensupport.URLParams
  5387. ctx_ context.Context
  5388. header_ http.Header
  5389. }
  5390. // Update: Updates a cluster within an instance.
  5391. func (r *ProjectsInstancesClustersService) Update(name string, cluster *Cluster) *ProjectsInstancesClustersUpdateCall {
  5392. c := &ProjectsInstancesClustersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5393. c.name = name
  5394. c.cluster = cluster
  5395. return c
  5396. }
  5397. // Fields allows partial responses to be retrieved. See
  5398. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5399. // for more information.
  5400. func (c *ProjectsInstancesClustersUpdateCall) Fields(s ...googleapi.Field) *ProjectsInstancesClustersUpdateCall {
  5401. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5402. return c
  5403. }
  5404. // Context sets the context to be used in this call's Do method. Any
  5405. // pending HTTP request will be aborted if the provided context is
  5406. // canceled.
  5407. func (c *ProjectsInstancesClustersUpdateCall) Context(ctx context.Context) *ProjectsInstancesClustersUpdateCall {
  5408. c.ctx_ = ctx
  5409. return c
  5410. }
  5411. // Header returns an http.Header that can be modified by the caller to
  5412. // add HTTP headers to the request.
  5413. func (c *ProjectsInstancesClustersUpdateCall) Header() http.Header {
  5414. if c.header_ == nil {
  5415. c.header_ = make(http.Header)
  5416. }
  5417. return c.header_
  5418. }
  5419. func (c *ProjectsInstancesClustersUpdateCall) doRequest(alt string) (*http.Response, error) {
  5420. reqHeaders := make(http.Header)
  5421. for k, v := range c.header_ {
  5422. reqHeaders[k] = v
  5423. }
  5424. reqHeaders.Set("User-Agent", c.s.userAgent())
  5425. var body io.Reader = nil
  5426. body, err := googleapi.WithoutDataWrapper.JSONReader(c.cluster)
  5427. if err != nil {
  5428. return nil, err
  5429. }
  5430. reqHeaders.Set("Content-Type", "application/json")
  5431. c.urlParams_.Set("alt", alt)
  5432. c.urlParams_.Set("prettyPrint", "false")
  5433. urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
  5434. urls += "?" + c.urlParams_.Encode()
  5435. req, err := http.NewRequest("PUT", urls, body)
  5436. if err != nil {
  5437. return nil, err
  5438. }
  5439. req.Header = reqHeaders
  5440. googleapi.Expand(req.URL, map[string]string{
  5441. "name": c.name,
  5442. })
  5443. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5444. }
  5445. // Do executes the "bigtableadmin.projects.instances.clusters.update" call.
  5446. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  5447. // status code is an error. Response headers are in either
  5448. // *Operation.ServerResponse.Header or (if a response was returned at
  5449. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  5450. // to check whether the returned error was because
  5451. // http.StatusNotModified was returned.
  5452. func (c *ProjectsInstancesClustersUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  5453. gensupport.SetOptions(c.urlParams_, opts...)
  5454. res, err := c.doRequest("json")
  5455. if res != nil && res.StatusCode == http.StatusNotModified {
  5456. if res.Body != nil {
  5457. res.Body.Close()
  5458. }
  5459. return nil, &googleapi.Error{
  5460. Code: res.StatusCode,
  5461. Header: res.Header,
  5462. }
  5463. }
  5464. if err != nil {
  5465. return nil, err
  5466. }
  5467. defer googleapi.CloseBody(res)
  5468. if err := googleapi.CheckResponse(res); err != nil {
  5469. return nil, err
  5470. }
  5471. ret := &Operation{
  5472. ServerResponse: googleapi.ServerResponse{
  5473. Header: res.Header,
  5474. HTTPStatusCode: res.StatusCode,
  5475. },
  5476. }
  5477. target := &ret
  5478. if err := gensupport.DecodeResponse(target, res); err != nil {
  5479. return nil, err
  5480. }
  5481. return ret, nil
  5482. // {
  5483. // "description": "Updates a cluster within an instance.",
  5484. // "flatPath": "v2/projects/{projectsId}/instances/{instancesId}/clusters/{clustersId}",
  5485. // "httpMethod": "PUT",
  5486. // "id": "bigtableadmin.projects.instances.clusters.update",
  5487. // "parameterOrder": [
  5488. // "name"
  5489. // ],
  5490. // "parameters": {
  5491. // "name": {
  5492. // "description": "(`OutputOnly`)\nThe unique name of the cluster. Values are of the form\n`projects/\u003cproject\u003e/instances/\u003cinstance\u003e/clusters/a-z*`.",
  5493. // "location": "path",
  5494. // "pattern": "^projects/[^/]+/instances/[^/]+/clusters/[^/]+$",
  5495. // "required": true,
  5496. // "type": "string"
  5497. // }
  5498. // },
  5499. // "path": "v2/{+name}",
  5500. // "request": {
  5501. // "$ref": "Cluster"
  5502. // },
  5503. // "response": {
  5504. // "$ref": "Operation"
  5505. // },
  5506. // "scopes": [
  5507. // "https://www.googleapis.com/auth/bigtable.admin",
  5508. // "https://www.googleapis.com/auth/bigtable.admin.cluster",
  5509. // "https://www.googleapis.com/auth/bigtable.admin.instance",
  5510. // "https://www.googleapis.com/auth/cloud-bigtable.admin",
  5511. // "https://www.googleapis.com/auth/cloud-bigtable.admin.cluster",
  5512. // "https://www.googleapis.com/auth/cloud-platform"
  5513. // ]
  5514. // }
  5515. }
  5516. // method id "bigtableadmin.projects.instances.tables.checkConsistency":
  5517. type ProjectsInstancesTablesCheckConsistencyCall struct {
  5518. s *Service
  5519. name string
  5520. checkconsistencyrequest *CheckConsistencyRequest
  5521. urlParams_ gensupport.URLParams
  5522. ctx_ context.Context
  5523. header_ http.Header
  5524. }
  5525. // CheckConsistency: Checks replication consistency based on a
  5526. // consistency token, that is, if
  5527. // replication has caught up based on the conditions specified in the
  5528. // token
  5529. // and the check request.
  5530. func (r *ProjectsInstancesTablesService) CheckConsistency(name string, checkconsistencyrequest *CheckConsistencyRequest) *ProjectsInstancesTablesCheckConsistencyCall {
  5531. c := &ProjectsInstancesTablesCheckConsistencyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5532. c.name = name
  5533. c.checkconsistencyrequest = checkconsistencyrequest
  5534. return c
  5535. }
  5536. // Fields allows partial responses to be retrieved. See
  5537. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5538. // for more information.
  5539. func (c *ProjectsInstancesTablesCheckConsistencyCall) Fields(s ...googleapi.Field) *ProjectsInstancesTablesCheckConsistencyCall {
  5540. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5541. return c
  5542. }
  5543. // Context sets the context to be used in this call's Do method. Any
  5544. // pending HTTP request will be aborted if the provided context is
  5545. // canceled.
  5546. func (c *ProjectsInstancesTablesCheckConsistencyCall) Context(ctx context.Context) *ProjectsInstancesTablesCheckConsistencyCall {
  5547. c.ctx_ = ctx
  5548. return c
  5549. }
  5550. // Header returns an http.Header that can be modified by the caller to
  5551. // add HTTP headers to the request.
  5552. func (c *ProjectsInstancesTablesCheckConsistencyCall) Header() http.Header {
  5553. if c.header_ == nil {
  5554. c.header_ = make(http.Header)
  5555. }
  5556. return c.header_
  5557. }
  5558. func (c *ProjectsInstancesTablesCheckConsistencyCall) doRequest(alt string) (*http.Response, error) {
  5559. reqHeaders := make(http.Header)
  5560. for k, v := range c.header_ {
  5561. reqHeaders[k] = v
  5562. }
  5563. reqHeaders.Set("User-Agent", c.s.userAgent())
  5564. var body io.Reader = nil
  5565. body, err := googleapi.WithoutDataWrapper.JSONReader(c.checkconsistencyrequest)
  5566. if err != nil {
  5567. return nil, err
  5568. }
  5569. reqHeaders.Set("Content-Type", "application/json")
  5570. c.urlParams_.Set("alt", alt)
  5571. c.urlParams_.Set("prettyPrint", "false")
  5572. urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:checkConsistency")
  5573. urls += "?" + c.urlParams_.Encode()
  5574. req, err := http.NewRequest("POST", urls, body)
  5575. if err != nil {
  5576. return nil, err
  5577. }
  5578. req.Header = reqHeaders
  5579. googleapi.Expand(req.URL, map[string]string{
  5580. "name": c.name,
  5581. })
  5582. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5583. }
  5584. // Do executes the "bigtableadmin.projects.instances.tables.checkConsistency" call.
  5585. // Exactly one of *CheckConsistencyResponse or error will be non-nil.
  5586. // Any non-2xx status code is an error. Response headers are in either
  5587. // *CheckConsistencyResponse.ServerResponse.Header or (if a response was
  5588. // returned at all) in error.(*googleapi.Error).Header. Use
  5589. // googleapi.IsNotModified to check whether the returned error was
  5590. // because http.StatusNotModified was returned.
  5591. func (c *ProjectsInstancesTablesCheckConsistencyCall) Do(opts ...googleapi.CallOption) (*CheckConsistencyResponse, error) {
  5592. gensupport.SetOptions(c.urlParams_, opts...)
  5593. res, err := c.doRequest("json")
  5594. if res != nil && res.StatusCode == http.StatusNotModified {
  5595. if res.Body != nil {
  5596. res.Body.Close()
  5597. }
  5598. return nil, &googleapi.Error{
  5599. Code: res.StatusCode,
  5600. Header: res.Header,
  5601. }
  5602. }
  5603. if err != nil {
  5604. return nil, err
  5605. }
  5606. defer googleapi.CloseBody(res)
  5607. if err := googleapi.CheckResponse(res); err != nil {
  5608. return nil, err
  5609. }
  5610. ret := &CheckConsistencyResponse{
  5611. ServerResponse: googleapi.ServerResponse{
  5612. Header: res.Header,
  5613. HTTPStatusCode: res.StatusCode,
  5614. },
  5615. }
  5616. target := &ret
  5617. if err := gensupport.DecodeResponse(target, res); err != nil {
  5618. return nil, err
  5619. }
  5620. return ret, nil
  5621. // {
  5622. // "description": "Checks replication consistency based on a consistency token, that is, if\nreplication has caught up based on the conditions specified in the token\nand the check request.",
  5623. // "flatPath": "v2/projects/{projectsId}/instances/{instancesId}/tables/{tablesId}:checkConsistency",
  5624. // "httpMethod": "POST",
  5625. // "id": "bigtableadmin.projects.instances.tables.checkConsistency",
  5626. // "parameterOrder": [
  5627. // "name"
  5628. // ],
  5629. // "parameters": {
  5630. // "name": {
  5631. // "description": "The unique name of the Table for which to check replication consistency.\nValues are of the form\n`projects/\u003cproject\u003e/instances/\u003cinstance\u003e/tables/\u003ctable\u003e`.",
  5632. // "location": "path",
  5633. // "pattern": "^projects/[^/]+/instances/[^/]+/tables/[^/]+$",
  5634. // "required": true,
  5635. // "type": "string"
  5636. // }
  5637. // },
  5638. // "path": "v2/{+name}:checkConsistency",
  5639. // "request": {
  5640. // "$ref": "CheckConsistencyRequest"
  5641. // },
  5642. // "response": {
  5643. // "$ref": "CheckConsistencyResponse"
  5644. // },
  5645. // "scopes": [
  5646. // "https://www.googleapis.com/auth/bigtable.admin",
  5647. // "https://www.googleapis.com/auth/bigtable.admin.table",
  5648. // "https://www.googleapis.com/auth/cloud-bigtable.admin",
  5649. // "https://www.googleapis.com/auth/cloud-bigtable.admin.table",
  5650. // "https://www.googleapis.com/auth/cloud-platform"
  5651. // ]
  5652. // }
  5653. }
  5654. // method id "bigtableadmin.projects.instances.tables.create":
  5655. type ProjectsInstancesTablesCreateCall struct {
  5656. s *Service
  5657. parent string
  5658. createtablerequest *CreateTableRequest
  5659. urlParams_ gensupport.URLParams
  5660. ctx_ context.Context
  5661. header_ http.Header
  5662. }
  5663. // Create: Creates a new table in the specified instance.
  5664. // The table can be created with a full set of initial column
  5665. // families,
  5666. // specified in the request.
  5667. func (r *ProjectsInstancesTablesService) Create(parent string, createtablerequest *CreateTableRequest) *ProjectsInstancesTablesCreateCall {
  5668. c := &ProjectsInstancesTablesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5669. c.parent = parent
  5670. c.createtablerequest = createtablerequest
  5671. return c
  5672. }
  5673. // Fields allows partial responses to be retrieved. See
  5674. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5675. // for more information.
  5676. func (c *ProjectsInstancesTablesCreateCall) Fields(s ...googleapi.Field) *ProjectsInstancesTablesCreateCall {
  5677. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5678. return c
  5679. }
  5680. // Context sets the context to be used in this call's Do method. Any
  5681. // pending HTTP request will be aborted if the provided context is
  5682. // canceled.
  5683. func (c *ProjectsInstancesTablesCreateCall) Context(ctx context.Context) *ProjectsInstancesTablesCreateCall {
  5684. c.ctx_ = ctx
  5685. return c
  5686. }
  5687. // Header returns an http.Header that can be modified by the caller to
  5688. // add HTTP headers to the request.
  5689. func (c *ProjectsInstancesTablesCreateCall) Header() http.Header {
  5690. if c.header_ == nil {
  5691. c.header_ = make(http.Header)
  5692. }
  5693. return c.header_
  5694. }
  5695. func (c *ProjectsInstancesTablesCreateCall) doRequest(alt string) (*http.Response, error) {
  5696. reqHeaders := make(http.Header)
  5697. for k, v := range c.header_ {
  5698. reqHeaders[k] = v
  5699. }
  5700. reqHeaders.Set("User-Agent", c.s.userAgent())
  5701. var body io.Reader = nil
  5702. body, err := googleapi.WithoutDataWrapper.JSONReader(c.createtablerequest)
  5703. if err != nil {
  5704. return nil, err
  5705. }
  5706. reqHeaders.Set("Content-Type", "application/json")
  5707. c.urlParams_.Set("alt", alt)
  5708. c.urlParams_.Set("prettyPrint", "false")
  5709. urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/tables")
  5710. urls += "?" + c.urlParams_.Encode()
  5711. req, err := http.NewRequest("POST", urls, body)
  5712. if err != nil {
  5713. return nil, err
  5714. }
  5715. req.Header = reqHeaders
  5716. googleapi.Expand(req.URL, map[string]string{
  5717. "parent": c.parent,
  5718. })
  5719. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5720. }
  5721. // Do executes the "bigtableadmin.projects.instances.tables.create" call.
  5722. // Exactly one of *Table or error will be non-nil. Any non-2xx status
  5723. // code is an error. Response headers are in either
  5724. // *Table.ServerResponse.Header or (if a response was returned at all)
  5725. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  5726. // check whether the returned error was because http.StatusNotModified
  5727. // was returned.
  5728. func (c *ProjectsInstancesTablesCreateCall) Do(opts ...googleapi.CallOption) (*Table, error) {
  5729. gensupport.SetOptions(c.urlParams_, opts...)
  5730. res, err := c.doRequest("json")
  5731. if res != nil && res.StatusCode == http.StatusNotModified {
  5732. if res.Body != nil {
  5733. res.Body.Close()
  5734. }
  5735. return nil, &googleapi.Error{
  5736. Code: res.StatusCode,
  5737. Header: res.Header,
  5738. }
  5739. }
  5740. if err != nil {
  5741. return nil, err
  5742. }
  5743. defer googleapi.CloseBody(res)
  5744. if err := googleapi.CheckResponse(res); err != nil {
  5745. return nil, err
  5746. }
  5747. ret := &Table{
  5748. ServerResponse: googleapi.ServerResponse{
  5749. Header: res.Header,
  5750. HTTPStatusCode: res.StatusCode,
  5751. },
  5752. }
  5753. target := &ret
  5754. if err := gensupport.DecodeResponse(target, res); err != nil {
  5755. return nil, err
  5756. }
  5757. return ret, nil
  5758. // {
  5759. // "description": "Creates a new table in the specified instance.\nThe table can be created with a full set of initial column families,\nspecified in the request.",
  5760. // "flatPath": "v2/projects/{projectsId}/instances/{instancesId}/tables",
  5761. // "httpMethod": "POST",
  5762. // "id": "bigtableadmin.projects.instances.tables.create",
  5763. // "parameterOrder": [
  5764. // "parent"
  5765. // ],
  5766. // "parameters": {
  5767. // "parent": {
  5768. // "description": "The unique name of the instance in which to create the table.\nValues are of the form `projects/\u003cproject\u003e/instances/\u003cinstance\u003e`.",
  5769. // "location": "path",
  5770. // "pattern": "^projects/[^/]+/instances/[^/]+$",
  5771. // "required": true,
  5772. // "type": "string"
  5773. // }
  5774. // },
  5775. // "path": "v2/{+parent}/tables",
  5776. // "request": {
  5777. // "$ref": "CreateTableRequest"
  5778. // },
  5779. // "response": {
  5780. // "$ref": "Table"
  5781. // },
  5782. // "scopes": [
  5783. // "https://www.googleapis.com/auth/bigtable.admin",
  5784. // "https://www.googleapis.com/auth/bigtable.admin.table",
  5785. // "https://www.googleapis.com/auth/cloud-bigtable.admin",
  5786. // "https://www.googleapis.com/auth/cloud-bigtable.admin.table",
  5787. // "https://www.googleapis.com/auth/cloud-platform"
  5788. // ]
  5789. // }
  5790. }
  5791. // method id "bigtableadmin.projects.instances.tables.delete":
  5792. type ProjectsInstancesTablesDeleteCall struct {
  5793. s *Service
  5794. name string
  5795. urlParams_ gensupport.URLParams
  5796. ctx_ context.Context
  5797. header_ http.Header
  5798. }
  5799. // Delete: Permanently deletes a specified table and all of its data.
  5800. func (r *ProjectsInstancesTablesService) Delete(name string) *ProjectsInstancesTablesDeleteCall {
  5801. c := &ProjectsInstancesTablesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5802. c.name = name
  5803. return c
  5804. }
  5805. // Fields allows partial responses to be retrieved. See
  5806. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5807. // for more information.
  5808. func (c *ProjectsInstancesTablesDeleteCall) Fields(s ...googleapi.Field) *ProjectsInstancesTablesDeleteCall {
  5809. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5810. return c
  5811. }
  5812. // Context sets the context to be used in this call's Do method. Any
  5813. // pending HTTP request will be aborted if the provided context is
  5814. // canceled.
  5815. func (c *ProjectsInstancesTablesDeleteCall) Context(ctx context.Context) *ProjectsInstancesTablesDeleteCall {
  5816. c.ctx_ = ctx
  5817. return c
  5818. }
  5819. // Header returns an http.Header that can be modified by the caller to
  5820. // add HTTP headers to the request.
  5821. func (c *ProjectsInstancesTablesDeleteCall) Header() http.Header {
  5822. if c.header_ == nil {
  5823. c.header_ = make(http.Header)
  5824. }
  5825. return c.header_
  5826. }
  5827. func (c *ProjectsInstancesTablesDeleteCall) doRequest(alt string) (*http.Response, error) {
  5828. reqHeaders := make(http.Header)
  5829. for k, v := range c.header_ {
  5830. reqHeaders[k] = v
  5831. }
  5832. reqHeaders.Set("User-Agent", c.s.userAgent())
  5833. var body io.Reader = nil
  5834. c.urlParams_.Set("alt", alt)
  5835. c.urlParams_.Set("prettyPrint", "false")
  5836. urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
  5837. urls += "?" + c.urlParams_.Encode()
  5838. req, err := http.NewRequest("DELETE", urls, body)
  5839. if err != nil {
  5840. return nil, err
  5841. }
  5842. req.Header = reqHeaders
  5843. googleapi.Expand(req.URL, map[string]string{
  5844. "name": c.name,
  5845. })
  5846. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5847. }
  5848. // Do executes the "bigtableadmin.projects.instances.tables.delete" call.
  5849. // Exactly one of *Empty or error will be non-nil. Any non-2xx status
  5850. // code is an error. Response headers are in either
  5851. // *Empty.ServerResponse.Header or (if a response was returned at all)
  5852. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  5853. // check whether the returned error was because http.StatusNotModified
  5854. // was returned.
  5855. func (c *ProjectsInstancesTablesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  5856. gensupport.SetOptions(c.urlParams_, opts...)
  5857. res, err := c.doRequest("json")
  5858. if res != nil && res.StatusCode == http.StatusNotModified {
  5859. if res.Body != nil {
  5860. res.Body.Close()
  5861. }
  5862. return nil, &googleapi.Error{
  5863. Code: res.StatusCode,
  5864. Header: res.Header,
  5865. }
  5866. }
  5867. if err != nil {
  5868. return nil, err
  5869. }
  5870. defer googleapi.CloseBody(res)
  5871. if err := googleapi.CheckResponse(res); err != nil {
  5872. return nil, err
  5873. }
  5874. ret := &Empty{
  5875. ServerResponse: googleapi.ServerResponse{
  5876. Header: res.Header,
  5877. HTTPStatusCode: res.StatusCode,
  5878. },
  5879. }
  5880. target := &ret
  5881. if err := gensupport.DecodeResponse(target, res); err != nil {
  5882. return nil, err
  5883. }
  5884. return ret, nil
  5885. // {
  5886. // "description": "Permanently deletes a specified table and all of its data.",
  5887. // "flatPath": "v2/projects/{projectsId}/instances/{instancesId}/tables/{tablesId}",
  5888. // "httpMethod": "DELETE",
  5889. // "id": "bigtableadmin.projects.instances.tables.delete",
  5890. // "parameterOrder": [
  5891. // "name"
  5892. // ],
  5893. // "parameters": {
  5894. // "name": {
  5895. // "description": "The unique name of the table to be deleted.\nValues are of the form\n`projects/\u003cproject\u003e/instances/\u003cinstance\u003e/tables/\u003ctable\u003e`.",
  5896. // "location": "path",
  5897. // "pattern": "^projects/[^/]+/instances/[^/]+/tables/[^/]+$",
  5898. // "required": true,
  5899. // "type": "string"
  5900. // }
  5901. // },
  5902. // "path": "v2/{+name}",
  5903. // "response": {
  5904. // "$ref": "Empty"
  5905. // },
  5906. // "scopes": [
  5907. // "https://www.googleapis.com/auth/bigtable.admin",
  5908. // "https://www.googleapis.com/auth/bigtable.admin.table",
  5909. // "https://www.googleapis.com/auth/cloud-bigtable.admin",
  5910. // "https://www.googleapis.com/auth/cloud-bigtable.admin.table",
  5911. // "https://www.googleapis.com/auth/cloud-platform"
  5912. // ]
  5913. // }
  5914. }
  5915. // method id "bigtableadmin.projects.instances.tables.dropRowRange":
  5916. type ProjectsInstancesTablesDropRowRangeCall struct {
  5917. s *Service
  5918. name string
  5919. droprowrangerequest *DropRowRangeRequest
  5920. urlParams_ gensupport.URLParams
  5921. ctx_ context.Context
  5922. header_ http.Header
  5923. }
  5924. // DropRowRange: Permanently drop/delete a row range from a specified
  5925. // table. The request can
  5926. // specify whether to delete all rows in a table, or only those that
  5927. // match a
  5928. // particular prefix.
  5929. func (r *ProjectsInstancesTablesService) DropRowRange(name string, droprowrangerequest *DropRowRangeRequest) *ProjectsInstancesTablesDropRowRangeCall {
  5930. c := &ProjectsInstancesTablesDropRowRangeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5931. c.name = name
  5932. c.droprowrangerequest = droprowrangerequest
  5933. return c
  5934. }
  5935. // Fields allows partial responses to be retrieved. See
  5936. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5937. // for more information.
  5938. func (c *ProjectsInstancesTablesDropRowRangeCall) Fields(s ...googleapi.Field) *ProjectsInstancesTablesDropRowRangeCall {
  5939. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5940. return c
  5941. }
  5942. // Context sets the context to be used in this call's Do method. Any
  5943. // pending HTTP request will be aborted if the provided context is
  5944. // canceled.
  5945. func (c *ProjectsInstancesTablesDropRowRangeCall) Context(ctx context.Context) *ProjectsInstancesTablesDropRowRangeCall {
  5946. c.ctx_ = ctx
  5947. return c
  5948. }
  5949. // Header returns an http.Header that can be modified by the caller to
  5950. // add HTTP headers to the request.
  5951. func (c *ProjectsInstancesTablesDropRowRangeCall) Header() http.Header {
  5952. if c.header_ == nil {
  5953. c.header_ = make(http.Header)
  5954. }
  5955. return c.header_
  5956. }
  5957. func (c *ProjectsInstancesTablesDropRowRangeCall) doRequest(alt string) (*http.Response, error) {
  5958. reqHeaders := make(http.Header)
  5959. for k, v := range c.header_ {
  5960. reqHeaders[k] = v
  5961. }
  5962. reqHeaders.Set("User-Agent", c.s.userAgent())
  5963. var body io.Reader = nil
  5964. body, err := googleapi.WithoutDataWrapper.JSONReader(c.droprowrangerequest)
  5965. if err != nil {
  5966. return nil, err
  5967. }
  5968. reqHeaders.Set("Content-Type", "application/json")
  5969. c.urlParams_.Set("alt", alt)
  5970. c.urlParams_.Set("prettyPrint", "false")
  5971. urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:dropRowRange")
  5972. urls += "?" + c.urlParams_.Encode()
  5973. req, err := http.NewRequest("POST", urls, body)
  5974. if err != nil {
  5975. return nil, err
  5976. }
  5977. req.Header = reqHeaders
  5978. googleapi.Expand(req.URL, map[string]string{
  5979. "name": c.name,
  5980. })
  5981. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5982. }
  5983. // Do executes the "bigtableadmin.projects.instances.tables.dropRowRange" call.
  5984. // Exactly one of *Empty or error will be non-nil. Any non-2xx status
  5985. // code is an error. Response headers are in either
  5986. // *Empty.ServerResponse.Header or (if a response was returned at all)
  5987. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  5988. // check whether the returned error was because http.StatusNotModified
  5989. // was returned.
  5990. func (c *ProjectsInstancesTablesDropRowRangeCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  5991. gensupport.SetOptions(c.urlParams_, opts...)
  5992. res, err := c.doRequest("json")
  5993. if res != nil && res.StatusCode == http.StatusNotModified {
  5994. if res.Body != nil {
  5995. res.Body.Close()
  5996. }
  5997. return nil, &googleapi.Error{
  5998. Code: res.StatusCode,
  5999. Header: res.Header,
  6000. }
  6001. }
  6002. if err != nil {
  6003. return nil, err
  6004. }
  6005. defer googleapi.CloseBody(res)
  6006. if err := googleapi.CheckResponse(res); err != nil {
  6007. return nil, err
  6008. }
  6009. ret := &Empty{
  6010. ServerResponse: googleapi.ServerResponse{
  6011. Header: res.Header,
  6012. HTTPStatusCode: res.StatusCode,
  6013. },
  6014. }
  6015. target := &ret
  6016. if err := gensupport.DecodeResponse(target, res); err != nil {
  6017. return nil, err
  6018. }
  6019. return ret, nil
  6020. // {
  6021. // "description": "Permanently drop/delete a row range from a specified table. The request can\nspecify whether to delete all rows in a table, or only those that match a\nparticular prefix.",
  6022. // "flatPath": "v2/projects/{projectsId}/instances/{instancesId}/tables/{tablesId}:dropRowRange",
  6023. // "httpMethod": "POST",
  6024. // "id": "bigtableadmin.projects.instances.tables.dropRowRange",
  6025. // "parameterOrder": [
  6026. // "name"
  6027. // ],
  6028. // "parameters": {
  6029. // "name": {
  6030. // "description": "The unique name of the table on which to drop a range of rows.\nValues are of the form\n`projects/\u003cproject\u003e/instances/\u003cinstance\u003e/tables/\u003ctable\u003e`.",
  6031. // "location": "path",
  6032. // "pattern": "^projects/[^/]+/instances/[^/]+/tables/[^/]+$",
  6033. // "required": true,
  6034. // "type": "string"
  6035. // }
  6036. // },
  6037. // "path": "v2/{+name}:dropRowRange",
  6038. // "request": {
  6039. // "$ref": "DropRowRangeRequest"
  6040. // },
  6041. // "response": {
  6042. // "$ref": "Empty"
  6043. // },
  6044. // "scopes": [
  6045. // "https://www.googleapis.com/auth/bigtable.admin",
  6046. // "https://www.googleapis.com/auth/bigtable.admin.table",
  6047. // "https://www.googleapis.com/auth/cloud-bigtable.admin",
  6048. // "https://www.googleapis.com/auth/cloud-bigtable.admin.table",
  6049. // "https://www.googleapis.com/auth/cloud-platform"
  6050. // ]
  6051. // }
  6052. }
  6053. // method id "bigtableadmin.projects.instances.tables.generateConsistencyToken":
  6054. type ProjectsInstancesTablesGenerateConsistencyTokenCall struct {
  6055. s *Service
  6056. name string
  6057. generateconsistencytokenrequest *GenerateConsistencyTokenRequest
  6058. urlParams_ gensupport.URLParams
  6059. ctx_ context.Context
  6060. header_ http.Header
  6061. }
  6062. // GenerateConsistencyToken: Generates a consistency token for a Table,
  6063. // which can be used in
  6064. // CheckConsistency to check whether mutations to the table that
  6065. // finished
  6066. // before this call started have been replicated. The tokens will be
  6067. // available
  6068. // for 90 days.
  6069. func (r *ProjectsInstancesTablesService) GenerateConsistencyToken(name string, generateconsistencytokenrequest *GenerateConsistencyTokenRequest) *ProjectsInstancesTablesGenerateConsistencyTokenCall {
  6070. c := &ProjectsInstancesTablesGenerateConsistencyTokenCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6071. c.name = name
  6072. c.generateconsistencytokenrequest = generateconsistencytokenrequest
  6073. return c
  6074. }
  6075. // Fields allows partial responses to be retrieved. See
  6076. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6077. // for more information.
  6078. func (c *ProjectsInstancesTablesGenerateConsistencyTokenCall) Fields(s ...googleapi.Field) *ProjectsInstancesTablesGenerateConsistencyTokenCall {
  6079. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6080. return c
  6081. }
  6082. // Context sets the context to be used in this call's Do method. Any
  6083. // pending HTTP request will be aborted if the provided context is
  6084. // canceled.
  6085. func (c *ProjectsInstancesTablesGenerateConsistencyTokenCall) Context(ctx context.Context) *ProjectsInstancesTablesGenerateConsistencyTokenCall {
  6086. c.ctx_ = ctx
  6087. return c
  6088. }
  6089. // Header returns an http.Header that can be modified by the caller to
  6090. // add HTTP headers to the request.
  6091. func (c *ProjectsInstancesTablesGenerateConsistencyTokenCall) Header() http.Header {
  6092. if c.header_ == nil {
  6093. c.header_ = make(http.Header)
  6094. }
  6095. return c.header_
  6096. }
  6097. func (c *ProjectsInstancesTablesGenerateConsistencyTokenCall) doRequest(alt string) (*http.Response, error) {
  6098. reqHeaders := make(http.Header)
  6099. for k, v := range c.header_ {
  6100. reqHeaders[k] = v
  6101. }
  6102. reqHeaders.Set("User-Agent", c.s.userAgent())
  6103. var body io.Reader = nil
  6104. body, err := googleapi.WithoutDataWrapper.JSONReader(c.generateconsistencytokenrequest)
  6105. if err != nil {
  6106. return nil, err
  6107. }
  6108. reqHeaders.Set("Content-Type", "application/json")
  6109. c.urlParams_.Set("alt", alt)
  6110. c.urlParams_.Set("prettyPrint", "false")
  6111. urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:generateConsistencyToken")
  6112. urls += "?" + c.urlParams_.Encode()
  6113. req, err := http.NewRequest("POST", urls, body)
  6114. if err != nil {
  6115. return nil, err
  6116. }
  6117. req.Header = reqHeaders
  6118. googleapi.Expand(req.URL, map[string]string{
  6119. "name": c.name,
  6120. })
  6121. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6122. }
  6123. // Do executes the "bigtableadmin.projects.instances.tables.generateConsistencyToken" call.
  6124. // Exactly one of *GenerateConsistencyTokenResponse or error will be
  6125. // non-nil. Any non-2xx status code is an error. Response headers are in
  6126. // either *GenerateConsistencyTokenResponse.ServerResponse.Header or (if
  6127. // a response was returned at all) in error.(*googleapi.Error).Header.
  6128. // Use googleapi.IsNotModified to check whether the returned error was
  6129. // because http.StatusNotModified was returned.
  6130. func (c *ProjectsInstancesTablesGenerateConsistencyTokenCall) Do(opts ...googleapi.CallOption) (*GenerateConsistencyTokenResponse, error) {
  6131. gensupport.SetOptions(c.urlParams_, opts...)
  6132. res, err := c.doRequest("json")
  6133. if res != nil && res.StatusCode == http.StatusNotModified {
  6134. if res.Body != nil {
  6135. res.Body.Close()
  6136. }
  6137. return nil, &googleapi.Error{
  6138. Code: res.StatusCode,
  6139. Header: res.Header,
  6140. }
  6141. }
  6142. if err != nil {
  6143. return nil, err
  6144. }
  6145. defer googleapi.CloseBody(res)
  6146. if err := googleapi.CheckResponse(res); err != nil {
  6147. return nil, err
  6148. }
  6149. ret := &GenerateConsistencyTokenResponse{
  6150. ServerResponse: googleapi.ServerResponse{
  6151. Header: res.Header,
  6152. HTTPStatusCode: res.StatusCode,
  6153. },
  6154. }
  6155. target := &ret
  6156. if err := gensupport.DecodeResponse(target, res); err != nil {
  6157. return nil, err
  6158. }
  6159. return ret, nil
  6160. // {
  6161. // "description": "Generates a consistency token for a Table, which can be used in\nCheckConsistency to check whether mutations to the table that finished\nbefore this call started have been replicated. The tokens will be available\nfor 90 days.",
  6162. // "flatPath": "v2/projects/{projectsId}/instances/{instancesId}/tables/{tablesId}:generateConsistencyToken",
  6163. // "httpMethod": "POST",
  6164. // "id": "bigtableadmin.projects.instances.tables.generateConsistencyToken",
  6165. // "parameterOrder": [
  6166. // "name"
  6167. // ],
  6168. // "parameters": {
  6169. // "name": {
  6170. // "description": "The unique name of the Table for which to create a consistency token.\nValues are of the form\n`projects/\u003cproject\u003e/instances/\u003cinstance\u003e/tables/\u003ctable\u003e`.",
  6171. // "location": "path",
  6172. // "pattern": "^projects/[^/]+/instances/[^/]+/tables/[^/]+$",
  6173. // "required": true,
  6174. // "type": "string"
  6175. // }
  6176. // },
  6177. // "path": "v2/{+name}:generateConsistencyToken",
  6178. // "request": {
  6179. // "$ref": "GenerateConsistencyTokenRequest"
  6180. // },
  6181. // "response": {
  6182. // "$ref": "GenerateConsistencyTokenResponse"
  6183. // },
  6184. // "scopes": [
  6185. // "https://www.googleapis.com/auth/bigtable.admin",
  6186. // "https://www.googleapis.com/auth/bigtable.admin.table",
  6187. // "https://www.googleapis.com/auth/cloud-bigtable.admin",
  6188. // "https://www.googleapis.com/auth/cloud-bigtable.admin.table",
  6189. // "https://www.googleapis.com/auth/cloud-platform"
  6190. // ]
  6191. // }
  6192. }
  6193. // method id "bigtableadmin.projects.instances.tables.get":
  6194. type ProjectsInstancesTablesGetCall struct {
  6195. s *Service
  6196. name string
  6197. urlParams_ gensupport.URLParams
  6198. ifNoneMatch_ string
  6199. ctx_ context.Context
  6200. header_ http.Header
  6201. }
  6202. // Get: Gets metadata information about the specified table.
  6203. func (r *ProjectsInstancesTablesService) Get(name string) *ProjectsInstancesTablesGetCall {
  6204. c := &ProjectsInstancesTablesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6205. c.name = name
  6206. return c
  6207. }
  6208. // View sets the optional parameter "view": The view to be applied to
  6209. // the returned table's fields.
  6210. // Defaults to `SCHEMA_VIEW` if unspecified.
  6211. //
  6212. // Possible values:
  6213. // "VIEW_UNSPECIFIED"
  6214. // "NAME_ONLY"
  6215. // "SCHEMA_VIEW"
  6216. // "REPLICATION_VIEW"
  6217. // "FULL"
  6218. func (c *ProjectsInstancesTablesGetCall) View(view string) *ProjectsInstancesTablesGetCall {
  6219. c.urlParams_.Set("view", view)
  6220. return c
  6221. }
  6222. // Fields allows partial responses to be retrieved. See
  6223. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6224. // for more information.
  6225. func (c *ProjectsInstancesTablesGetCall) Fields(s ...googleapi.Field) *ProjectsInstancesTablesGetCall {
  6226. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6227. return c
  6228. }
  6229. // IfNoneMatch sets the optional parameter which makes the operation
  6230. // fail if the object's ETag matches the given value. This is useful for
  6231. // getting updates only after the object has changed since the last
  6232. // request. Use googleapi.IsNotModified to check whether the response
  6233. // error from Do is the result of In-None-Match.
  6234. func (c *ProjectsInstancesTablesGetCall) IfNoneMatch(entityTag string) *ProjectsInstancesTablesGetCall {
  6235. c.ifNoneMatch_ = entityTag
  6236. return c
  6237. }
  6238. // Context sets the context to be used in this call's Do method. Any
  6239. // pending HTTP request will be aborted if the provided context is
  6240. // canceled.
  6241. func (c *ProjectsInstancesTablesGetCall) Context(ctx context.Context) *ProjectsInstancesTablesGetCall {
  6242. c.ctx_ = ctx
  6243. return c
  6244. }
  6245. // Header returns an http.Header that can be modified by the caller to
  6246. // add HTTP headers to the request.
  6247. func (c *ProjectsInstancesTablesGetCall) Header() http.Header {
  6248. if c.header_ == nil {
  6249. c.header_ = make(http.Header)
  6250. }
  6251. return c.header_
  6252. }
  6253. func (c *ProjectsInstancesTablesGetCall) doRequest(alt string) (*http.Response, error) {
  6254. reqHeaders := make(http.Header)
  6255. for k, v := range c.header_ {
  6256. reqHeaders[k] = v
  6257. }
  6258. reqHeaders.Set("User-Agent", c.s.userAgent())
  6259. if c.ifNoneMatch_ != "" {
  6260. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6261. }
  6262. var body io.Reader = nil
  6263. c.urlParams_.Set("alt", alt)
  6264. c.urlParams_.Set("prettyPrint", "false")
  6265. urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
  6266. urls += "?" + c.urlParams_.Encode()
  6267. req, err := http.NewRequest("GET", urls, body)
  6268. if err != nil {
  6269. return nil, err
  6270. }
  6271. req.Header = reqHeaders
  6272. googleapi.Expand(req.URL, map[string]string{
  6273. "name": c.name,
  6274. })
  6275. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6276. }
  6277. // Do executes the "bigtableadmin.projects.instances.tables.get" call.
  6278. // Exactly one of *Table or error will be non-nil. Any non-2xx status
  6279. // code is an error. Response headers are in either
  6280. // *Table.ServerResponse.Header or (if a response was returned at all)
  6281. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  6282. // check whether the returned error was because http.StatusNotModified
  6283. // was returned.
  6284. func (c *ProjectsInstancesTablesGetCall) Do(opts ...googleapi.CallOption) (*Table, error) {
  6285. gensupport.SetOptions(c.urlParams_, opts...)
  6286. res, err := c.doRequest("json")
  6287. if res != nil && res.StatusCode == http.StatusNotModified {
  6288. if res.Body != nil {
  6289. res.Body.Close()
  6290. }
  6291. return nil, &googleapi.Error{
  6292. Code: res.StatusCode,
  6293. Header: res.Header,
  6294. }
  6295. }
  6296. if err != nil {
  6297. return nil, err
  6298. }
  6299. defer googleapi.CloseBody(res)
  6300. if err := googleapi.CheckResponse(res); err != nil {
  6301. return nil, err
  6302. }
  6303. ret := &Table{
  6304. ServerResponse: googleapi.ServerResponse{
  6305. Header: res.Header,
  6306. HTTPStatusCode: res.StatusCode,
  6307. },
  6308. }
  6309. target := &ret
  6310. if err := gensupport.DecodeResponse(target, res); err != nil {
  6311. return nil, err
  6312. }
  6313. return ret, nil
  6314. // {
  6315. // "description": "Gets metadata information about the specified table.",
  6316. // "flatPath": "v2/projects/{projectsId}/instances/{instancesId}/tables/{tablesId}",
  6317. // "httpMethod": "GET",
  6318. // "id": "bigtableadmin.projects.instances.tables.get",
  6319. // "parameterOrder": [
  6320. // "name"
  6321. // ],
  6322. // "parameters": {
  6323. // "name": {
  6324. // "description": "The unique name of the requested table.\nValues are of the form\n`projects/\u003cproject\u003e/instances/\u003cinstance\u003e/tables/\u003ctable\u003e`.",
  6325. // "location": "path",
  6326. // "pattern": "^projects/[^/]+/instances/[^/]+/tables/[^/]+$",
  6327. // "required": true,
  6328. // "type": "string"
  6329. // },
  6330. // "view": {
  6331. // "description": "The view to be applied to the returned table's fields.\nDefaults to `SCHEMA_VIEW` if unspecified.",
  6332. // "enum": [
  6333. // "VIEW_UNSPECIFIED",
  6334. // "NAME_ONLY",
  6335. // "SCHEMA_VIEW",
  6336. // "REPLICATION_VIEW",
  6337. // "FULL"
  6338. // ],
  6339. // "location": "query",
  6340. // "type": "string"
  6341. // }
  6342. // },
  6343. // "path": "v2/{+name}",
  6344. // "response": {
  6345. // "$ref": "Table"
  6346. // },
  6347. // "scopes": [
  6348. // "https://www.googleapis.com/auth/bigtable.admin",
  6349. // "https://www.googleapis.com/auth/bigtable.admin.table",
  6350. // "https://www.googleapis.com/auth/cloud-bigtable.admin",
  6351. // "https://www.googleapis.com/auth/cloud-bigtable.admin.table",
  6352. // "https://www.googleapis.com/auth/cloud-platform",
  6353. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  6354. // ]
  6355. // }
  6356. }
  6357. // method id "bigtableadmin.projects.instances.tables.list":
  6358. type ProjectsInstancesTablesListCall struct {
  6359. s *Service
  6360. parent string
  6361. urlParams_ gensupport.URLParams
  6362. ifNoneMatch_ string
  6363. ctx_ context.Context
  6364. header_ http.Header
  6365. }
  6366. // List: Lists all tables served from a specified instance.
  6367. func (r *ProjectsInstancesTablesService) List(parent string) *ProjectsInstancesTablesListCall {
  6368. c := &ProjectsInstancesTablesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6369. c.parent = parent
  6370. return c
  6371. }
  6372. // PageSize sets the optional parameter "pageSize": Maximum number of
  6373. // results per page.
  6374. // CURRENTLY UNIMPLEMENTED AND IGNORED.
  6375. func (c *ProjectsInstancesTablesListCall) PageSize(pageSize int64) *ProjectsInstancesTablesListCall {
  6376. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  6377. return c
  6378. }
  6379. // PageToken sets the optional parameter "pageToken": The value of
  6380. // `next_page_token` returned by a previous call.
  6381. func (c *ProjectsInstancesTablesListCall) PageToken(pageToken string) *ProjectsInstancesTablesListCall {
  6382. c.urlParams_.Set("pageToken", pageToken)
  6383. return c
  6384. }
  6385. // View sets the optional parameter "view": The view to be applied to
  6386. // the returned tables' fields.
  6387. // Defaults to `NAME_ONLY` if unspecified; no others are currently
  6388. // supported.
  6389. //
  6390. // Possible values:
  6391. // "VIEW_UNSPECIFIED"
  6392. // "NAME_ONLY"
  6393. // "SCHEMA_VIEW"
  6394. // "REPLICATION_VIEW"
  6395. // "FULL"
  6396. func (c *ProjectsInstancesTablesListCall) View(view string) *ProjectsInstancesTablesListCall {
  6397. c.urlParams_.Set("view", view)
  6398. return c
  6399. }
  6400. // Fields allows partial responses to be retrieved. See
  6401. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6402. // for more information.
  6403. func (c *ProjectsInstancesTablesListCall) Fields(s ...googleapi.Field) *ProjectsInstancesTablesListCall {
  6404. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6405. return c
  6406. }
  6407. // IfNoneMatch sets the optional parameter which makes the operation
  6408. // fail if the object's ETag matches the given value. This is useful for
  6409. // getting updates only after the object has changed since the last
  6410. // request. Use googleapi.IsNotModified to check whether the response
  6411. // error from Do is the result of In-None-Match.
  6412. func (c *ProjectsInstancesTablesListCall) IfNoneMatch(entityTag string) *ProjectsInstancesTablesListCall {
  6413. c.ifNoneMatch_ = entityTag
  6414. return c
  6415. }
  6416. // Context sets the context to be used in this call's Do method. Any
  6417. // pending HTTP request will be aborted if the provided context is
  6418. // canceled.
  6419. func (c *ProjectsInstancesTablesListCall) Context(ctx context.Context) *ProjectsInstancesTablesListCall {
  6420. c.ctx_ = ctx
  6421. return c
  6422. }
  6423. // Header returns an http.Header that can be modified by the caller to
  6424. // add HTTP headers to the request.
  6425. func (c *ProjectsInstancesTablesListCall) Header() http.Header {
  6426. if c.header_ == nil {
  6427. c.header_ = make(http.Header)
  6428. }
  6429. return c.header_
  6430. }
  6431. func (c *ProjectsInstancesTablesListCall) doRequest(alt string) (*http.Response, error) {
  6432. reqHeaders := make(http.Header)
  6433. for k, v := range c.header_ {
  6434. reqHeaders[k] = v
  6435. }
  6436. reqHeaders.Set("User-Agent", c.s.userAgent())
  6437. if c.ifNoneMatch_ != "" {
  6438. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6439. }
  6440. var body io.Reader = nil
  6441. c.urlParams_.Set("alt", alt)
  6442. c.urlParams_.Set("prettyPrint", "false")
  6443. urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/tables")
  6444. urls += "?" + c.urlParams_.Encode()
  6445. req, err := http.NewRequest("GET", urls, body)
  6446. if err != nil {
  6447. return nil, err
  6448. }
  6449. req.Header = reqHeaders
  6450. googleapi.Expand(req.URL, map[string]string{
  6451. "parent": c.parent,
  6452. })
  6453. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6454. }
  6455. // Do executes the "bigtableadmin.projects.instances.tables.list" call.
  6456. // Exactly one of *ListTablesResponse or error will be non-nil. Any
  6457. // non-2xx status code is an error. Response headers are in either
  6458. // *ListTablesResponse.ServerResponse.Header or (if a response was
  6459. // returned at all) in error.(*googleapi.Error).Header. Use
  6460. // googleapi.IsNotModified to check whether the returned error was
  6461. // because http.StatusNotModified was returned.
  6462. func (c *ProjectsInstancesTablesListCall) Do(opts ...googleapi.CallOption) (*ListTablesResponse, error) {
  6463. gensupport.SetOptions(c.urlParams_, opts...)
  6464. res, err := c.doRequest("json")
  6465. if res != nil && res.StatusCode == http.StatusNotModified {
  6466. if res.Body != nil {
  6467. res.Body.Close()
  6468. }
  6469. return nil, &googleapi.Error{
  6470. Code: res.StatusCode,
  6471. Header: res.Header,
  6472. }
  6473. }
  6474. if err != nil {
  6475. return nil, err
  6476. }
  6477. defer googleapi.CloseBody(res)
  6478. if err := googleapi.CheckResponse(res); err != nil {
  6479. return nil, err
  6480. }
  6481. ret := &ListTablesResponse{
  6482. ServerResponse: googleapi.ServerResponse{
  6483. Header: res.Header,
  6484. HTTPStatusCode: res.StatusCode,
  6485. },
  6486. }
  6487. target := &ret
  6488. if err := gensupport.DecodeResponse(target, res); err != nil {
  6489. return nil, err
  6490. }
  6491. return ret, nil
  6492. // {
  6493. // "description": "Lists all tables served from a specified instance.",
  6494. // "flatPath": "v2/projects/{projectsId}/instances/{instancesId}/tables",
  6495. // "httpMethod": "GET",
  6496. // "id": "bigtableadmin.projects.instances.tables.list",
  6497. // "parameterOrder": [
  6498. // "parent"
  6499. // ],
  6500. // "parameters": {
  6501. // "pageSize": {
  6502. // "description": "Maximum number of results per page.\nCURRENTLY UNIMPLEMENTED AND IGNORED.",
  6503. // "format": "int32",
  6504. // "location": "query",
  6505. // "type": "integer"
  6506. // },
  6507. // "pageToken": {
  6508. // "description": "The value of `next_page_token` returned by a previous call.",
  6509. // "location": "query",
  6510. // "type": "string"
  6511. // },
  6512. // "parent": {
  6513. // "description": "The unique name of the instance for which tables should be listed.\nValues are of the form `projects/\u003cproject\u003e/instances/\u003cinstance\u003e`.",
  6514. // "location": "path",
  6515. // "pattern": "^projects/[^/]+/instances/[^/]+$",
  6516. // "required": true,
  6517. // "type": "string"
  6518. // },
  6519. // "view": {
  6520. // "description": "The view to be applied to the returned tables' fields.\nDefaults to `NAME_ONLY` if unspecified; no others are currently supported.",
  6521. // "enum": [
  6522. // "VIEW_UNSPECIFIED",
  6523. // "NAME_ONLY",
  6524. // "SCHEMA_VIEW",
  6525. // "REPLICATION_VIEW",
  6526. // "FULL"
  6527. // ],
  6528. // "location": "query",
  6529. // "type": "string"
  6530. // }
  6531. // },
  6532. // "path": "v2/{+parent}/tables",
  6533. // "response": {
  6534. // "$ref": "ListTablesResponse"
  6535. // },
  6536. // "scopes": [
  6537. // "https://www.googleapis.com/auth/bigtable.admin",
  6538. // "https://www.googleapis.com/auth/bigtable.admin.table",
  6539. // "https://www.googleapis.com/auth/cloud-bigtable.admin",
  6540. // "https://www.googleapis.com/auth/cloud-bigtable.admin.table",
  6541. // "https://www.googleapis.com/auth/cloud-platform",
  6542. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  6543. // ]
  6544. // }
  6545. }
  6546. // Pages invokes f for each page of results.
  6547. // A non-nil error returned from f will halt the iteration.
  6548. // The provided context supersedes any context provided to the Context method.
  6549. func (c *ProjectsInstancesTablesListCall) Pages(ctx context.Context, f func(*ListTablesResponse) error) error {
  6550. c.ctx_ = ctx
  6551. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  6552. for {
  6553. x, err := c.Do()
  6554. if err != nil {
  6555. return err
  6556. }
  6557. if err := f(x); err != nil {
  6558. return err
  6559. }
  6560. if x.NextPageToken == "" {
  6561. return nil
  6562. }
  6563. c.PageToken(x.NextPageToken)
  6564. }
  6565. }
  6566. // method id "bigtableadmin.projects.instances.tables.modifyColumnFamilies":
  6567. type ProjectsInstancesTablesModifyColumnFamiliesCall struct {
  6568. s *Service
  6569. name string
  6570. modifycolumnfamiliesrequest *ModifyColumnFamiliesRequest
  6571. urlParams_ gensupport.URLParams
  6572. ctx_ context.Context
  6573. header_ http.Header
  6574. }
  6575. // ModifyColumnFamilies: Performs a series of column family
  6576. // modifications on the specified table.
  6577. // Either all or none of the modifications will occur before this
  6578. // method
  6579. // returns, but data requests received prior to that point may see a
  6580. // table
  6581. // where only some modifications have taken effect.
  6582. func (r *ProjectsInstancesTablesService) ModifyColumnFamilies(name string, modifycolumnfamiliesrequest *ModifyColumnFamiliesRequest) *ProjectsInstancesTablesModifyColumnFamiliesCall {
  6583. c := &ProjectsInstancesTablesModifyColumnFamiliesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6584. c.name = name
  6585. c.modifycolumnfamiliesrequest = modifycolumnfamiliesrequest
  6586. return c
  6587. }
  6588. // Fields allows partial responses to be retrieved. See
  6589. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6590. // for more information.
  6591. func (c *ProjectsInstancesTablesModifyColumnFamiliesCall) Fields(s ...googleapi.Field) *ProjectsInstancesTablesModifyColumnFamiliesCall {
  6592. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6593. return c
  6594. }
  6595. // Context sets the context to be used in this call's Do method. Any
  6596. // pending HTTP request will be aborted if the provided context is
  6597. // canceled.
  6598. func (c *ProjectsInstancesTablesModifyColumnFamiliesCall) Context(ctx context.Context) *ProjectsInstancesTablesModifyColumnFamiliesCall {
  6599. c.ctx_ = ctx
  6600. return c
  6601. }
  6602. // Header returns an http.Header that can be modified by the caller to
  6603. // add HTTP headers to the request.
  6604. func (c *ProjectsInstancesTablesModifyColumnFamiliesCall) Header() http.Header {
  6605. if c.header_ == nil {
  6606. c.header_ = make(http.Header)
  6607. }
  6608. return c.header_
  6609. }
  6610. func (c *ProjectsInstancesTablesModifyColumnFamiliesCall) doRequest(alt string) (*http.Response, error) {
  6611. reqHeaders := make(http.Header)
  6612. for k, v := range c.header_ {
  6613. reqHeaders[k] = v
  6614. }
  6615. reqHeaders.Set("User-Agent", c.s.userAgent())
  6616. var body io.Reader = nil
  6617. body, err := googleapi.WithoutDataWrapper.JSONReader(c.modifycolumnfamiliesrequest)
  6618. if err != nil {
  6619. return nil, err
  6620. }
  6621. reqHeaders.Set("Content-Type", "application/json")
  6622. c.urlParams_.Set("alt", alt)
  6623. c.urlParams_.Set("prettyPrint", "false")
  6624. urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:modifyColumnFamilies")
  6625. urls += "?" + c.urlParams_.Encode()
  6626. req, err := http.NewRequest("POST", urls, body)
  6627. if err != nil {
  6628. return nil, err
  6629. }
  6630. req.Header = reqHeaders
  6631. googleapi.Expand(req.URL, map[string]string{
  6632. "name": c.name,
  6633. })
  6634. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6635. }
  6636. // Do executes the "bigtableadmin.projects.instances.tables.modifyColumnFamilies" call.
  6637. // Exactly one of *Table or error will be non-nil. Any non-2xx status
  6638. // code is an error. Response headers are in either
  6639. // *Table.ServerResponse.Header or (if a response was returned at all)
  6640. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  6641. // check whether the returned error was because http.StatusNotModified
  6642. // was returned.
  6643. func (c *ProjectsInstancesTablesModifyColumnFamiliesCall) Do(opts ...googleapi.CallOption) (*Table, error) {
  6644. gensupport.SetOptions(c.urlParams_, opts...)
  6645. res, err := c.doRequest("json")
  6646. if res != nil && res.StatusCode == http.StatusNotModified {
  6647. if res.Body != nil {
  6648. res.Body.Close()
  6649. }
  6650. return nil, &googleapi.Error{
  6651. Code: res.StatusCode,
  6652. Header: res.Header,
  6653. }
  6654. }
  6655. if err != nil {
  6656. return nil, err
  6657. }
  6658. defer googleapi.CloseBody(res)
  6659. if err := googleapi.CheckResponse(res); err != nil {
  6660. return nil, err
  6661. }
  6662. ret := &Table{
  6663. ServerResponse: googleapi.ServerResponse{
  6664. Header: res.Header,
  6665. HTTPStatusCode: res.StatusCode,
  6666. },
  6667. }
  6668. target := &ret
  6669. if err := gensupport.DecodeResponse(target, res); err != nil {
  6670. return nil, err
  6671. }
  6672. return ret, nil
  6673. // {
  6674. // "description": "Performs a series of column family modifications on the specified table.\nEither all or none of the modifications will occur before this method\nreturns, but data requests received prior to that point may see a table\nwhere only some modifications have taken effect.",
  6675. // "flatPath": "v2/projects/{projectsId}/instances/{instancesId}/tables/{tablesId}:modifyColumnFamilies",
  6676. // "httpMethod": "POST",
  6677. // "id": "bigtableadmin.projects.instances.tables.modifyColumnFamilies",
  6678. // "parameterOrder": [
  6679. // "name"
  6680. // ],
  6681. // "parameters": {
  6682. // "name": {
  6683. // "description": "The unique name of the table whose families should be modified.\nValues are of the form\n`projects/\u003cproject\u003e/instances/\u003cinstance\u003e/tables/\u003ctable\u003e`.",
  6684. // "location": "path",
  6685. // "pattern": "^projects/[^/]+/instances/[^/]+/tables/[^/]+$",
  6686. // "required": true,
  6687. // "type": "string"
  6688. // }
  6689. // },
  6690. // "path": "v2/{+name}:modifyColumnFamilies",
  6691. // "request": {
  6692. // "$ref": "ModifyColumnFamiliesRequest"
  6693. // },
  6694. // "response": {
  6695. // "$ref": "Table"
  6696. // },
  6697. // "scopes": [
  6698. // "https://www.googleapis.com/auth/bigtable.admin",
  6699. // "https://www.googleapis.com/auth/bigtable.admin.table",
  6700. // "https://www.googleapis.com/auth/cloud-bigtable.admin",
  6701. // "https://www.googleapis.com/auth/cloud-bigtable.admin.table",
  6702. // "https://www.googleapis.com/auth/cloud-platform"
  6703. // ]
  6704. // }
  6705. }