google-api-client 0.14.5 → 0.15.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +34 -0
- data/generated/google/apis/adexchangebuyer2_v2beta1.rb +1 -1
- data/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb +11 -0
- data/generated/google/apis/adexchangebuyer2_v2beta1/representations.rb +1 -0
- data/generated/google/apis/androidenterprise_v1.rb +1 -1
- data/generated/google/apis/androidenterprise_v1/classes.rb +63 -0
- data/generated/google/apis/androidenterprise_v1/representations.rb +18 -0
- data/generated/google/apis/bigquery_v2.rb +1 -1
- data/generated/google/apis/bigquery_v2/classes.rb +14 -0
- data/generated/google/apis/bigquery_v2/representations.rb +2 -0
- data/generated/google/apis/bigquerydatatransfer_v1.rb +1 -1
- data/generated/google/apis/bigquerydatatransfer_v1/classes.rb +28 -50
- data/generated/google/apis/classroom_v1.rb +1 -1
- data/generated/google/apis/cloudtasks_v2beta2.rb +1 -1
- data/generated/google/apis/cloudtasks_v2beta2/classes.rb +116 -111
- data/generated/google/apis/cloudtasks_v2beta2/representations.rb +17 -17
- data/generated/google/apis/cloudtasks_v2beta2/service.rb +8 -0
- data/generated/google/apis/cloudtrace_v2.rb +1 -1
- data/generated/google/apis/cloudtrace_v2/classes.rb +51 -58
- data/generated/google/apis/cloudtrace_v2/representations.rb +14 -15
- data/generated/google/apis/compute_alpha.rb +1 -1
- data/generated/google/apis/compute_alpha/classes.rb +157 -17
- data/generated/google/apis/compute_alpha/representations.rb +52 -0
- data/generated/google/apis/compute_alpha/service.rb +57 -0
- data/generated/google/apis/compute_beta.rb +1 -1
- data/generated/google/apis/compute_beta/classes.rb +46 -17
- data/generated/google/apis/compute_beta/representations.rb +2 -0
- data/generated/google/apis/compute_beta/service.rb +10 -1
- data/generated/google/apis/compute_v1.rb +1 -1
- data/generated/google/apis/compute_v1/classes.rb +4767 -337
- data/generated/google/apis/compute_v1/representations.rb +2044 -27
- data/generated/google/apis/compute_v1/service.rb +111 -0
- data/generated/google/apis/container_v1.rb +1 -1
- data/generated/google/apis/container_v1/classes.rb +1 -1
- data/generated/google/apis/container_v1beta1.rb +1 -1
- data/generated/google/apis/container_v1beta1/classes.rb +34 -1
- data/generated/google/apis/container_v1beta1/representations.rb +17 -0
- data/generated/google/apis/dataflow_v1b3.rb +1 -1
- data/generated/google/apis/dataflow_v1b3/classes.rb +0 -2
- data/generated/google/apis/dataproc_v1beta2.rb +1 -1
- data/generated/google/apis/dataproc_v1beta2/service.rb +5 -1
- data/generated/google/apis/{ml_v1beta1.rb → firestore_v1beta1.rb} +11 -8
- data/generated/google/apis/firestore_v1beta1/classes.rb +2115 -0
- data/generated/google/apis/firestore_v1beta1/representations.rb +899 -0
- data/generated/google/apis/firestore_v1beta1/service.rb +734 -0
- data/generated/google/apis/identitytoolkit_v3.rb +1 -1
- data/generated/google/apis/identitytoolkit_v3/classes.rb +93 -0
- data/generated/google/apis/identitytoolkit_v3/representations.rb +35 -0
- data/generated/google/apis/identitytoolkit_v3/service.rb +35 -0
- data/generated/google/apis/logging_v2.rb +1 -1
- data/generated/google/apis/logging_v2/classes.rb +4 -9
- data/generated/google/apis/logging_v2beta1.rb +1 -1
- data/generated/google/apis/logging_v2beta1/classes.rb +4 -9
- data/generated/google/apis/ml_v1.rb +1 -1
- data/generated/google/apis/ml_v1/service.rb +102 -0
- data/generated/google/apis/monitoring_v3.rb +1 -1
- data/generated/google/apis/monitoring_v3/classes.rb +4 -9
- data/generated/google/apis/proximitybeacon_v1beta1.rb +1 -1
- data/generated/google/apis/proximitybeacon_v1beta1/classes.rb +17 -0
- data/generated/google/apis/proximitybeacon_v1beta1/representations.rb +1 -0
- data/generated/google/apis/servicecontrol_v1.rb +1 -1
- data/generated/google/apis/servicecontrol_v1/classes.rb +5 -11
- data/generated/google/apis/servicecontrol_v1/representations.rb +1 -1
- data/generated/google/apis/servicemanagement_v1.rb +1 -1
- data/generated/google/apis/serviceuser_v1.rb +1 -1
- data/generated/google/apis/sheets_v4.rb +1 -1
- data/generated/google/apis/sheets_v4/classes.rb +81 -26
- data/generated/google/apis/sheets_v4/representations.rb +23 -0
- data/generated/google/apis/sheets_v4/service.rb +5 -5
- data/generated/google/apis/streetviewpublish_v1.rb +1 -1
- data/generated/google/apis/streetviewpublish_v1/classes.rb +97 -0
- data/generated/google/apis/streetviewpublish_v1/representations.rb +18 -0
- data/generated/google/apis/toolresults_v1beta3.rb +1 -1
- data/generated/google/apis/toolresults_v1beta3/classes.rb +121 -0
- data/generated/google/apis/toolresults_v1beta3/representations.rb +41 -0
- data/generated/google/apis/vision_v1.rb +1 -1
- data/generated/google/apis/vision_v1/classes.rb +4 -2
- data/generated/google/apis/youtube_partner_v1.rb +1 -1
- data/lib/google/apis/version.rb +1 -1
- metadata +6 -6
- data/generated/google/apis/ml_v1beta1/classes.rb +0 -2396
- data/generated/google/apis/ml_v1beta1/representations.rb +0 -755
- data/generated/google/apis/ml_v1beta1/service.rb +0 -975
@@ -7627,6 +7627,64 @@ module Google
|
|
7627
7627
|
execute_or_queue_command(command, &block)
|
7628
7628
|
end
|
7629
7629
|
|
7630
|
+
# Changes the minimum CPU platform that this instance should use. This method
|
7631
|
+
# can only be called on a stopped instance. For more information, read
|
7632
|
+
# Specifying a Minimum CPU Platform.
|
7633
|
+
# @param [String] project
|
7634
|
+
# Project ID for this request.
|
7635
|
+
# @param [String] zone
|
7636
|
+
# The name of the zone for this request.
|
7637
|
+
# @param [String] instance
|
7638
|
+
# Name of the instance scoping this request.
|
7639
|
+
# @param [Google::Apis::ComputeV1::InstancesSetMinCpuPlatformRequest] instances_set_min_cpu_platform_request_object
|
7640
|
+
# @param [String] request_id
|
7641
|
+
# An optional request ID to identify requests. Specify a unique request ID so
|
7642
|
+
# that if you must retry your request, the server will know to ignore the
|
7643
|
+
# request if it has already been completed.
|
7644
|
+
# For example, consider a situation where you make an initial request and the
|
7645
|
+
# request times out. If you make the request again with the same request ID, the
|
7646
|
+
# server can check if original operation with the same request ID was received,
|
7647
|
+
# and if so, will ignore the second request. This prevents clients from
|
7648
|
+
# accidentally creating duplicate commitments.
|
7649
|
+
# The request ID must be a valid UUID with the exception that zero UUID is not
|
7650
|
+
# supported (00000000-0000-0000-0000-000000000000).
|
7651
|
+
# @param [String] fields
|
7652
|
+
# Selector specifying which fields to include in a partial response.
|
7653
|
+
# @param [String] quota_user
|
7654
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
7655
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
7656
|
+
# Overrides userIp if both are provided.
|
7657
|
+
# @param [String] user_ip
|
7658
|
+
# IP address of the site where the request originates. Use this if you want to
|
7659
|
+
# enforce per-user limits.
|
7660
|
+
# @param [Google::Apis::RequestOptions] options
|
7661
|
+
# Request-specific options
|
7662
|
+
#
|
7663
|
+
# @yield [result, err] Result & error if block supplied
|
7664
|
+
# @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object
|
7665
|
+
# @yieldparam err [StandardError] error object if request failed
|
7666
|
+
#
|
7667
|
+
# @return [Google::Apis::ComputeV1::Operation]
|
7668
|
+
#
|
7669
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
7670
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
7671
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
7672
|
+
def set_instance_min_cpu_platform(project, zone, instance, instances_set_min_cpu_platform_request_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
7673
|
+
command = make_simple_command(:post, '{project}/zones/{zone}/instances/{instance}/setMinCpuPlatform', options)
|
7674
|
+
command.request_representation = Google::Apis::ComputeV1::InstancesSetMinCpuPlatformRequest::Representation
|
7675
|
+
command.request_object = instances_set_min_cpu_platform_request_object
|
7676
|
+
command.response_representation = Google::Apis::ComputeV1::Operation::Representation
|
7677
|
+
command.response_class = Google::Apis::ComputeV1::Operation
|
7678
|
+
command.params['project'] = project unless project.nil?
|
7679
|
+
command.params['zone'] = zone unless zone.nil?
|
7680
|
+
command.params['instance'] = instance unless instance.nil?
|
7681
|
+
command.query['requestId'] = request_id unless request_id.nil?
|
7682
|
+
command.query['fields'] = fields unless fields.nil?
|
7683
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
7684
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
7685
|
+
execute_or_queue_command(command, &block)
|
7686
|
+
end
|
7687
|
+
|
7630
7688
|
# Sets an instance's scheduling options.
|
7631
7689
|
# @param [String] project
|
7632
7690
|
# Project ID for this request.
|
@@ -8469,6 +8527,59 @@ module Google
|
|
8469
8527
|
execute_or_queue_command(command, &block)
|
8470
8528
|
end
|
8471
8529
|
|
8530
|
+
# Patches the specified network with the data included in the request.
|
8531
|
+
# @param [String] project
|
8532
|
+
# Project ID for this request.
|
8533
|
+
# @param [String] network
|
8534
|
+
# Name of the network to update.
|
8535
|
+
# @param [Google::Apis::ComputeV1::Network] network_object
|
8536
|
+
# @param [String] request_id
|
8537
|
+
# An optional request ID to identify requests. Specify a unique request ID so
|
8538
|
+
# that if you must retry your request, the server will know to ignore the
|
8539
|
+
# request if it has already been completed.
|
8540
|
+
# For example, consider a situation where you make an initial request and the
|
8541
|
+
# request times out. If you make the request again with the same request ID, the
|
8542
|
+
# server can check if original operation with the same request ID was received,
|
8543
|
+
# and if so, will ignore the second request. This prevents clients from
|
8544
|
+
# accidentally creating duplicate commitments.
|
8545
|
+
# The request ID must be a valid UUID with the exception that zero UUID is not
|
8546
|
+
# supported (00000000-0000-0000-0000-000000000000).
|
8547
|
+
# @param [String] fields
|
8548
|
+
# Selector specifying which fields to include in a partial response.
|
8549
|
+
# @param [String] quota_user
|
8550
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
8551
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
8552
|
+
# Overrides userIp if both are provided.
|
8553
|
+
# @param [String] user_ip
|
8554
|
+
# IP address of the site where the request originates. Use this if you want to
|
8555
|
+
# enforce per-user limits.
|
8556
|
+
# @param [Google::Apis::RequestOptions] options
|
8557
|
+
# Request-specific options
|
8558
|
+
#
|
8559
|
+
# @yield [result, err] Result & error if block supplied
|
8560
|
+
# @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object
|
8561
|
+
# @yieldparam err [StandardError] error object if request failed
|
8562
|
+
#
|
8563
|
+
# @return [Google::Apis::ComputeV1::Operation]
|
8564
|
+
#
|
8565
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
8566
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
8567
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
8568
|
+
def patch_network(project, network, network_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
8569
|
+
command = make_simple_command(:patch, '{project}/global/networks/{network}', options)
|
8570
|
+
command.request_representation = Google::Apis::ComputeV1::Network::Representation
|
8571
|
+
command.request_object = network_object
|
8572
|
+
command.response_representation = Google::Apis::ComputeV1::Operation::Representation
|
8573
|
+
command.response_class = Google::Apis::ComputeV1::Operation
|
8574
|
+
command.params['project'] = project unless project.nil?
|
8575
|
+
command.params['network'] = network unless network.nil?
|
8576
|
+
command.query['requestId'] = request_id unless request_id.nil?
|
8577
|
+
command.query['fields'] = fields unless fields.nil?
|
8578
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
8579
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
8580
|
+
execute_or_queue_command(command, &block)
|
8581
|
+
end
|
8582
|
+
|
8472
8583
|
# Removes a peering from the specified network.
|
8473
8584
|
# @param [String] project
|
8474
8585
|
# Project ID for this request.
|
@@ -26,7 +26,7 @@ module Google
|
|
26
26
|
# @see https://cloud.google.com/container-engine/
|
27
27
|
module ContainerV1
|
28
28
|
VERSION = 'V1'
|
29
|
-
REVISION = '
|
29
|
+
REVISION = '20170922'
|
30
30
|
|
31
31
|
# View and manage your data across Google Cloud Platform services
|
32
32
|
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
@@ -1705,7 +1705,7 @@ module Google
|
|
1705
1705
|
class SetMasterAuthRequest
|
1706
1706
|
include Google::Apis::Core::Hashable
|
1707
1707
|
|
1708
|
-
# The exact form of action to be taken on the master auth
|
1708
|
+
# The exact form of action to be taken on the master auth.
|
1709
1709
|
# Corresponds to the JSON property `action`
|
1710
1710
|
# @return [String]
|
1711
1711
|
attr_accessor :action
|
@@ -26,7 +26,7 @@ module Google
|
|
26
26
|
# @see https://cloud.google.com/container-engine/
|
27
27
|
module ContainerV1beta1
|
28
28
|
VERSION = 'V1beta1'
|
29
|
-
REVISION = '
|
29
|
+
REVISION = '20170922'
|
30
30
|
|
31
31
|
# View and manage your data across Google Cloud Platform services
|
32
32
|
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
@@ -407,6 +407,11 @@ module Google
|
|
407
407
|
# @return [Array<Google::Apis::ContainerV1beta1::NodePool>]
|
408
408
|
attr_accessor :node_pools
|
409
409
|
|
410
|
+
# Configuration for the PodSecurityPolicy feature.
|
411
|
+
# Corresponds to the JSON property `podSecurityPolicyConfig`
|
412
|
+
# @return [Google::Apis::ContainerV1beta1::PodSecurityPolicyConfig]
|
413
|
+
attr_accessor :pod_security_policy_config
|
414
|
+
|
410
415
|
# [Output only] Server-defined URL for the resource.
|
411
416
|
# Corresponds to the JSON property `selfLink`
|
412
417
|
# @return [String]
|
@@ -480,6 +485,7 @@ module Google
|
|
480
485
|
@node_config = args[:node_config] if args.key?(:node_config)
|
481
486
|
@node_ipv4_cidr_size = args[:node_ipv4_cidr_size] if args.key?(:node_ipv4_cidr_size)
|
482
487
|
@node_pools = args[:node_pools] if args.key?(:node_pools)
|
488
|
+
@pod_security_policy_config = args[:pod_security_policy_config] if args.key?(:pod_security_policy_config)
|
483
489
|
@self_link = args[:self_link] if args.key?(:self_link)
|
484
490
|
@services_ipv4_cidr = args[:services_ipv4_cidr] if args.key?(:services_ipv4_cidr)
|
485
491
|
@status = args[:status] if args.key?(:status)
|
@@ -561,6 +567,11 @@ module Google
|
|
561
567
|
# @return [String]
|
562
568
|
attr_accessor :desired_node_version
|
563
569
|
|
570
|
+
# Configuration for the PodSecurityPolicy feature.
|
571
|
+
# Corresponds to the JSON property `desiredPodSecurityPolicyConfig`
|
572
|
+
# @return [Google::Apis::ContainerV1beta1::PodSecurityPolicyConfig]
|
573
|
+
attr_accessor :desired_pod_security_policy_config
|
574
|
+
|
564
575
|
def initialize(**args)
|
565
576
|
update!(**args)
|
566
577
|
end
|
@@ -576,6 +587,7 @@ module Google
|
|
576
587
|
@desired_node_pool_autoscaling = args[:desired_node_pool_autoscaling] if args.key?(:desired_node_pool_autoscaling)
|
577
588
|
@desired_node_pool_id = args[:desired_node_pool_id] if args.key?(:desired_node_pool_id)
|
578
589
|
@desired_node_version = args[:desired_node_version] if args.key?(:desired_node_version)
|
590
|
+
@desired_pod_security_policy_config = args[:desired_pod_security_policy_config] if args.key?(:desired_pod_security_policy_config)
|
579
591
|
end
|
580
592
|
end
|
581
593
|
|
@@ -1629,6 +1641,27 @@ module Google
|
|
1629
1641
|
end
|
1630
1642
|
end
|
1631
1643
|
|
1644
|
+
# Configuration for the PodSecurityPolicy feature.
|
1645
|
+
class PodSecurityPolicyConfig
|
1646
|
+
include Google::Apis::Core::Hashable
|
1647
|
+
|
1648
|
+
# Enable the PodSecurityPolicy controller for this cluster. If enabled, pods
|
1649
|
+
# must be valid under a PodSecurityPolicy to be created.
|
1650
|
+
# Corresponds to the JSON property `enabled`
|
1651
|
+
# @return [Boolean]
|
1652
|
+
attr_accessor :enabled
|
1653
|
+
alias_method :enabled?, :enabled
|
1654
|
+
|
1655
|
+
def initialize(**args)
|
1656
|
+
update!(**args)
|
1657
|
+
end
|
1658
|
+
|
1659
|
+
# Update properties of this object
|
1660
|
+
def update!(**args)
|
1661
|
+
@enabled = args[:enabled] if args.key?(:enabled)
|
1662
|
+
end
|
1663
|
+
end
|
1664
|
+
|
1632
1665
|
# RollbackNodePoolUpgradeRequest rollbacks the previously Aborted or Failed
|
1633
1666
|
# NodePool upgrade. This will be an no-op if the last upgrade successfully
|
1634
1667
|
# completed.
|
@@ -1893,7 +1926,7 @@ module Google
|
|
1893
1926
|
class SetMasterAuthRequest
|
1894
1927
|
include Google::Apis::Core::Hashable
|
1895
1928
|
|
1896
|
-
# The exact form of action to be taken on the master auth
|
1929
|
+
# The exact form of action to be taken on the master auth.
|
1897
1930
|
# Corresponds to the JSON property `action`
|
1898
1931
|
# @return [String]
|
1899
1932
|
attr_accessor :action
|
@@ -214,6 +214,12 @@ module Google
|
|
214
214
|
include Google::Apis::Core::JsonObjectSupport
|
215
215
|
end
|
216
216
|
|
217
|
+
class PodSecurityPolicyConfig
|
218
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
219
|
+
|
220
|
+
include Google::Apis::Core::JsonObjectSupport
|
221
|
+
end
|
222
|
+
|
217
223
|
class RollbackNodePoolUpgradeRequest
|
218
224
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
219
225
|
|
@@ -367,6 +373,8 @@ module Google
|
|
367
373
|
property :node_ipv4_cidr_size, as: 'nodeIpv4CidrSize'
|
368
374
|
collection :node_pools, as: 'nodePools', class: Google::Apis::ContainerV1beta1::NodePool, decorator: Google::Apis::ContainerV1beta1::NodePool::Representation
|
369
375
|
|
376
|
+
property :pod_security_policy_config, as: 'podSecurityPolicyConfig', class: Google::Apis::ContainerV1beta1::PodSecurityPolicyConfig, decorator: Google::Apis::ContainerV1beta1::PodSecurityPolicyConfig::Representation
|
377
|
+
|
370
378
|
property :self_link, as: 'selfLink'
|
371
379
|
property :services_ipv4_cidr, as: 'servicesIpv4Cidr'
|
372
380
|
property :status, as: 'status'
|
@@ -391,6 +399,8 @@ module Google
|
|
391
399
|
|
392
400
|
property :desired_node_pool_id, as: 'desiredNodePoolId'
|
393
401
|
property :desired_node_version, as: 'desiredNodeVersion'
|
402
|
+
property :desired_pod_security_policy_config, as: 'desiredPodSecurityPolicyConfig', class: Google::Apis::ContainerV1beta1::PodSecurityPolicyConfig, decorator: Google::Apis::ContainerV1beta1::PodSecurityPolicyConfig::Representation
|
403
|
+
|
394
404
|
end
|
395
405
|
end
|
396
406
|
|
@@ -643,6 +653,13 @@ module Google
|
|
643
653
|
end
|
644
654
|
end
|
645
655
|
|
656
|
+
class PodSecurityPolicyConfig
|
657
|
+
# @private
|
658
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
659
|
+
property :enabled, as: 'enabled'
|
660
|
+
end
|
661
|
+
end
|
662
|
+
|
646
663
|
class RollbackNodePoolUpgradeRequest
|
647
664
|
# @private
|
648
665
|
class Representation < Google::Apis::Core::JsonRepresentation
|
@@ -25,7 +25,7 @@ module Google
|
|
25
25
|
# @see https://cloud.google.com/dataflow
|
26
26
|
module DataflowV1b3
|
27
27
|
VERSION = 'V1b3'
|
28
|
-
REVISION = '
|
28
|
+
REVISION = '20170930'
|
29
29
|
|
30
30
|
# View and manage your data across Google Cloud Platform services
|
31
31
|
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
@@ -5210,8 +5210,6 @@ module Google
|
|
5210
5210
|
# "UNKNOWN": shutdown reason is unknown.
|
5211
5211
|
# "PREEMPTION": shutdown reason is preemption.
|
5212
5212
|
# Other possible reasons may be added in the future.
|
5213
|
-
# Note that this must match the names of the enum specified in
|
5214
|
-
# google3/cloud/dataflow/router/protos/cloud_worker_messages_service.proto.
|
5215
5213
|
# Corresponds to the JSON property `reason`
|
5216
5214
|
# @return [String]
|
5217
5215
|
attr_accessor :reason
|
@@ -25,7 +25,7 @@ module Google
|
|
25
25
|
# @see https://cloud.google.com/dataproc/
|
26
26
|
module DataprocV1beta2
|
27
27
|
VERSION = 'V1beta2'
|
28
|
-
REVISION = '
|
28
|
+
REVISION = '20171003'
|
29
29
|
|
30
30
|
# View and manage your data across Google Cloud Platform services
|
31
31
|
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
@@ -318,6 +318,9 @@ module Google
|
|
318
318
|
# Required. The Cloud Dataproc region in which to handle the request.
|
319
319
|
# @param [String] cluster_name
|
320
320
|
# Required. The cluster name.
|
321
|
+
# @param [String] cluster_uuid
|
322
|
+
# Optional. Specifying the cluster_uuid means the RPC should fail (with error
|
323
|
+
# NOT_FOUND) if cluster with specified UUID does not exist.
|
321
324
|
# @param [String] fields
|
322
325
|
# Selector specifying which fields to include in a partial response.
|
323
326
|
# @param [String] quota_user
|
@@ -335,13 +338,14 @@ module Google
|
|
335
338
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
336
339
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
337
340
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
338
|
-
def delete_project_region_cluster(project_id, region, cluster_name, fields: nil, quota_user: nil, options: nil, &block)
|
341
|
+
def delete_project_region_cluster(project_id, region, cluster_name, cluster_uuid: nil, fields: nil, quota_user: nil, options: nil, &block)
|
339
342
|
command = make_simple_command(:delete, 'v1beta2/projects/{projectId}/regions/{region}/clusters/{clusterName}', options)
|
340
343
|
command.response_representation = Google::Apis::DataprocV1beta2::Operation::Representation
|
341
344
|
command.response_class = Google::Apis::DataprocV1beta2::Operation
|
342
345
|
command.params['projectId'] = project_id unless project_id.nil?
|
343
346
|
command.params['region'] = region unless region.nil?
|
344
347
|
command.params['clusterName'] = cluster_name unless cluster_name.nil?
|
348
|
+
command.query['clusterUuid'] = cluster_uuid unless cluster_uuid.nil?
|
345
349
|
command.query['fields'] = fields unless fields.nil?
|
346
350
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
347
351
|
execute_or_queue_command(command, &block)
|
@@ -12,23 +12,26 @@
|
|
12
12
|
# See the License for the specific language governing permissions and
|
13
13
|
# limitations under the License.
|
14
14
|
|
15
|
-
require 'google/apis/
|
16
|
-
require 'google/apis/
|
17
|
-
require 'google/apis/
|
15
|
+
require 'google/apis/firestore_v1beta1/service.rb'
|
16
|
+
require 'google/apis/firestore_v1beta1/classes.rb'
|
17
|
+
require 'google/apis/firestore_v1beta1/representations.rb'
|
18
18
|
|
19
19
|
module Google
|
20
20
|
module Apis
|
21
|
-
# Google Cloud
|
21
|
+
# Google Cloud Firestore API
|
22
22
|
#
|
23
|
-
#
|
23
|
+
#
|
24
24
|
#
|
25
|
-
# @see https://cloud.google.com/
|
26
|
-
module
|
25
|
+
# @see https://cloud.google.com/firestore
|
26
|
+
module FirestoreV1beta1
|
27
27
|
VERSION = 'V1beta1'
|
28
|
-
REVISION = '
|
28
|
+
REVISION = '0'
|
29
29
|
|
30
30
|
# View and manage your data across Google Cloud Platform services
|
31
31
|
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
32
|
+
|
33
|
+
# View and manage your Google Cloud Datastore data
|
34
|
+
AUTH_DATASTORE = 'https://www.googleapis.com/auth/datastore'
|
32
35
|
end
|
33
36
|
end
|
34
37
|
end
|
@@ -0,0 +1,2115 @@
|
|
1
|
+
# Copyright 2015 Google Inc.
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
require 'date'
|
16
|
+
require 'google/apis/core/base_service'
|
17
|
+
require 'google/apis/core/json_representation'
|
18
|
+
require 'google/apis/core/hashable'
|
19
|
+
require 'google/apis/errors'
|
20
|
+
|
21
|
+
module Google
|
22
|
+
module Apis
|
23
|
+
module FirestoreV1beta1
|
24
|
+
|
25
|
+
# An array value.
|
26
|
+
class ArrayValue
|
27
|
+
include Google::Apis::Core::Hashable
|
28
|
+
|
29
|
+
# Values in the array.
|
30
|
+
# Corresponds to the JSON property `values`
|
31
|
+
# @return [Array<Google::Apis::FirestoreV1beta1::Value>]
|
32
|
+
attr_accessor :values
|
33
|
+
|
34
|
+
def initialize(**args)
|
35
|
+
update!(**args)
|
36
|
+
end
|
37
|
+
|
38
|
+
# Update properties of this object
|
39
|
+
def update!(**args)
|
40
|
+
@values = args[:values] if args.key?(:values)
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
# The request for Firestore.BatchGetDocuments.
|
45
|
+
class BatchGetDocumentsRequest
|
46
|
+
include Google::Apis::Core::Hashable
|
47
|
+
|
48
|
+
# The names of the documents to retrieve. In the format:
|
49
|
+
# `projects/`project_id`/databases/`database_id`/documents/`document_path``.
|
50
|
+
# The request will fail if any of the document is not a child resource of the
|
51
|
+
# given `database`. Duplicate names will be elided.
|
52
|
+
# Corresponds to the JSON property `documents`
|
53
|
+
# @return [Array<String>]
|
54
|
+
attr_accessor :documents
|
55
|
+
|
56
|
+
# A set of field paths on a document.
|
57
|
+
# Used to restrict a get or update operation on a document to a subset of its
|
58
|
+
# fields.
|
59
|
+
# This is different from standard field masks, as this is always scoped to a
|
60
|
+
# Document, and takes in account the dynamic nature of Value.
|
61
|
+
# Corresponds to the JSON property `mask`
|
62
|
+
# @return [Google::Apis::FirestoreV1beta1::DocumentMask]
|
63
|
+
attr_accessor :mask
|
64
|
+
|
65
|
+
# Options for creating a new transaction.
|
66
|
+
# Corresponds to the JSON property `newTransaction`
|
67
|
+
# @return [Google::Apis::FirestoreV1beta1::TransactionOptions]
|
68
|
+
attr_accessor :new_transaction
|
69
|
+
|
70
|
+
# Reads documents as they were at the given time.
|
71
|
+
# This may not be older than 60 seconds.
|
72
|
+
# Corresponds to the JSON property `readTime`
|
73
|
+
# @return [String]
|
74
|
+
attr_accessor :read_time
|
75
|
+
|
76
|
+
# Reads documents in a transaction.
|
77
|
+
# Corresponds to the JSON property `transaction`
|
78
|
+
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
79
|
+
# @return [String]
|
80
|
+
attr_accessor :transaction
|
81
|
+
|
82
|
+
def initialize(**args)
|
83
|
+
update!(**args)
|
84
|
+
end
|
85
|
+
|
86
|
+
# Update properties of this object
|
87
|
+
def update!(**args)
|
88
|
+
@documents = args[:documents] if args.key?(:documents)
|
89
|
+
@mask = args[:mask] if args.key?(:mask)
|
90
|
+
@new_transaction = args[:new_transaction] if args.key?(:new_transaction)
|
91
|
+
@read_time = args[:read_time] if args.key?(:read_time)
|
92
|
+
@transaction = args[:transaction] if args.key?(:transaction)
|
93
|
+
end
|
94
|
+
end
|
95
|
+
|
96
|
+
# The streamed response for Firestore.BatchGetDocuments.
|
97
|
+
class BatchGetDocumentsResponse
|
98
|
+
include Google::Apis::Core::Hashable
|
99
|
+
|
100
|
+
# A Firestore document.
|
101
|
+
# Must not exceed 1 MiB - 4 bytes.
|
102
|
+
# Corresponds to the JSON property `found`
|
103
|
+
# @return [Google::Apis::FirestoreV1beta1::Document]
|
104
|
+
attr_accessor :found
|
105
|
+
|
106
|
+
# A document name that was requested but does not exist. In the format:
|
107
|
+
# `projects/`project_id`/databases/`database_id`/documents/`document_path``.
|
108
|
+
# Corresponds to the JSON property `missing`
|
109
|
+
# @return [String]
|
110
|
+
attr_accessor :missing
|
111
|
+
|
112
|
+
# The time at which the document was read.
|
113
|
+
# This may be monotically increasing, in this case the previous documents in
|
114
|
+
# the result stream are guaranteed not to have changed between their
|
115
|
+
# read_time and this one.
|
116
|
+
# Corresponds to the JSON property `readTime`
|
117
|
+
# @return [String]
|
118
|
+
attr_accessor :read_time
|
119
|
+
|
120
|
+
# The transaction that was started as part of this request.
|
121
|
+
# Will only be set in the first response, and only if
|
122
|
+
# BatchGetDocumentsRequest.new_transaction was set in the request.
|
123
|
+
# Corresponds to the JSON property `transaction`
|
124
|
+
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
125
|
+
# @return [String]
|
126
|
+
attr_accessor :transaction
|
127
|
+
|
128
|
+
def initialize(**args)
|
129
|
+
update!(**args)
|
130
|
+
end
|
131
|
+
|
132
|
+
# Update properties of this object
|
133
|
+
def update!(**args)
|
134
|
+
@found = args[:found] if args.key?(:found)
|
135
|
+
@missing = args[:missing] if args.key?(:missing)
|
136
|
+
@read_time = args[:read_time] if args.key?(:read_time)
|
137
|
+
@transaction = args[:transaction] if args.key?(:transaction)
|
138
|
+
end
|
139
|
+
end
|
140
|
+
|
141
|
+
# The request for Firestore.BeginTransaction.
|
142
|
+
class BeginTransactionRequest
|
143
|
+
include Google::Apis::Core::Hashable
|
144
|
+
|
145
|
+
# Options for creating a new transaction.
|
146
|
+
# Corresponds to the JSON property `options`
|
147
|
+
# @return [Google::Apis::FirestoreV1beta1::TransactionOptions]
|
148
|
+
attr_accessor :options
|
149
|
+
|
150
|
+
def initialize(**args)
|
151
|
+
update!(**args)
|
152
|
+
end
|
153
|
+
|
154
|
+
# Update properties of this object
|
155
|
+
def update!(**args)
|
156
|
+
@options = args[:options] if args.key?(:options)
|
157
|
+
end
|
158
|
+
end
|
159
|
+
|
160
|
+
# The response for Firestore.BeginTransaction.
|
161
|
+
class BeginTransactionResponse
|
162
|
+
include Google::Apis::Core::Hashable
|
163
|
+
|
164
|
+
# The transaction that was started.
|
165
|
+
# Corresponds to the JSON property `transaction`
|
166
|
+
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
167
|
+
# @return [String]
|
168
|
+
attr_accessor :transaction
|
169
|
+
|
170
|
+
def initialize(**args)
|
171
|
+
update!(**args)
|
172
|
+
end
|
173
|
+
|
174
|
+
# Update properties of this object
|
175
|
+
def update!(**args)
|
176
|
+
@transaction = args[:transaction] if args.key?(:transaction)
|
177
|
+
end
|
178
|
+
end
|
179
|
+
|
180
|
+
# A selection of a collection, such as `messages as m1`.
|
181
|
+
class CollectionSelector
|
182
|
+
include Google::Apis::Core::Hashable
|
183
|
+
|
184
|
+
# When false, selects only collections that are immediate children of
|
185
|
+
# the `parent` specified in the containing `RunQueryRequest`.
|
186
|
+
# When true, selects all descendant collections.
|
187
|
+
# Corresponds to the JSON property `allDescendants`
|
188
|
+
# @return [Boolean]
|
189
|
+
attr_accessor :all_descendants
|
190
|
+
alias_method :all_descendants?, :all_descendants
|
191
|
+
|
192
|
+
# The collection ID.
|
193
|
+
# When set, selects only collections with this ID.
|
194
|
+
# Corresponds to the JSON property `collectionId`
|
195
|
+
# @return [String]
|
196
|
+
attr_accessor :collection_id
|
197
|
+
|
198
|
+
def initialize(**args)
|
199
|
+
update!(**args)
|
200
|
+
end
|
201
|
+
|
202
|
+
# Update properties of this object
|
203
|
+
def update!(**args)
|
204
|
+
@all_descendants = args[:all_descendants] if args.key?(:all_descendants)
|
205
|
+
@collection_id = args[:collection_id] if args.key?(:collection_id)
|
206
|
+
end
|
207
|
+
end
|
208
|
+
|
209
|
+
# The request for Firestore.Commit.
|
210
|
+
class CommitRequest
|
211
|
+
include Google::Apis::Core::Hashable
|
212
|
+
|
213
|
+
# If non-empty, applies all writes in this transaction, and commits it.
|
214
|
+
# Otherwise, applies the writes as if they were in their own transaction.
|
215
|
+
# Corresponds to the JSON property `transaction`
|
216
|
+
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
217
|
+
# @return [String]
|
218
|
+
attr_accessor :transaction
|
219
|
+
|
220
|
+
# The writes to apply.
|
221
|
+
# Always executed atomically and in order.
|
222
|
+
# Corresponds to the JSON property `writes`
|
223
|
+
# @return [Array<Google::Apis::FirestoreV1beta1::Write>]
|
224
|
+
attr_accessor :writes
|
225
|
+
|
226
|
+
def initialize(**args)
|
227
|
+
update!(**args)
|
228
|
+
end
|
229
|
+
|
230
|
+
# Update properties of this object
|
231
|
+
def update!(**args)
|
232
|
+
@transaction = args[:transaction] if args.key?(:transaction)
|
233
|
+
@writes = args[:writes] if args.key?(:writes)
|
234
|
+
end
|
235
|
+
end
|
236
|
+
|
237
|
+
# The response for Firestore.Commit.
|
238
|
+
class CommitResponse
|
239
|
+
include Google::Apis::Core::Hashable
|
240
|
+
|
241
|
+
# The time at which the commit occurred.
|
242
|
+
# Corresponds to the JSON property `commitTime`
|
243
|
+
# @return [String]
|
244
|
+
attr_accessor :commit_time
|
245
|
+
|
246
|
+
# The result of applying the writes.
|
247
|
+
# This i-th write result corresponds to the i-th write in the
|
248
|
+
# request.
|
249
|
+
# Corresponds to the JSON property `writeResults`
|
250
|
+
# @return [Array<Google::Apis::FirestoreV1beta1::WriteResult>]
|
251
|
+
attr_accessor :write_results
|
252
|
+
|
253
|
+
def initialize(**args)
|
254
|
+
update!(**args)
|
255
|
+
end
|
256
|
+
|
257
|
+
# Update properties of this object
|
258
|
+
def update!(**args)
|
259
|
+
@commit_time = args[:commit_time] if args.key?(:commit_time)
|
260
|
+
@write_results = args[:write_results] if args.key?(:write_results)
|
261
|
+
end
|
262
|
+
end
|
263
|
+
|
264
|
+
# A filter that merges multiple other filters using the given operator.
|
265
|
+
class CompositeFilter
|
266
|
+
include Google::Apis::Core::Hashable
|
267
|
+
|
268
|
+
# The list of filters to combine.
|
269
|
+
# Must contain at least one filter.
|
270
|
+
# Corresponds to the JSON property `filters`
|
271
|
+
# @return [Array<Google::Apis::FirestoreV1beta1::Filter>]
|
272
|
+
attr_accessor :filters
|
273
|
+
|
274
|
+
# The operator for combining multiple filters.
|
275
|
+
# Corresponds to the JSON property `op`
|
276
|
+
# @return [String]
|
277
|
+
attr_accessor :op
|
278
|
+
|
279
|
+
def initialize(**args)
|
280
|
+
update!(**args)
|
281
|
+
end
|
282
|
+
|
283
|
+
# Update properties of this object
|
284
|
+
def update!(**args)
|
285
|
+
@filters = args[:filters] if args.key?(:filters)
|
286
|
+
@op = args[:op] if args.key?(:op)
|
287
|
+
end
|
288
|
+
end
|
289
|
+
|
290
|
+
# A position in a query result set.
|
291
|
+
class Cursor
|
292
|
+
include Google::Apis::Core::Hashable
|
293
|
+
|
294
|
+
# If the position is just before or just after the given values, relative
|
295
|
+
# to the sort order defined by the query.
|
296
|
+
# Corresponds to the JSON property `before`
|
297
|
+
# @return [Boolean]
|
298
|
+
attr_accessor :before
|
299
|
+
alias_method :before?, :before
|
300
|
+
|
301
|
+
# The values that represent a position, in the order they appear in
|
302
|
+
# the order by clause of a query.
|
303
|
+
# Can contain fewer values than specified in the order by clause.
|
304
|
+
# Corresponds to the JSON property `values`
|
305
|
+
# @return [Array<Google::Apis::FirestoreV1beta1::Value>]
|
306
|
+
attr_accessor :values
|
307
|
+
|
308
|
+
def initialize(**args)
|
309
|
+
update!(**args)
|
310
|
+
end
|
311
|
+
|
312
|
+
# Update properties of this object
|
313
|
+
def update!(**args)
|
314
|
+
@before = args[:before] if args.key?(:before)
|
315
|
+
@values = args[:values] if args.key?(:values)
|
316
|
+
end
|
317
|
+
end
|
318
|
+
|
319
|
+
# A Firestore document.
|
320
|
+
# Must not exceed 1 MiB - 4 bytes.
|
321
|
+
class Document
|
322
|
+
include Google::Apis::Core::Hashable
|
323
|
+
|
324
|
+
# Output only. The time at which the document was created.
|
325
|
+
# This value increases monotonically when a document is deleted then
|
326
|
+
# recreated. It can also be compared to values from other documents and
|
327
|
+
# the `read_time` of a query.
|
328
|
+
# Corresponds to the JSON property `createTime`
|
329
|
+
# @return [String]
|
330
|
+
attr_accessor :create_time
|
331
|
+
|
332
|
+
# The document's fields.
|
333
|
+
# The map keys represent field names.
|
334
|
+
# A simple field name contains only characters `a` to `z`, `A` to `Z`,
|
335
|
+
# `0` to `9`, or `_`, and must not start with `0` to `9` or `_`. For example,
|
336
|
+
# `foo_bar_17`.
|
337
|
+
# Field names matching the regular expression `__.*__` are reserved. Reserved
|
338
|
+
# field names are forbidden except in certain documented contexts. The map
|
339
|
+
# keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be
|
340
|
+
# empty.
|
341
|
+
# Field paths may be used in other contexts to refer to structured fields
|
342
|
+
# defined here. For `map_value`, the field path is represented by the simple
|
343
|
+
# or quoted field names of the containing fields, delimited by `.`. For
|
344
|
+
# example, the structured field
|
345
|
+
# `"foo" : ` map_value: ` "x&y" : ` string_value: "hello" ```` would be
|
346
|
+
# represented by the field path `foo.x&y`.
|
347
|
+
# Within a field path, a quoted field name starts and ends with `` ` `` and
|
348
|
+
# may contain any character. Some characters, including `` ` ``, must be
|
349
|
+
# escaped using a `\`. For example, `` `x&y` `` represents `x&y` and
|
350
|
+
# `` `bak\`tik` `` represents `` bak`tik ``.
|
351
|
+
# Corresponds to the JSON property `fields`
|
352
|
+
# @return [Hash<String,Google::Apis::FirestoreV1beta1::Value>]
|
353
|
+
attr_accessor :fields
|
354
|
+
|
355
|
+
# The resource name of the document, for example
|
356
|
+
# `projects/`project_id`/databases/`database_id`/documents/`document_path``.
|
357
|
+
# Corresponds to the JSON property `name`
|
358
|
+
# @return [String]
|
359
|
+
attr_accessor :name
|
360
|
+
|
361
|
+
# Output only. The time at which the document was last changed.
|
362
|
+
# This value is initally set to the `create_time` then increases
|
363
|
+
# monotonically with each change to the document. It can also be
|
364
|
+
# compared to values from other documents and the `read_time` of a query.
|
365
|
+
# Corresponds to the JSON property `updateTime`
|
366
|
+
# @return [String]
|
367
|
+
attr_accessor :update_time
|
368
|
+
|
369
|
+
def initialize(**args)
|
370
|
+
update!(**args)
|
371
|
+
end
|
372
|
+
|
373
|
+
# Update properties of this object
|
374
|
+
def update!(**args)
|
375
|
+
@create_time = args[:create_time] if args.key?(:create_time)
|
376
|
+
@fields = args[:fields] if args.key?(:fields)
|
377
|
+
@name = args[:name] if args.key?(:name)
|
378
|
+
@update_time = args[:update_time] if args.key?(:update_time)
|
379
|
+
end
|
380
|
+
end
|
381
|
+
|
382
|
+
# A Document has changed.
|
383
|
+
# May be the result of multiple writes, including deletes, that
|
384
|
+
# ultimately resulted in a new value for the Document.
|
385
|
+
# Multiple DocumentChange messages may be returned for the same logical
|
386
|
+
# change, if multiple targets are affected.
|
387
|
+
class DocumentChange
|
388
|
+
include Google::Apis::Core::Hashable
|
389
|
+
|
390
|
+
# A Firestore document.
|
391
|
+
# Must not exceed 1 MiB - 4 bytes.
|
392
|
+
# Corresponds to the JSON property `document`
|
393
|
+
# @return [Google::Apis::FirestoreV1beta1::Document]
|
394
|
+
attr_accessor :document
|
395
|
+
|
396
|
+
# A set of target IDs for targets that no longer match this document.
|
397
|
+
# Corresponds to the JSON property `removedTargetIds`
|
398
|
+
# @return [Array<Fixnum>]
|
399
|
+
attr_accessor :removed_target_ids
|
400
|
+
|
401
|
+
# A set of target IDs of targets that match this document.
|
402
|
+
# Corresponds to the JSON property `targetIds`
|
403
|
+
# @return [Array<Fixnum>]
|
404
|
+
attr_accessor :target_ids
|
405
|
+
|
406
|
+
def initialize(**args)
|
407
|
+
update!(**args)
|
408
|
+
end
|
409
|
+
|
410
|
+
# Update properties of this object
|
411
|
+
def update!(**args)
|
412
|
+
@document = args[:document] if args.key?(:document)
|
413
|
+
@removed_target_ids = args[:removed_target_ids] if args.key?(:removed_target_ids)
|
414
|
+
@target_ids = args[:target_ids] if args.key?(:target_ids)
|
415
|
+
end
|
416
|
+
end
|
417
|
+
|
418
|
+
# A Document has been deleted.
|
419
|
+
# May be the result of multiple writes, including updates, the
|
420
|
+
# last of which deleted the Document.
|
421
|
+
# Multiple DocumentDelete messages may be returned for the same logical
|
422
|
+
# delete, if multiple targets are affected.
|
423
|
+
class DocumentDelete
|
424
|
+
include Google::Apis::Core::Hashable
|
425
|
+
|
426
|
+
# The resource name of the Document that was deleted.
|
427
|
+
# Corresponds to the JSON property `document`
|
428
|
+
# @return [String]
|
429
|
+
attr_accessor :document
|
430
|
+
|
431
|
+
# The read timestamp at which the delete was observed.
|
432
|
+
# Greater or equal to the `commit_time` of the delete.
|
433
|
+
# Corresponds to the JSON property `readTime`
|
434
|
+
# @return [String]
|
435
|
+
attr_accessor :read_time
|
436
|
+
|
437
|
+
# A set of target IDs for targets that previously matched this entity.
|
438
|
+
# Corresponds to the JSON property `removedTargetIds`
|
439
|
+
# @return [Array<Fixnum>]
|
440
|
+
attr_accessor :removed_target_ids
|
441
|
+
|
442
|
+
def initialize(**args)
|
443
|
+
update!(**args)
|
444
|
+
end
|
445
|
+
|
446
|
+
# Update properties of this object
|
447
|
+
def update!(**args)
|
448
|
+
@document = args[:document] if args.key?(:document)
|
449
|
+
@read_time = args[:read_time] if args.key?(:read_time)
|
450
|
+
@removed_target_ids = args[:removed_target_ids] if args.key?(:removed_target_ids)
|
451
|
+
end
|
452
|
+
end
|
453
|
+
|
454
|
+
# A set of field paths on a document.
|
455
|
+
# Used to restrict a get or update operation on a document to a subset of its
|
456
|
+
# fields.
|
457
|
+
# This is different from standard field masks, as this is always scoped to a
|
458
|
+
# Document, and takes in account the dynamic nature of Value.
|
459
|
+
class DocumentMask
|
460
|
+
include Google::Apis::Core::Hashable
|
461
|
+
|
462
|
+
# The list of field paths in the mask. See Document.fields for a field
|
463
|
+
# path syntax reference.
|
464
|
+
# Corresponds to the JSON property `fieldPaths`
|
465
|
+
# @return [Array<String>]
|
466
|
+
attr_accessor :field_paths
|
467
|
+
|
468
|
+
def initialize(**args)
|
469
|
+
update!(**args)
|
470
|
+
end
|
471
|
+
|
472
|
+
# Update properties of this object
|
473
|
+
def update!(**args)
|
474
|
+
@field_paths = args[:field_paths] if args.key?(:field_paths)
|
475
|
+
end
|
476
|
+
end
|
477
|
+
|
478
|
+
# A Document has been removed from the view of the targets.
|
479
|
+
# Sent if the document is no longer relevant to a target and is out of view.
|
480
|
+
# Can be sent instead of a DocumentDelete or a DocumentChange if the server
|
481
|
+
# can not send the new value of the document.
|
482
|
+
# Multiple DocumentRemove messages may be returned for the same logical
|
483
|
+
# write or delete, if multiple targets are affected.
|
484
|
+
class DocumentRemove
|
485
|
+
include Google::Apis::Core::Hashable
|
486
|
+
|
487
|
+
# The resource name of the Document that has gone out of view.
|
488
|
+
# Corresponds to the JSON property `document`
|
489
|
+
# @return [String]
|
490
|
+
attr_accessor :document
|
491
|
+
|
492
|
+
# The read timestamp at which the remove was observed.
|
493
|
+
# Greater or equal to the `commit_time` of the change/delete/remove.
|
494
|
+
# Corresponds to the JSON property `readTime`
|
495
|
+
# @return [String]
|
496
|
+
attr_accessor :read_time
|
497
|
+
|
498
|
+
# A set of target IDs for targets that previously matched this document.
|
499
|
+
# Corresponds to the JSON property `removedTargetIds`
|
500
|
+
# @return [Array<Fixnum>]
|
501
|
+
attr_accessor :removed_target_ids
|
502
|
+
|
503
|
+
def initialize(**args)
|
504
|
+
update!(**args)
|
505
|
+
end
|
506
|
+
|
507
|
+
# Update properties of this object
|
508
|
+
def update!(**args)
|
509
|
+
@document = args[:document] if args.key?(:document)
|
510
|
+
@read_time = args[:read_time] if args.key?(:read_time)
|
511
|
+
@removed_target_ids = args[:removed_target_ids] if args.key?(:removed_target_ids)
|
512
|
+
end
|
513
|
+
end
|
514
|
+
|
515
|
+
# A transformation of a document.
|
516
|
+
class DocumentTransform
|
517
|
+
include Google::Apis::Core::Hashable
|
518
|
+
|
519
|
+
# The name of the document to transform.
|
520
|
+
# Corresponds to the JSON property `document`
|
521
|
+
# @return [String]
|
522
|
+
attr_accessor :document
|
523
|
+
|
524
|
+
# The list of transformations to apply to the fields of the document, in
|
525
|
+
# order.
|
526
|
+
# Corresponds to the JSON property `fieldTransforms`
|
527
|
+
# @return [Array<Google::Apis::FirestoreV1beta1::FieldTransform>]
|
528
|
+
attr_accessor :field_transforms
|
529
|
+
|
530
|
+
def initialize(**args)
|
531
|
+
update!(**args)
|
532
|
+
end
|
533
|
+
|
534
|
+
# Update properties of this object
|
535
|
+
def update!(**args)
|
536
|
+
@document = args[:document] if args.key?(:document)
|
537
|
+
@field_transforms = args[:field_transforms] if args.key?(:field_transforms)
|
538
|
+
end
|
539
|
+
end
|
540
|
+
|
541
|
+
# A target specified by a set of documents names.
|
542
|
+
class DocumentsTarget
|
543
|
+
include Google::Apis::Core::Hashable
|
544
|
+
|
545
|
+
# The names of the documents to retrieve. In the format:
|
546
|
+
# `projects/`project_id`/databases/`database_id`/documents/`document_path``.
|
547
|
+
# The request will fail if any of the document is not a child resource of
|
548
|
+
# the given `database`. Duplicate names will be elided.
|
549
|
+
# Corresponds to the JSON property `documents`
|
550
|
+
# @return [Array<String>]
|
551
|
+
attr_accessor :documents
|
552
|
+
|
553
|
+
def initialize(**args)
|
554
|
+
update!(**args)
|
555
|
+
end
|
556
|
+
|
557
|
+
# Update properties of this object
|
558
|
+
def update!(**args)
|
559
|
+
@documents = args[:documents] if args.key?(:documents)
|
560
|
+
end
|
561
|
+
end
|
562
|
+
|
563
|
+
# A generic empty message that you can re-use to avoid defining duplicated
|
564
|
+
# empty messages in your APIs. A typical example is to use it as the request
|
565
|
+
# or the response type of an API method. For instance:
|
566
|
+
# service Foo `
|
567
|
+
# rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
|
568
|
+
# `
|
569
|
+
# The JSON representation for `Empty` is empty JSON object ````.
|
570
|
+
class Empty
|
571
|
+
include Google::Apis::Core::Hashable
|
572
|
+
|
573
|
+
def initialize(**args)
|
574
|
+
update!(**args)
|
575
|
+
end
|
576
|
+
|
577
|
+
# Update properties of this object
|
578
|
+
def update!(**args)
|
579
|
+
end
|
580
|
+
end
|
581
|
+
|
582
|
+
# A digest of all the documents that match a given target.
|
583
|
+
class ExistenceFilter
|
584
|
+
include Google::Apis::Core::Hashable
|
585
|
+
|
586
|
+
# The total count of documents that match target_id.
|
587
|
+
# If different from the count of documents in the client that match, the
|
588
|
+
# client must manually determine which documents no longer match the target.
|
589
|
+
# Corresponds to the JSON property `count`
|
590
|
+
# @return [Fixnum]
|
591
|
+
attr_accessor :count
|
592
|
+
|
593
|
+
# The target ID to which this filter applies.
|
594
|
+
# Corresponds to the JSON property `targetId`
|
595
|
+
# @return [Fixnum]
|
596
|
+
attr_accessor :target_id
|
597
|
+
|
598
|
+
def initialize(**args)
|
599
|
+
update!(**args)
|
600
|
+
end
|
601
|
+
|
602
|
+
# Update properties of this object
|
603
|
+
def update!(**args)
|
604
|
+
@count = args[:count] if args.key?(:count)
|
605
|
+
@target_id = args[:target_id] if args.key?(:target_id)
|
606
|
+
end
|
607
|
+
end
|
608
|
+
|
609
|
+
# A filter on a specific field.
|
610
|
+
class FieldFilter
|
611
|
+
include Google::Apis::Core::Hashable
|
612
|
+
|
613
|
+
# A reference to a field, such as `max(messages.time) as max_time`.
|
614
|
+
# Corresponds to the JSON property `field`
|
615
|
+
# @return [Google::Apis::FirestoreV1beta1::FieldReference]
|
616
|
+
attr_accessor :field
|
617
|
+
|
618
|
+
# The operator to filter by.
|
619
|
+
# Corresponds to the JSON property `op`
|
620
|
+
# @return [String]
|
621
|
+
attr_accessor :op
|
622
|
+
|
623
|
+
# A message that can hold any of the supported value types.
|
624
|
+
# Corresponds to the JSON property `value`
|
625
|
+
# @return [Google::Apis::FirestoreV1beta1::Value]
|
626
|
+
attr_accessor :value
|
627
|
+
|
628
|
+
def initialize(**args)
|
629
|
+
update!(**args)
|
630
|
+
end
|
631
|
+
|
632
|
+
# Update properties of this object
|
633
|
+
def update!(**args)
|
634
|
+
@field = args[:field] if args.key?(:field)
|
635
|
+
@op = args[:op] if args.key?(:op)
|
636
|
+
@value = args[:value] if args.key?(:value)
|
637
|
+
end
|
638
|
+
end
|
639
|
+
|
640
|
+
# A reference to a field, such as `max(messages.time) as max_time`.
|
641
|
+
class FieldReference
|
642
|
+
include Google::Apis::Core::Hashable
|
643
|
+
|
644
|
+
#
|
645
|
+
# Corresponds to the JSON property `fieldPath`
|
646
|
+
# @return [String]
|
647
|
+
attr_accessor :field_path
|
648
|
+
|
649
|
+
def initialize(**args)
|
650
|
+
update!(**args)
|
651
|
+
end
|
652
|
+
|
653
|
+
# Update properties of this object
|
654
|
+
def update!(**args)
|
655
|
+
@field_path = args[:field_path] if args.key?(:field_path)
|
656
|
+
end
|
657
|
+
end
|
658
|
+
|
659
|
+
# A transformation of a field of the document.
|
660
|
+
class FieldTransform
|
661
|
+
include Google::Apis::Core::Hashable
|
662
|
+
|
663
|
+
# The path of the field. See Document.fields for the field path syntax
|
664
|
+
# reference.
|
665
|
+
# Corresponds to the JSON property `fieldPath`
|
666
|
+
# @return [String]
|
667
|
+
attr_accessor :field_path
|
668
|
+
|
669
|
+
# Sets the field to the given server value.
|
670
|
+
# Corresponds to the JSON property `setToServerValue`
|
671
|
+
# @return [String]
|
672
|
+
attr_accessor :set_to_server_value
|
673
|
+
|
674
|
+
def initialize(**args)
|
675
|
+
update!(**args)
|
676
|
+
end
|
677
|
+
|
678
|
+
# Update properties of this object
|
679
|
+
def update!(**args)
|
680
|
+
@field_path = args[:field_path] if args.key?(:field_path)
|
681
|
+
@set_to_server_value = args[:set_to_server_value] if args.key?(:set_to_server_value)
|
682
|
+
end
|
683
|
+
end
|
684
|
+
|
685
|
+
# A filter.
|
686
|
+
class Filter
|
687
|
+
include Google::Apis::Core::Hashable
|
688
|
+
|
689
|
+
# A filter that merges multiple other filters using the given operator.
|
690
|
+
# Corresponds to the JSON property `compositeFilter`
|
691
|
+
# @return [Google::Apis::FirestoreV1beta1::CompositeFilter]
|
692
|
+
attr_accessor :composite_filter
|
693
|
+
|
694
|
+
# A filter on a specific field.
|
695
|
+
# Corresponds to the JSON property `fieldFilter`
|
696
|
+
# @return [Google::Apis::FirestoreV1beta1::FieldFilter]
|
697
|
+
attr_accessor :field_filter
|
698
|
+
|
699
|
+
# A filter with a single operand.
|
700
|
+
# Corresponds to the JSON property `unaryFilter`
|
701
|
+
# @return [Google::Apis::FirestoreV1beta1::UnaryFilter]
|
702
|
+
attr_accessor :unary_filter
|
703
|
+
|
704
|
+
def initialize(**args)
|
705
|
+
update!(**args)
|
706
|
+
end
|
707
|
+
|
708
|
+
# Update properties of this object
|
709
|
+
def update!(**args)
|
710
|
+
@composite_filter = args[:composite_filter] if args.key?(:composite_filter)
|
711
|
+
@field_filter = args[:field_filter] if args.key?(:field_filter)
|
712
|
+
@unary_filter = args[:unary_filter] if args.key?(:unary_filter)
|
713
|
+
end
|
714
|
+
end
|
715
|
+
|
716
|
+
# An index definition.
|
717
|
+
class Index
|
718
|
+
include Google::Apis::Core::Hashable
|
719
|
+
|
720
|
+
# The collection ID to which this index applies. Required.
|
721
|
+
# Corresponds to the JSON property `collectionId`
|
722
|
+
# @return [String]
|
723
|
+
attr_accessor :collection_id
|
724
|
+
|
725
|
+
# The fields to index.
|
726
|
+
# Corresponds to the JSON property `fields`
|
727
|
+
# @return [Array<Google::Apis::FirestoreV1beta1::IndexField>]
|
728
|
+
attr_accessor :fields
|
729
|
+
|
730
|
+
# The resource name of the index.
|
731
|
+
# Corresponds to the JSON property `name`
|
732
|
+
# @return [String]
|
733
|
+
attr_accessor :name
|
734
|
+
|
735
|
+
# The state of the index.
|
736
|
+
# The state is read-only.
|
737
|
+
# @OutputOnly
|
738
|
+
# Corresponds to the JSON property `state`
|
739
|
+
# @return [String]
|
740
|
+
attr_accessor :state
|
741
|
+
|
742
|
+
def initialize(**args)
|
743
|
+
update!(**args)
|
744
|
+
end
|
745
|
+
|
746
|
+
# Update properties of this object
|
747
|
+
def update!(**args)
|
748
|
+
@collection_id = args[:collection_id] if args.key?(:collection_id)
|
749
|
+
@fields = args[:fields] if args.key?(:fields)
|
750
|
+
@name = args[:name] if args.key?(:name)
|
751
|
+
@state = args[:state] if args.key?(:state)
|
752
|
+
end
|
753
|
+
end
|
754
|
+
|
755
|
+
# A field of an index.
|
756
|
+
class IndexField
|
757
|
+
include Google::Apis::Core::Hashable
|
758
|
+
|
759
|
+
# The path of the field. Must match the field path specification described
|
760
|
+
# by google.firestore.v1beta1.Document.fields.
|
761
|
+
# Special field path `__name__` may be used by itself or at the end of a
|
762
|
+
# path. `__type__` may be used only at the end of path.
|
763
|
+
# Corresponds to the JSON property `fieldPath`
|
764
|
+
# @return [String]
|
765
|
+
attr_accessor :field_path
|
766
|
+
|
767
|
+
# The field's mode.
|
768
|
+
# Corresponds to the JSON property `mode`
|
769
|
+
# @return [String]
|
770
|
+
attr_accessor :mode
|
771
|
+
|
772
|
+
def initialize(**args)
|
773
|
+
update!(**args)
|
774
|
+
end
|
775
|
+
|
776
|
+
# Update properties of this object
|
777
|
+
def update!(**args)
|
778
|
+
@field_path = args[:field_path] if args.key?(:field_path)
|
779
|
+
@mode = args[:mode] if args.key?(:mode)
|
780
|
+
end
|
781
|
+
end
|
782
|
+
|
783
|
+
# Metadata for index operations. This metadata populates
|
784
|
+
# the metadata field of google.longrunning.Operation.
|
785
|
+
class IndexOperationMetadata
|
786
|
+
include Google::Apis::Core::Hashable
|
787
|
+
|
788
|
+
# True if the [google.longrunning.Operation] was cancelled. If the
|
789
|
+
# cancellation is in progress, cancelled will be true but
|
790
|
+
# google.longrunning.Operation.done will be false.
|
791
|
+
# Corresponds to the JSON property `cancelled`
|
792
|
+
# @return [Boolean]
|
793
|
+
attr_accessor :cancelled
|
794
|
+
alias_method :cancelled?, :cancelled
|
795
|
+
|
796
|
+
# Measures the progress of a particular metric.
|
797
|
+
# Corresponds to the JSON property `documentProgress`
|
798
|
+
# @return [Google::Apis::FirestoreV1beta1::Progress]
|
799
|
+
attr_accessor :document_progress
|
800
|
+
|
801
|
+
# The time the operation ended, either successfully or otherwise. Unset if
|
802
|
+
# the operation is still active.
|
803
|
+
# Corresponds to the JSON property `endTime`
|
804
|
+
# @return [String]
|
805
|
+
attr_accessor :end_time
|
806
|
+
|
807
|
+
# The index resource that this operation is acting on. For example:
|
808
|
+
# `projects/`project_id`/databases/`database_id`/indexes/`index_id``
|
809
|
+
# Corresponds to the JSON property `index`
|
810
|
+
# @return [String]
|
811
|
+
attr_accessor :index
|
812
|
+
|
813
|
+
# The type of index operation.
|
814
|
+
# Corresponds to the JSON property `operationType`
|
815
|
+
# @return [String]
|
816
|
+
attr_accessor :operation_type
|
817
|
+
|
818
|
+
# The time that work began on the operation.
|
819
|
+
# Corresponds to the JSON property `startTime`
|
820
|
+
# @return [String]
|
821
|
+
attr_accessor :start_time
|
822
|
+
|
823
|
+
def initialize(**args)
|
824
|
+
update!(**args)
|
825
|
+
end
|
826
|
+
|
827
|
+
# Update properties of this object
|
828
|
+
def update!(**args)
|
829
|
+
@cancelled = args[:cancelled] if args.key?(:cancelled)
|
830
|
+
@document_progress = args[:document_progress] if args.key?(:document_progress)
|
831
|
+
@end_time = args[:end_time] if args.key?(:end_time)
|
832
|
+
@index = args[:index] if args.key?(:index)
|
833
|
+
@operation_type = args[:operation_type] if args.key?(:operation_type)
|
834
|
+
@start_time = args[:start_time] if args.key?(:start_time)
|
835
|
+
end
|
836
|
+
end
|
837
|
+
|
838
|
+
# An object representing a latitude/longitude pair. This is expressed as a pair
|
839
|
+
# of doubles representing degrees latitude and degrees longitude. Unless
|
840
|
+
# specified otherwise, this must conform to the
|
841
|
+
# <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
|
842
|
+
# standard</a>. Values must be within normalized ranges.
|
843
|
+
# Example of normalization code in Python:
|
844
|
+
# def NormalizeLongitude(longitude):
|
845
|
+
# """Wraps decimal degrees longitude to [-180.0, 180.0]."""
|
846
|
+
# q, r = divmod(longitude, 360.0)
|
847
|
+
# if r > 180.0 or (r == 180.0 and q <= -1.0):
|
848
|
+
# return r - 360.0
|
849
|
+
# return r
|
850
|
+
# def NormalizeLatLng(latitude, longitude):
|
851
|
+
# """Wraps decimal degrees latitude and longitude to
|
852
|
+
# [-90.0, 90.0] and [-180.0, 180.0], respectively."""
|
853
|
+
# r = latitude % 360.0
|
854
|
+
# if r <= 90.0:
|
855
|
+
# return r, NormalizeLongitude(longitude)
|
856
|
+
# elif r >= 270.0:
|
857
|
+
# return r - 360, NormalizeLongitude(longitude)
|
858
|
+
# else:
|
859
|
+
# return 180 - r, NormalizeLongitude(longitude + 180.0)
|
860
|
+
# assert 180.0 == NormalizeLongitude(180.0)
|
861
|
+
# assert -180.0 == NormalizeLongitude(-180.0)
|
862
|
+
# assert -179.0 == NormalizeLongitude(181.0)
|
863
|
+
# assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0)
|
864
|
+
# assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0)
|
865
|
+
# assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0)
|
866
|
+
# assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0)
|
867
|
+
# assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0)
|
868
|
+
# assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0)
|
869
|
+
# assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0)
|
870
|
+
# assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0)
|
871
|
+
# assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0)
|
872
|
+
# assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0)
|
873
|
+
class LatLng
|
874
|
+
include Google::Apis::Core::Hashable
|
875
|
+
|
876
|
+
# The latitude in degrees. It must be in the range [-90.0, +90.0].
|
877
|
+
# Corresponds to the JSON property `latitude`
|
878
|
+
# @return [Float]
|
879
|
+
attr_accessor :latitude
|
880
|
+
|
881
|
+
# The longitude in degrees. It must be in the range [-180.0, +180.0].
|
882
|
+
# Corresponds to the JSON property `longitude`
|
883
|
+
# @return [Float]
|
884
|
+
attr_accessor :longitude
|
885
|
+
|
886
|
+
def initialize(**args)
|
887
|
+
update!(**args)
|
888
|
+
end
|
889
|
+
|
890
|
+
# Update properties of this object
|
891
|
+
def update!(**args)
|
892
|
+
@latitude = args[:latitude] if args.key?(:latitude)
|
893
|
+
@longitude = args[:longitude] if args.key?(:longitude)
|
894
|
+
end
|
895
|
+
end
|
896
|
+
|
897
|
+
# The response from Firestore.ListCollectionIds.
|
898
|
+
class ListCollectionIdsResponse
|
899
|
+
include Google::Apis::Core::Hashable
|
900
|
+
|
901
|
+
# The collection ids.
|
902
|
+
# Corresponds to the JSON property `collectionIds`
|
903
|
+
# @return [Array<String>]
|
904
|
+
attr_accessor :collection_ids
|
905
|
+
|
906
|
+
# A page token that may be used to continue the list.
|
907
|
+
# Corresponds to the JSON property `nextPageToken`
|
908
|
+
# @return [String]
|
909
|
+
attr_accessor :next_page_token
|
910
|
+
|
911
|
+
def initialize(**args)
|
912
|
+
update!(**args)
|
913
|
+
end
|
914
|
+
|
915
|
+
# Update properties of this object
|
916
|
+
def update!(**args)
|
917
|
+
@collection_ids = args[:collection_ids] if args.key?(:collection_ids)
|
918
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
919
|
+
end
|
920
|
+
end
|
921
|
+
|
922
|
+
# The response for Firestore.ListDocuments.
|
923
|
+
class ListDocumentsResponse
|
924
|
+
include Google::Apis::Core::Hashable
|
925
|
+
|
926
|
+
# The Documents found.
|
927
|
+
# Corresponds to the JSON property `documents`
|
928
|
+
# @return [Array<Google::Apis::FirestoreV1beta1::Document>]
|
929
|
+
attr_accessor :documents
|
930
|
+
|
931
|
+
# The next page token.
|
932
|
+
# Corresponds to the JSON property `nextPageToken`
|
933
|
+
# @return [String]
|
934
|
+
attr_accessor :next_page_token
|
935
|
+
|
936
|
+
def initialize(**args)
|
937
|
+
update!(**args)
|
938
|
+
end
|
939
|
+
|
940
|
+
# Update properties of this object
|
941
|
+
def update!(**args)
|
942
|
+
@documents = args[:documents] if args.key?(:documents)
|
943
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
944
|
+
end
|
945
|
+
end
|
946
|
+
|
947
|
+
# The response for FirestoreAdmin.ListIndexes.
|
948
|
+
class ListIndexesResponse
|
949
|
+
include Google::Apis::Core::Hashable
|
950
|
+
|
951
|
+
# The indexes.
|
952
|
+
# Corresponds to the JSON property `indexes`
|
953
|
+
# @return [Array<Google::Apis::FirestoreV1beta1::Index>]
|
954
|
+
attr_accessor :indexes
|
955
|
+
|
956
|
+
# The standard List next-page token.
|
957
|
+
# Corresponds to the JSON property `nextPageToken`
|
958
|
+
# @return [String]
|
959
|
+
attr_accessor :next_page_token
|
960
|
+
|
961
|
+
def initialize(**args)
|
962
|
+
update!(**args)
|
963
|
+
end
|
964
|
+
|
965
|
+
# Update properties of this object
|
966
|
+
def update!(**args)
|
967
|
+
@indexes = args[:indexes] if args.key?(:indexes)
|
968
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
969
|
+
end
|
970
|
+
end
|
971
|
+
|
972
|
+
# A request for Firestore.Listen
|
973
|
+
class ListenRequest
|
974
|
+
include Google::Apis::Core::Hashable
|
975
|
+
|
976
|
+
# A specification of a set of documents to listen to.
|
977
|
+
# Corresponds to the JSON property `addTarget`
|
978
|
+
# @return [Google::Apis::FirestoreV1beta1::Target]
|
979
|
+
attr_accessor :add_target
|
980
|
+
|
981
|
+
# Labels associated with this target change.
|
982
|
+
# Corresponds to the JSON property `labels`
|
983
|
+
# @return [Hash<String,String>]
|
984
|
+
attr_accessor :labels
|
985
|
+
|
986
|
+
# The ID of a target to remove from this stream.
|
987
|
+
# Corresponds to the JSON property `removeTarget`
|
988
|
+
# @return [Fixnum]
|
989
|
+
attr_accessor :remove_target
|
990
|
+
|
991
|
+
def initialize(**args)
|
992
|
+
update!(**args)
|
993
|
+
end
|
994
|
+
|
995
|
+
# Update properties of this object
|
996
|
+
def update!(**args)
|
997
|
+
@add_target = args[:add_target] if args.key?(:add_target)
|
998
|
+
@labels = args[:labels] if args.key?(:labels)
|
999
|
+
@remove_target = args[:remove_target] if args.key?(:remove_target)
|
1000
|
+
end
|
1001
|
+
end
|
1002
|
+
|
1003
|
+
# The response for Firestore.Listen.
|
1004
|
+
class ListenResponse
|
1005
|
+
include Google::Apis::Core::Hashable
|
1006
|
+
|
1007
|
+
# A Document has changed.
|
1008
|
+
# May be the result of multiple writes, including deletes, that
|
1009
|
+
# ultimately resulted in a new value for the Document.
|
1010
|
+
# Multiple DocumentChange messages may be returned for the same logical
|
1011
|
+
# change, if multiple targets are affected.
|
1012
|
+
# Corresponds to the JSON property `documentChange`
|
1013
|
+
# @return [Google::Apis::FirestoreV1beta1::DocumentChange]
|
1014
|
+
attr_accessor :document_change
|
1015
|
+
|
1016
|
+
# A Document has been deleted.
|
1017
|
+
# May be the result of multiple writes, including updates, the
|
1018
|
+
# last of which deleted the Document.
|
1019
|
+
# Multiple DocumentDelete messages may be returned for the same logical
|
1020
|
+
# delete, if multiple targets are affected.
|
1021
|
+
# Corresponds to the JSON property `documentDelete`
|
1022
|
+
# @return [Google::Apis::FirestoreV1beta1::DocumentDelete]
|
1023
|
+
attr_accessor :document_delete
|
1024
|
+
|
1025
|
+
# A Document has been removed from the view of the targets.
|
1026
|
+
# Sent if the document is no longer relevant to a target and is out of view.
|
1027
|
+
# Can be sent instead of a DocumentDelete or a DocumentChange if the server
|
1028
|
+
# can not send the new value of the document.
|
1029
|
+
# Multiple DocumentRemove messages may be returned for the same logical
|
1030
|
+
# write or delete, if multiple targets are affected.
|
1031
|
+
# Corresponds to the JSON property `documentRemove`
|
1032
|
+
# @return [Google::Apis::FirestoreV1beta1::DocumentRemove]
|
1033
|
+
attr_accessor :document_remove
|
1034
|
+
|
1035
|
+
# A digest of all the documents that match a given target.
|
1036
|
+
# Corresponds to the JSON property `filter`
|
1037
|
+
# @return [Google::Apis::FirestoreV1beta1::ExistenceFilter]
|
1038
|
+
attr_accessor :filter
|
1039
|
+
|
1040
|
+
# Targets being watched have changed.
|
1041
|
+
# Corresponds to the JSON property `targetChange`
|
1042
|
+
# @return [Google::Apis::FirestoreV1beta1::TargetChange]
|
1043
|
+
attr_accessor :target_change
|
1044
|
+
|
1045
|
+
def initialize(**args)
|
1046
|
+
update!(**args)
|
1047
|
+
end
|
1048
|
+
|
1049
|
+
# Update properties of this object
|
1050
|
+
def update!(**args)
|
1051
|
+
@document_change = args[:document_change] if args.key?(:document_change)
|
1052
|
+
@document_delete = args[:document_delete] if args.key?(:document_delete)
|
1053
|
+
@document_remove = args[:document_remove] if args.key?(:document_remove)
|
1054
|
+
@filter = args[:filter] if args.key?(:filter)
|
1055
|
+
@target_change = args[:target_change] if args.key?(:target_change)
|
1056
|
+
end
|
1057
|
+
end
|
1058
|
+
|
1059
|
+
# A map value.
|
1060
|
+
class MapValue
|
1061
|
+
include Google::Apis::Core::Hashable
|
1062
|
+
|
1063
|
+
# The map's fields.
|
1064
|
+
# The map keys represent field names. Field names matching the regular
|
1065
|
+
# expression `__.*__` are reserved. Reserved field names are forbidden except
|
1066
|
+
# in certain documented contexts. The map keys, represented as UTF-8, must
|
1067
|
+
# not exceed 1,500 bytes and cannot be empty.
|
1068
|
+
# Corresponds to the JSON property `fields`
|
1069
|
+
# @return [Hash<String,Google::Apis::FirestoreV1beta1::Value>]
|
1070
|
+
attr_accessor :fields
|
1071
|
+
|
1072
|
+
def initialize(**args)
|
1073
|
+
update!(**args)
|
1074
|
+
end
|
1075
|
+
|
1076
|
+
# Update properties of this object
|
1077
|
+
def update!(**args)
|
1078
|
+
@fields = args[:fields] if args.key?(:fields)
|
1079
|
+
end
|
1080
|
+
end
|
1081
|
+
|
1082
|
+
# This resource represents a long-running operation that is the result of a
|
1083
|
+
# network API call.
|
1084
|
+
class Operation
|
1085
|
+
include Google::Apis::Core::Hashable
|
1086
|
+
|
1087
|
+
# If the value is `false`, it means the operation is still in progress.
|
1088
|
+
# If `true`, the operation is completed, and either `error` or `response` is
|
1089
|
+
# available.
|
1090
|
+
# Corresponds to the JSON property `done`
|
1091
|
+
# @return [Boolean]
|
1092
|
+
attr_accessor :done
|
1093
|
+
alias_method :done?, :done
|
1094
|
+
|
1095
|
+
# The `Status` type defines a logical error model that is suitable for different
|
1096
|
+
# programming environments, including REST APIs and RPC APIs. It is used by
|
1097
|
+
# [gRPC](https://github.com/grpc). The error model is designed to be:
|
1098
|
+
# - Simple to use and understand for most users
|
1099
|
+
# - Flexible enough to meet unexpected needs
|
1100
|
+
# # Overview
|
1101
|
+
# The `Status` message contains three pieces of data: error code, error message,
|
1102
|
+
# and error details. The error code should be an enum value of
|
1103
|
+
# google.rpc.Code, but it may accept additional error codes if needed. The
|
1104
|
+
# error message should be a developer-facing English message that helps
|
1105
|
+
# developers *understand* and *resolve* the error. If a localized user-facing
|
1106
|
+
# error message is needed, put the localized message in the error details or
|
1107
|
+
# localize it in the client. The optional error details may contain arbitrary
|
1108
|
+
# information about the error. There is a predefined set of error detail types
|
1109
|
+
# in the package `google.rpc` that can be used for common error conditions.
|
1110
|
+
# # Language mapping
|
1111
|
+
# The `Status` message is the logical representation of the error model, but it
|
1112
|
+
# is not necessarily the actual wire format. When the `Status` message is
|
1113
|
+
# exposed in different client libraries and different wire protocols, it can be
|
1114
|
+
# mapped differently. For example, it will likely be mapped to some exceptions
|
1115
|
+
# in Java, but more likely mapped to some error codes in C.
|
1116
|
+
# # Other uses
|
1117
|
+
# The error model and the `Status` message can be used in a variety of
|
1118
|
+
# environments, either with or without APIs, to provide a
|
1119
|
+
# consistent developer experience across different environments.
|
1120
|
+
# Example uses of this error model include:
|
1121
|
+
# - Partial errors. If a service needs to return partial errors to the client,
|
1122
|
+
# it may embed the `Status` in the normal response to indicate the partial
|
1123
|
+
# errors.
|
1124
|
+
# - Workflow errors. A typical workflow has multiple steps. Each step may
|
1125
|
+
# have a `Status` message for error reporting.
|
1126
|
+
# - Batch operations. If a client uses batch request and batch response, the
|
1127
|
+
# `Status` message should be used directly inside batch response, one for
|
1128
|
+
# each error sub-response.
|
1129
|
+
# - Asynchronous operations. If an API call embeds asynchronous operation
|
1130
|
+
# results in its response, the status of those operations should be
|
1131
|
+
# represented directly using the `Status` message.
|
1132
|
+
# - Logging. If some API errors are stored in logs, the message `Status` could
|
1133
|
+
# be used directly after any stripping needed for security/privacy reasons.
|
1134
|
+
# Corresponds to the JSON property `error`
|
1135
|
+
# @return [Google::Apis::FirestoreV1beta1::Status]
|
1136
|
+
attr_accessor :error
|
1137
|
+
|
1138
|
+
# Service-specific metadata associated with the operation. It typically
|
1139
|
+
# contains progress information and common metadata such as create time.
|
1140
|
+
# Some services might not provide such metadata. Any method that returns a
|
1141
|
+
# long-running operation should document the metadata type, if any.
|
1142
|
+
# Corresponds to the JSON property `metadata`
|
1143
|
+
# @return [Hash<String,Object>]
|
1144
|
+
attr_accessor :metadata
|
1145
|
+
|
1146
|
+
# The server-assigned name, which is only unique within the same service that
|
1147
|
+
# originally returns it. If you use the default HTTP mapping, the
|
1148
|
+
# `name` should have the format of `operations/some/unique/name`.
|
1149
|
+
# Corresponds to the JSON property `name`
|
1150
|
+
# @return [String]
|
1151
|
+
attr_accessor :name
|
1152
|
+
|
1153
|
+
# The normal response of the operation in case of success. If the original
|
1154
|
+
# method returns no data on success, such as `Delete`, the response is
|
1155
|
+
# `google.protobuf.Empty`. If the original method is standard
|
1156
|
+
# `Get`/`Create`/`Update`, the response should be the resource. For other
|
1157
|
+
# methods, the response should have the type `XxxResponse`, where `Xxx`
|
1158
|
+
# is the original method name. For example, if the original method name
|
1159
|
+
# is `TakeSnapshot()`, the inferred response type is
|
1160
|
+
# `TakeSnapshotResponse`.
|
1161
|
+
# Corresponds to the JSON property `response`
|
1162
|
+
# @return [Hash<String,Object>]
|
1163
|
+
attr_accessor :response
|
1164
|
+
|
1165
|
+
def initialize(**args)
|
1166
|
+
update!(**args)
|
1167
|
+
end
|
1168
|
+
|
1169
|
+
# Update properties of this object
|
1170
|
+
def update!(**args)
|
1171
|
+
@done = args[:done] if args.key?(:done)
|
1172
|
+
@error = args[:error] if args.key?(:error)
|
1173
|
+
@metadata = args[:metadata] if args.key?(:metadata)
|
1174
|
+
@name = args[:name] if args.key?(:name)
|
1175
|
+
@response = args[:response] if args.key?(:response)
|
1176
|
+
end
|
1177
|
+
end
|
1178
|
+
|
1179
|
+
# An order on a field.
|
1180
|
+
class Order
|
1181
|
+
include Google::Apis::Core::Hashable
|
1182
|
+
|
1183
|
+
# The direction to order by. Defaults to `ASCENDING`.
|
1184
|
+
# Corresponds to the JSON property `direction`
|
1185
|
+
# @return [String]
|
1186
|
+
attr_accessor :direction
|
1187
|
+
|
1188
|
+
# A reference to a field, such as `max(messages.time) as max_time`.
|
1189
|
+
# Corresponds to the JSON property `field`
|
1190
|
+
# @return [Google::Apis::FirestoreV1beta1::FieldReference]
|
1191
|
+
attr_accessor :field
|
1192
|
+
|
1193
|
+
def initialize(**args)
|
1194
|
+
update!(**args)
|
1195
|
+
end
|
1196
|
+
|
1197
|
+
# Update properties of this object
|
1198
|
+
def update!(**args)
|
1199
|
+
@direction = args[:direction] if args.key?(:direction)
|
1200
|
+
@field = args[:field] if args.key?(:field)
|
1201
|
+
end
|
1202
|
+
end
|
1203
|
+
|
1204
|
+
# A precondition on a document, used for conditional operations.
|
1205
|
+
class Precondition
|
1206
|
+
include Google::Apis::Core::Hashable
|
1207
|
+
|
1208
|
+
# When set to `true`, the target document must exist.
|
1209
|
+
# When set to `false`, the target document must not exist.
|
1210
|
+
# Corresponds to the JSON property `exists`
|
1211
|
+
# @return [Boolean]
|
1212
|
+
attr_accessor :exists
|
1213
|
+
alias_method :exists?, :exists
|
1214
|
+
|
1215
|
+
# When set, the target document must exist and have been last updated at
|
1216
|
+
# that time.
|
1217
|
+
# Corresponds to the JSON property `updateTime`
|
1218
|
+
# @return [String]
|
1219
|
+
attr_accessor :update_time
|
1220
|
+
|
1221
|
+
def initialize(**args)
|
1222
|
+
update!(**args)
|
1223
|
+
end
|
1224
|
+
|
1225
|
+
# Update properties of this object
|
1226
|
+
def update!(**args)
|
1227
|
+
@exists = args[:exists] if args.key?(:exists)
|
1228
|
+
@update_time = args[:update_time] if args.key?(:update_time)
|
1229
|
+
end
|
1230
|
+
end
|
1231
|
+
|
1232
|
+
# Measures the progress of a particular metric.
|
1233
|
+
class Progress
|
1234
|
+
include Google::Apis::Core::Hashable
|
1235
|
+
|
1236
|
+
# An estimate of how much work has been completed. Note that this may be
|
1237
|
+
# greater than `work_estimated`.
|
1238
|
+
# Corresponds to the JSON property `workCompleted`
|
1239
|
+
# @return [Fixnum]
|
1240
|
+
attr_accessor :work_completed
|
1241
|
+
|
1242
|
+
# An estimate of how much work needs to be performed. Zero if the
|
1243
|
+
# work estimate is unavailable. May change as work progresses.
|
1244
|
+
# Corresponds to the JSON property `workEstimated`
|
1245
|
+
# @return [Fixnum]
|
1246
|
+
attr_accessor :work_estimated
|
1247
|
+
|
1248
|
+
def initialize(**args)
|
1249
|
+
update!(**args)
|
1250
|
+
end
|
1251
|
+
|
1252
|
+
# Update properties of this object
|
1253
|
+
def update!(**args)
|
1254
|
+
@work_completed = args[:work_completed] if args.key?(:work_completed)
|
1255
|
+
@work_estimated = args[:work_estimated] if args.key?(:work_estimated)
|
1256
|
+
end
|
1257
|
+
end
|
1258
|
+
|
1259
|
+
# The projection of document's fields to return.
|
1260
|
+
class Projection
|
1261
|
+
include Google::Apis::Core::Hashable
|
1262
|
+
|
1263
|
+
# The fields to return.
|
1264
|
+
# If empty, all fields are returned. To only return the name
|
1265
|
+
# of the document, use `['__name__']`.
|
1266
|
+
# Corresponds to the JSON property `fields`
|
1267
|
+
# @return [Array<Google::Apis::FirestoreV1beta1::FieldReference>]
|
1268
|
+
attr_accessor :fields
|
1269
|
+
|
1270
|
+
def initialize(**args)
|
1271
|
+
update!(**args)
|
1272
|
+
end
|
1273
|
+
|
1274
|
+
# Update properties of this object
|
1275
|
+
def update!(**args)
|
1276
|
+
@fields = args[:fields] if args.key?(:fields)
|
1277
|
+
end
|
1278
|
+
end
|
1279
|
+
|
1280
|
+
# A target specified by a query.
|
1281
|
+
class QueryTarget
|
1282
|
+
include Google::Apis::Core::Hashable
|
1283
|
+
|
1284
|
+
# The parent resource name. In the format:
|
1285
|
+
# `projects/`project_id`/databases/`database_id`/documents` or
|
1286
|
+
# `projects/`project_id`/databases/`database_id`/documents/`document_path``.
|
1287
|
+
# For example:
|
1288
|
+
# `projects/my-project/databases/my-database/documents` or
|
1289
|
+
# `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`
|
1290
|
+
# Corresponds to the JSON property `parent`
|
1291
|
+
# @return [String]
|
1292
|
+
attr_accessor :parent
|
1293
|
+
|
1294
|
+
# A Firestore query.
|
1295
|
+
# Corresponds to the JSON property `structuredQuery`
|
1296
|
+
# @return [Google::Apis::FirestoreV1beta1::StructuredQuery]
|
1297
|
+
attr_accessor :structured_query
|
1298
|
+
|
1299
|
+
def initialize(**args)
|
1300
|
+
update!(**args)
|
1301
|
+
end
|
1302
|
+
|
1303
|
+
# Update properties of this object
|
1304
|
+
def update!(**args)
|
1305
|
+
@parent = args[:parent] if args.key?(:parent)
|
1306
|
+
@structured_query = args[:structured_query] if args.key?(:structured_query)
|
1307
|
+
end
|
1308
|
+
end
|
1309
|
+
|
1310
|
+
# Options for a transaction that can only be used to read documents.
|
1311
|
+
class ReadOnly
|
1312
|
+
include Google::Apis::Core::Hashable
|
1313
|
+
|
1314
|
+
# Reads documents at the given time.
|
1315
|
+
# This may not be older than 60 seconds.
|
1316
|
+
# Corresponds to the JSON property `readTime`
|
1317
|
+
# @return [String]
|
1318
|
+
attr_accessor :read_time
|
1319
|
+
|
1320
|
+
def initialize(**args)
|
1321
|
+
update!(**args)
|
1322
|
+
end
|
1323
|
+
|
1324
|
+
# Update properties of this object
|
1325
|
+
def update!(**args)
|
1326
|
+
@read_time = args[:read_time] if args.key?(:read_time)
|
1327
|
+
end
|
1328
|
+
end
|
1329
|
+
|
1330
|
+
# Options for a transaction that can be used to read and write documents.
|
1331
|
+
class ReadWrite
|
1332
|
+
include Google::Apis::Core::Hashable
|
1333
|
+
|
1334
|
+
# An optional transaction to retry.
|
1335
|
+
# Corresponds to the JSON property `retryTransaction`
|
1336
|
+
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
1337
|
+
# @return [String]
|
1338
|
+
attr_accessor :retry_transaction
|
1339
|
+
|
1340
|
+
def initialize(**args)
|
1341
|
+
update!(**args)
|
1342
|
+
end
|
1343
|
+
|
1344
|
+
# Update properties of this object
|
1345
|
+
def update!(**args)
|
1346
|
+
@retry_transaction = args[:retry_transaction] if args.key?(:retry_transaction)
|
1347
|
+
end
|
1348
|
+
end
|
1349
|
+
|
1350
|
+
# The request for Firestore.Rollback.
|
1351
|
+
class RollbackRequest
|
1352
|
+
include Google::Apis::Core::Hashable
|
1353
|
+
|
1354
|
+
# The transaction to roll back.
|
1355
|
+
# Corresponds to the JSON property `transaction`
|
1356
|
+
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
1357
|
+
# @return [String]
|
1358
|
+
attr_accessor :transaction
|
1359
|
+
|
1360
|
+
def initialize(**args)
|
1361
|
+
update!(**args)
|
1362
|
+
end
|
1363
|
+
|
1364
|
+
# Update properties of this object
|
1365
|
+
def update!(**args)
|
1366
|
+
@transaction = args[:transaction] if args.key?(:transaction)
|
1367
|
+
end
|
1368
|
+
end
|
1369
|
+
|
1370
|
+
# The request for Firestore.RunQuery.
|
1371
|
+
class RunQueryRequest
|
1372
|
+
include Google::Apis::Core::Hashable
|
1373
|
+
|
1374
|
+
# Options for creating a new transaction.
|
1375
|
+
# Corresponds to the JSON property `newTransaction`
|
1376
|
+
# @return [Google::Apis::FirestoreV1beta1::TransactionOptions]
|
1377
|
+
attr_accessor :new_transaction
|
1378
|
+
|
1379
|
+
# Reads documents as they were at the given time.
|
1380
|
+
# This may not be older than 60 seconds.
|
1381
|
+
# Corresponds to the JSON property `readTime`
|
1382
|
+
# @return [String]
|
1383
|
+
attr_accessor :read_time
|
1384
|
+
|
1385
|
+
# A Firestore query.
|
1386
|
+
# Corresponds to the JSON property `structuredQuery`
|
1387
|
+
# @return [Google::Apis::FirestoreV1beta1::StructuredQuery]
|
1388
|
+
attr_accessor :structured_query
|
1389
|
+
|
1390
|
+
# Reads documents in a transaction.
|
1391
|
+
# Corresponds to the JSON property `transaction`
|
1392
|
+
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
1393
|
+
# @return [String]
|
1394
|
+
attr_accessor :transaction
|
1395
|
+
|
1396
|
+
def initialize(**args)
|
1397
|
+
update!(**args)
|
1398
|
+
end
|
1399
|
+
|
1400
|
+
# Update properties of this object
|
1401
|
+
def update!(**args)
|
1402
|
+
@new_transaction = args[:new_transaction] if args.key?(:new_transaction)
|
1403
|
+
@read_time = args[:read_time] if args.key?(:read_time)
|
1404
|
+
@structured_query = args[:structured_query] if args.key?(:structured_query)
|
1405
|
+
@transaction = args[:transaction] if args.key?(:transaction)
|
1406
|
+
end
|
1407
|
+
end
|
1408
|
+
|
1409
|
+
# The response for Firestore.RunQuery.
|
1410
|
+
class RunQueryResponse
|
1411
|
+
include Google::Apis::Core::Hashable
|
1412
|
+
|
1413
|
+
# A Firestore document.
|
1414
|
+
# Must not exceed 1 MiB - 4 bytes.
|
1415
|
+
# Corresponds to the JSON property `document`
|
1416
|
+
# @return [Google::Apis::FirestoreV1beta1::Document]
|
1417
|
+
attr_accessor :document
|
1418
|
+
|
1419
|
+
# The time at which the document was read. This may be monotonically
|
1420
|
+
# increasing; in this case, the previous documents in the result stream are
|
1421
|
+
# guaranteed not to have changed between their `read_time` and this one.
|
1422
|
+
# If the query returns no results, a response with `read_time` and no
|
1423
|
+
# `document` will be sent, and this represents the time at which the query
|
1424
|
+
# was run.
|
1425
|
+
# Corresponds to the JSON property `readTime`
|
1426
|
+
# @return [String]
|
1427
|
+
attr_accessor :read_time
|
1428
|
+
|
1429
|
+
# The number of results that have been skipped due to an offset between
|
1430
|
+
# the last response and the current response.
|
1431
|
+
# Corresponds to the JSON property `skippedResults`
|
1432
|
+
# @return [Fixnum]
|
1433
|
+
attr_accessor :skipped_results
|
1434
|
+
|
1435
|
+
# The transaction that was started as part of this request.
|
1436
|
+
# Can only be set in the first response, and only if
|
1437
|
+
# RunQueryRequest.new_transaction was set in the request.
|
1438
|
+
# If set, no other fields will be set in this response.
|
1439
|
+
# Corresponds to the JSON property `transaction`
|
1440
|
+
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
1441
|
+
# @return [String]
|
1442
|
+
attr_accessor :transaction
|
1443
|
+
|
1444
|
+
def initialize(**args)
|
1445
|
+
update!(**args)
|
1446
|
+
end
|
1447
|
+
|
1448
|
+
# Update properties of this object
|
1449
|
+
def update!(**args)
|
1450
|
+
@document = args[:document] if args.key?(:document)
|
1451
|
+
@read_time = args[:read_time] if args.key?(:read_time)
|
1452
|
+
@skipped_results = args[:skipped_results] if args.key?(:skipped_results)
|
1453
|
+
@transaction = args[:transaction] if args.key?(:transaction)
|
1454
|
+
end
|
1455
|
+
end
|
1456
|
+
|
1457
|
+
# The `Status` type defines a logical error model that is suitable for different
|
1458
|
+
# programming environments, including REST APIs and RPC APIs. It is used by
|
1459
|
+
# [gRPC](https://github.com/grpc). The error model is designed to be:
|
1460
|
+
# - Simple to use and understand for most users
|
1461
|
+
# - Flexible enough to meet unexpected needs
|
1462
|
+
# # Overview
|
1463
|
+
# The `Status` message contains three pieces of data: error code, error message,
|
1464
|
+
# and error details. The error code should be an enum value of
|
1465
|
+
# google.rpc.Code, but it may accept additional error codes if needed. The
|
1466
|
+
# error message should be a developer-facing English message that helps
|
1467
|
+
# developers *understand* and *resolve* the error. If a localized user-facing
|
1468
|
+
# error message is needed, put the localized message in the error details or
|
1469
|
+
# localize it in the client. The optional error details may contain arbitrary
|
1470
|
+
# information about the error. There is a predefined set of error detail types
|
1471
|
+
# in the package `google.rpc` that can be used for common error conditions.
|
1472
|
+
# # Language mapping
|
1473
|
+
# The `Status` message is the logical representation of the error model, but it
|
1474
|
+
# is not necessarily the actual wire format. When the `Status` message is
|
1475
|
+
# exposed in different client libraries and different wire protocols, it can be
|
1476
|
+
# mapped differently. For example, it will likely be mapped to some exceptions
|
1477
|
+
# in Java, but more likely mapped to some error codes in C.
|
1478
|
+
# # Other uses
|
1479
|
+
# The error model and the `Status` message can be used in a variety of
|
1480
|
+
# environments, either with or without APIs, to provide a
|
1481
|
+
# consistent developer experience across different environments.
|
1482
|
+
# Example uses of this error model include:
|
1483
|
+
# - Partial errors. If a service needs to return partial errors to the client,
|
1484
|
+
# it may embed the `Status` in the normal response to indicate the partial
|
1485
|
+
# errors.
|
1486
|
+
# - Workflow errors. A typical workflow has multiple steps. Each step may
|
1487
|
+
# have a `Status` message for error reporting.
|
1488
|
+
# - Batch operations. If a client uses batch request and batch response, the
|
1489
|
+
# `Status` message should be used directly inside batch response, one for
|
1490
|
+
# each error sub-response.
|
1491
|
+
# - Asynchronous operations. If an API call embeds asynchronous operation
|
1492
|
+
# results in its response, the status of those operations should be
|
1493
|
+
# represented directly using the `Status` message.
|
1494
|
+
# - Logging. If some API errors are stored in logs, the message `Status` could
|
1495
|
+
# be used directly after any stripping needed for security/privacy reasons.
|
1496
|
+
class Status
|
1497
|
+
include Google::Apis::Core::Hashable
|
1498
|
+
|
1499
|
+
# The status code, which should be an enum value of google.rpc.Code.
|
1500
|
+
# Corresponds to the JSON property `code`
|
1501
|
+
# @return [Fixnum]
|
1502
|
+
attr_accessor :code
|
1503
|
+
|
1504
|
+
# A list of messages that carry the error details. There is a common set of
|
1505
|
+
# message types for APIs to use.
|
1506
|
+
# Corresponds to the JSON property `details`
|
1507
|
+
# @return [Array<Hash<String,Object>>]
|
1508
|
+
attr_accessor :details
|
1509
|
+
|
1510
|
+
# A developer-facing error message, which should be in English. Any
|
1511
|
+
# user-facing error message should be localized and sent in the
|
1512
|
+
# google.rpc.Status.details field, or localized by the client.
|
1513
|
+
# Corresponds to the JSON property `message`
|
1514
|
+
# @return [String]
|
1515
|
+
attr_accessor :message
|
1516
|
+
|
1517
|
+
def initialize(**args)
|
1518
|
+
update!(**args)
|
1519
|
+
end
|
1520
|
+
|
1521
|
+
# Update properties of this object
|
1522
|
+
def update!(**args)
|
1523
|
+
@code = args[:code] if args.key?(:code)
|
1524
|
+
@details = args[:details] if args.key?(:details)
|
1525
|
+
@message = args[:message] if args.key?(:message)
|
1526
|
+
end
|
1527
|
+
end
|
1528
|
+
|
1529
|
+
# A Firestore query.
|
1530
|
+
class StructuredQuery
|
1531
|
+
include Google::Apis::Core::Hashable
|
1532
|
+
|
1533
|
+
# A position in a query result set.
|
1534
|
+
# Corresponds to the JSON property `endAt`
|
1535
|
+
# @return [Google::Apis::FirestoreV1beta1::Cursor]
|
1536
|
+
attr_accessor :end_at
|
1537
|
+
|
1538
|
+
# The collections to query.
|
1539
|
+
# Corresponds to the JSON property `from`
|
1540
|
+
# @return [Array<Google::Apis::FirestoreV1beta1::CollectionSelector>]
|
1541
|
+
attr_accessor :from
|
1542
|
+
|
1543
|
+
# The maximum number of results to return.
|
1544
|
+
# Applies after all other constraints.
|
1545
|
+
# Must be >= 0 if specified.
|
1546
|
+
# Corresponds to the JSON property `limit`
|
1547
|
+
# @return [Fixnum]
|
1548
|
+
attr_accessor :limit
|
1549
|
+
|
1550
|
+
# The number of results to skip.
|
1551
|
+
# Applies before limit, but after all other constraints. Must be >= 0 if
|
1552
|
+
# specified.
|
1553
|
+
# Corresponds to the JSON property `offset`
|
1554
|
+
# @return [Fixnum]
|
1555
|
+
attr_accessor :offset
|
1556
|
+
|
1557
|
+
# The order to apply to the query results.
|
1558
|
+
# Firestore guarantees a stable ordering through the following rules:
|
1559
|
+
# * Any field required to appear in `order_by`, that is not already
|
1560
|
+
# specified in `order_by`, is appended to the order in field name order
|
1561
|
+
# by default.
|
1562
|
+
# * If an order on `__name__` is not specified, it is appended by default.
|
1563
|
+
# Fields are appended with the same sort direction as the last order
|
1564
|
+
# specified, or 'ASCENDING' if no order was specified. For example:
|
1565
|
+
# * `SELECT * FROM Foo ORDER BY A` becomes
|
1566
|
+
# `SELECT * FROM Foo ORDER BY A, __name__`
|
1567
|
+
# * `SELECT * FROM Foo ORDER BY A DESC` becomes
|
1568
|
+
# `SELECT * FROM Foo ORDER BY A DESC, __name__ DESC`
|
1569
|
+
# * `SELECT * FROM Foo WHERE A > 1` becomes
|
1570
|
+
# `SELECT * FROM Foo WHERE A > 1 ORDER BY A, __name__`
|
1571
|
+
# Corresponds to the JSON property `orderBy`
|
1572
|
+
# @return [Array<Google::Apis::FirestoreV1beta1::Order>]
|
1573
|
+
attr_accessor :order_by
|
1574
|
+
|
1575
|
+
# The projection of document's fields to return.
|
1576
|
+
# Corresponds to the JSON property `select`
|
1577
|
+
# @return [Google::Apis::FirestoreV1beta1::Projection]
|
1578
|
+
attr_accessor :select
|
1579
|
+
|
1580
|
+
# A position in a query result set.
|
1581
|
+
# Corresponds to the JSON property `startAt`
|
1582
|
+
# @return [Google::Apis::FirestoreV1beta1::Cursor]
|
1583
|
+
attr_accessor :start_at
|
1584
|
+
|
1585
|
+
# A filter.
|
1586
|
+
# Corresponds to the JSON property `where`
|
1587
|
+
# @return [Google::Apis::FirestoreV1beta1::Filter]
|
1588
|
+
attr_accessor :where
|
1589
|
+
|
1590
|
+
def initialize(**args)
|
1591
|
+
update!(**args)
|
1592
|
+
end
|
1593
|
+
|
1594
|
+
# Update properties of this object
|
1595
|
+
def update!(**args)
|
1596
|
+
@end_at = args[:end_at] if args.key?(:end_at)
|
1597
|
+
@from = args[:from] if args.key?(:from)
|
1598
|
+
@limit = args[:limit] if args.key?(:limit)
|
1599
|
+
@offset = args[:offset] if args.key?(:offset)
|
1600
|
+
@order_by = args[:order_by] if args.key?(:order_by)
|
1601
|
+
@select = args[:select] if args.key?(:select)
|
1602
|
+
@start_at = args[:start_at] if args.key?(:start_at)
|
1603
|
+
@where = args[:where] if args.key?(:where)
|
1604
|
+
end
|
1605
|
+
end
|
1606
|
+
|
1607
|
+
# A specification of a set of documents to listen to.
|
1608
|
+
class Target
|
1609
|
+
include Google::Apis::Core::Hashable
|
1610
|
+
|
1611
|
+
# A target specified by a set of documents names.
|
1612
|
+
# Corresponds to the JSON property `documents`
|
1613
|
+
# @return [Google::Apis::FirestoreV1beta1::DocumentsTarget]
|
1614
|
+
attr_accessor :documents
|
1615
|
+
|
1616
|
+
# If the target should be removed once it is current and consistent.
|
1617
|
+
# Corresponds to the JSON property `once`
|
1618
|
+
# @return [Boolean]
|
1619
|
+
attr_accessor :once
|
1620
|
+
alias_method :once?, :once
|
1621
|
+
|
1622
|
+
# A target specified by a query.
|
1623
|
+
# Corresponds to the JSON property `query`
|
1624
|
+
# @return [Google::Apis::FirestoreV1beta1::QueryTarget]
|
1625
|
+
attr_accessor :query
|
1626
|
+
|
1627
|
+
# Start listening after a specific `read_time`.
|
1628
|
+
# The client must know the state of matching documents at this time.
|
1629
|
+
# Corresponds to the JSON property `readTime`
|
1630
|
+
# @return [String]
|
1631
|
+
attr_accessor :read_time
|
1632
|
+
|
1633
|
+
# A resume token from a prior TargetChange for an identical target.
|
1634
|
+
# Using a resume token with a different target is unsupported and may fail.
|
1635
|
+
# Corresponds to the JSON property `resumeToken`
|
1636
|
+
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
1637
|
+
# @return [String]
|
1638
|
+
attr_accessor :resume_token
|
1639
|
+
|
1640
|
+
# A client provided target ID.
|
1641
|
+
# If not set, the server will assign an ID for the target.
|
1642
|
+
# Used for resuming a target without changing IDs. The IDs can either be
|
1643
|
+
# client-assigned or be server-assigned in a previous stream. All targets
|
1644
|
+
# with client provided IDs must be added before adding a target that needs
|
1645
|
+
# a server-assigned id.
|
1646
|
+
# Corresponds to the JSON property `targetId`
|
1647
|
+
# @return [Fixnum]
|
1648
|
+
attr_accessor :target_id
|
1649
|
+
|
1650
|
+
def initialize(**args)
|
1651
|
+
update!(**args)
|
1652
|
+
end
|
1653
|
+
|
1654
|
+
# Update properties of this object
|
1655
|
+
def update!(**args)
|
1656
|
+
@documents = args[:documents] if args.key?(:documents)
|
1657
|
+
@once = args[:once] if args.key?(:once)
|
1658
|
+
@query = args[:query] if args.key?(:query)
|
1659
|
+
@read_time = args[:read_time] if args.key?(:read_time)
|
1660
|
+
@resume_token = args[:resume_token] if args.key?(:resume_token)
|
1661
|
+
@target_id = args[:target_id] if args.key?(:target_id)
|
1662
|
+
end
|
1663
|
+
end
|
1664
|
+
|
1665
|
+
# Targets being watched have changed.
|
1666
|
+
class TargetChange
|
1667
|
+
include Google::Apis::Core::Hashable
|
1668
|
+
|
1669
|
+
# The `Status` type defines a logical error model that is suitable for different
|
1670
|
+
# programming environments, including REST APIs and RPC APIs. It is used by
|
1671
|
+
# [gRPC](https://github.com/grpc). The error model is designed to be:
|
1672
|
+
# - Simple to use and understand for most users
|
1673
|
+
# - Flexible enough to meet unexpected needs
|
1674
|
+
# # Overview
|
1675
|
+
# The `Status` message contains three pieces of data: error code, error message,
|
1676
|
+
# and error details. The error code should be an enum value of
|
1677
|
+
# google.rpc.Code, but it may accept additional error codes if needed. The
|
1678
|
+
# error message should be a developer-facing English message that helps
|
1679
|
+
# developers *understand* and *resolve* the error. If a localized user-facing
|
1680
|
+
# error message is needed, put the localized message in the error details or
|
1681
|
+
# localize it in the client. The optional error details may contain arbitrary
|
1682
|
+
# information about the error. There is a predefined set of error detail types
|
1683
|
+
# in the package `google.rpc` that can be used for common error conditions.
|
1684
|
+
# # Language mapping
|
1685
|
+
# The `Status` message is the logical representation of the error model, but it
|
1686
|
+
# is not necessarily the actual wire format. When the `Status` message is
|
1687
|
+
# exposed in different client libraries and different wire protocols, it can be
|
1688
|
+
# mapped differently. For example, it will likely be mapped to some exceptions
|
1689
|
+
# in Java, but more likely mapped to some error codes in C.
|
1690
|
+
# # Other uses
|
1691
|
+
# The error model and the `Status` message can be used in a variety of
|
1692
|
+
# environments, either with or without APIs, to provide a
|
1693
|
+
# consistent developer experience across different environments.
|
1694
|
+
# Example uses of this error model include:
|
1695
|
+
# - Partial errors. If a service needs to return partial errors to the client,
|
1696
|
+
# it may embed the `Status` in the normal response to indicate the partial
|
1697
|
+
# errors.
|
1698
|
+
# - Workflow errors. A typical workflow has multiple steps. Each step may
|
1699
|
+
# have a `Status` message for error reporting.
|
1700
|
+
# - Batch operations. If a client uses batch request and batch response, the
|
1701
|
+
# `Status` message should be used directly inside batch response, one for
|
1702
|
+
# each error sub-response.
|
1703
|
+
# - Asynchronous operations. If an API call embeds asynchronous operation
|
1704
|
+
# results in its response, the status of those operations should be
|
1705
|
+
# represented directly using the `Status` message.
|
1706
|
+
# - Logging. If some API errors are stored in logs, the message `Status` could
|
1707
|
+
# be used directly after any stripping needed for security/privacy reasons.
|
1708
|
+
# Corresponds to the JSON property `cause`
|
1709
|
+
# @return [Google::Apis::FirestoreV1beta1::Status]
|
1710
|
+
attr_accessor :cause
|
1711
|
+
|
1712
|
+
# The consistent `read_time` for the given `target_ids` (omitted when the
|
1713
|
+
# target_ids are not at a consistent snapshot).
|
1714
|
+
# The stream is guaranteed to send a `read_time` with `target_ids` empty
|
1715
|
+
# whenever the entire stream reaches a new consistent snapshot. ADD,
|
1716
|
+
# CURRENT, and RESET messages are guaranteed to (eventually) result in a
|
1717
|
+
# new consistent snapshot (while NO_CHANGE and REMOVE messages are not).
|
1718
|
+
# For a given stream, `read_time` is guaranteed to be monotonically
|
1719
|
+
# increasing.
|
1720
|
+
# Corresponds to the JSON property `readTime`
|
1721
|
+
# @return [String]
|
1722
|
+
attr_accessor :read_time
|
1723
|
+
|
1724
|
+
# A token that can be used to resume the stream for the given `target_ids`,
|
1725
|
+
# or all targets if `target_ids` is empty.
|
1726
|
+
# Not set on every target change.
|
1727
|
+
# Corresponds to the JSON property `resumeToken`
|
1728
|
+
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
1729
|
+
# @return [String]
|
1730
|
+
attr_accessor :resume_token
|
1731
|
+
|
1732
|
+
# The type of change that occurred.
|
1733
|
+
# Corresponds to the JSON property `targetChangeType`
|
1734
|
+
# @return [String]
|
1735
|
+
attr_accessor :target_change_type
|
1736
|
+
|
1737
|
+
# The target IDs of targets that have changed.
|
1738
|
+
# If empty, the change applies to all targets.
|
1739
|
+
# For `target_change_type=ADD`, the order of the target IDs matches the order
|
1740
|
+
# of the requests to add the targets. This allows clients to unambiguously
|
1741
|
+
# associate server-assigned target IDs with added targets.
|
1742
|
+
# For other states, the order of the target IDs is not defined.
|
1743
|
+
# Corresponds to the JSON property `targetIds`
|
1744
|
+
# @return [Array<Fixnum>]
|
1745
|
+
attr_accessor :target_ids
|
1746
|
+
|
1747
|
+
def initialize(**args)
|
1748
|
+
update!(**args)
|
1749
|
+
end
|
1750
|
+
|
1751
|
+
# Update properties of this object
|
1752
|
+
def update!(**args)
|
1753
|
+
@cause = args[:cause] if args.key?(:cause)
|
1754
|
+
@read_time = args[:read_time] if args.key?(:read_time)
|
1755
|
+
@resume_token = args[:resume_token] if args.key?(:resume_token)
|
1756
|
+
@target_change_type = args[:target_change_type] if args.key?(:target_change_type)
|
1757
|
+
@target_ids = args[:target_ids] if args.key?(:target_ids)
|
1758
|
+
end
|
1759
|
+
end
|
1760
|
+
|
1761
|
+
# Options for creating a new transaction.
|
1762
|
+
class TransactionOptions
|
1763
|
+
include Google::Apis::Core::Hashable
|
1764
|
+
|
1765
|
+
# Options for a transaction that can only be used to read documents.
|
1766
|
+
# Corresponds to the JSON property `readOnly`
|
1767
|
+
# @return [Google::Apis::FirestoreV1beta1::ReadOnly]
|
1768
|
+
attr_accessor :read_only
|
1769
|
+
|
1770
|
+
# Options for a transaction that can be used to read and write documents.
|
1771
|
+
# Corresponds to the JSON property `readWrite`
|
1772
|
+
# @return [Google::Apis::FirestoreV1beta1::ReadWrite]
|
1773
|
+
attr_accessor :read_write
|
1774
|
+
|
1775
|
+
def initialize(**args)
|
1776
|
+
update!(**args)
|
1777
|
+
end
|
1778
|
+
|
1779
|
+
# Update properties of this object
|
1780
|
+
def update!(**args)
|
1781
|
+
@read_only = args[:read_only] if args.key?(:read_only)
|
1782
|
+
@read_write = args[:read_write] if args.key?(:read_write)
|
1783
|
+
end
|
1784
|
+
end
|
1785
|
+
|
1786
|
+
# A filter with a single operand.
|
1787
|
+
class UnaryFilter
|
1788
|
+
include Google::Apis::Core::Hashable
|
1789
|
+
|
1790
|
+
# A reference to a field, such as `max(messages.time) as max_time`.
|
1791
|
+
# Corresponds to the JSON property `field`
|
1792
|
+
# @return [Google::Apis::FirestoreV1beta1::FieldReference]
|
1793
|
+
attr_accessor :field
|
1794
|
+
|
1795
|
+
# The unary operator to apply.
|
1796
|
+
# Corresponds to the JSON property `op`
|
1797
|
+
# @return [String]
|
1798
|
+
attr_accessor :op
|
1799
|
+
|
1800
|
+
def initialize(**args)
|
1801
|
+
update!(**args)
|
1802
|
+
end
|
1803
|
+
|
1804
|
+
# Update properties of this object
|
1805
|
+
def update!(**args)
|
1806
|
+
@field = args[:field] if args.key?(:field)
|
1807
|
+
@op = args[:op] if args.key?(:op)
|
1808
|
+
end
|
1809
|
+
end
|
1810
|
+
|
1811
|
+
# A message that can hold any of the supported value types.
|
1812
|
+
class Value
|
1813
|
+
include Google::Apis::Core::Hashable
|
1814
|
+
|
1815
|
+
# An array value.
|
1816
|
+
# Corresponds to the JSON property `arrayValue`
|
1817
|
+
# @return [Google::Apis::FirestoreV1beta1::ArrayValue]
|
1818
|
+
attr_accessor :array_value
|
1819
|
+
|
1820
|
+
# A boolean value.
|
1821
|
+
# Corresponds to the JSON property `booleanValue`
|
1822
|
+
# @return [Boolean]
|
1823
|
+
attr_accessor :boolean_value
|
1824
|
+
alias_method :boolean_value?, :boolean_value
|
1825
|
+
|
1826
|
+
# A bytes value.
|
1827
|
+
# Must not exceed 1 MiB - 89 bytes.
|
1828
|
+
# Only the first 1,500 bytes are considered by queries.
|
1829
|
+
# Corresponds to the JSON property `bytesValue`
|
1830
|
+
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
1831
|
+
# @return [String]
|
1832
|
+
attr_accessor :bytes_value
|
1833
|
+
|
1834
|
+
# A double value.
|
1835
|
+
# Corresponds to the JSON property `doubleValue`
|
1836
|
+
# @return [Float]
|
1837
|
+
attr_accessor :double_value
|
1838
|
+
|
1839
|
+
# An object representing a latitude/longitude pair. This is expressed as a pair
|
1840
|
+
# of doubles representing degrees latitude and degrees longitude. Unless
|
1841
|
+
# specified otherwise, this must conform to the
|
1842
|
+
# <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
|
1843
|
+
# standard</a>. Values must be within normalized ranges.
|
1844
|
+
# Example of normalization code in Python:
|
1845
|
+
# def NormalizeLongitude(longitude):
|
1846
|
+
# """Wraps decimal degrees longitude to [-180.0, 180.0]."""
|
1847
|
+
# q, r = divmod(longitude, 360.0)
|
1848
|
+
# if r > 180.0 or (r == 180.0 and q <= -1.0):
|
1849
|
+
# return r - 360.0
|
1850
|
+
# return r
|
1851
|
+
# def NormalizeLatLng(latitude, longitude):
|
1852
|
+
# """Wraps decimal degrees latitude and longitude to
|
1853
|
+
# [-90.0, 90.0] and [-180.0, 180.0], respectively."""
|
1854
|
+
# r = latitude % 360.0
|
1855
|
+
# if r <= 90.0:
|
1856
|
+
# return r, NormalizeLongitude(longitude)
|
1857
|
+
# elif r >= 270.0:
|
1858
|
+
# return r - 360, NormalizeLongitude(longitude)
|
1859
|
+
# else:
|
1860
|
+
# return 180 - r, NormalizeLongitude(longitude + 180.0)
|
1861
|
+
# assert 180.0 == NormalizeLongitude(180.0)
|
1862
|
+
# assert -180.0 == NormalizeLongitude(-180.0)
|
1863
|
+
# assert -179.0 == NormalizeLongitude(181.0)
|
1864
|
+
# assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0)
|
1865
|
+
# assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0)
|
1866
|
+
# assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0)
|
1867
|
+
# assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0)
|
1868
|
+
# assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0)
|
1869
|
+
# assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0)
|
1870
|
+
# assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0)
|
1871
|
+
# assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0)
|
1872
|
+
# assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0)
|
1873
|
+
# assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0)
|
1874
|
+
# Corresponds to the JSON property `geoPointValue`
|
1875
|
+
# @return [Google::Apis::FirestoreV1beta1::LatLng]
|
1876
|
+
attr_accessor :geo_point_value
|
1877
|
+
|
1878
|
+
# An integer value.
|
1879
|
+
# Corresponds to the JSON property `integerValue`
|
1880
|
+
# @return [Fixnum]
|
1881
|
+
attr_accessor :integer_value
|
1882
|
+
|
1883
|
+
# A map value.
|
1884
|
+
# Corresponds to the JSON property `mapValue`
|
1885
|
+
# @return [Google::Apis::FirestoreV1beta1::MapValue]
|
1886
|
+
attr_accessor :map_value
|
1887
|
+
|
1888
|
+
# A null value.
|
1889
|
+
# Corresponds to the JSON property `nullValue`
|
1890
|
+
# @return [String]
|
1891
|
+
attr_accessor :null_value
|
1892
|
+
|
1893
|
+
# A reference to a document. For example:
|
1894
|
+
# `projects/`project_id`/databases/`database_id`/documents/`document_path``.
|
1895
|
+
# Corresponds to the JSON property `referenceValue`
|
1896
|
+
# @return [String]
|
1897
|
+
attr_accessor :reference_value
|
1898
|
+
|
1899
|
+
# A string value.
|
1900
|
+
# The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes.
|
1901
|
+
# Only the first 1,500 bytes of the UTF-8 representation are considered by
|
1902
|
+
# queries.
|
1903
|
+
# Corresponds to the JSON property `stringValue`
|
1904
|
+
# @return [String]
|
1905
|
+
attr_accessor :string_value
|
1906
|
+
|
1907
|
+
# A timestamp value.
|
1908
|
+
# Precise only to microseconds. When stored, any additional precision is
|
1909
|
+
# rounded down.
|
1910
|
+
# Corresponds to the JSON property `timestampValue`
|
1911
|
+
# @return [String]
|
1912
|
+
attr_accessor :timestamp_value
|
1913
|
+
|
1914
|
+
def initialize(**args)
|
1915
|
+
update!(**args)
|
1916
|
+
end
|
1917
|
+
|
1918
|
+
# Update properties of this object
|
1919
|
+
def update!(**args)
|
1920
|
+
@array_value = args[:array_value] if args.key?(:array_value)
|
1921
|
+
@boolean_value = args[:boolean_value] if args.key?(:boolean_value)
|
1922
|
+
@bytes_value = args[:bytes_value] if args.key?(:bytes_value)
|
1923
|
+
@double_value = args[:double_value] if args.key?(:double_value)
|
1924
|
+
@geo_point_value = args[:geo_point_value] if args.key?(:geo_point_value)
|
1925
|
+
@integer_value = args[:integer_value] if args.key?(:integer_value)
|
1926
|
+
@map_value = args[:map_value] if args.key?(:map_value)
|
1927
|
+
@null_value = args[:null_value] if args.key?(:null_value)
|
1928
|
+
@reference_value = args[:reference_value] if args.key?(:reference_value)
|
1929
|
+
@string_value = args[:string_value] if args.key?(:string_value)
|
1930
|
+
@timestamp_value = args[:timestamp_value] if args.key?(:timestamp_value)
|
1931
|
+
end
|
1932
|
+
end
|
1933
|
+
|
1934
|
+
# A write on a document.
|
1935
|
+
class Write
|
1936
|
+
include Google::Apis::Core::Hashable
|
1937
|
+
|
1938
|
+
# A precondition on a document, used for conditional operations.
|
1939
|
+
# Corresponds to the JSON property `currentDocument`
|
1940
|
+
# @return [Google::Apis::FirestoreV1beta1::Precondition]
|
1941
|
+
attr_accessor :current_document
|
1942
|
+
|
1943
|
+
# A document name to delete. In the format:
|
1944
|
+
# `projects/`project_id`/databases/`database_id`/documents/`document_path``.
|
1945
|
+
# Corresponds to the JSON property `delete`
|
1946
|
+
# @return [String]
|
1947
|
+
attr_accessor :delete
|
1948
|
+
|
1949
|
+
# A transformation of a document.
|
1950
|
+
# Corresponds to the JSON property `transform`
|
1951
|
+
# @return [Google::Apis::FirestoreV1beta1::DocumentTransform]
|
1952
|
+
attr_accessor :transform
|
1953
|
+
|
1954
|
+
# A Firestore document.
|
1955
|
+
# Must not exceed 1 MiB - 4 bytes.
|
1956
|
+
# Corresponds to the JSON property `update`
|
1957
|
+
# @return [Google::Apis::FirestoreV1beta1::Document]
|
1958
|
+
attr_accessor :update
|
1959
|
+
|
1960
|
+
# A set of field paths on a document.
|
1961
|
+
# Used to restrict a get or update operation on a document to a subset of its
|
1962
|
+
# fields.
|
1963
|
+
# This is different from standard field masks, as this is always scoped to a
|
1964
|
+
# Document, and takes in account the dynamic nature of Value.
|
1965
|
+
# Corresponds to the JSON property `updateMask`
|
1966
|
+
# @return [Google::Apis::FirestoreV1beta1::DocumentMask]
|
1967
|
+
attr_accessor :update_mask
|
1968
|
+
|
1969
|
+
def initialize(**args)
|
1970
|
+
update!(**args)
|
1971
|
+
end
|
1972
|
+
|
1973
|
+
# Update properties of this object
|
1974
|
+
def update!(**args)
|
1975
|
+
@current_document = args[:current_document] if args.key?(:current_document)
|
1976
|
+
@delete = args[:delete] if args.key?(:delete)
|
1977
|
+
@transform = args[:transform] if args.key?(:transform)
|
1978
|
+
@update = args[:update] if args.key?(:update)
|
1979
|
+
@update_mask = args[:update_mask] if args.key?(:update_mask)
|
1980
|
+
end
|
1981
|
+
end
|
1982
|
+
|
1983
|
+
# The request for Firestore.Write.
|
1984
|
+
# The first request creates a stream, or resumes an existing one from a token.
|
1985
|
+
# When creating a new stream, the server replies with a response containing
|
1986
|
+
# only an ID and a token, to use in the next request.
|
1987
|
+
# When resuming a stream, the server first streams any responses later than the
|
1988
|
+
# given token, then a response containing only an up-to-date token, to use in
|
1989
|
+
# the next request.
|
1990
|
+
class WriteRequest
|
1991
|
+
include Google::Apis::Core::Hashable
|
1992
|
+
|
1993
|
+
# Labels associated with this write request.
|
1994
|
+
# Corresponds to the JSON property `labels`
|
1995
|
+
# @return [Hash<String,String>]
|
1996
|
+
attr_accessor :labels
|
1997
|
+
|
1998
|
+
# The ID of the write stream to resume.
|
1999
|
+
# This may only be set in the first message. When left empty, a new write
|
2000
|
+
# stream will be created.
|
2001
|
+
# Corresponds to the JSON property `streamId`
|
2002
|
+
# @return [String]
|
2003
|
+
attr_accessor :stream_id
|
2004
|
+
|
2005
|
+
# A stream token that was previously sent by the server.
|
2006
|
+
# The client should set this field to the token from the most recent
|
2007
|
+
# WriteResponse it has received. This acknowledges that the client has
|
2008
|
+
# received responses up to this token. After sending this token, earlier
|
2009
|
+
# tokens may not be used anymore.
|
2010
|
+
# The server may close the stream if there are too many unacknowledged
|
2011
|
+
# responses.
|
2012
|
+
# Leave this field unset when creating a new stream. To resume a stream at
|
2013
|
+
# a specific point, set this field and the `stream_id` field.
|
2014
|
+
# Leave this field unset when creating a new stream.
|
2015
|
+
# Corresponds to the JSON property `streamToken`
|
2016
|
+
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
2017
|
+
# @return [String]
|
2018
|
+
attr_accessor :stream_token
|
2019
|
+
|
2020
|
+
# The writes to apply.
|
2021
|
+
# Always executed atomically and in order.
|
2022
|
+
# This must be empty on the first request.
|
2023
|
+
# This may be empty on the last request.
|
2024
|
+
# This must not be empty on all other requests.
|
2025
|
+
# Corresponds to the JSON property `writes`
|
2026
|
+
# @return [Array<Google::Apis::FirestoreV1beta1::Write>]
|
2027
|
+
attr_accessor :writes
|
2028
|
+
|
2029
|
+
def initialize(**args)
|
2030
|
+
update!(**args)
|
2031
|
+
end
|
2032
|
+
|
2033
|
+
# Update properties of this object
|
2034
|
+
def update!(**args)
|
2035
|
+
@labels = args[:labels] if args.key?(:labels)
|
2036
|
+
@stream_id = args[:stream_id] if args.key?(:stream_id)
|
2037
|
+
@stream_token = args[:stream_token] if args.key?(:stream_token)
|
2038
|
+
@writes = args[:writes] if args.key?(:writes)
|
2039
|
+
end
|
2040
|
+
end
|
2041
|
+
|
2042
|
+
# The response for Firestore.Write.
|
2043
|
+
class WriteResponse
|
2044
|
+
include Google::Apis::Core::Hashable
|
2045
|
+
|
2046
|
+
# The time at which the commit occurred.
|
2047
|
+
# Corresponds to the JSON property `commitTime`
|
2048
|
+
# @return [String]
|
2049
|
+
attr_accessor :commit_time
|
2050
|
+
|
2051
|
+
# The ID of the stream.
|
2052
|
+
# Only set on the first message, when a new stream was created.
|
2053
|
+
# Corresponds to the JSON property `streamId`
|
2054
|
+
# @return [String]
|
2055
|
+
attr_accessor :stream_id
|
2056
|
+
|
2057
|
+
# A token that represents the position of this response in the stream.
|
2058
|
+
# This can be used by a client to resume the stream at this point.
|
2059
|
+
# This field is always set.
|
2060
|
+
# Corresponds to the JSON property `streamToken`
|
2061
|
+
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
2062
|
+
# @return [String]
|
2063
|
+
attr_accessor :stream_token
|
2064
|
+
|
2065
|
+
# The result of applying the writes.
|
2066
|
+
# This i-th write result corresponds to the i-th write in the
|
2067
|
+
# request.
|
2068
|
+
# Corresponds to the JSON property `writeResults`
|
2069
|
+
# @return [Array<Google::Apis::FirestoreV1beta1::WriteResult>]
|
2070
|
+
attr_accessor :write_results
|
2071
|
+
|
2072
|
+
def initialize(**args)
|
2073
|
+
update!(**args)
|
2074
|
+
end
|
2075
|
+
|
2076
|
+
# Update properties of this object
|
2077
|
+
def update!(**args)
|
2078
|
+
@commit_time = args[:commit_time] if args.key?(:commit_time)
|
2079
|
+
@stream_id = args[:stream_id] if args.key?(:stream_id)
|
2080
|
+
@stream_token = args[:stream_token] if args.key?(:stream_token)
|
2081
|
+
@write_results = args[:write_results] if args.key?(:write_results)
|
2082
|
+
end
|
2083
|
+
end
|
2084
|
+
|
2085
|
+
# The result of applying a write.
|
2086
|
+
class WriteResult
|
2087
|
+
include Google::Apis::Core::Hashable
|
2088
|
+
|
2089
|
+
# The results of applying each DocumentTransform.FieldTransform, in the
|
2090
|
+
# same order.
|
2091
|
+
# Corresponds to the JSON property `transformResults`
|
2092
|
+
# @return [Array<Google::Apis::FirestoreV1beta1::Value>]
|
2093
|
+
attr_accessor :transform_results
|
2094
|
+
|
2095
|
+
# The last update time of the document after applying the write. Not set
|
2096
|
+
# after a `delete`.
|
2097
|
+
# If the write did not actually change the document, this will be the
|
2098
|
+
# previous update_time.
|
2099
|
+
# Corresponds to the JSON property `updateTime`
|
2100
|
+
# @return [String]
|
2101
|
+
attr_accessor :update_time
|
2102
|
+
|
2103
|
+
def initialize(**args)
|
2104
|
+
update!(**args)
|
2105
|
+
end
|
2106
|
+
|
2107
|
+
# Update properties of this object
|
2108
|
+
def update!(**args)
|
2109
|
+
@transform_results = args[:transform_results] if args.key?(:transform_results)
|
2110
|
+
@update_time = args[:update_time] if args.key?(:update_time)
|
2111
|
+
end
|
2112
|
+
end
|
2113
|
+
end
|
2114
|
+
end
|
2115
|
+
end
|