Class: Google::Apis::FirestoreV1beta1::Projection

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

Overview

The projection of document's fields to return.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Projection

Returns a new instance of Projection.



2093
2094
2095
# File 'lib/google/apis/firestore_v1beta1/classes.rb', line 2093

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

Instance Attribute Details

#fields ⇒ Array<Google::Apis::FirestoreV1beta1::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



2091
2092
2093
# File 'lib/google/apis/firestore_v1beta1/classes.rb', line 2091

def fields
  @fields
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2098
2099
2100
# File 'lib/google/apis/firestore_v1beta1/classes.rb', line 2098

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