Struct googapis::google::firestore::admin::v1beta2::Index [−][src]
pub struct Index {
pub name: String,
pub query_scope: i32,
pub fields: Vec<IndexField>,
pub state: i32,
}
Expand description
Cloud Firestore indexes enable simple and complex queries against documents in a database.
Fields
name: String
Output only. A server defined name for this index.
The form of this name for composite indexes will be:
projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{composite_index_id}
For single field indexes, this field will be empty.
query_scope: i32
Indexes with a collection query scope specified allow queries against a collection that is the child of a specific document, specified at query time, and that has the same collection id.
Indexes with a collection group query scope specified allow queries against all collections descended from a specific document, specified at query time, and that have the same collection id as this index.
fields: Vec<IndexField>
The fields supported by this index.
For composite indexes, this is always 2 or more fields.
The last field entry is always for the field path __name__
. If, on
creation, __name__
was not specified as the last field, it will be added
automatically with the same direction as that of the last field defined. If
the final field in a composite index is not directional, the __name__
will be ordered ASCENDING (unless explicitly specified).
For single field indexes, this will always be exactly one entry with a field path equal to the field path of the associated field.
state: i32
Output only. The serving state of the index.
Implementations
Returns the enum value of query_scope
, or the default if the field is set to an invalid enum value.
Sets query_scope
to the provided enum value.
Returns the enum value of state
, or the default if the field is set to an invalid enum value.
Trait Implementations
fn merge_field<B>(
&mut self,
tag: u32,
wire_type: WireType,
buf: &mut B,
ctx: DecodeContext
) -> Result<(), DecodeError> where
B: Buf,
Returns the encoded length of the message without a length delimiter.
Encodes the message to a buffer. Read more
Encodes the message to a newly allocated buffer.
Encodes the message with a length-delimiter to a buffer. Read more
Encodes the message with a length-delimiter to a newly allocated buffer.
Decodes an instance of the message from a buffer. Read more
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError> where
Self: Default,
B: Buf,
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError> where
Self: Default,
B: Buf,
Decodes a length-delimited instance of the message from the buffer.
Decodes an instance of the message from a buffer, and merges it into self
. Read more
Decodes a length-delimited instance of the message from buffer, and
merges it into self
. Read more
Auto Trait Implementations
impl RefUnwindSafe for Index
impl UnwindSafe for Index
Blanket Implementations
Mutably borrows from an owned value. Read more
Wrap the input message T
in a tonic::Request
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more