Package com.oracle.bmc.usageapi.model
Class QueryProperties.Builder
- java.lang.Object
-
- com.oracle.bmc.usageapi.model.QueryProperties.Builder
-
- Enclosing class:
- QueryProperties
public static class QueryProperties.Builder extends Object
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description QueryPropertiesbuild()QueryProperties.BuildercompartmentDepth(BigDecimal compartmentDepth)The depth level of the compartment.QueryProperties.Buildercopy(QueryProperties model)QueryProperties.BuilderdateRange(DateRange dateRange)QueryProperties.Builderfilter(Filter filter)QueryProperties.Buildergranularity(QueryProperties.Granularity granularity)The usage granularity.QueryProperties.BuildergroupBy(List<String> groupBy)Aggregate the result by.QueryProperties.BuildergroupByTag(List<Tag> groupByTag)GroupBy a specific tagKey.QueryProperties.BuilderisAggregateByTime(Boolean isAggregateByTime)Specifies whether aggregated by time.QueryProperties.BuilderqueryType(QueryProperties.QueryType queryType)The query usage type.
-
-
-
Method Detail
-
groupBy
public QueryProperties.Builder groupBy(List<String> groupBy)
Aggregate the result by.For example: [ “tagNamespace”, “tagKey”, “tagValue”, “service”, “skuName”, “skuPartNumber”, “unit”, “compartmentName”, “compartmentPath”, “compartmentId”, “platform”, “region”, “logicalAd”, “resourceId”, “tenantId”, “tenantName” ]
- Parameters:
groupBy- the value to set- Returns:
- this builder
-
groupByTag
public QueryProperties.Builder groupByTag(List<Tag> groupByTag)
GroupBy a specific tagKey.Provide the tagNamespace and tagKey in the tag object. Only supports one tag in the list. For example: [ { “namespace”: “oracle”, “key”: “createdBy” ]
- Parameters:
groupByTag- the value to set- Returns:
- this builder
-
filter
public QueryProperties.Builder filter(Filter filter)
-
compartmentDepth
public QueryProperties.Builder compartmentDepth(BigDecimal compartmentDepth)
The depth level of the compartment.- Parameters:
compartmentDepth- the value to set- Returns:
- this builder
-
granularity
public QueryProperties.Builder granularity(QueryProperties.Granularity granularity)
The usage granularity.DAILY - Daily data aggregation. MONTHLY - Monthly data aggregation. Allowed values are: DAILY MONTHLY
- Parameters:
granularity- the value to set- Returns:
- this builder
-
queryType
public QueryProperties.Builder queryType(QueryProperties.QueryType queryType)
The query usage type.COST by default if it is missing. Usage - Query the usage data. Cost - Query the cost/billing data. Allowed values are: USAGE COST USAGE_AND_COST
- Parameters:
queryType- the value to set- Returns:
- this builder
-
isAggregateByTime
public QueryProperties.Builder isAggregateByTime(Boolean isAggregateByTime)
Specifies whether aggregated by time.If isAggregateByTime is true, all usage or cost over the query time period will be added up.
- Parameters:
isAggregateByTime- the value to set- Returns:
- this builder
-
dateRange
public QueryProperties.Builder dateRange(DateRange dateRange)
-
build
public QueryProperties build()
-
copy
public QueryProperties.Builder copy(QueryProperties model)
-
-