Class: Google::Apis::FirestoreV1::Projection

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

Overview

The projection of document's fields to return.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ Projection

Returns a new instance of Projection.



1834
1835
1836
# File 'generated/google/apis/firestore_v1/classes.rb', line 1834

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

Instance Attribute Details

#fieldsArray<Google::Apis::FirestoreV1::FieldReference>

The fields to return. If empty, all fields are returned. To only return the name of the document, use ['__name__']. Corresponds to the JSON property fields



1832
1833
1834
# File 'generated/google/apis/firestore_v1/classes.rb', line 1832

def fields
  @fields
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1839
1840
1841
# File 'generated/google/apis/firestore_v1/classes.rb', line 1839

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