generated/google/apis/spanner_v1/classes.rb in google-api-client-0.10.3 vs generated/google/apis/spanner_v1/classes.rb in google-api-client-0.11.0
- old
+ new
@@ -20,39 +20,40 @@
module Google
module Apis
module SpannerV1
- # The response for ListInstanceConfigs.
- class ListInstanceConfigsResponse
+ # Metadata about a ResultSet or PartialResultSet.
+ class ResultSetMetadata
include Google::Apis::Core::Hashable
- # `next_page_token` can be sent in a subsequent
- # ListInstanceConfigs call to
- # fetch more of the matching instance configurations.
- # Corresponds to the JSON property `nextPageToken`
- # @return [String]
- attr_accessor :next_page_token
+ # `StructType` defines the fields of a STRUCT type.
+ # Corresponds to the JSON property `rowType`
+ # @return [Google::Apis::SpannerV1::StructType]
+ attr_accessor :row_type
- # The list of requested instance configurations.
- # Corresponds to the JSON property `instanceConfigs`
- # @return [Array<Google::Apis::SpannerV1::InstanceConfig>]
- attr_accessor :instance_configs
+ # A transaction.
+ # Corresponds to the JSON property `transaction`
+ # @return [Google::Apis::SpannerV1::Transaction]
+ attr_accessor :transaction
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
- @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
- @instance_configs = args[:instance_configs] if args.key?(:instance_configs)
+ @row_type = args[:row_type] if args.key?(:row_type)
+ @transaction = args[:transaction] if args.key?(:transaction)
end
end
- # The request for BeginTransaction.
- class BeginTransactionRequest
+ # This message is used to select the transaction in which a
+ # Read or
+ # ExecuteSql call runs.
+ # See TransactionOptions for more information about transactions.
+ class TransactionSelector
include Google::Apis::Core::Hashable
# # Transactions
# Each session can have at most one active transaction at a time. After the
# active transaction is completed, the session can immediately be
@@ -219,24 +220,1035 @@
# are one hour old. Because of this, Cloud Spanner cannot perform reads
# at read timestamps more than one hour in the past. This
# restriction also applies to in-progress reads and/or SQL queries whose
# timestamp become too old while executing. Reads and SQL queries with
# too-old read timestamps fail with the error `FAILED_PRECONDITION`.
- # Corresponds to the JSON property `options`
+ # Corresponds to the JSON property `singleUse`
# @return [Google::Apis::SpannerV1::TransactionOptions]
- attr_accessor :options
+ attr_accessor :single_use
+ # # Transactions
+ # Each session can have at most one active transaction at a time. After the
+ # active transaction is completed, the session can immediately be
+ # re-used for the next transaction. It is not necessary to create a
+ # new session for each transaction.
+ # # Transaction Modes
+ # Cloud Spanner supports two transaction modes:
+ # 1. Locking read-write. This type of transaction is the only way
+ # to write data into Cloud Spanner. These transactions rely on
+ # pessimistic locking and, if necessary, two-phase commit.
+ # Locking read-write transactions may abort, requiring the
+ # application to retry.
+ # 2. Snapshot read-only. This transaction type provides guaranteed
+ # consistency across several reads, but does not allow
+ # writes. Snapshot read-only transactions can be configured to
+ # read at timestamps in the past. Snapshot read-only
+ # transactions do not need to be committed.
+ # For transactions that only read, snapshot read-only transactions
+ # provide simpler semantics and are almost always faster. In
+ # particular, read-only transactions do not take locks, so they do
+ # not conflict with read-write transactions. As a consequence of not
+ # taking locks, they also do not abort, so retry loops are not needed.
+ # Transactions may only read/write data in a single database. They
+ # may, however, read/write data in different tables within that
+ # database.
+ # ## Locking Read-Write Transactions
+ # Locking transactions may be used to atomically read-modify-write
+ # data anywhere in a database. This type of transaction is externally
+ # consistent.
+ # Clients should attempt to minimize the amount of time a transaction
+ # is active. Faster transactions commit with higher probability
+ # and cause less contention. Cloud Spanner attempts to keep read locks
+ # active as long as the transaction continues to do reads, and the
+ # transaction has not been terminated by
+ # Commit or
+ # Rollback. Long periods of
+ # inactivity at the client may cause Cloud Spanner to release a
+ # transaction's locks and abort it.
+ # Reads performed within a transaction acquire locks on the data
+ # being read. Writes can only be done at commit time, after all reads
+ # have been completed.
+ # Conceptually, a read-write transaction consists of zero or more
+ # reads or SQL queries followed by
+ # Commit. At any time before
+ # Commit, the client can send a
+ # Rollback request to abort the
+ # transaction.
+ # ### Semantics
+ # Cloud Spanner can commit the transaction if all read locks it acquired
+ # are still valid at commit time, and it is able to acquire write
+ # locks for all writes. Cloud Spanner can abort the transaction for any
+ # reason. If a commit attempt returns `ABORTED`, Cloud Spanner guarantees
+ # that the transaction has not modified any user data in Cloud Spanner.
+ # Unless the transaction commits, Cloud Spanner makes no guarantees about
+ # how long the transaction's locks were held for. It is an error to
+ # use Cloud Spanner locks for any sort of mutual exclusion other than
+ # between Cloud Spanner transactions themselves.
+ # ### Retrying Aborted Transactions
+ # When a transaction aborts, the application can choose to retry the
+ # whole transaction again. To maximize the chances of successfully
+ # committing the retry, the client should execute the retry in the
+ # same session as the original attempt. The original session's lock
+ # priority increases with each consecutive abort, meaning that each
+ # attempt has a slightly better chance of success than the previous.
+ # Under some circumstances (e.g., many transactions attempting to
+ # modify the same row(s)), a transaction can abort many times in a
+ # short period before successfully committing. Thus, it is not a good
+ # idea to cap the number of retries a transaction can attempt;
+ # instead, it is better to limit the total amount of wall time spent
+ # retrying.
+ # ### Idle Transactions
+ # A transaction is considered idle if it has no outstanding reads or
+ # SQL queries and has not started a read or SQL query within the last 10
+ # seconds. Idle transactions can be aborted by Cloud Spanner so that they
+ # don't hold on to locks indefinitely. In that case, the commit will
+ # fail with error `ABORTED`.
+ # If this behavior is undesirable, periodically executing a simple
+ # SQL query in the transaction (e.g., `SELECT 1`) prevents the
+ # transaction from becoming idle.
+ # ## Snapshot Read-Only Transactions
+ # Snapshot read-only transactions provides a simpler method than
+ # locking read-write transactions for doing several consistent
+ # reads. However, this type of transaction does not support writes.
+ # Snapshot transactions do not take locks. Instead, they work by
+ # choosing a Cloud Spanner timestamp, then executing all reads at that
+ # timestamp. Since they do not acquire locks, they do not block
+ # concurrent read-write transactions.
+ # Unlike locking read-write transactions, snapshot read-only
+ # transactions never abort. They can fail if the chosen read
+ # timestamp is garbage collected; however, the default garbage
+ # collection policy is generous enough that most applications do not
+ # need to worry about this in practice.
+ # Snapshot read-only transactions do not need to call
+ # Commit or
+ # Rollback (and in fact are not
+ # permitted to do so).
+ # To execute a snapshot transaction, the client specifies a timestamp
+ # bound, which tells Cloud Spanner how to choose a read timestamp.
+ # The types of timestamp bound are:
+ # - Strong (the default).
+ # - Bounded staleness.
+ # - Exact staleness.
+ # If the Cloud Spanner database to be read is geographically distributed,
+ # stale read-only transactions can execute more quickly than strong
+ # or read-write transaction, because they are able to execute far
+ # from the leader replica.
+ # Each type of timestamp bound is discussed in detail below.
+ # ### Strong
+ # Strong reads are guaranteed to see the effects of all transactions
+ # that have committed before the start of the read. Furthermore, all
+ # rows yielded by a single read are consistent with each other -- if
+ # any part of the read observes a transaction, all parts of the read
+ # see the transaction.
+ # Strong reads are not repeatable: two consecutive strong read-only
+ # transactions might return inconsistent results if there are
+ # concurrent writes. If consistency across reads is required, the
+ # reads should be executed within a transaction or at an exact read
+ # timestamp.
+ # See TransactionOptions.ReadOnly.strong.
+ # ### Exact Staleness
+ # These timestamp bounds execute reads at a user-specified
+ # timestamp. Reads at a timestamp are guaranteed to see a consistent
+ # prefix of the global transaction history: they observe
+ # modifications done by all transactions with a commit timestamp <=
+ # the read timestamp, and observe none of the modifications done by
+ # transactions with a larger commit timestamp. They will block until
+ # all conflicting transactions that may be assigned commit timestamps
+ # <= the read timestamp have finished.
+ # The timestamp can either be expressed as an absolute Cloud Spanner commit
+ # timestamp or a staleness relative to the current time.
+ # These modes do not require a "negotiation phase" to pick a
+ # timestamp. As a result, they execute slightly faster than the
+ # equivalent boundedly stale concurrency modes. On the other hand,
+ # boundedly stale reads usually return fresher results.
+ # See TransactionOptions.ReadOnly.read_timestamp and
+ # TransactionOptions.ReadOnly.exact_staleness.
+ # ### Bounded Staleness
+ # Bounded staleness modes allow Cloud Spanner to pick the read timestamp,
+ # subject to a user-provided staleness bound. Cloud Spanner chooses the
+ # newest timestamp within the staleness bound that allows execution
+ # of the reads at the closest available replica without blocking.
+ # All rows yielded are consistent with each other -- if any part of
+ # the read observes a transaction, all parts of the read see the
+ # transaction. Boundedly stale reads are not repeatable: two stale
+ # reads, even if they use the same staleness bound, can execute at
+ # different timestamps and thus return inconsistent results.
+ # Boundedly stale reads execute in two phases: the first phase
+ # negotiates a timestamp among all replicas needed to serve the
+ # read. In the second phase, reads are executed at the negotiated
+ # timestamp.
+ # As a result of the two phase execution, bounded staleness reads are
+ # usually a little slower than comparable exact staleness
+ # reads. However, they are typically able to return fresher
+ # results, and are more likely to execute at the closest replica.
+ # Because the timestamp negotiation requires up-front knowledge of
+ # which rows will be read, it can only be used with single-use
+ # read-only transactions.
+ # See TransactionOptions.ReadOnly.max_staleness and
+ # TransactionOptions.ReadOnly.min_read_timestamp.
+ # ### Old Read Timestamps and Garbage Collection
+ # Cloud Spanner continuously garbage collects deleted and overwritten data
+ # in the background to reclaim storage space. This process is known
+ # as "version GC". By default, version GC reclaims versions after they
+ # are one hour old. Because of this, Cloud Spanner cannot perform reads
+ # at read timestamps more than one hour in the past. This
+ # restriction also applies to in-progress reads and/or SQL queries whose
+ # timestamp become too old while executing. Reads and SQL queries with
+ # too-old read timestamps fail with the error `FAILED_PRECONDITION`.
+ # Corresponds to the JSON property `begin`
+ # @return [Google::Apis::SpannerV1::TransactionOptions]
+ attr_accessor :begin
+
+ # Execute the read or SQL query in a previously-started transaction.
+ # Corresponds to the JSON property `id`
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
+ # @return [String]
+ attr_accessor :id
+
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
- @options = args[:options] if args.key?(:options)
+ @single_use = args[:single_use] if args.key?(:single_use)
+ @begin = args[:begin] if args.key?(:begin)
+ @id = args[:id] if args.key?(:id)
end
end
+ # `KeySet` defines a collection of Cloud Spanner keys and/or key ranges. All
+ # the keys are expected to be in the same table or index. The keys need
+ # not be sorted in any particular way.
+ # If the same key is specified multiple times in the set (for example
+ # if two ranges, two keys, or a key and a range overlap), Cloud Spanner
+ # behaves as if the key were only specified once.
+ class KeySet
+ include Google::Apis::Core::Hashable
+
+ # A list of key ranges. See KeyRange for more information about
+ # key range specifications.
+ # Corresponds to the JSON property `ranges`
+ # @return [Array<Google::Apis::SpannerV1::KeyRange>]
+ attr_accessor :ranges
+
+ # A list of specific keys. Entries in `keys` should have exactly as
+ # many elements as there are columns in the primary or index key
+ # with which this `KeySet` is used. Individual key values are
+ # encoded as described here.
+ # Corresponds to the JSON property `keys`
+ # @return [Array<Array<Object>>]
+ attr_accessor :keys
+
+ # For convenience `all` can be set to `true` to indicate that this
+ # `KeySet` matches all keys in the table or index. Note that any keys
+ # specified in `keys` or `ranges` are only yielded once.
+ # Corresponds to the JSON property `all`
+ # @return [Boolean]
+ attr_accessor :all
+ alias_method :all?, :all
+
+ def initialize(**args)
+ update!(**args)
+ end
+
+ # Update properties of this object
+ def update!(**args)
+ @ranges = args[:ranges] if args.key?(:ranges)
+ @keys = args[:keys] if args.key?(:keys)
+ @all = args[:all] if args.key?(:all)
+ end
+ end
+
+ # A modification to one or more Cloud Spanner rows. Mutations can be
+ # applied to a Cloud Spanner database by sending them in a
+ # Commit call.
+ class Mutation
+ include Google::Apis::Core::Hashable
+
+ # Arguments to insert, update, insert_or_update, and
+ # replace operations.
+ # Corresponds to the JSON property `update`
+ # @return [Google::Apis::SpannerV1::Write]
+ attr_accessor :update
+
+ # Arguments to insert, update, insert_or_update, and
+ # replace operations.
+ # Corresponds to the JSON property `replace`
+ # @return [Google::Apis::SpannerV1::Write]
+ attr_accessor :replace
+
+ # Arguments to delete operations.
+ # Corresponds to the JSON property `delete`
+ # @return [Google::Apis::SpannerV1::Delete]
+ attr_accessor :delete
+
+ # Arguments to insert, update, insert_or_update, and
+ # replace operations.
+ # Corresponds to the JSON property `insert`
+ # @return [Google::Apis::SpannerV1::Write]
+ attr_accessor :insert
+
+ # Arguments to insert, update, insert_or_update, and
+ # replace operations.
+ # Corresponds to the JSON property `insertOrUpdate`
+ # @return [Google::Apis::SpannerV1::Write]
+ attr_accessor :insert_or_update
+
+ def initialize(**args)
+ update!(**args)
+ end
+
+ # Update properties of this object
+ def update!(**args)
+ @update = args[:update] if args.key?(:update)
+ @replace = args[:replace] if args.key?(:replace)
+ @delete = args[:delete] if args.key?(:delete)
+ @insert = args[:insert] if args.key?(:insert)
+ @insert_or_update = args[:insert_or_update] if args.key?(:insert_or_update)
+ end
+ end
+
+ # The response for GetDatabaseDdl.
+ class GetDatabaseDdlResponse
+ include Google::Apis::Core::Hashable
+
+ # A list of formatted DDL statements defining the schema of the database
+ # specified in the request.
+ # Corresponds to the JSON property `statements`
+ # @return [Array<String>]
+ attr_accessor :statements
+
+ def initialize(**args)
+ update!(**args)
+ end
+
+ # Update properties of this object
+ def update!(**args)
+ @statements = args[:statements] if args.key?(:statements)
+ end
+ end
+
+ # A Cloud Spanner database.
+ class Database
+ include Google::Apis::Core::Hashable
+
+ # Output only. The current database state.
+ # Corresponds to the JSON property `state`
+ # @return [String]
+ attr_accessor :state
+
+ # Required. The name of the database. Values are of the form
+ # `projects/<project>/instances/<instance>/databases/<database>`,
+ # where `<database>` is as specified in the `CREATE DATABASE`
+ # statement. This name can be passed to other API methods to
+ # identify the database.
+ # Corresponds to the JSON property `name`
+ # @return [String]
+ attr_accessor :name
+
+ def initialize(**args)
+ update!(**args)
+ end
+
+ # Update properties of this object
+ def update!(**args)
+ @state = args[:state] if args.key?(:state)
+ @name = args[:name] if args.key?(:name)
+ end
+ end
+
+ # An isolated set of Cloud Spanner resources on which databases can be hosted.
+ class Instance
+ include Google::Apis::Core::Hashable
+
+ # Required. The name of the instance's configuration. Values are of the form
+ # `projects/<project>/instanceConfigs/<configuration>`. See
+ # also InstanceConfig and
+ # ListInstanceConfigs.
+ # Corresponds to the JSON property `config`
+ # @return [String]
+ attr_accessor :config
+
+ # Output only. The current instance state. For
+ # CreateInstance, the state must be
+ # either omitted or set to `CREATING`. For
+ # UpdateInstance, the state must be
+ # either omitted or set to `READY`.
+ # Corresponds to the JSON property `state`
+ # @return [String]
+ attr_accessor :state
+
+ # Required. A unique identifier for the instance, which cannot be changed
+ # after the instance is created. Values are of the form
+ # `projects/<project>/instances/a-z*[a-z0-9]`. The final
+ # segment of the name must be between 6 and 30 characters in length.
+ # Corresponds to the JSON property `name`
+ # @return [String]
+ attr_accessor :name
+
+ # Required. The descriptive name for this instance as it appears in UIs.
+ # Must be unique per project and between 4 and 30 characters in length.
+ # Corresponds to the JSON property `displayName`
+ # @return [String]
+ attr_accessor :display_name
+
+ # Required. The number of nodes allocated to this instance.
+ # Corresponds to the JSON property `nodeCount`
+ # @return [Fixnum]
+ attr_accessor :node_count
+
+ # Cloud Labels are a flexible and lightweight mechanism for organizing cloud
+ # resources into groups that reflect a customer's organizational needs and
+ # deployment strategies. Cloud Labels can be used to filter collections of
+ # resources. They can be used to control how resource metrics are aggregated.
+ # And they can be used as arguments to policy management rules (e.g. route,
+ # firewall, load balancing, etc.).
+ # * Label keys must be between 1 and 63 characters long and must conform to
+ # the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
+ # * Label values must be between 0 and 63 characters long and must conform
+ # to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
+ # * No more than 64 labels can be associated with a given resource.
+ # See https://goo.gl/xmQnxf for more information on and examples of labels.
+ # If you plan to use labels in your own code, please note that additional
+ # characters may be allowed in the future. And so you are advised to use an
+ # internal label representation, such as JSON, which doesn't rely upon
+ # specific characters being disallowed. For example, representing labels
+ # as the string: name + "_" + value would prove problematic if we were to
+ # allow "_" in a future release.
+ # Corresponds to the JSON property `labels`
+ # @return [Hash<String,String>]
+ attr_accessor :labels
+
+ def initialize(**args)
+ update!(**args)
+ end
+
+ # Update properties of this object
+ def update!(**args)
+ @config = args[:config] if args.key?(:config)
+ @state = args[:state] if args.key?(:state)
+ @name = args[:name] if args.key?(:name)
+ @display_name = args[:display_name] if args.key?(:display_name)
+ @node_count = args[:node_count] if args.key?(:node_count)
+ @labels = args[:labels] if args.key?(:labels)
+ end
+ end
+
+ # Request message for `SetIamPolicy` method.
+ class SetIamPolicyRequest
+ include Google::Apis::Core::Hashable
+
+ # Defines an Identity and Access Management (IAM) policy. It is used to
+ # specify access control policies for Cloud Platform resources.
+ # A `Policy` consists of a list of `bindings`. A `Binding` binds a list of
+ # `members` to a `role`, where the members can be user accounts, Google groups,
+ # Google domains, and service accounts. A `role` is a named list of permissions
+ # defined by IAM.
+ # **Example**
+ # `
+ # "bindings": [
+ # `
+ # "role": "roles/owner",
+ # "members": [
+ # "user:mike@example.com",
+ # "group:admins@example.com",
+ # "domain:google.com",
+ # "serviceAccount:my-other-app@appspot.gserviceaccount.com",
+ # ]
+ # `,
+ # `
+ # "role": "roles/viewer",
+ # "members": ["user:sean@example.com"]
+ # `
+ # ]
+ # `
+ # For a description of IAM and its features, see the
+ # [IAM developer's guide](https://cloud.google.com/iam).
+ # Corresponds to the JSON property `policy`
+ # @return [Google::Apis::SpannerV1::Policy]
+ attr_accessor :policy
+
+ # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
+ # the fields in the mask will be modified. If no mask is provided, a default
+ # mask is used:
+ # paths: "bindings, etag"
+ # This field is only used by Cloud IAM.
+ # Corresponds to the JSON property `updateMask`
+ # @return [String]
+ attr_accessor :update_mask
+
+ def initialize(**args)
+ update!(**args)
+ end
+
+ # Update properties of this object
+ def update!(**args)
+ @policy = args[:policy] if args.key?(:policy)
+ @update_mask = args[:update_mask] if args.key?(:update_mask)
+ end
+ end
+
+ # The response for ListDatabases.
+ class ListDatabasesResponse
+ include Google::Apis::Core::Hashable
+
+ # `next_page_token` can be sent in a subsequent
+ # ListDatabases call to fetch more
+ # of the matching databases.
+ # Corresponds to the JSON property `nextPageToken`
+ # @return [String]
+ attr_accessor :next_page_token
+
+ # Databases that matched the request.
+ # Corresponds to the JSON property `databases`
+ # @return [Array<Google::Apis::SpannerV1::Database>]
+ attr_accessor :databases
+
+ def initialize(**args)
+ update!(**args)
+ end
+
+ # Update properties of this object
+ def update!(**args)
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
+ @databases = args[:databases] if args.key?(:databases)
+ end
+ end
+
+ # The request for Rollback.
+ class RollbackRequest
+ include Google::Apis::Core::Hashable
+
+ # Required. The transaction to roll back.
+ # Corresponds to the JSON property `transactionId`
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
+ # @return [String]
+ attr_accessor :transaction_id
+
+ def initialize(**args)
+ update!(**args)
+ end
+
+ # Update properties of this object
+ def update!(**args)
+ @transaction_id = args[:transaction_id] if args.key?(:transaction_id)
+ end
+ end
+
+ # A transaction.
+ class Transaction
+ include Google::Apis::Core::Hashable
+
+ # For snapshot read-only transactions, the read timestamp chosen
+ # for the transaction. Not returned by default: see
+ # TransactionOptions.ReadOnly.return_read_timestamp.
+ # Corresponds to the JSON property `readTimestamp`
+ # @return [String]
+ attr_accessor :read_timestamp
+
+ # `id` may be used to identify the transaction in subsequent
+ # Read,
+ # ExecuteSql,
+ # Commit, or
+ # Rollback calls.
+ # Single-use read-only transactions do not have IDs, because
+ # single-use transactions do not support multiple requests.
+ # Corresponds to the JSON property `id`
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
+ # @return [String]
+ attr_accessor :id
+
+ def initialize(**args)
+ update!(**args)
+ end
+
+ # Update properties of this object
+ def update!(**args)
+ @read_timestamp = args[:read_timestamp] if args.key?(:read_timestamp)
+ @id = args[:id] if args.key?(:id)
+ end
+ end
+
+ # Metadata type for the operation returned by
+ # UpdateDatabaseDdl.
+ class UpdateDatabaseDdlMetadata
+ include Google::Apis::Core::Hashable
+
+ # For an update this list contains all the statements. For an
+ # individual statement, this list contains only that statement.
+ # Corresponds to the JSON property `statements`
+ # @return [Array<String>]
+ attr_accessor :statements
+
+ # Reports the commit timestamps of all statements that have
+ # succeeded so far, where `commit_timestamps[i]` is the commit
+ # timestamp for the statement `statements[i]`.
+ # Corresponds to the JSON property `commitTimestamps`
+ # @return [Array<String>]
+ attr_accessor :commit_timestamps
+
+ # The database being modified.
+ # Corresponds to the JSON property `database`
+ # @return [String]
+ attr_accessor :database
+
+ def initialize(**args)
+ update!(**args)
+ end
+
+ # Update properties of this object
+ def update!(**args)
+ @statements = args[:statements] if args.key?(:statements)
+ @commit_timestamps = args[:commit_timestamps] if args.key?(:commit_timestamps)
+ @database = args[:database] if args.key?(:database)
+ end
+ end
+
+ # Options for counters
+ class CounterOptions
+ include Google::Apis::Core::Hashable
+
+ # The metric to update.
+ # Corresponds to the JSON property `metric`
+ # @return [String]
+ attr_accessor :metric
+
+ # The field value to attribute.
+ # Corresponds to the JSON property `field`
+ # @return [String]
+ attr_accessor :field
+
+ def initialize(**args)
+ update!(**args)
+ end
+
+ # Update properties of this object
+ def update!(**args)
+ @metric = args[:metric] if args.key?(:metric)
+ @field = args[:field] if args.key?(:field)
+ end
+ end
+
+ # `StructType` defines the fields of a STRUCT type.
+ class StructType
+ include Google::Apis::Core::Hashable
+
+ # The list of fields that make up this struct. Order is
+ # significant, because values of this struct type are represented as
+ # lists, where the order of field values matches the order of
+ # fields in the StructType. In turn, the order of fields
+ # matches the order of columns in a read request, or the order of
+ # fields in the `SELECT` clause of a query.
+ # Corresponds to the JSON property `fields`
+ # @return [Array<Google::Apis::SpannerV1::Field>]
+ attr_accessor :fields
+
+ def initialize(**args)
+ update!(**args)
+ end
+
+ # Update properties of this object
+ def update!(**args)
+ @fields = args[:fields] if args.key?(:fields)
+ end
+ end
+
+ # Contains an ordered list of nodes appearing in the query plan.
+ class QueryPlan
+ include Google::Apis::Core::Hashable
+
+ # The nodes in the query plan. Plan nodes are returned in pre-order starting
+ # with the plan root. Each PlanNode's `id` corresponds to its index in
+ # `plan_nodes`.
+ # Corresponds to the JSON property `planNodes`
+ # @return [Array<Google::Apis::SpannerV1::PlanNode>]
+ attr_accessor :plan_nodes
+
+ def initialize(**args)
+ update!(**args)
+ end
+
+ # Update properties of this object
+ def update!(**args)
+ @plan_nodes = args[:plan_nodes] if args.key?(:plan_nodes)
+ end
+ end
+
+ # Message representing a single field of a struct.
+ class Field
+ include Google::Apis::Core::Hashable
+
+ # The name of the field. For reads, this is the column name. For
+ # SQL queries, it is the column alias (e.g., `"Word"` in the
+ # query `"SELECT 'hello' AS Word"`), or the column name (e.g.,
+ # `"ColName"` in the query `"SELECT ColName FROM Table"`). Some
+ # columns might have an empty name (e.g., !"SELECT
+ # UPPER(ColName)"`). Note that a query result can contain
+ # multiple fields with the same name.
+ # Corresponds to the JSON property `name`
+ # @return [String]
+ attr_accessor :name
+
+ # `Type` indicates the type of a Cloud Spanner value, as might be stored in a
+ # table cell or returned from an SQL query.
+ # Corresponds to the JSON property `type`
+ # @return [Google::Apis::SpannerV1::Type]
+ attr_accessor :type
+
+ def initialize(**args)
+ update!(**args)
+ end
+
+ # Update properties of this object
+ def update!(**args)
+ @name = args[:name] if args.key?(:name)
+ @type = args[:type] if args.key?(:type)
+ end
+ end
+
+ # Additional statistics about a ResultSet or PartialResultSet.
+ class ResultSetStats
+ include Google::Apis::Core::Hashable
+
+ # Contains an ordered list of nodes appearing in the query plan.
+ # Corresponds to the JSON property `queryPlan`
+ # @return [Google::Apis::SpannerV1::QueryPlan]
+ attr_accessor :query_plan
+
+ # Aggregated statistics from the execution of the query. Only present when
+ # the query is profiled. For example, a query could return the statistics as
+ # follows:
+ # `
+ # "rows_returned": "3",
+ # "elapsed_time": "1.22 secs",
+ # "cpu_time": "1.19 secs"
+ # `
+ # Corresponds to the JSON property `queryStats`
+ # @return [Hash<String,Object>]
+ attr_accessor :query_stats
+
+ def initialize(**args)
+ update!(**args)
+ end
+
+ # Update properties of this object
+ def update!(**args)
+ @query_plan = args[:query_plan] if args.key?(:query_plan)
+ @query_stats = args[:query_stats] if args.key?(:query_stats)
+ end
+ end
+
+ # Request message for `TestIamPermissions` method.
+ class TestIamPermissionsRequest
+ include Google::Apis::Core::Hashable
+
+ # REQUIRED: The set of permissions to check for 'resource'.
+ # Permissions with wildcards (such as '*', 'spanner.*', 'spanner.instances.*')
+ # are not allowed.
+ # Corresponds to the JSON property `permissions`
+ # @return [Array<String>]
+ attr_accessor :permissions
+
+ def initialize(**args)
+ update!(**args)
+ end
+
+ # Update properties of this object
+ def update!(**args)
+ @permissions = args[:permissions] if args.key?(:permissions)
+ end
+ end
+
+ # The response for Commit.
+ class CommitResponse
+ include Google::Apis::Core::Hashable
+
+ # The Cloud Spanner timestamp at which the transaction committed.
+ # Corresponds to the JSON property `commitTimestamp`
+ # @return [String]
+ attr_accessor :commit_timestamp
+
+ def initialize(**args)
+ update!(**args)
+ end
+
+ # Update properties of this object
+ def update!(**args)
+ @commit_timestamp = args[:commit_timestamp] if args.key?(:commit_timestamp)
+ end
+ end
+
+ # `Type` indicates the type of a Cloud Spanner value, as might be stored in a
+ # table cell or returned from an SQL query.
+ class Type
+ include Google::Apis::Core::Hashable
+
+ # `StructType` defines the fields of a STRUCT type.
+ # Corresponds to the JSON property `structType`
+ # @return [Google::Apis::SpannerV1::StructType]
+ attr_accessor :struct_type
+
+ # `Type` indicates the type of a Cloud Spanner value, as might be stored in a
+ # table cell or returned from an SQL query.
+ # Corresponds to the JSON property `arrayElementType`
+ # @return [Google::Apis::SpannerV1::Type]
+ attr_accessor :array_element_type
+
+ # Required. The TypeCode for this type.
+ # Corresponds to the JSON property `code`
+ # @return [String]
+ attr_accessor :code
+
+ def initialize(**args)
+ update!(**args)
+ end
+
+ # Update properties of this object
+ def update!(**args)
+ @struct_type = args[:struct_type] if args.key?(:struct_type)
+ @array_element_type = args[:array_element_type] if args.key?(:array_element_type)
+ @code = args[:code] if args.key?(:code)
+ end
+ end
+
+ # Node information for nodes appearing in a QueryPlan.plan_nodes.
+ class PlanNode
+ include Google::Apis::Core::Hashable
+
+ # Attributes relevant to the node contained in a group of key-value pairs.
+ # For example, a Parameter Reference node could have the following
+ # information in its metadata:
+ # `
+ # "parameter_reference": "param1",
+ # "parameter_type": "array"
+ # `
+ # Corresponds to the JSON property `metadata`
+ # @return [Hash<String,Object>]
+ attr_accessor :metadata
+
+ # The execution statistics associated with the node, contained in a group of
+ # key-value pairs. Only present if the plan was returned as a result of a
+ # profile query. For example, number of executions, number of rows/time per
+ # execution etc.
+ # Corresponds to the JSON property `executionStats`
+ # @return [Hash<String,Object>]
+ attr_accessor :execution_stats
+
+ # Condensed representation of a node and its subtree. Only present for
+ # `SCALAR` PlanNode(s).
+ # Corresponds to the JSON property `shortRepresentation`
+ # @return [Google::Apis::SpannerV1::ShortRepresentation]
+ attr_accessor :short_representation
+
+ # The `PlanNode`'s index in node list.
+ # Corresponds to the JSON property `index`
+ # @return [Fixnum]
+ attr_accessor :index
+
+ # The display name for the node.
+ # Corresponds to the JSON property `displayName`
+ # @return [String]
+ attr_accessor :display_name
+
+ # Used to determine the type of node. May be needed for visualizing
+ # different kinds of nodes differently. For example, If the node is a
+ # SCALAR node, it will have a condensed representation
+ # which can be used to directly embed a description of the node in its
+ # parent.
+ # Corresponds to the JSON property `kind`
+ # @return [String]
+ attr_accessor :kind
+
+ # List of child node `index`es and their relationship to this parent.
+ # Corresponds to the JSON property `childLinks`
+ # @return [Array<Google::Apis::SpannerV1::ChildLink>]
+ attr_accessor :child_links
+
+ def initialize(**args)
+ update!(**args)
+ end
+
+ # Update properties of this object
+ def update!(**args)
+ @metadata = args[:metadata] if args.key?(:metadata)
+ @execution_stats = args[:execution_stats] if args.key?(:execution_stats)
+ @short_representation = args[:short_representation] if args.key?(:short_representation)
+ @index = args[:index] if args.key?(:index)
+ @display_name = args[:display_name] if args.key?(:display_name)
+ @kind = args[:kind] if args.key?(:kind)
+ @child_links = args[:child_links] if args.key?(:child_links)
+ end
+ end
+
+ # Metadata type for the operation returned by
+ # CreateInstance.
+ class CreateInstanceMetadata
+ include Google::Apis::Core::Hashable
+
+ # The time at which this operation was cancelled. If set, this operation is
+ # in the process of undoing itself (which is guaranteed to succeed) and
+ # cannot be cancelled again.
+ # Corresponds to the JSON property `cancelTime`
+ # @return [String]
+ attr_accessor :cancel_time
+
+ # The time at which this operation failed or was completed successfully.
+ # Corresponds to the JSON property `endTime`
+ # @return [String]
+ attr_accessor :end_time
+
+ # An isolated set of Cloud Spanner resources on which databases can be hosted.
+ # Corresponds to the JSON property `instance`
+ # @return [Google::Apis::SpannerV1::Instance]
+ attr_accessor :instance
+
+ # The time at which the
+ # CreateInstance request was
+ # received.
+ # Corresponds to the JSON property `startTime`
+ # @return [String]
+ attr_accessor :start_time
+
+ def initialize(**args)
+ update!(**args)
+ end
+
+ # Update properties of this object
+ def update!(**args)
+ @cancel_time = args[:cancel_time] if args.key?(:cancel_time)
+ @end_time = args[:end_time] if args.key?(:end_time)
+ @instance = args[:instance] if args.key?(:instance)
+ @start_time = args[:start_time] if args.key?(:start_time)
+ end
+ end
+
+ # Specifies the audit configuration for a service.
+ # It consists of which permission types are logged, and what identities, if
+ # any, are exempted from logging.
+ # An AuditConifg must have one or more AuditLogConfigs.
+ class AuditConfig
+ include Google::Apis::Core::Hashable
+
+ # Specifies the identities that are exempted from "data access" audit
+ # logging for the `service` specified above.
+ # Follows the same format of Binding.members.
+ # This field is deprecated in favor of per-permission-type exemptions.
+ # Corresponds to the JSON property `exemptedMembers`
+ # @return [Array<String>]
+ attr_accessor :exempted_members
+
+ # Specifies a service that will be enabled for audit logging.
+ # For example, `resourcemanager`, `storage`, `compute`.
+ # `allServices` is a special value that covers all services.
+ # Corresponds to the JSON property `service`
+ # @return [String]
+ attr_accessor :service
+
+ # The configuration for logging of each type of permission.
+ # Next ID: 4
+ # Corresponds to the JSON property `auditLogConfigs`
+ # @return [Array<Google::Apis::SpannerV1::AuditLogConfig>]
+ attr_accessor :audit_log_configs
+
+ def initialize(**args)
+ update!(**args)
+ end
+
+ # Update properties of this object
+ def update!(**args)
+ @exempted_members = args[:exempted_members] if args.key?(:exempted_members)
+ @service = args[:service] if args.key?(:service)
+ @audit_log_configs = args[:audit_log_configs] if args.key?(:audit_log_configs)
+ end
+ end
+
+ # Metadata associated with a parent-child relationship appearing in a
+ # PlanNode.
+ class ChildLink
+ include Google::Apis::Core::Hashable
+
+ # The type of the link. For example, in Hash Joins this could be used to
+ # distinguish between the build child and the probe child, or in the case
+ # of the child being an output variable, to represent the tag associated
+ # with the output variable.
+ # Corresponds to the JSON property `type`
+ # @return [String]
+ attr_accessor :type
+
+ # The node to which the link points.
+ # Corresponds to the JSON property `childIndex`
+ # @return [Fixnum]
+ attr_accessor :child_index
+
+ # Only present if the child node is SCALAR and corresponds
+ # to an output variable of the parent node. The field carries the name of
+ # the output variable.
+ # For example, a `TableScan` operator that reads rows from a table will
+ # have child links to the `SCALAR` nodes representing the output variables
+ # created for each column that is read by the operator. The corresponding
+ # `variable` fields will be set to the variable names assigned to the
+ # columns.
+ # Corresponds to the JSON property `variable`
+ # @return [String]
+ attr_accessor :variable
+
+ def initialize(**args)
+ update!(**args)
+ end
+
+ # Update properties of this object
+ def update!(**args)
+ @type = args[:type] if args.key?(:type)
+ @child_index = args[:child_index] if args.key?(:child_index)
+ @variable = args[:variable] if args.key?(:variable)
+ end
+ end
+
+ # Write a Cloud Audit log
+ class CloudAuditOptions
+ include Google::Apis::Core::Hashable
+
+ def initialize(**args)
+ update!(**args)
+ end
+
+ # Update properties of this object
+ def update!(**args)
+ end
+ end
+
+ # Arguments to delete operations.
+ class Delete
+ include Google::Apis::Core::Hashable
+
+ # Required. The table whose rows will be deleted.
+ # Corresponds to the JSON property `table`
+ # @return [String]
+ attr_accessor :table
+
+ # `KeySet` defines a collection of Cloud Spanner keys and/or key ranges. All
+ # the keys are expected to be in the same table or index. The keys need
+ # not be sorted in any particular way.
+ # If the same key is specified multiple times in the set (for example
+ # if two ranges, two keys, or a key and a range overlap), Cloud Spanner
+ # behaves as if the key were only specified once.
+ # Corresponds to the JSON property `keySet`
+ # @return [Google::Apis::SpannerV1::KeySet]
+ attr_accessor :key_set
+
+ def initialize(**args)
+ update!(**args)
+ end
+
+ # Update properties of this object
+ def update!(**args)
+ @table = args[:table] if args.key?(:table)
+ @key_set = args[:key_set] if args.key?(:key_set)
+ end
+ end
+
# The request for Commit.
class CommitRequest
include Google::Apis::Core::Hashable
# # Transactions
@@ -434,77 +1446,260 @@
@mutations = args[:mutations] if args.key?(:mutations)
@transaction_id = args[:transaction_id] if args.key?(:transaction_id)
end
end
- # Request message for `GetIamPolicy` method.
- class GetIamPolicyRequest
+ # The request for BeginTransaction.
+ class BeginTransactionRequest
include Google::Apis::Core::Hashable
+ # # Transactions
+ # Each session can have at most one active transaction at a time. After the
+ # active transaction is completed, the session can immediately be
+ # re-used for the next transaction. It is not necessary to create a
+ # new session for each transaction.
+ # # Transaction Modes
+ # Cloud Spanner supports two transaction modes:
+ # 1. Locking read-write. This type of transaction is the only way
+ # to write data into Cloud Spanner. These transactions rely on
+ # pessimistic locking and, if necessary, two-phase commit.
+ # Locking read-write transactions may abort, requiring the
+ # application to retry.
+ # 2. Snapshot read-only. This transaction type provides guaranteed
+ # consistency across several reads, but does not allow
+ # writes. Snapshot read-only transactions can be configured to
+ # read at timestamps in the past. Snapshot read-only
+ # transactions do not need to be committed.
+ # For transactions that only read, snapshot read-only transactions
+ # provide simpler semantics and are almost always faster. In
+ # particular, read-only transactions do not take locks, so they do
+ # not conflict with read-write transactions. As a consequence of not
+ # taking locks, they also do not abort, so retry loops are not needed.
+ # Transactions may only read/write data in a single database. They
+ # may, however, read/write data in different tables within that
+ # database.
+ # ## Locking Read-Write Transactions
+ # Locking transactions may be used to atomically read-modify-write
+ # data anywhere in a database. This type of transaction is externally
+ # consistent.
+ # Clients should attempt to minimize the amount of time a transaction
+ # is active. Faster transactions commit with higher probability
+ # and cause less contention. Cloud Spanner attempts to keep read locks
+ # active as long as the transaction continues to do reads, and the
+ # transaction has not been terminated by
+ # Commit or
+ # Rollback. Long periods of
+ # inactivity at the client may cause Cloud Spanner to release a
+ # transaction's locks and abort it.
+ # Reads performed within a transaction acquire locks on the data
+ # being read. Writes can only be done at commit time, after all reads
+ # have been completed.
+ # Conceptually, a read-write transaction consists of zero or more
+ # reads or SQL queries followed by
+ # Commit. At any time before
+ # Commit, the client can send a
+ # Rollback request to abort the
+ # transaction.
+ # ### Semantics
+ # Cloud Spanner can commit the transaction if all read locks it acquired
+ # are still valid at commit time, and it is able to acquire write
+ # locks for all writes. Cloud Spanner can abort the transaction for any
+ # reason. If a commit attempt returns `ABORTED`, Cloud Spanner guarantees
+ # that the transaction has not modified any user data in Cloud Spanner.
+ # Unless the transaction commits, Cloud Spanner makes no guarantees about
+ # how long the transaction's locks were held for. It is an error to
+ # use Cloud Spanner locks for any sort of mutual exclusion other than
+ # between Cloud Spanner transactions themselves.
+ # ### Retrying Aborted Transactions
+ # When a transaction aborts, the application can choose to retry the
+ # whole transaction again. To maximize the chances of successfully
+ # committing the retry, the client should execute the retry in the
+ # same session as the original attempt. The original session's lock
+ # priority increases with each consecutive abort, meaning that each
+ # attempt has a slightly better chance of success than the previous.
+ # Under some circumstances (e.g., many transactions attempting to
+ # modify the same row(s)), a transaction can abort many times in a
+ # short period before successfully committing. Thus, it is not a good
+ # idea to cap the number of retries a transaction can attempt;
+ # instead, it is better to limit the total amount of wall time spent
+ # retrying.
+ # ### Idle Transactions
+ # A transaction is considered idle if it has no outstanding reads or
+ # SQL queries and has not started a read or SQL query within the last 10
+ # seconds. Idle transactions can be aborted by Cloud Spanner so that they
+ # don't hold on to locks indefinitely. In that case, the commit will
+ # fail with error `ABORTED`.
+ # If this behavior is undesirable, periodically executing a simple
+ # SQL query in the transaction (e.g., `SELECT 1`) prevents the
+ # transaction from becoming idle.
+ # ## Snapshot Read-Only Transactions
+ # Snapshot read-only transactions provides a simpler method than
+ # locking read-write transactions for doing several consistent
+ # reads. However, this type of transaction does not support writes.
+ # Snapshot transactions do not take locks. Instead, they work by
+ # choosing a Cloud Spanner timestamp, then executing all reads at that
+ # timestamp. Since they do not acquire locks, they do not block
+ # concurrent read-write transactions.
+ # Unlike locking read-write transactions, snapshot read-only
+ # transactions never abort. They can fail if the chosen read
+ # timestamp is garbage collected; however, the default garbage
+ # collection policy is generous enough that most applications do not
+ # need to worry about this in practice.
+ # Snapshot read-only transactions do not need to call
+ # Commit or
+ # Rollback (and in fact are not
+ # permitted to do so).
+ # To execute a snapshot transaction, the client specifies a timestamp
+ # bound, which tells Cloud Spanner how to choose a read timestamp.
+ # The types of timestamp bound are:
+ # - Strong (the default).
+ # - Bounded staleness.
+ # - Exact staleness.
+ # If the Cloud Spanner database to be read is geographically distributed,
+ # stale read-only transactions can execute more quickly than strong
+ # or read-write transaction, because they are able to execute far
+ # from the leader replica.
+ # Each type of timestamp bound is discussed in detail below.
+ # ### Strong
+ # Strong reads are guaranteed to see the effects of all transactions
+ # that have committed before the start of the read. Furthermore, all
+ # rows yielded by a single read are consistent with each other -- if
+ # any part of the read observes a transaction, all parts of the read
+ # see the transaction.
+ # Strong reads are not repeatable: two consecutive strong read-only
+ # transactions might return inconsistent results if there are
+ # concurrent writes. If consistency across reads is required, the
+ # reads should be executed within a transaction or at an exact read
+ # timestamp.
+ # See TransactionOptions.ReadOnly.strong.
+ # ### Exact Staleness
+ # These timestamp bounds execute reads at a user-specified
+ # timestamp. Reads at a timestamp are guaranteed to see a consistent
+ # prefix of the global transaction history: they observe
+ # modifications done by all transactions with a commit timestamp <=
+ # the read timestamp, and observe none of the modifications done by
+ # transactions with a larger commit timestamp. They will block until
+ # all conflicting transactions that may be assigned commit timestamps
+ # <= the read timestamp have finished.
+ # The timestamp can either be expressed as an absolute Cloud Spanner commit
+ # timestamp or a staleness relative to the current time.
+ # These modes do not require a "negotiation phase" to pick a
+ # timestamp. As a result, they execute slightly faster than the
+ # equivalent boundedly stale concurrency modes. On the other hand,
+ # boundedly stale reads usually return fresher results.
+ # See TransactionOptions.ReadOnly.read_timestamp and
+ # TransactionOptions.ReadOnly.exact_staleness.
+ # ### Bounded Staleness
+ # Bounded staleness modes allow Cloud Spanner to pick the read timestamp,
+ # subject to a user-provided staleness bound. Cloud Spanner chooses the
+ # newest timestamp within the staleness bound that allows execution
+ # of the reads at the closest available replica without blocking.
+ # All rows yielded are consistent with each other -- if any part of
+ # the read observes a transaction, all parts of the read see the
+ # transaction. Boundedly stale reads are not repeatable: two stale
+ # reads, even if they use the same staleness bound, can execute at
+ # different timestamps and thus return inconsistent results.
+ # Boundedly stale reads execute in two phases: the first phase
+ # negotiates a timestamp among all replicas needed to serve the
+ # read. In the second phase, reads are executed at the negotiated
+ # timestamp.
+ # As a result of the two phase execution, bounded staleness reads are
+ # usually a little slower than comparable exact staleness
+ # reads. However, they are typically able to return fresher
+ # results, and are more likely to execute at the closest replica.
+ # Because the timestamp negotiation requires up-front knowledge of
+ # which rows will be read, it can only be used with single-use
+ # read-only transactions.
+ # See TransactionOptions.ReadOnly.max_staleness and
+ # TransactionOptions.ReadOnly.min_read_timestamp.
+ # ### Old Read Timestamps and Garbage Collection
+ # Cloud Spanner continuously garbage collects deleted and overwritten data
+ # in the background to reclaim storage space. This process is known
+ # as "version GC". By default, version GC reclaims versions after they
+ # are one hour old. Because of this, Cloud Spanner cannot perform reads
+ # at read timestamps more than one hour in the past. This
+ # restriction also applies to in-progress reads and/or SQL queries whose
+ # timestamp become too old while executing. Reads and SQL queries with
+ # too-old read timestamps fail with the error `FAILED_PRECONDITION`.
+ # Corresponds to the JSON property `options`
+ # @return [Google::Apis::SpannerV1::TransactionOptions]
+ attr_accessor :options
+
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
+ @options = args[:options] if args.key?(:options)
end
end
- # Response message for `TestIamPermissions` method.
- class TestIamPermissionsResponse
+ # The response for ListInstanceConfigs.
+ class ListInstanceConfigsResponse
include Google::Apis::Core::Hashable
- # A subset of `TestPermissionsRequest.permissions` that the caller is
- # allowed.
- # Corresponds to the JSON property `permissions`
- # @return [Array<String>]
- attr_accessor :permissions
+ # `next_page_token` can be sent in a subsequent
+ # ListInstanceConfigs call to
+ # fetch more of the matching instance configurations.
+ # Corresponds to the JSON property `nextPageToken`
+ # @return [String]
+ attr_accessor :next_page_token
+ # The list of requested instance configurations.
+ # Corresponds to the JSON property `instanceConfigs`
+ # @return [Array<Google::Apis::SpannerV1::InstanceConfig>]
+ attr_accessor :instance_configs
+
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
- @permissions = args[:permissions] if args.key?(:permissions)
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
+ @instance_configs = args[:instance_configs] if args.key?(:instance_configs)
end
end
- # Metadata type for the operation returned by
- # CreateDatabase.
- class CreateDatabaseMetadata
+ # Request message for `GetIamPolicy` method.
+ class GetIamPolicyRequest
include Google::Apis::Core::Hashable
- # The database being created.
- # Corresponds to the JSON property `database`
- # @return [String]
- attr_accessor :database
+ def initialize(**args)
+ update!(**args)
+ end
+ # Update properties of this object
+ def update!(**args)
+ end
+ end
+
+ # Response message for `TestIamPermissions` method.
+ class TestIamPermissionsResponse
+ include Google::Apis::Core::Hashable
+
+ # A subset of `TestPermissionsRequest.permissions` that the caller is
+ # allowed.
+ # Corresponds to the JSON property `permissions`
+ # @return [Array<String>]
+ attr_accessor :permissions
+
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
- @database = args[:database] if args.key?(:database)
+ @permissions = args[:permissions] if args.key?(:permissions)
end
end
# A rule to be applied in a Policy.
class Rule
include Google::Apis::Core::Hashable
- # Human-readable description of the rule.
- # Corresponds to the JSON property `description`
- # @return [String]
- attr_accessor :description
-
- # Additional restrictions that must be met
- # Corresponds to the JSON property `conditions`
- # @return [Array<Google::Apis::SpannerV1::Condition>]
- attr_accessor :conditions
-
# The config returned to callers of tech.iam.IAM.CheckPolicy for any entries
# that match the LOG action.
# Corresponds to the JSON property `logConfig`
# @return [Array<Google::Apis::SpannerV1::LogConfig>]
attr_accessor :log_config
@@ -533,26 +1728,56 @@
# Binding (see google/iam/v1/policy.proto).
# Corresponds to the JSON property `notIn`
# @return [Array<String>]
attr_accessor :not_in
+ # Human-readable description of the rule.
+ # Corresponds to the JSON property `description`
+ # @return [String]
+ attr_accessor :description
+
+ # Additional restrictions that must be met
+ # Corresponds to the JSON property `conditions`
+ # @return [Array<Google::Apis::SpannerV1::Condition>]
+ attr_accessor :conditions
+
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
- @description = args[:description] if args.key?(:description)
- @conditions = args[:conditions] if args.key?(:conditions)
@log_config = args[:log_config] if args.key?(:log_config)
@in = args[:in] if args.key?(:in)
@permissions = args[:permissions] if args.key?(:permissions)
@action = args[:action] if args.key?(:action)
@not_in = args[:not_in] if args.key?(:not_in)
+ @description = args[:description] if args.key?(:description)
+ @conditions = args[:conditions] if args.key?(:conditions)
end
end
+ # Metadata type for the operation returned by
+ # CreateDatabase.
+ class CreateDatabaseMetadata
+ include Google::Apis::Core::Hashable
+
+ # The database being created.
+ # Corresponds to the JSON property `database`
+ # @return [String]
+ attr_accessor :database
+
+ def initialize(**args)
+ update!(**args)
+ end
+
+ # Update properties of this object
+ def update!(**args)
+ @database = args[:database] if args.key?(:database)
+ end
+ end
+
# Specifies what kind of log the caller must write
# Increment a streamz counter with the specified metric and field names.
# Metric names should start with a '/', generally be lowercase-only,
# and end in "_count". Field names should not contain an initial slash.
# The actual exported metric names will have "/iam/policy" prepended.
@@ -570,34 +1795,34 @@
# * decrementing the counter
# * incrementing it by anything other than 1
class LogConfig
include Google::Apis::Core::Hashable
+ # Write a Cloud Audit log
+ # Corresponds to the JSON property `cloudAudit`
+ # @return [Google::Apis::SpannerV1::CloudAuditOptions]
+ attr_accessor :cloud_audit
+
# Options for counters
# Corresponds to the JSON property `counter`
# @return [Google::Apis::SpannerV1::CounterOptions]
attr_accessor :counter
# Write a Data Access (Gin) log
# Corresponds to the JSON property `dataAccess`
# @return [Google::Apis::SpannerV1::DataAccessOptions]
attr_accessor :data_access
- # Write a Cloud Audit log
- # Corresponds to the JSON property `cloudAudit`
- # @return [Google::Apis::SpannerV1::CloudAuditOptions]
- attr_accessor :cloud_audit
-
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
+ @cloud_audit = args[:cloud_audit] if args.key?(:cloud_audit)
@counter = args[:counter] if args.key?(:counter)
@data_access = args[:data_access] if args.key?(:data_access)
- @cloud_audit = args[:cloud_audit] if args.key?(:cloud_audit)
end
end
# A session in the Cloud Spanner API.
class Session
@@ -616,37 +1841,10 @@
def update!(**args)
@name = args[:name] if args.key?(:name)
end
end
- # The response for ListInstances.
- class ListInstancesResponse
- include Google::Apis::Core::Hashable
-
- # `next_page_token` can be sent in a subsequent
- # ListInstances call to fetch more
- # of the matching instances.
- # Corresponds to the JSON property `nextPageToken`
- # @return [String]
- attr_accessor :next_page_token
-
- # The list of requested instances.
- # Corresponds to the JSON property `instances`
- # @return [Array<Google::Apis::SpannerV1::Instance>]
- attr_accessor :instances
-
- def initialize(**args)
- update!(**args)
- end
-
- # Update properties of this object
- def update!(**args)
- @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
- @instances = args[:instances] if args.key?(:instances)
- end
- end
-
# KeyRange represents a range of rows in a table or index.
# A range has a start key and an end key. These keys can be open or
# closed, indicating if the range includes rows with that key.
# Keys are represented by lists, where the ith value in the list
# corresponds to the ith component of the table or index primary key.
@@ -705,16 +1903,10 @@
# Note that 100 is passed as the start, and 1 is passed as the end,
# because `Key` is a descending column in the schema.
class KeyRange
include Google::Apis::Core::Hashable
- # If the end is closed, then the range includes all rows whose
- # first `len(end_closed)` key columns exactly match `end_closed`.
- # Corresponds to the JSON property `endClosed`
- # @return [Array<Object>]
- attr_accessor :end_closed
-
# If the start is closed, then the range includes all rows whose
# first `len(start_closed)` key columns exactly match `start_closed`.
# Corresponds to the JSON property `startClosed`
# @return [Array<Object>]
attr_accessor :start_closed
@@ -729,23 +1921,56 @@
# `len(end_open)` key columns exactly match `end_open`.
# Corresponds to the JSON property `endOpen`
# @return [Array<Object>]
attr_accessor :end_open
+ # If the end is closed, then the range includes all rows whose
+ # first `len(end_closed)` key columns exactly match `end_closed`.
+ # Corresponds to the JSON property `endClosed`
+ # @return [Array<Object>]
+ attr_accessor :end_closed
+
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
- @end_closed = args[:end_closed] if args.key?(:end_closed)
@start_closed = args[:start_closed] if args.key?(:start_closed)
@start_open = args[:start_open] if args.key?(:start_open)
@end_open = args[:end_open] if args.key?(:end_open)
+ @end_closed = args[:end_closed] if args.key?(:end_closed)
end
end
+ # The response for ListInstances.
+ class ListInstancesResponse
+ include Google::Apis::Core::Hashable
+
+ # `next_page_token` can be sent in a subsequent
+ # ListInstances call to fetch more
+ # of the matching instances.
+ # Corresponds to the JSON property `nextPageToken`
+ # @return [String]
+ attr_accessor :next_page_token
+
+ # The list of requested instances.
+ # Corresponds to the JSON property `instances`
+ # @return [Array<Google::Apis::SpannerV1::Instance>]
+ attr_accessor :instances
+
+ def initialize(**args)
+ update!(**args)
+ end
+
+ # Update properties of this object
+ def update!(**args)
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
+ @instances = args[:instances] if args.key?(:instances)
+ end
+ end
+
# Condensed representation of a node and its subtree. Only present for
# `SCALAR` PlanNode(s).
class ShortRepresentation
include Google::Apis::Core::Hashable
@@ -1045,83 +2270,67 @@
# The request for CreateDatabase.
class CreateDatabaseRequest
include Google::Apis::Core::Hashable
+ # Required. A `CREATE DATABASE` statement, which specifies the ID of the
+ # new database. The database ID must conform to the regular expression
+ # `a-z*[a-z0-9]` and be between 2 and 30 characters in length.
+ # Corresponds to the JSON property `createStatement`
+ # @return [String]
+ attr_accessor :create_statement
+
# An optional list of DDL statements to run inside the newly created
# database. Statements can create tables, indexes, etc. These
# statements execute atomically with the creation of the database:
# if there is an error in any statement, the database is not created.
# Corresponds to the JSON property `extraStatements`
# @return [Array<String>]
attr_accessor :extra_statements
- # Required. A `CREATE DATABASE` statement, which specifies the ID of the
- # new database. The database ID must conform to the regular expression
- # `a-z*[a-z0-9]` and be between 2 and 30 characters in length.
- # Corresponds to the JSON property `createStatement`
- # @return [String]
- attr_accessor :create_statement
-
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
- @extra_statements = args[:extra_statements] if args.key?(:extra_statements)
@create_statement = args[:create_statement] if args.key?(:create_statement)
+ @extra_statements = args[:extra_statements] if args.key?(:extra_statements)
end
end
# The request for CreateInstance.
class CreateInstanceRequest
include Google::Apis::Core::Hashable
- # An isolated set of Cloud Spanner resources on which databases can be hosted.
- # Corresponds to the JSON property `instance`
- # @return [Google::Apis::SpannerV1::Instance]
- attr_accessor :instance
-
# Required. The ID of the instance to create. Valid identifiers are of the
# form `a-z*[a-z0-9]` and must be between 6 and 30 characters in
# length.
# Corresponds to the JSON property `instanceId`
# @return [String]
attr_accessor :instance_id
+ # An isolated set of Cloud Spanner resources on which databases can be hosted.
+ # Corresponds to the JSON property `instance`
+ # @return [Google::Apis::SpannerV1::Instance]
+ attr_accessor :instance
+
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
- @instance = args[:instance] if args.key?(:instance)
@instance_id = args[:instance_id] if args.key?(:instance_id)
+ @instance = args[:instance] if args.key?(:instance)
end
end
# A condition to be met.
class Condition
include Google::Apis::Core::Hashable
- # Trusted attributes discharged by the service.
- # Corresponds to the JSON property `svc`
- # @return [String]
- attr_accessor :svc
-
- # DEPRECATED. Use 'values' instead.
- # Corresponds to the JSON property `value`
- # @return [String]
- attr_accessor :value
-
- # Trusted attributes supplied by any service that owns resources and uses
- # the IAM system for access control.
- # Corresponds to the JSON property `sys`
- # @return [String]
- attr_accessor :sys
-
# The objects of the condition. This is mutually exclusive with 'value'.
# Corresponds to the JSON property `values`
# @return [Array<String>]
attr_accessor :values
@@ -1133,22 +2342,38 @@
# An operator to apply the subject with.
# Corresponds to the JSON property `op`
# @return [String]
attr_accessor :op
+ # Trusted attributes discharged by the service.
+ # Corresponds to the JSON property `svc`
+ # @return [String]
+ attr_accessor :svc
+
+ # Trusted attributes supplied by any service that owns resources and uses
+ # the IAM system for access control.
+ # Corresponds to the JSON property `sys`
+ # @return [String]
+ attr_accessor :sys
+
+ # DEPRECATED. Use 'values' instead.
+ # Corresponds to the JSON property `value`
+ # @return [String]
+ attr_accessor :value
+
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
- @svc = args[:svc] if args.key?(:svc)
- @value = args[:value] if args.key?(:value)
- @sys = args[:sys] if args.key?(:sys)
@values = args[:values] if args.key?(:values)
@iam = args[:iam] if args.key?(:iam)
@op = args[:op] if args.key?(:op)
+ @svc = args[:svc] if args.key?(:svc)
+ @sys = args[:sys] if args.key?(:sys)
+ @value = args[:value] if args.key?(:value)
end
end
# Provides the configuration for logging a type of permissions.
# Example:
@@ -1195,19 +2420,10 @@
# Options for read-only transactions.
class ReadOnly
include Google::Apis::Core::Hashable
- # Executes all reads at a timestamp >= `min_read_timestamp`.
- # This is useful for requesting fresher data than some previous
- # read, or data that is fresh enough to observe the effects of some
- # previously committed transaction whose timestamp is known.
- # Note that this option can only be used in single-use transactions.
- # Corresponds to the JSON property `minReadTimestamp`
- # @return [String]
- attr_accessor :min_read_timestamp
-
# Read data at a timestamp >= `NOW - max_staleness`
# seconds. Guarantees that all writes that have committed more
# than the specified number of seconds ago are visible. Because
# Cloud Spanner chooses the exact timestamp, this mode works even if
# the client's local clock is substantially skewed from Cloud Spanner
@@ -1258,22 +2474,31 @@
# Corresponds to the JSON property `strong`
# @return [Boolean]
attr_accessor :strong
alias_method :strong?, :strong
+ # Executes all reads at a timestamp >= `min_read_timestamp`.
+ # This is useful for requesting fresher data than some previous
+ # read, or data that is fresh enough to observe the effects of some
+ # previously committed transaction whose timestamp is known.
+ # Note that this option can only be used in single-use transactions.
+ # Corresponds to the JSON property `minReadTimestamp`
+ # @return [String]
+ attr_accessor :min_read_timestamp
+
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
- @min_read_timestamp = args[:min_read_timestamp] if args.key?(:min_read_timestamp)
@max_staleness = args[:max_staleness] if args.key?(:max_staleness)
@read_timestamp = args[:read_timestamp] if args.key?(:read_timestamp)
@return_read_timestamp = args[:return_read_timestamp] if args.key?(:return_read_timestamp)
@exact_staleness = args[:exact_staleness] if args.key?(:exact_staleness)
@strong = args[:strong] if args.key?(:strong)
+ @min_read_timestamp = args[:min_read_timestamp] if args.key?(:min_read_timestamp)
end
end
# The request for ExecuteSql and
# ExecuteStreamingSql.
@@ -1378,10 +2603,29 @@
# For a description of IAM and its features, see the
# [IAM developer's guide](https://cloud.google.com/iam).
class Policy
include Google::Apis::Core::Hashable
+ #
+ # Corresponds to the JSON property `iamOwned`
+ # @return [Boolean]
+ attr_accessor :iam_owned
+ alias_method :iam_owned?, :iam_owned
+
+ # If more than one rule is specified, the rules are applied in the following
+ # manner:
+ # - All matching LOG rules are always applied.
+ # - If any DENY/DENY_WITH_LOG rule matches, permission is denied.
+ # Logging will be applied if one or more matching rule requires logging.
+ # - Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is
+ # granted.
+ # Logging will be applied if one or more matching rule requires logging.
+ # - Otherwise, if no rule applies, permission is denied.
+ # Corresponds to the JSON property `rules`
+ # @return [Array<Google::Apis::SpannerV1::Rule>]
+ attr_accessor :rules
+
# Version of the `Policy`. The default version is 0.
# Corresponds to the JSON property `version`
# @return [Fixnum]
attr_accessor :version
@@ -1409,49 +2653,53 @@
# Corresponds to the JSON property `etag`
# NOTE: Values are automatically base64 encoded/decoded in the client library.
# @return [String]
attr_accessor :etag
- #
- # Corresponds to the JSON property `iamOwned`
- # @return [Boolean]
- attr_accessor :iam_owned
- alias_method :iam_owned?, :iam_owned
-
- # If more than one rule is specified, the rules are applied in the following
- # manner:
- # - All matching LOG rules are always applied.
- # - If any DENY/DENY_WITH_LOG rule matches, permission is denied.
- # Logging will be applied if one or more matching rule requires logging.
- # - Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is
- # granted.
- # Logging will be applied if one or more matching rule requires logging.
- # - Otherwise, if no rule applies, permission is denied.
- # Corresponds to the JSON property `rules`
- # @return [Array<Google::Apis::SpannerV1::Rule>]
- attr_accessor :rules
-
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
+ @iam_owned = args[:iam_owned] if args.key?(:iam_owned)
+ @rules = args[:rules] if args.key?(:rules)
@version = args[:version] if args.key?(:version)
@audit_configs = args[:audit_configs] if args.key?(:audit_configs)
@bindings = args[:bindings] if args.key?(:bindings)
@etag = args[:etag] if args.key?(:etag)
- @iam_owned = args[:iam_owned] if args.key?(:iam_owned)
- @rules = args[:rules] if args.key?(:rules)
end
end
# The request for Read and
# StreamingRead.
class ReadRequest
include Google::Apis::Core::Hashable
+ # If non-empty, the name of an index on table. This index is
+ # used instead of the table primary key when interpreting key_set
+ # and sorting result rows. See key_set for further information.
+ # Corresponds to the JSON property `index`
+ # @return [String]
+ attr_accessor :index
+
+ # `KeySet` defines a collection of Cloud Spanner keys and/or key ranges. All
+ # the keys are expected to be in the same table or index. The keys need
+ # not be sorted in any particular way.
+ # If the same key is specified multiple times in the set (for example
+ # if two ranges, two keys, or a key and a range overlap), Cloud Spanner
+ # behaves as if the key were only specified once.
+ # Corresponds to the JSON property `keySet`
+ # @return [Google::Apis::SpannerV1::KeySet]
+ attr_accessor :key_set
+
+ # The columns of table to be returned for each row matching
+ # this request.
+ # Corresponds to the JSON property `columns`
+ # @return [Array<String>]
+ attr_accessor :columns
+
# This message is used to select the transaction in which a
# Read or
# ExecuteSql call runs.
# See TransactionOptions for more information about transactions.
# Corresponds to the JSON property `transaction`
@@ -1475,62 +2723,34 @@
attr_accessor :table
# If greater than zero, only the first `limit` rows are yielded. If `limit`
# is zero, the default is no limit.
# Corresponds to the JSON property `limit`
- # @return [String]
+ # @return [Fixnum]
attr_accessor :limit
- # If non-empty, the name of an index on table. This index is
- # used instead of the table primary key when interpreting key_set
- # and sorting result rows. See key_set for further information.
- # Corresponds to the JSON property `index`
- # @return [String]
- attr_accessor :index
-
- # `KeySet` defines a collection of Cloud Spanner keys and/or key ranges. All
- # the keys are expected to be in the same table or index. The keys need
- # not be sorted in any particular way.
- # If the same key is specified multiple times in the set (for example
- # if two ranges, two keys, or a key and a range overlap), Cloud Spanner
- # behaves as if the key were only specified once.
- # Corresponds to the JSON property `keySet`
- # @return [Google::Apis::SpannerV1::KeySet]
- attr_accessor :key_set
-
- # The columns of table to be returned for each row matching
- # this request.
- # Corresponds to the JSON property `columns`
- # @return [Array<String>]
- attr_accessor :columns
-
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
+ @index = args[:index] if args.key?(:index)
+ @key_set = args[:key_set] if args.key?(:key_set)
+ @columns = args[:columns] if args.key?(:columns)
@transaction = args[:transaction] if args.key?(:transaction)
@resume_token = args[:resume_token] if args.key?(:resume_token)
@table = args[:table] if args.key?(:table)
@limit = args[:limit] if args.key?(:limit)
- @index = args[:index] if args.key?(:index)
- @key_set = args[:key_set] if args.key?(:key_set)
- @columns = args[:columns] if args.key?(:columns)
end
end
# Arguments to insert, update, insert_or_update, and
# replace operations.
class Write
include Google::Apis::Core::Hashable
- # Required. The table whose rows will be written.
- # Corresponds to the JSON property `table`
- # @return [String]
- attr_accessor :table
-
# The names of the columns in table to be written.
# The list of columns must contain enough columns to allow
# Cloud Spanner to derive values for all primary key columns in the
# row(s) to be modified.
# Corresponds to the JSON property `columns`
@@ -1547,24 +2767,29 @@
# encoded as described here.
# Corresponds to the JSON property `values`
# @return [Array<Array<Object>>]
attr_accessor :values
+ # Required. The table whose rows will be written.
+ # Corresponds to the JSON property `table`
+ # @return [String]
+ attr_accessor :table
+
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
- @table = args[:table] if args.key?(:table)
@columns = args[:columns] if args.key?(:columns)
@values = args[:values] if args.key?(:values)
+ @table = args[:table] if args.key?(:table)
end
end
- # Options for read-write transactions.
- class ReadWrite
+ # Write a Data Access (Gin) log
+ class DataAccessOptions
include Google::Apis::Core::Hashable
def initialize(**args)
update!(**args)
end
@@ -1572,12 +2797,12 @@
# Update properties of this object
def update!(**args)
end
end
- # Write a Data Access (Gin) log
- class DataAccessOptions
+ # Options for read-write transactions.
+ class ReadWrite
include Google::Apis::Core::Hashable
def initialize(**args)
update!(**args)
end
@@ -1682,47 +2907,10 @@
@metadata = args[:metadata] if args.key?(:metadata)
@done = args[:done] if args.key?(:done)
end
end
- # Results from Read or
- # ExecuteSql.
- class ResultSet
- include Google::Apis::Core::Hashable
-
- # Each element in `rows` is a row whose format is defined by
- # metadata.row_type. The ith element
- # in each row matches the ith field in
- # metadata.row_type. Elements are
- # encoded based on type as described
- # here.
- # Corresponds to the JSON property `rows`
- # @return [Array<Array<Object>>]
- attr_accessor :rows
-
- # Metadata about a ResultSet or PartialResultSet.
- # Corresponds to the JSON property `metadata`
- # @return [Google::Apis::SpannerV1::ResultSetMetadata]
- attr_accessor :metadata
-
- # Additional statistics about a ResultSet or PartialResultSet.
- # Corresponds to the JSON property `stats`
- # @return [Google::Apis::SpannerV1::ResultSetStats]
- attr_accessor :stats
-
- def initialize(**args)
- update!(**args)
- end
-
- # Update properties of this object
- def update!(**args)
- @rows = args[:rows] if args.key?(:rows)
- @metadata = args[:metadata] if args.key?(:metadata)
- @stats = args[:stats] if args.key?(:stats)
- end
- end
-
# The `Status` type defines a logical error model that is suitable for different
# programming environments, including REST APIs and RPC APIs. It is used by
# [gRPC](https://github.com/grpc). The error model is designed to be:
# - Simple to use and understand for most users
# - Flexible enough to meet unexpected needs
@@ -1761,10 +2949,17 @@
# - Logging. If some API errors are stored in logs, the message `Status` could
# be used directly after any stripping needed for security/privacy reasons.
class Status
include Google::Apis::Core::Hashable
+ # A developer-facing error message, which should be in English. Any
+ # user-facing error message should be localized and sent in the
+ # google.rpc.Status.details field, or localized by the client.
+ # Corresponds to the JSON property `message`
+ # @return [String]
+ attr_accessor :message
+
# A list of messages that carry the error details. There will be a
# common set of message types for APIs to use.
# Corresponds to the JSON property `details`
# @return [Array<Hash<String,Object>>]
attr_accessor :details
@@ -1772,66 +2967,56 @@
# The status code, which should be an enum value of google.rpc.Code.
# Corresponds to the JSON property `code`
# @return [Fixnum]
attr_accessor :code
- # A developer-facing error message, which should be in English. Any
- # user-facing error message should be localized and sent in the
- # google.rpc.Status.details field, or localized by the client.
- # Corresponds to the JSON property `message`
- # @return [String]
- attr_accessor :message
-
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
+ @message = args[:message] if args.key?(:message)
@details = args[:details] if args.key?(:details)
@code = args[:code] if args.key?(:code)
- @message = args[:message] if args.key?(:message)
end
end
- # Associates `members` with a `role`.
- class Binding
+ # Results from Read or
+ # ExecuteSql.
+ class ResultSet
include Google::Apis::Core::Hashable
- # Specifies the identities requesting access for a Cloud Platform resource.
- # `members` can have the following values:
- # * `allUsers`: A special identifier that represents anyone who is
- # on the internet; with or without a Google account.
- # * `allAuthenticatedUsers`: A special identifier that represents anyone
- # who is authenticated with a Google account or a service account.
- # * `user:`emailid``: An email address that represents a specific Google
- # account. For example, `alice@gmail.com` or `joe@example.com`.
- # * `serviceAccount:`emailid``: An email address that represents a service
- # account. For example, `my-other-app@appspot.gserviceaccount.com`.
- # * `group:`emailid``: An email address that represents a Google group.
- # For example, `admins@example.com`.
- # * `domain:`domain``: A Google Apps domain name that represents all the
- # users of that domain. For example, `google.com` or `example.com`.
- # Corresponds to the JSON property `members`
- # @return [Array<String>]
- attr_accessor :members
+ # Additional statistics about a ResultSet or PartialResultSet.
+ # Corresponds to the JSON property `stats`
+ # @return [Google::Apis::SpannerV1::ResultSetStats]
+ attr_accessor :stats
- # Role that is assigned to `members`.
- # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
- # Required
- # Corresponds to the JSON property `role`
- # @return [String]
- attr_accessor :role
+ # Each element in `rows` is a row whose format is defined by
+ # metadata.row_type. The ith element
+ # in each row matches the ith field in
+ # metadata.row_type. Elements are
+ # encoded based on type as described
+ # here.
+ # Corresponds to the JSON property `rows`
+ # @return [Array<Array<Object>>]
+ attr_accessor :rows
+ # Metadata about a ResultSet or PartialResultSet.
+ # Corresponds to the JSON property `metadata`
+ # @return [Google::Apis::SpannerV1::ResultSetMetadata]
+ attr_accessor :metadata
+
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
- @members = args[:members] if args.key?(:members)
- @role = args[:role] if args.key?(:role)
+ @stats = args[:stats] if args.key?(:stats)
+ @rows = args[:rows] if args.key?(:rows)
+ @metadata = args[:metadata] if args.key?(:metadata)
end
end
# Enqueues the given DDL statements to be applied, in order but not
# necessarily all at once, to the database schema at some point (or
@@ -1886,31 +3071,56 @@
@statements = args[:statements] if args.key?(:statements)
@operation_id = args[:operation_id] if args.key?(:operation_id)
end
end
+ # Associates `members` with a `role`.
+ class Binding
+ include Google::Apis::Core::Hashable
+
+ # Specifies the identities requesting access for a Cloud Platform resource.
+ # `members` can have the following values:
+ # * `allUsers`: A special identifier that represents anyone who is
+ # on the internet; with or without a Google account.
+ # * `allAuthenticatedUsers`: A special identifier that represents anyone
+ # who is authenticated with a Google account or a service account.
+ # * `user:`emailid``: An email address that represents a specific Google
+ # account. For example, `alice@gmail.com` or `joe@example.com`.
+ # * `serviceAccount:`emailid``: An email address that represents a service
+ # account. For example, `my-other-app@appspot.gserviceaccount.com`.
+ # * `group:`emailid``: An email address that represents a Google group.
+ # For example, `admins@example.com`.
+ # * `domain:`domain``: A Google Apps domain name that represents all the
+ # users of that domain. For example, `google.com` or `example.com`.
+ # Corresponds to the JSON property `members`
+ # @return [Array<String>]
+ attr_accessor :members
+
+ # Role that is assigned to `members`.
+ # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
+ # Required
+ # Corresponds to the JSON property `role`
+ # @return [String]
+ attr_accessor :role
+
+ def initialize(**args)
+ update!(**args)
+ end
+
+ # Update properties of this object
+ def update!(**args)
+ @members = args[:members] if args.key?(:members)
+ @role = args[:role] if args.key?(:role)
+ end
+ end
+
# Partial results from a streaming read or SQL query. Streaming reads and
# SQL queries better tolerate large result sets, large rows, and large
# values, but are a little trickier to consume.
class PartialResultSet
include Google::Apis::Core::Hashable
- # Streaming calls might be interrupted for a variety of reasons, such
- # as TCP connection loss. If this occurs, the stream of results can
- # be resumed by re-sending the original request and including
- # `resume_token`. Note that executing any other transaction in the
- # same session invalidates the token.
- # Corresponds to the JSON property `resumeToken`
- # NOTE: Values are automatically base64 encoded/decoded in the client library.
- # @return [String]
- attr_accessor :resume_token
-
- # Additional statistics about a ResultSet or PartialResultSet.
- # Corresponds to the JSON property `stats`
- # @return [Google::Apis::SpannerV1::ResultSetStats]
- attr_accessor :stats
-
# If true, then the final value in values is chunked, and must
# be combined with more values from subsequent `PartialResultSet`s
# to obtain a complete field value.
# Corresponds to the JSON property `chunkedValue`
# @return [Boolean]
@@ -1983,40 +3193,44 @@
# field value `"World" = "W" + "orl" + "d"`.
# Corresponds to the JSON property `values`
# @return [Array<Object>]
attr_accessor :values
+ # Streaming calls might be interrupted for a variety of reasons, such
+ # as TCP connection loss. If this occurs, the stream of results can
+ # be resumed by re-sending the original request and including
+ # `resume_token`. Note that executing any other transaction in the
+ # same session invalidates the token.
+ # Corresponds to the JSON property `resumeToken`
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
+ # @return [String]
+ attr_accessor :resume_token
+
+ # Additional statistics about a ResultSet or PartialResultSet.
+ # Corresponds to the JSON property `stats`
+ # @return [Google::Apis::SpannerV1::ResultSetStats]
+ attr_accessor :stats
+
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
- @resume_token = args[:resume_token] if args.key?(:resume_token)
- @stats = args[:stats] if args.key?(:stats)
@chunked_value = args[:chunked_value] if args.key?(:chunked_value)
@metadata = args[:metadata] if args.key?(:metadata)
@values = args[:values] if args.key?(:values)
+ @resume_token = args[:resume_token] if args.key?(:resume_token)
+ @stats = args[:stats] if args.key?(:stats)
end
end
# Metadata type for the operation returned by
# UpdateInstance.
class UpdateInstanceMetadata
include Google::Apis::Core::Hashable
- # An isolated set of Cloud Spanner resources on which databases can be hosted.
- # Corresponds to the JSON property `instance`
- # @return [Google::Apis::SpannerV1::Instance]
- attr_accessor :instance
-
- # The time at which UpdateInstance
- # request was received.
- # Corresponds to the JSON property `startTime`
- # @return [String]
- attr_accessor :start_time
-
# The time at which this operation was cancelled. If set, this operation is
# in the process of undoing itself (which is guaranteed to succeed) and
# cannot be cancelled again.
# Corresponds to the JSON property `cancelTime`
# @return [String]
@@ -2025,1171 +3239,17 @@
# The time at which this operation failed or was completed successfully.
# Corresponds to the JSON property `endTime`
# @return [String]
attr_accessor :end_time
- def initialize(**args)
- update!(**args)
- end
-
- # Update properties of this object
- def update!(**args)
- @instance = args[:instance] if args.key?(:instance)
- @start_time = args[:start_time] if args.key?(:start_time)
- @cancel_time = args[:cancel_time] if args.key?(:cancel_time)
- @end_time = args[:end_time] if args.key?(:end_time)
- end
- end
-
- # The response message for Operations.ListOperations.
- class ListOperationsResponse
- include Google::Apis::Core::Hashable
-
- # The standard List next-page token.
- # Corresponds to the JSON property `nextPageToken`
- # @return [String]
- attr_accessor :next_page_token
-
- # A list of operations that matches the specified filter in the request.
- # Corresponds to the JSON property `operations`
- # @return [Array<Google::Apis::SpannerV1::Operation>]
- attr_accessor :operations
-
- def initialize(**args)
- update!(**args)
- end
-
- # Update properties of this object
- def update!(**args)
- @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
- @operations = args[:operations] if args.key?(:operations)
- end
- end
-
- # Metadata about a ResultSet or PartialResultSet.
- class ResultSetMetadata
- include Google::Apis::Core::Hashable
-
- # A transaction.
- # Corresponds to the JSON property `transaction`
- # @return [Google::Apis::SpannerV1::Transaction]
- attr_accessor :transaction
-
- # `StructType` defines the fields of a STRUCT type.
- # Corresponds to the JSON property `rowType`
- # @return [Google::Apis::SpannerV1::StructType]
- attr_accessor :row_type
-
- def initialize(**args)
- update!(**args)
- end
-
- # Update properties of this object
- def update!(**args)
- @transaction = args[:transaction] if args.key?(:transaction)
- @row_type = args[:row_type] if args.key?(:row_type)
- end
- end
-
- # This message is used to select the transaction in which a
- # Read or
- # ExecuteSql call runs.
- # See TransactionOptions for more information about transactions.
- class TransactionSelector
- include Google::Apis::Core::Hashable
-
- # Execute the read or SQL query in a previously-started transaction.
- # Corresponds to the JSON property `id`
- # NOTE: Values are automatically base64 encoded/decoded in the client library.
- # @return [String]
- attr_accessor :id
-
- # # Transactions
- # Each session can have at most one active transaction at a time. After the
- # active transaction is completed, the session can immediately be
- # re-used for the next transaction. It is not necessary to create a
- # new session for each transaction.
- # # Transaction Modes
- # Cloud Spanner supports two transaction modes:
- # 1. Locking read-write. This type of transaction is the only way
- # to write data into Cloud Spanner. These transactions rely on
- # pessimistic locking and, if necessary, two-phase commit.
- # Locking read-write transactions may abort, requiring the
- # application to retry.
- # 2. Snapshot read-only. This transaction type provides guaranteed
- # consistency across several reads, but does not allow
- # writes. Snapshot read-only transactions can be configured to
- # read at timestamps in the past. Snapshot read-only
- # transactions do not need to be committed.
- # For transactions that only read, snapshot read-only transactions
- # provide simpler semantics and are almost always faster. In
- # particular, read-only transactions do not take locks, so they do
- # not conflict with read-write transactions. As a consequence of not
- # taking locks, they also do not abort, so retry loops are not needed.
- # Transactions may only read/write data in a single database. They
- # may, however, read/write data in different tables within that
- # database.
- # ## Locking Read-Write Transactions
- # Locking transactions may be used to atomically read-modify-write
- # data anywhere in a database. This type of transaction is externally
- # consistent.
- # Clients should attempt to minimize the amount of time a transaction
- # is active. Faster transactions commit with higher probability
- # and cause less contention. Cloud Spanner attempts to keep read locks
- # active as long as the transaction continues to do reads, and the
- # transaction has not been terminated by
- # Commit or
- # Rollback. Long periods of
- # inactivity at the client may cause Cloud Spanner to release a
- # transaction's locks and abort it.
- # Reads performed within a transaction acquire locks on the data
- # being read. Writes can only be done at commit time, after all reads
- # have been completed.
- # Conceptually, a read-write transaction consists of zero or more
- # reads or SQL queries followed by
- # Commit. At any time before
- # Commit, the client can send a
- # Rollback request to abort the
- # transaction.
- # ### Semantics
- # Cloud Spanner can commit the transaction if all read locks it acquired
- # are still valid at commit time, and it is able to acquire write
- # locks for all writes. Cloud Spanner can abort the transaction for any
- # reason. If a commit attempt returns `ABORTED`, Cloud Spanner guarantees
- # that the transaction has not modified any user data in Cloud Spanner.
- # Unless the transaction commits, Cloud Spanner makes no guarantees about
- # how long the transaction's locks were held for. It is an error to
- # use Cloud Spanner locks for any sort of mutual exclusion other than
- # between Cloud Spanner transactions themselves.
- # ### Retrying Aborted Transactions
- # When a transaction aborts, the application can choose to retry the
- # whole transaction again. To maximize the chances of successfully
- # committing the retry, the client should execute the retry in the
- # same session as the original attempt. The original session's lock
- # priority increases with each consecutive abort, meaning that each
- # attempt has a slightly better chance of success than the previous.
- # Under some circumstances (e.g., many transactions attempting to
- # modify the same row(s)), a transaction can abort many times in a
- # short period before successfully committing. Thus, it is not a good
- # idea to cap the number of retries a transaction can attempt;
- # instead, it is better to limit the total amount of wall time spent
- # retrying.
- # ### Idle Transactions
- # A transaction is considered idle if it has no outstanding reads or
- # SQL queries and has not started a read or SQL query within the last 10
- # seconds. Idle transactions can be aborted by Cloud Spanner so that they
- # don't hold on to locks indefinitely. In that case, the commit will
- # fail with error `ABORTED`.
- # If this behavior is undesirable, periodically executing a simple
- # SQL query in the transaction (e.g., `SELECT 1`) prevents the
- # transaction from becoming idle.
- # ## Snapshot Read-Only Transactions
- # Snapshot read-only transactions provides a simpler method than
- # locking read-write transactions for doing several consistent
- # reads. However, this type of transaction does not support writes.
- # Snapshot transactions do not take locks. Instead, they work by
- # choosing a Cloud Spanner timestamp, then executing all reads at that
- # timestamp. Since they do not acquire locks, they do not block
- # concurrent read-write transactions.
- # Unlike locking read-write transactions, snapshot read-only
- # transactions never abort. They can fail if the chosen read
- # timestamp is garbage collected; however, the default garbage
- # collection policy is generous enough that most applications do not
- # need to worry about this in practice.
- # Snapshot read-only transactions do not need to call
- # Commit or
- # Rollback (and in fact are not
- # permitted to do so).
- # To execute a snapshot transaction, the client specifies a timestamp
- # bound, which tells Cloud Spanner how to choose a read timestamp.
- # The types of timestamp bound are:
- # - Strong (the default).
- # - Bounded staleness.
- # - Exact staleness.
- # If the Cloud Spanner database to be read is geographically distributed,
- # stale read-only transactions can execute more quickly than strong
- # or read-write transaction, because they are able to execute far
- # from the leader replica.
- # Each type of timestamp bound is discussed in detail below.
- # ### Strong
- # Strong reads are guaranteed to see the effects of all transactions
- # that have committed before the start of the read. Furthermore, all
- # rows yielded by a single read are consistent with each other -- if
- # any part of the read observes a transaction, all parts of the read
- # see the transaction.
- # Strong reads are not repeatable: two consecutive strong read-only
- # transactions might return inconsistent results if there are
- # concurrent writes. If consistency across reads is required, the
- # reads should be executed within a transaction or at an exact read
- # timestamp.
- # See TransactionOptions.ReadOnly.strong.
- # ### Exact Staleness
- # These timestamp bounds execute reads at a user-specified
- # timestamp. Reads at a timestamp are guaranteed to see a consistent
- # prefix of the global transaction history: they observe
- # modifications done by all transactions with a commit timestamp <=
- # the read timestamp, and observe none of the modifications done by
- # transactions with a larger commit timestamp. They will block until
- # all conflicting transactions that may be assigned commit timestamps
- # <= the read timestamp have finished.
- # The timestamp can either be expressed as an absolute Cloud Spanner commit
- # timestamp or a staleness relative to the current time.
- # These modes do not require a "negotiation phase" to pick a
- # timestamp. As a result, they execute slightly faster than the
- # equivalent boundedly stale concurrency modes. On the other hand,
- # boundedly stale reads usually return fresher results.
- # See TransactionOptions.ReadOnly.read_timestamp and
- # TransactionOptions.ReadOnly.exact_staleness.
- # ### Bounded Staleness
- # Bounded staleness modes allow Cloud Spanner to pick the read timestamp,
- # subject to a user-provided staleness bound. Cloud Spanner chooses the
- # newest timestamp within the staleness bound that allows execution
- # of the reads at the closest available replica without blocking.
- # All rows yielded are consistent with each other -- if any part of
- # the read observes a transaction, all parts of the read see the
- # transaction. Boundedly stale reads are not repeatable: two stale
- # reads, even if they use the same staleness bound, can execute at
- # different timestamps and thus return inconsistent results.
- # Boundedly stale reads execute in two phases: the first phase
- # negotiates a timestamp among all replicas needed to serve the
- # read. In the second phase, reads are executed at the negotiated
- # timestamp.
- # As a result of the two phase execution, bounded staleness reads are
- # usually a little slower than comparable exact staleness
- # reads. However, they are typically able to return fresher
- # results, and are more likely to execute at the closest replica.
- # Because the timestamp negotiation requires up-front knowledge of
- # which rows will be read, it can only be used with single-use
- # read-only transactions.
- # See TransactionOptions.ReadOnly.max_staleness and
- # TransactionOptions.ReadOnly.min_read_timestamp.
- # ### Old Read Timestamps and Garbage Collection
- # Cloud Spanner continuously garbage collects deleted and overwritten data
- # in the background to reclaim storage space. This process is known
- # as "version GC". By default, version GC reclaims versions after they
- # are one hour old. Because of this, Cloud Spanner cannot perform reads
- # at read timestamps more than one hour in the past. This
- # restriction also applies to in-progress reads and/or SQL queries whose
- # timestamp become too old while executing. Reads and SQL queries with
- # too-old read timestamps fail with the error `FAILED_PRECONDITION`.
- # Corresponds to the JSON property `singleUse`
- # @return [Google::Apis::SpannerV1::TransactionOptions]
- attr_accessor :single_use
-
- # # Transactions
- # Each session can have at most one active transaction at a time. After the
- # active transaction is completed, the session can immediately be
- # re-used for the next transaction. It is not necessary to create a
- # new session for each transaction.
- # # Transaction Modes
- # Cloud Spanner supports two transaction modes:
- # 1. Locking read-write. This type of transaction is the only way
- # to write data into Cloud Spanner. These transactions rely on
- # pessimistic locking and, if necessary, two-phase commit.
- # Locking read-write transactions may abort, requiring the
- # application to retry.
- # 2. Snapshot read-only. This transaction type provides guaranteed
- # consistency across several reads, but does not allow
- # writes. Snapshot read-only transactions can be configured to
- # read at timestamps in the past. Snapshot read-only
- # transactions do not need to be committed.
- # For transactions that only read, snapshot read-only transactions
- # provide simpler semantics and are almost always faster. In
- # particular, read-only transactions do not take locks, so they do
- # not conflict with read-write transactions. As a consequence of not
- # taking locks, they also do not abort, so retry loops are not needed.
- # Transactions may only read/write data in a single database. They
- # may, however, read/write data in different tables within that
- # database.
- # ## Locking Read-Write Transactions
- # Locking transactions may be used to atomically read-modify-write
- # data anywhere in a database. This type of transaction is externally
- # consistent.
- # Clients should attempt to minimize the amount of time a transaction
- # is active. Faster transactions commit with higher probability
- # and cause less contention. Cloud Spanner attempts to keep read locks
- # active as long as the transaction continues to do reads, and the
- # transaction has not been terminated by
- # Commit or
- # Rollback. Long periods of
- # inactivity at the client may cause Cloud Spanner to release a
- # transaction's locks and abort it.
- # Reads performed within a transaction acquire locks on the data
- # being read. Writes can only be done at commit time, after all reads
- # have been completed.
- # Conceptually, a read-write transaction consists of zero or more
- # reads or SQL queries followed by
- # Commit. At any time before
- # Commit, the client can send a
- # Rollback request to abort the
- # transaction.
- # ### Semantics
- # Cloud Spanner can commit the transaction if all read locks it acquired
- # are still valid at commit time, and it is able to acquire write
- # locks for all writes. Cloud Spanner can abort the transaction for any
- # reason. If a commit attempt returns `ABORTED`, Cloud Spanner guarantees
- # that the transaction has not modified any user data in Cloud Spanner.
- # Unless the transaction commits, Cloud Spanner makes no guarantees about
- # how long the transaction's locks were held for. It is an error to
- # use Cloud Spanner locks for any sort of mutual exclusion other than
- # between Cloud Spanner transactions themselves.
- # ### Retrying Aborted Transactions
- # When a transaction aborts, the application can choose to retry the
- # whole transaction again. To maximize the chances of successfully
- # committing the retry, the client should execute the retry in the
- # same session as the original attempt. The original session's lock
- # priority increases with each consecutive abort, meaning that each
- # attempt has a slightly better chance of success than the previous.
- # Under some circumstances (e.g., many transactions attempting to
- # modify the same row(s)), a transaction can abort many times in a
- # short period before successfully committing. Thus, it is not a good
- # idea to cap the number of retries a transaction can attempt;
- # instead, it is better to limit the total amount of wall time spent
- # retrying.
- # ### Idle Transactions
- # A transaction is considered idle if it has no outstanding reads or
- # SQL queries and has not started a read or SQL query within the last 10
- # seconds. Idle transactions can be aborted by Cloud Spanner so that they
- # don't hold on to locks indefinitely. In that case, the commit will
- # fail with error `ABORTED`.
- # If this behavior is undesirable, periodically executing a simple
- # SQL query in the transaction (e.g., `SELECT 1`) prevents the
- # transaction from becoming idle.
- # ## Snapshot Read-Only Transactions
- # Snapshot read-only transactions provides a simpler method than
- # locking read-write transactions for doing several consistent
- # reads. However, this type of transaction does not support writes.
- # Snapshot transactions do not take locks. Instead, they work by
- # choosing a Cloud Spanner timestamp, then executing all reads at that
- # timestamp. Since they do not acquire locks, they do not block
- # concurrent read-write transactions.
- # Unlike locking read-write transactions, snapshot read-only
- # transactions never abort. They can fail if the chosen read
- # timestamp is garbage collected; however, the default garbage
- # collection policy is generous enough that most applications do not
- # need to worry about this in practice.
- # Snapshot read-only transactions do not need to call
- # Commit or
- # Rollback (and in fact are not
- # permitted to do so).
- # To execute a snapshot transaction, the client specifies a timestamp
- # bound, which tells Cloud Spanner how to choose a read timestamp.
- # The types of timestamp bound are:
- # - Strong (the default).
- # - Bounded staleness.
- # - Exact staleness.
- # If the Cloud Spanner database to be read is geographically distributed,
- # stale read-only transactions can execute more quickly than strong
- # or read-write transaction, because they are able to execute far
- # from the leader replica.
- # Each type of timestamp bound is discussed in detail below.
- # ### Strong
- # Strong reads are guaranteed to see the effects of all transactions
- # that have committed before the start of the read. Furthermore, all
- # rows yielded by a single read are consistent with each other -- if
- # any part of the read observes a transaction, all parts of the read
- # see the transaction.
- # Strong reads are not repeatable: two consecutive strong read-only
- # transactions might return inconsistent results if there are
- # concurrent writes. If consistency across reads is required, the
- # reads should be executed within a transaction or at an exact read
- # timestamp.
- # See TransactionOptions.ReadOnly.strong.
- # ### Exact Staleness
- # These timestamp bounds execute reads at a user-specified
- # timestamp. Reads at a timestamp are guaranteed to see a consistent
- # prefix of the global transaction history: they observe
- # modifications done by all transactions with a commit timestamp <=
- # the read timestamp, and observe none of the modifications done by
- # transactions with a larger commit timestamp. They will block until
- # all conflicting transactions that may be assigned commit timestamps
- # <= the read timestamp have finished.
- # The timestamp can either be expressed as an absolute Cloud Spanner commit
- # timestamp or a staleness relative to the current time.
- # These modes do not require a "negotiation phase" to pick a
- # timestamp. As a result, they execute slightly faster than the
- # equivalent boundedly stale concurrency modes. On the other hand,
- # boundedly stale reads usually return fresher results.
- # See TransactionOptions.ReadOnly.read_timestamp and
- # TransactionOptions.ReadOnly.exact_staleness.
- # ### Bounded Staleness
- # Bounded staleness modes allow Cloud Spanner to pick the read timestamp,
- # subject to a user-provided staleness bound. Cloud Spanner chooses the
- # newest timestamp within the staleness bound that allows execution
- # of the reads at the closest available replica without blocking.
- # All rows yielded are consistent with each other -- if any part of
- # the read observes a transaction, all parts of the read see the
- # transaction. Boundedly stale reads are not repeatable: two stale
- # reads, even if they use the same staleness bound, can execute at
- # different timestamps and thus return inconsistent results.
- # Boundedly stale reads execute in two phases: the first phase
- # negotiates a timestamp among all replicas needed to serve the
- # read. In the second phase, reads are executed at the negotiated
- # timestamp.
- # As a result of the two phase execution, bounded staleness reads are
- # usually a little slower than comparable exact staleness
- # reads. However, they are typically able to return fresher
- # results, and are more likely to execute at the closest replica.
- # Because the timestamp negotiation requires up-front knowledge of
- # which rows will be read, it can only be used with single-use
- # read-only transactions.
- # See TransactionOptions.ReadOnly.max_staleness and
- # TransactionOptions.ReadOnly.min_read_timestamp.
- # ### Old Read Timestamps and Garbage Collection
- # Cloud Spanner continuously garbage collects deleted and overwritten data
- # in the background to reclaim storage space. This process is known
- # as "version GC". By default, version GC reclaims versions after they
- # are one hour old. Because of this, Cloud Spanner cannot perform reads
- # at read timestamps more than one hour in the past. This
- # restriction also applies to in-progress reads and/or SQL queries whose
- # timestamp become too old while executing. Reads and SQL queries with
- # too-old read timestamps fail with the error `FAILED_PRECONDITION`.
- # Corresponds to the JSON property `begin`
- # @return [Google::Apis::SpannerV1::TransactionOptions]
- attr_accessor :begin
-
- def initialize(**args)
- update!(**args)
- end
-
- # Update properties of this object
- def update!(**args)
- @id = args[:id] if args.key?(:id)
- @single_use = args[:single_use] if args.key?(:single_use)
- @begin = args[:begin] if args.key?(:begin)
- end
- end
-
- # A modification to one or more Cloud Spanner rows. Mutations can be
- # applied to a Cloud Spanner database by sending them in a
- # Commit call.
- class Mutation
- include Google::Apis::Core::Hashable
-
- # Arguments to delete operations.
- # Corresponds to the JSON property `delete`
- # @return [Google::Apis::SpannerV1::Delete]
- attr_accessor :delete
-
- # Arguments to insert, update, insert_or_update, and
- # replace operations.
- # Corresponds to the JSON property `insert`
- # @return [Google::Apis::SpannerV1::Write]
- attr_accessor :insert
-
- # Arguments to insert, update, insert_or_update, and
- # replace operations.
- # Corresponds to the JSON property `insertOrUpdate`
- # @return [Google::Apis::SpannerV1::Write]
- attr_accessor :insert_or_update
-
- # Arguments to insert, update, insert_or_update, and
- # replace operations.
- # Corresponds to the JSON property `update`
- # @return [Google::Apis::SpannerV1::Write]
- attr_accessor :update
-
- # Arguments to insert, update, insert_or_update, and
- # replace operations.
- # Corresponds to the JSON property `replace`
- # @return [Google::Apis::SpannerV1::Write]
- attr_accessor :replace
-
- def initialize(**args)
- update!(**args)
- end
-
- # Update properties of this object
- def update!(**args)
- @delete = args[:delete] if args.key?(:delete)
- @insert = args[:insert] if args.key?(:insert)
- @insert_or_update = args[:insert_or_update] if args.key?(:insert_or_update)
- @update = args[:update] if args.key?(:update)
- @replace = args[:replace] if args.key?(:replace)
- end
- end
-
- # `KeySet` defines a collection of Cloud Spanner keys and/or key ranges. All
- # the keys are expected to be in the same table or index. The keys need
- # not be sorted in any particular way.
- # If the same key is specified multiple times in the set (for example
- # if two ranges, two keys, or a key and a range overlap), Cloud Spanner
- # behaves as if the key were only specified once.
- class KeySet
- include Google::Apis::Core::Hashable
-
- # A list of key ranges. See KeyRange for more information about
- # key range specifications.
- # Corresponds to the JSON property `ranges`
- # @return [Array<Google::Apis::SpannerV1::KeyRange>]
- attr_accessor :ranges
-
- # A list of specific keys. Entries in `keys` should have exactly as
- # many elements as there are columns in the primary or index key
- # with which this `KeySet` is used. Individual key values are
- # encoded as described here.
- # Corresponds to the JSON property `keys`
- # @return [Array<Array<Object>>]
- attr_accessor :keys
-
- # For convenience `all` can be set to `true` to indicate that this
- # `KeySet` matches all keys in the table or index. Note that any keys
- # specified in `keys` or `ranges` are only yielded once.
- # Corresponds to the JSON property `all`
- # @return [Boolean]
- attr_accessor :all
- alias_method :all?, :all
-
- def initialize(**args)
- update!(**args)
- end
-
- # Update properties of this object
- def update!(**args)
- @ranges = args[:ranges] if args.key?(:ranges)
- @keys = args[:keys] if args.key?(:keys)
- @all = args[:all] if args.key?(:all)
- end
- end
-
- # The response for GetDatabaseDdl.
- class GetDatabaseDdlResponse
- include Google::Apis::Core::Hashable
-
- # A list of formatted DDL statements defining the schema of the database
- # specified in the request.
- # Corresponds to the JSON property `statements`
- # @return [Array<String>]
- attr_accessor :statements
-
- def initialize(**args)
- update!(**args)
- end
-
- # Update properties of this object
- def update!(**args)
- @statements = args[:statements] if args.key?(:statements)
- end
- end
-
- # A Cloud Spanner database.
- class Database
- include Google::Apis::Core::Hashable
-
- # Output only. The current database state.
- # Corresponds to the JSON property `state`
- # @return [String]
- attr_accessor :state
-
- # Required. The name of the database. Values are of the form
- # `projects/<project>/instances/<instance>/databases/<database>`,
- # where `<database>` is as specified in the `CREATE DATABASE`
- # statement. This name can be passed to other API methods to
- # identify the database.
- # Corresponds to the JSON property `name`
- # @return [String]
- attr_accessor :name
-
- def initialize(**args)
- update!(**args)
- end
-
- # Update properties of this object
- def update!(**args)
- @state = args[:state] if args.key?(:state)
- @name = args[:name] if args.key?(:name)
- end
- end
-
- # The response for ListDatabases.
- class ListDatabasesResponse
- include Google::Apis::Core::Hashable
-
- # `next_page_token` can be sent in a subsequent
- # ListDatabases call to fetch more
- # of the matching databases.
- # Corresponds to the JSON property `nextPageToken`
- # @return [String]
- attr_accessor :next_page_token
-
- # Databases that matched the request.
- # Corresponds to the JSON property `databases`
- # @return [Array<Google::Apis::SpannerV1::Database>]
- attr_accessor :databases
-
- def initialize(**args)
- update!(**args)
- end
-
- # Update properties of this object
- def update!(**args)
- @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
- @databases = args[:databases] if args.key?(:databases)
- end
- end
-
- # Request message for `SetIamPolicy` method.
- class SetIamPolicyRequest
- include Google::Apis::Core::Hashable
-
- # Defines an Identity and Access Management (IAM) policy. It is used to
- # specify access control policies for Cloud Platform resources.
- # A `Policy` consists of a list of `bindings`. A `Binding` binds a list of
- # `members` to a `role`, where the members can be user accounts, Google groups,
- # Google domains, and service accounts. A `role` is a named list of permissions
- # defined by IAM.
- # **Example**
- # `
- # "bindings": [
- # `
- # "role": "roles/owner",
- # "members": [
- # "user:mike@example.com",
- # "group:admins@example.com",
- # "domain:google.com",
- # "serviceAccount:my-other-app@appspot.gserviceaccount.com",
- # ]
- # `,
- # `
- # "role": "roles/viewer",
- # "members": ["user:sean@example.com"]
- # `
- # ]
- # `
- # For a description of IAM and its features, see the
- # [IAM developer's guide](https://cloud.google.com/iam).
- # Corresponds to the JSON property `policy`
- # @return [Google::Apis::SpannerV1::Policy]
- attr_accessor :policy
-
- # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
- # the fields in the mask will be modified. If no mask is provided, a default
- # mask is used:
- # paths: "bindings, etag"
- # This field is only used by Cloud IAM.
- # Corresponds to the JSON property `updateMask`
- # @return [String]
- attr_accessor :update_mask
-
- def initialize(**args)
- update!(**args)
- end
-
- # Update properties of this object
- def update!(**args)
- @policy = args[:policy] if args.key?(:policy)
- @update_mask = args[:update_mask] if args.key?(:update_mask)
- end
- end
-
- # An isolated set of Cloud Spanner resources on which databases can be hosted.
- class Instance
- include Google::Apis::Core::Hashable
-
- # Required. The number of nodes allocated to this instance.
- # Corresponds to the JSON property `nodeCount`
- # @return [Fixnum]
- attr_accessor :node_count
-
- # Cloud Labels are a flexible and lightweight mechanism for organizing cloud
- # resources into groups that reflect a customer's organizational needs and
- # deployment strategies. Cloud Labels can be used to filter collections of
- # resources. They can be used to control how resource metrics are aggregated.
- # And they can be used as arguments to policy management rules (e.g. route,
- # firewall, load balancing, etc.).
- # * Label keys must be between 1 and 63 characters long and must conform to
- # the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
- # * Label values must be between 0 and 63 characters long and must conform
- # to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
- # * No more than 64 labels can be associated with a given resource.
- # See https://goo.gl/xmQnxf for more information on and examples of labels.
- # If you plan to use labels in your own code, please note that additional
- # characters may be allowed in the future. And so you are advised to use an
- # internal label representation, such as JSON, which doesn't rely upon
- # specific characters being disallowed. For example, representing labels
- # as the string: name + "_" + value would prove problematic if we were to
- # allow "_" in a future release.
- # Corresponds to the JSON property `labels`
- # @return [Hash<String,String>]
- attr_accessor :labels
-
- # Required. The name of the instance's configuration. Values are of the form
- # `projects/<project>/instanceConfigs/<configuration>`. See
- # also InstanceConfig and
- # ListInstanceConfigs.
- # Corresponds to the JSON property `config`
- # @return [String]
- attr_accessor :config
-
- # Output only. The current instance state. For
- # CreateInstance, the state must be
- # either omitted or set to `CREATING`. For
- # UpdateInstance, the state must be
- # either omitted or set to `READY`.
- # Corresponds to the JSON property `state`
- # @return [String]
- attr_accessor :state
-
- # Required. A unique identifier for the instance, which cannot be changed
- # after the instance is created. Values are of the form
- # `projects/<project>/instances/a-z*[a-z0-9]`. The final
- # segment of the name must be between 6 and 30 characters in length.
- # Corresponds to the JSON property `name`
- # @return [String]
- attr_accessor :name
-
- # Required. The descriptive name for this instance as it appears in UIs.
- # Must be unique per project and between 4 and 30 characters in length.
- # Corresponds to the JSON property `displayName`
- # @return [String]
- attr_accessor :display_name
-
- def initialize(**args)
- update!(**args)
- end
-
- # Update properties of this object
- def update!(**args)
- @node_count = args[:node_count] if args.key?(:node_count)
- @labels = args[:labels] if args.key?(:labels)
- @config = args[:config] if args.key?(:config)
- @state = args[:state] if args.key?(:state)
- @name = args[:name] if args.key?(:name)
- @display_name = args[:display_name] if args.key?(:display_name)
- end
- end
-
- # The request for Rollback.
- class RollbackRequest
- include Google::Apis::Core::Hashable
-
- # Required. The transaction to roll back.
- # Corresponds to the JSON property `transactionId`
- # NOTE: Values are automatically base64 encoded/decoded in the client library.
- # @return [String]
- attr_accessor :transaction_id
-
- def initialize(**args)
- update!(**args)
- end
-
- # Update properties of this object
- def update!(**args)
- @transaction_id = args[:transaction_id] if args.key?(:transaction_id)
- end
- end
-
- # A transaction.
- class Transaction
- include Google::Apis::Core::Hashable
-
- # For snapshot read-only transactions, the read timestamp chosen
- # for the transaction. Not returned by default: see
- # TransactionOptions.ReadOnly.return_read_timestamp.
- # Corresponds to the JSON property `readTimestamp`
- # @return [String]
- attr_accessor :read_timestamp
-
- # `id` may be used to identify the transaction in subsequent
- # Read,
- # ExecuteSql,
- # Commit, or
- # Rollback calls.
- # Single-use read-only transactions do not have IDs, because
- # single-use transactions do not support multiple requests.
- # Corresponds to the JSON property `id`
- # NOTE: Values are automatically base64 encoded/decoded in the client library.
- # @return [String]
- attr_accessor :id
-
- def initialize(**args)
- update!(**args)
- end
-
- # Update properties of this object
- def update!(**args)
- @read_timestamp = args[:read_timestamp] if args.key?(:read_timestamp)
- @id = args[:id] if args.key?(:id)
- end
- end
-
- # Metadata type for the operation returned by
- # UpdateDatabaseDdl.
- class UpdateDatabaseDdlMetadata
- include Google::Apis::Core::Hashable
-
- # The database being modified.
- # Corresponds to the JSON property `database`
- # @return [String]
- attr_accessor :database
-
- # For an update this list contains all the statements. For an
- # individual statement, this list contains only that statement.
- # Corresponds to the JSON property `statements`
- # @return [Array<String>]
- attr_accessor :statements
-
- # Reports the commit timestamps of all statements that have
- # succeeded so far, where `commit_timestamps[i]` is the commit
- # timestamp for the statement `statements[i]`.
- # Corresponds to the JSON property `commitTimestamps`
- # @return [Array<String>]
- attr_accessor :commit_timestamps
-
- def initialize(**args)
- update!(**args)
- end
-
- # Update properties of this object
- def update!(**args)
- @database = args[:database] if args.key?(:database)
- @statements = args[:statements] if args.key?(:statements)
- @commit_timestamps = args[:commit_timestamps] if args.key?(:commit_timestamps)
- end
- end
-
- # Options for counters
- class CounterOptions
- include Google::Apis::Core::Hashable
-
- # The metric to update.
- # Corresponds to the JSON property `metric`
- # @return [String]
- attr_accessor :metric
-
- # The field value to attribute.
- # Corresponds to the JSON property `field`
- # @return [String]
- attr_accessor :field
-
- def initialize(**args)
- update!(**args)
- end
-
- # Update properties of this object
- def update!(**args)
- @metric = args[:metric] if args.key?(:metric)
- @field = args[:field] if args.key?(:field)
- end
- end
-
- # Contains an ordered list of nodes appearing in the query plan.
- class QueryPlan
- include Google::Apis::Core::Hashable
-
- # The nodes in the query plan. Plan nodes are returned in pre-order starting
- # with the plan root. Each PlanNode's `id` corresponds to its index in
- # `plan_nodes`.
- # Corresponds to the JSON property `planNodes`
- # @return [Array<Google::Apis::SpannerV1::PlanNode>]
- attr_accessor :plan_nodes
-
- def initialize(**args)
- update!(**args)
- end
-
- # Update properties of this object
- def update!(**args)
- @plan_nodes = args[:plan_nodes] if args.key?(:plan_nodes)
- end
- end
-
- # `StructType` defines the fields of a STRUCT type.
- class StructType
- include Google::Apis::Core::Hashable
-
- # The list of fields that make up this struct. Order is
- # significant, because values of this struct type are represented as
- # lists, where the order of field values matches the order of
- # fields in the StructType. In turn, the order of fields
- # matches the order of columns in a read request, or the order of
- # fields in the `SELECT` clause of a query.
- # Corresponds to the JSON property `fields`
- # @return [Array<Google::Apis::SpannerV1::Field>]
- attr_accessor :fields
-
- def initialize(**args)
- update!(**args)
- end
-
- # Update properties of this object
- def update!(**args)
- @fields = args[:fields] if args.key?(:fields)
- end
- end
-
- # Message representing a single field of a struct.
- class Field
- include Google::Apis::Core::Hashable
-
- # The name of the field. For reads, this is the column name. For
- # SQL queries, it is the column alias (e.g., `"Word"` in the
- # query `"SELECT 'hello' AS Word"`), or the column name (e.g.,
- # `"ColName"` in the query `"SELECT ColName FROM Table"`). Some
- # columns might have an empty name (e.g., !"SELECT
- # UPPER(ColName)"`). Note that a query result can contain
- # multiple fields with the same name.
- # Corresponds to the JSON property `name`
- # @return [String]
- attr_accessor :name
-
- # `Type` indicates the type of a Cloud Spanner value, as might be stored in a
- # table cell or returned from an SQL query.
- # Corresponds to the JSON property `type`
- # @return [Google::Apis::SpannerV1::Type]
- attr_accessor :type
-
- def initialize(**args)
- update!(**args)
- end
-
- # Update properties of this object
- def update!(**args)
- @name = args[:name] if args.key?(:name)
- @type = args[:type] if args.key?(:type)
- end
- end
-
- # Request message for `TestIamPermissions` method.
- class TestIamPermissionsRequest
- include Google::Apis::Core::Hashable
-
- # REQUIRED: The set of permissions to check for 'resource'.
- # Permissions with wildcards (such as '*', 'spanner.*', 'spanner.instances.*')
- # are not allowed.
- # Corresponds to the JSON property `permissions`
- # @return [Array<String>]
- attr_accessor :permissions
-
- def initialize(**args)
- update!(**args)
- end
-
- # Update properties of this object
- def update!(**args)
- @permissions = args[:permissions] if args.key?(:permissions)
- end
- end
-
- # Additional statistics about a ResultSet or PartialResultSet.
- class ResultSetStats
- include Google::Apis::Core::Hashable
-
- # Contains an ordered list of nodes appearing in the query plan.
- # Corresponds to the JSON property `queryPlan`
- # @return [Google::Apis::SpannerV1::QueryPlan]
- attr_accessor :query_plan
-
- # Aggregated statistics from the execution of the query. Only present when
- # the query is profiled. For example, a query could return the statistics as
- # follows:
- # `
- # "rows_returned": "3",
- # "elapsed_time": "1.22 secs",
- # "cpu_time": "1.19 secs"
- # `
- # Corresponds to the JSON property `queryStats`
- # @return [Hash<String,Object>]
- attr_accessor :query_stats
-
- def initialize(**args)
- update!(**args)
- end
-
- # Update properties of this object
- def update!(**args)
- @query_plan = args[:query_plan] if args.key?(:query_plan)
- @query_stats = args[:query_stats] if args.key?(:query_stats)
- end
- end
-
- # The response for Commit.
- class CommitResponse
- include Google::Apis::Core::Hashable
-
- # The Cloud Spanner timestamp at which the transaction committed.
- # Corresponds to the JSON property `commitTimestamp`
- # @return [String]
- attr_accessor :commit_timestamp
-
- def initialize(**args)
- update!(**args)
- end
-
- # Update properties of this object
- def update!(**args)
- @commit_timestamp = args[:commit_timestamp] if args.key?(:commit_timestamp)
- end
- end
-
- # `Type` indicates the type of a Cloud Spanner value, as might be stored in a
- # table cell or returned from an SQL query.
- class Type
- include Google::Apis::Core::Hashable
-
- # `StructType` defines the fields of a STRUCT type.
- # Corresponds to the JSON property `structType`
- # @return [Google::Apis::SpannerV1::StructType]
- attr_accessor :struct_type
-
- # `Type` indicates the type of a Cloud Spanner value, as might be stored in a
- # table cell or returned from an SQL query.
- # Corresponds to the JSON property `arrayElementType`
- # @return [Google::Apis::SpannerV1::Type]
- attr_accessor :array_element_type
-
- # Required. The TypeCode for this type.
- # Corresponds to the JSON property `code`
- # @return [String]
- attr_accessor :code
-
- def initialize(**args)
- update!(**args)
- end
-
- # Update properties of this object
- def update!(**args)
- @struct_type = args[:struct_type] if args.key?(:struct_type)
- @array_element_type = args[:array_element_type] if args.key?(:array_element_type)
- @code = args[:code] if args.key?(:code)
- end
- end
-
- # Node information for nodes appearing in a QueryPlan.plan_nodes.
- class PlanNode
- include Google::Apis::Core::Hashable
-
- # Attributes relevant to the node contained in a group of key-value pairs.
- # For example, a Parameter Reference node could have the following
- # information in its metadata:
- # `
- # "parameter_reference": "param1",
- # "parameter_type": "array"
- # `
- # Corresponds to the JSON property `metadata`
- # @return [Hash<String,Object>]
- attr_accessor :metadata
-
- # The execution statistics associated with the node, contained in a group of
- # key-value pairs. Only present if the plan was returned as a result of a
- # profile query. For example, number of executions, number of rows/time per
- # execution etc.
- # Corresponds to the JSON property `executionStats`
- # @return [Hash<String,Object>]
- attr_accessor :execution_stats
-
- # Condensed representation of a node and its subtree. Only present for
- # `SCALAR` PlanNode(s).
- # Corresponds to the JSON property `shortRepresentation`
- # @return [Google::Apis::SpannerV1::ShortRepresentation]
- attr_accessor :short_representation
-
- # The `PlanNode`'s index in node list.
- # Corresponds to the JSON property `index`
- # @return [Fixnum]
- attr_accessor :index
-
- # The display name for the node.
- # Corresponds to the JSON property `displayName`
- # @return [String]
- attr_accessor :display_name
-
- # Used to determine the type of node. May be needed for visualizing
- # different kinds of nodes differently. For example, If the node is a
- # SCALAR node, it will have a condensed representation
- # which can be used to directly embed a description of the node in its
- # parent.
- # Corresponds to the JSON property `kind`
- # @return [String]
- attr_accessor :kind
-
- # List of child node `index`es and their relationship to this parent.
- # Corresponds to the JSON property `childLinks`
- # @return [Array<Google::Apis::SpannerV1::ChildLink>]
- attr_accessor :child_links
-
- def initialize(**args)
- update!(**args)
- end
-
- # Update properties of this object
- def update!(**args)
- @metadata = args[:metadata] if args.key?(:metadata)
- @execution_stats = args[:execution_stats] if args.key?(:execution_stats)
- @short_representation = args[:short_representation] if args.key?(:short_representation)
- @index = args[:index] if args.key?(:index)
- @display_name = args[:display_name] if args.key?(:display_name)
- @kind = args[:kind] if args.key?(:kind)
- @child_links = args[:child_links] if args.key?(:child_links)
- end
- end
-
- # Specifies the audit configuration for a service.
- # It consists of which permission types are logged, and what identities, if
- # any, are exempted from logging.
- # An AuditConifg must have one or more AuditLogConfigs.
- class AuditConfig
- include Google::Apis::Core::Hashable
-
- # Specifies the identities that are exempted from "data access" audit
- # logging for the `service` specified above.
- # Follows the same format of Binding.members.
- # This field is deprecated in favor of per-permission-type exemptions.
- # Corresponds to the JSON property `exemptedMembers`
- # @return [Array<String>]
- attr_accessor :exempted_members
-
- # Specifies a service that will be enabled for audit logging.
- # For example, `resourcemanager`, `storage`, `compute`.
- # `allServices` is a special value that covers all services.
- # Corresponds to the JSON property `service`
- # @return [String]
- attr_accessor :service
-
- # The configuration for logging of each type of permission.
- # Next ID: 4
- # Corresponds to the JSON property `auditLogConfigs`
- # @return [Array<Google::Apis::SpannerV1::AuditLogConfig>]
- attr_accessor :audit_log_configs
-
- def initialize(**args)
- update!(**args)
- end
-
- # Update properties of this object
- def update!(**args)
- @exempted_members = args[:exempted_members] if args.key?(:exempted_members)
- @service = args[:service] if args.key?(:service)
- @audit_log_configs = args[:audit_log_configs] if args.key?(:audit_log_configs)
- end
- end
-
- # Metadata type for the operation returned by
- # CreateInstance.
- class CreateInstanceMetadata
- include Google::Apis::Core::Hashable
-
- # The time at which this operation was cancelled. If set, this operation is
- # in the process of undoing itself (which is guaranteed to succeed) and
- # cannot be cancelled again.
- # Corresponds to the JSON property `cancelTime`
- # @return [String]
- attr_accessor :cancel_time
-
- # The time at which this operation failed or was completed successfully.
- # Corresponds to the JSON property `endTime`
- # @return [String]
- attr_accessor :end_time
-
# An isolated set of Cloud Spanner resources on which databases can be hosted.
# Corresponds to the JSON property `instance`
# @return [Google::Apis::SpannerV1::Instance]
attr_accessor :instance
- # The time at which the
- # CreateInstance request was
- # received.
+ # The time at which UpdateInstance
+ # request was received.
# Corresponds to the JSON property `startTime`
# @return [String]
attr_accessor :start_time
def initialize(**args)
@@ -3203,91 +3263,31 @@
@instance = args[:instance] if args.key?(:instance)
@start_time = args[:start_time] if args.key?(:start_time)
end
end
- # Metadata associated with a parent-child relationship appearing in a
- # PlanNode.
- class ChildLink
+ # The response message for Operations.ListOperations.
+ class ListOperationsResponse
include Google::Apis::Core::Hashable
- # The node to which the link points.
- # Corresponds to the JSON property `childIndex`
- # @return [Fixnum]
- attr_accessor :child_index
-
- # Only present if the child node is SCALAR and corresponds
- # to an output variable of the parent node. The field carries the name of
- # the output variable.
- # For example, a `TableScan` operator that reads rows from a table will
- # have child links to the `SCALAR` nodes representing the output variables
- # created for each column that is read by the operator. The corresponding
- # `variable` fields will be set to the variable names assigned to the
- # columns.
- # Corresponds to the JSON property `variable`
+ # The standard List next-page token.
+ # Corresponds to the JSON property `nextPageToken`
# @return [String]
- attr_accessor :variable
+ attr_accessor :next_page_token
- # The type of the link. For example, in Hash Joins this could be used to
- # distinguish between the build child and the probe child, or in the case
- # of the child being an output variable, to represent the tag associated
- # with the output variable.
- # Corresponds to the JSON property `type`
- # @return [String]
- attr_accessor :type
+ # A list of operations that matches the specified filter in the request.
+ # Corresponds to the JSON property `operations`
+ # @return [Array<Google::Apis::SpannerV1::Operation>]
+ attr_accessor :operations
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
- @child_index = args[:child_index] if args.key?(:child_index)
- @variable = args[:variable] if args.key?(:variable)
- @type = args[:type] if args.key?(:type)
- end
- end
-
- # Write a Cloud Audit log
- class CloudAuditOptions
- include Google::Apis::Core::Hashable
-
- def initialize(**args)
- update!(**args)
- end
-
- # Update properties of this object
- def update!(**args)
- end
- end
-
- # Arguments to delete operations.
- class Delete
- include Google::Apis::Core::Hashable
-
- # Required. The table whose rows will be deleted.
- # Corresponds to the JSON property `table`
- # @return [String]
- attr_accessor :table
-
- # `KeySet` defines a collection of Cloud Spanner keys and/or key ranges. All
- # the keys are expected to be in the same table or index. The keys need
- # not be sorted in any particular way.
- # If the same key is specified multiple times in the set (for example
- # if two ranges, two keys, or a key and a range overlap), Cloud Spanner
- # behaves as if the key were only specified once.
- # Corresponds to the JSON property `keySet`
- # @return [Google::Apis::SpannerV1::KeySet]
- attr_accessor :key_set
-
- def initialize(**args)
- update!(**args)
- end
-
- # Update properties of this object
- def update!(**args)
- @table = args[:table] if args.key?(:table)
- @key_set = args[:key_set] if args.key?(:key_set)
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
+ @operations = args[:operations] if args.key?(:operations)
end
end
end
end
end