Class: Google::Apis::FirestoreV1::Order

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/firestore_v1/classes.rb,
lib/google/apis/firestore_v1/representations.rb,
lib/google/apis/firestore_v1/representations.rb

Overview

An order on a field.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Order

Returns a new instance of Order.



3139
3140
3141
# File 'lib/google/apis/firestore_v1/classes.rb', line 3139

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#directionString

The direction to order by. Defaults to ASCENDING. Corresponds to the JSON property direction

Returns:

  • (String)


3132
3133
3134
# File 'lib/google/apis/firestore_v1/classes.rb', line 3132

def direction
  @direction
end

#fieldGoogle::Apis::FirestoreV1::FieldReference

A reference to a field in a document, ex: stats.operations. Corresponds to the JSON property field



3137
3138
3139
# File 'lib/google/apis/firestore_v1/classes.rb', line 3137

def field
  @field
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3144
3145
3146
3147
# File 'lib/google/apis/firestore_v1/classes.rb', line 3144

def update!(**args)
  @direction = args[:direction] if args.key?(:direction)
  @field = args[:field] if args.key?(:field)
end