QueryRequest Class

  • java.lang.Object
    • com.azure.resourcemanager.resourcegraph.models.QueryRequest

Implements

public final class QueryRequest
implements JsonSerializable<QueryRequest>

Describes a query to be executed.

Constructor Summary

Constructor Description
QueryRequest()

Creates an instance of QueryRequest class.

Method Summary

Modifier and Type Method and Description
List<FacetRequest> facets()

Get the facets property: An array of facet requests to be computed against the query result.

static QueryRequest fromJson(JsonReader jsonReader)

Reads an instance of QueryRequest from the JsonReader.

List<String> managementGroups()

Get the managementGroups property: Azure management groups against which to execute the query.

QueryRequestOptions options()

Get the options property: The query evaluation options.

String query()

Get the query property: The resources query.

List<String> subscriptions()

Get the subscriptions property: Azure subscriptions against which to execute the query.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

QueryRequest withFacets(List<FacetRequest> facets)

Set the facets property: An array of facet requests to be computed against the query result.

QueryRequest withManagementGroups(List<String> managementGroups)

Set the managementGroups property: Azure management groups against which to execute the query.

QueryRequest withOptions(QueryRequestOptions options)

Set the options property: The query evaluation options.

QueryRequest withQuery(String query)

Set the query property: The resources query.

QueryRequest withSubscriptions(List<String> subscriptions)

Set the subscriptions property: Azure subscriptions against which to execute the query.

Methods inherited from java.lang.Object

Constructor Details

QueryRequest

public QueryRequest()

Creates an instance of QueryRequest class.

Method Details

facets

public List<FacetRequest> facets()

Get the facets property: An array of facet requests to be computed against the query result.

Returns:

the facets value.

fromJson

public static QueryRequest fromJson(JsonReader jsonReader)

Reads an instance of QueryRequest from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of QueryRequest if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

managementGroups

public List<String> managementGroups()

Get the managementGroups property: Azure management groups against which to execute the query. Example: [ 'mg1', 'mg2' ].

Returns:

the managementGroups value.

options

public QueryRequestOptions options()

Get the options property: The query evaluation options.

Returns:

the options value.

query

public String query()

Get the query property: The resources query.

Returns:

the query value.

subscriptions

public List<String> subscriptions()

Get the subscriptions property: Azure subscriptions against which to execute the query.

Returns:

the subscriptions value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withFacets

public QueryRequest withFacets(List<FacetRequest> facets)

Set the facets property: An array of facet requests to be computed against the query result.

Parameters:

facets - the facets value to set.

Returns:

the QueryRequest object itself.

withManagementGroups

public QueryRequest withManagementGroups(List<String> managementGroups)

Set the managementGroups property: Azure management groups against which to execute the query. Example: [ 'mg1', 'mg2' ].

Parameters:

managementGroups - the managementGroups value to set.

Returns:

the QueryRequest object itself.

withOptions

public QueryRequest withOptions(QueryRequestOptions options)

Set the options property: The query evaluation options.

Parameters:

options - the options value to set.

Returns:

the QueryRequest object itself.

withQuery

public QueryRequest withQuery(String query)

Set the query property: The resources query.

Parameters:

query - the query value to set.

Returns:

the QueryRequest object itself.

withSubscriptions

public QueryRequest withSubscriptions(List<String> subscriptions)

Set the subscriptions property: Azure subscriptions against which to execute the query.

Parameters:

subscriptions - the subscriptions value to set.

Returns:

the QueryRequest object itself.

Applies to