שתף באמצעות


QueryDefinition Class

  • java.lang.Object
    • com.azure.resourcemanager.costmanagement.models.QueryDefinition

Implements

public final class QueryDefinition
implements JsonSerializable<QueryDefinition>

The definition of a query.

Constructor Summary

Constructor Description
QueryDefinition()

Creates an instance of QueryDefinition class.

Method Summary

Modifier and Type Method and Description
QueryDataset dataset()

Get the dataset property: Has definition for data in this query.

static QueryDefinition fromJson(JsonReader jsonReader)

Reads an instance of QueryDefinition from the JsonReader.

TimeframeType timeframe()

Get the timeframe property: The time frame for pulling data for the query.

QueryTimePeriod timePeriod()

Get the timePeriod property: Has time period for pulling data for the query.

JsonWriter toJson(JsonWriter jsonWriter)
ExportType type()

Get the type property: The type of the query.

void validate()

Validates the instance.

QueryDefinition withDataset(QueryDataset dataset)

Set the dataset property: Has definition for data in this query.

QueryDefinition withTimeframe(TimeframeType timeframe)

Set the timeframe property: The time frame for pulling data for the query.

QueryDefinition withTimePeriod(QueryTimePeriod timePeriod)

Set the timePeriod property: Has time period for pulling data for the query.

QueryDefinition withType(ExportType type)

Set the type property: The type of the query.

Methods inherited from java.lang.Object

Constructor Details

QueryDefinition

public QueryDefinition()

Creates an instance of QueryDefinition class.

Method Details

dataset

public QueryDataset dataset()

Get the dataset property: Has definition for data in this query.

Returns:

the dataset value.

fromJson

public static QueryDefinition fromJson(JsonReader jsonReader)

Reads an instance of QueryDefinition from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of QueryDefinition 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.

timeframe

public TimeframeType timeframe()

Get the timeframe property: The time frame for pulling data for the query. If custom, then a specific time period must be provided.

Returns:

the timeframe value.

timePeriod

public QueryTimePeriod timePeriod()

Get the timePeriod property: Has time period for pulling data for the query.

Returns:

the timePeriod value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

type

public ExportType type()

Get the type property: The type of the query.

Returns:

the type value.

validate

public void validate()

Validates the instance.

withDataset

public QueryDefinition withDataset(QueryDataset dataset)

Set the dataset property: Has definition for data in this query.

Parameters:

dataset - the dataset value to set.

Returns:

the QueryDefinition object itself.

withTimeframe

public QueryDefinition withTimeframe(TimeframeType timeframe)

Set the timeframe property: The time frame for pulling data for the query. If custom, then a specific time period must be provided.

Parameters:

timeframe - the timeframe value to set.

Returns:

the QueryDefinition object itself.

withTimePeriod

public QueryDefinition withTimePeriod(QueryTimePeriod timePeriod)

Set the timePeriod property: Has time period for pulling data for the query.

Parameters:

timePeriod - the timePeriod value to set.

Returns:

the QueryDefinition object itself.

withType

public QueryDefinition withType(ExportType type)

Set the type property: The type of the query.

Parameters:

type - the type value to set.

Returns:

the QueryDefinition object itself.

Applies to