Class MetadataQueryBuilder
Allows building a fluent query to the metadata provider.
Inherited Members
Namespace: Unity.Cloud.Metadata
Syntax
public class MetadataQueryBuilder
Methods
ExecuteAsync()
Executes the built query by calling the metadata provider.
Declaration
public async Task<MatchCollection> ExecuteAsync()
Returns
Type | Description |
---|---|
Task<MatchCollection> | The list of |
IncludedIn(IEnumerable<OwnerId>)
Adds the owner IDs to the lookup query.
Declaration
public MetadataQueryBuilder IncludedIn(IEnumerable<OwnerId> ownerIds)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<OwnerId> | ownerIds | The owners' ids |
Returns
Type | Description |
---|---|
MetadataQueryBuilder | The called MetadataQueryBuilder |
Select(IEnumerable<String>)
Adds the desired output metadata keys to the query.
Declaration
public MetadataQueryBuilder Select(IEnumerable<string> keys)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<String> | keys | An of wanted keys |
Returns
Type | Description |
---|---|
MetadataQueryBuilder | The called MetadataQueryBuilder |
SelectAll()
Sets the query to return the full metadata.
Declaration
public MetadataQueryBuilder SelectAll()
Returns
Type | Description |
---|---|
MetadataQueryBuilder | The called MetadataQueryBuilder |
SelectOnlyId()
Sets the query to return only the owner ID.
Declaration
public MetadataQueryBuilder SelectOnlyId()
Returns
Type | Description |
---|---|
MetadataQueryBuilder | The called MetadataQueryBuilder |
WhereKeyEquals(IEnumerable<String>, String)
Adds metadata conditions to the query.
Declaration
public MetadataQueryBuilder WhereKeyEquals(IEnumerable<string> path, string value)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<String> | path | A list representing the path of keys and sub-keys in the metadata |
String | value | The value that the last keys in the keyHierarchy needs to be equals to |
Returns
Type | Description |
---|---|
MetadataQueryBuilder | The called MetadataQueryBuilder |