Class: Google::Cloud::Firestore::V1::DocumentTransform
- Inherits:
-
Object
- Object
- Google::Cloud::Firestore::V1::DocumentTransform
- Extended by:
- Protobuf::MessageExts::ClassMethods
- Includes:
- Protobuf::MessageExts
- Defined in:
- proto_docs/google/firestore/v1/write.rb
Overview
A transformation of a document.
Defined Under Namespace
Classes: FieldTransform
Instance Attribute Summary collapse
-
#document ⇒ ::String
The name of the document to transform.
-
#field_transforms ⇒ ::Array<::Google::Cloud::Firestore::V1::DocumentTransform::FieldTransform>
The list of transformations to apply to the fields of the document, in order.
Instance Attribute Details
#document ⇒ ::String
Returns The name of the document to transform.
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 |
# File 'proto_docs/google/firestore/v1/write.rb', line 73 class DocumentTransform include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A transformation of a field of the document. # @!attribute [rw] field_path # @return [::String] # The path of the field. See {::Google::Cloud::Firestore::V1::Document#fields Document.fields} for the field path syntax # reference. # @!attribute [rw] set_to_server_value # @return [::Google::Cloud::Firestore::V1::DocumentTransform::FieldTransform::ServerValue] # Sets the field to the given server value. # @!attribute [rw] increment # @return [::Google::Cloud::Firestore::V1::Value] # Adds the given value to the field's current value. # # This must be an integer or a double value. # If the field is not an integer or double, or if the field does not yet # exist, the transformation will set the field to the given value. # If either of the given value or the current field value are doubles, # both values will be interpreted as doubles. Double arithmetic and # representation of double values follow IEEE 754 semantics. # If there is positive/negative integer overflow, the field is resolved # to the largest magnitude positive/negative integer. # @!attribute [rw] maximum # @return [::Google::Cloud::Firestore::V1::Value] # Sets the field to the maximum of its current value and the given value. # # This must be an integer or a double value. # If the field is not an integer or double, or if the field does not yet # exist, the transformation will set the field to the given value. # If a maximum operation is applied where the field and the input value # are of mixed types (that is - one is an integer and one is a double) # the field takes on the type of the larger operand. If the operands are # equivalent (e.g. 3 and 3.0), the field does not change. # 0, 0.0, and -0.0 are all zero. The maximum of a zero stored value and # zero input value is always the stored value. # The maximum of any numeric value x and NaN is NaN. # @!attribute [rw] minimum # @return [::Google::Cloud::Firestore::V1::Value] # Sets the field to the minimum of its current value and the given value. # # This must be an integer or a double value. # If the field is not an integer or double, or if the field does not yet # exist, the transformation will set the field to the input value. # If a minimum operation is applied where the field and the input value # are of mixed types (that is - one is an integer and one is a double) # the field takes on the type of the smaller operand. If the operands are # equivalent (e.g. 3 and 3.0), the field does not change. # 0, 0.0, and -0.0 are all zero. The minimum of a zero stored value and # zero input value is always the stored value. # The minimum of any numeric value x and NaN is NaN. # @!attribute [rw] append_missing_elements # @return [::Google::Cloud::Firestore::V1::ArrayValue] # Append the given elements in order if they are not already present in # the current field value. # If the field is not an array, or if the field does not yet exist, it is # first set to the empty array. # # Equivalent numbers of different types (e.g. 3L and 3.0) are # considered equal when checking if a value is missing. # NaN is equal to NaN, and Null is equal to Null. # If the input contains multiple equivalent values, only the first will # be considered. # # The corresponding transform_result will be the null value. # @!attribute [rw] remove_all_from_array # @return [::Google::Cloud::Firestore::V1::ArrayValue] # Remove all of the given elements from the array in the field. # If the field is not an array, or if the field does not yet exist, it is # set to the empty array. # # Equivalent numbers of the different types (e.g. 3L and 3.0) are # considered equal when deciding whether an element should be removed. # NaN is equal to NaN, and Null is equal to Null. # This will remove all equivalent values if there are duplicates. # # The corresponding transform_result will be the null value. class FieldTransform include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A value that is calculated by the server. module ServerValue # Unspecified. This value must not be used. SERVER_VALUE_UNSPECIFIED = 0 # The time at which the server processed the request, with millisecond # precision. If used on multiple fields (same or different documents) in # a transaction, all the fields will get the same server timestamp. REQUEST_TIME = 1 end end end |
#field_transforms ⇒ ::Array<::Google::Cloud::Firestore::V1::DocumentTransform::FieldTransform>
Returns The list of transformations to apply to the fields of the document, in order. This must not be empty.
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 |
# File 'proto_docs/google/firestore/v1/write.rb', line 73 class DocumentTransform include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A transformation of a field of the document. # @!attribute [rw] field_path # @return [::String] # The path of the field. See {::Google::Cloud::Firestore::V1::Document#fields Document.fields} for the field path syntax # reference. # @!attribute [rw] set_to_server_value # @return [::Google::Cloud::Firestore::V1::DocumentTransform::FieldTransform::ServerValue] # Sets the field to the given server value. # @!attribute [rw] increment # @return [::Google::Cloud::Firestore::V1::Value] # Adds the given value to the field's current value. # # This must be an integer or a double value. # If the field is not an integer or double, or if the field does not yet # exist, the transformation will set the field to the given value. # If either of the given value or the current field value are doubles, # both values will be interpreted as doubles. Double arithmetic and # representation of double values follow IEEE 754 semantics. # If there is positive/negative integer overflow, the field is resolved # to the largest magnitude positive/negative integer. # @!attribute [rw] maximum # @return [::Google::Cloud::Firestore::V1::Value] # Sets the field to the maximum of its current value and the given value. # # This must be an integer or a double value. # If the field is not an integer or double, or if the field does not yet # exist, the transformation will set the field to the given value. # If a maximum operation is applied where the field and the input value # are of mixed types (that is - one is an integer and one is a double) # the field takes on the type of the larger operand. If the operands are # equivalent (e.g. 3 and 3.0), the field does not change. # 0, 0.0, and -0.0 are all zero. The maximum of a zero stored value and # zero input value is always the stored value. # The maximum of any numeric value x and NaN is NaN. # @!attribute [rw] minimum # @return [::Google::Cloud::Firestore::V1::Value] # Sets the field to the minimum of its current value and the given value. # # This must be an integer or a double value. # If the field is not an integer or double, or if the field does not yet # exist, the transformation will set the field to the input value. # If a minimum operation is applied where the field and the input value # are of mixed types (that is - one is an integer and one is a double) # the field takes on the type of the smaller operand. If the operands are # equivalent (e.g. 3 and 3.0), the field does not change. # 0, 0.0, and -0.0 are all zero. The minimum of a zero stored value and # zero input value is always the stored value. # The minimum of any numeric value x and NaN is NaN. # @!attribute [rw] append_missing_elements # @return [::Google::Cloud::Firestore::V1::ArrayValue] # Append the given elements in order if they are not already present in # the current field value. # If the field is not an array, or if the field does not yet exist, it is # first set to the empty array. # # Equivalent numbers of different types (e.g. 3L and 3.0) are # considered equal when checking if a value is missing. # NaN is equal to NaN, and Null is equal to Null. # If the input contains multiple equivalent values, only the first will # be considered. # # The corresponding transform_result will be the null value. # @!attribute [rw] remove_all_from_array # @return [::Google::Cloud::Firestore::V1::ArrayValue] # Remove all of the given elements from the array in the field. # If the field is not an array, or if the field does not yet exist, it is # set to the empty array. # # Equivalent numbers of the different types (e.g. 3L and 3.0) are # considered equal when deciding whether an element should be removed. # NaN is equal to NaN, and Null is equal to Null. # This will remove all equivalent values if there are duplicates. # # The corresponding transform_result will be the null value. class FieldTransform include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A value that is calculated by the server. module ServerValue # Unspecified. This value must not be used. SERVER_VALUE_UNSPECIFIED = 0 # The time at which the server processed the request, with millisecond # precision. If used on multiple fields (same or different documents) in # a transaction, all the fields will get the same server timestamp. REQUEST_TIME = 1 end end end |