public static final class Report.Builder extends GeneratedMessage.Builder<Report.Builder> implements ReportOrBuilderA configuration that defines the parameters for the data represented by a report.
Protobuf type google.cloud.appoptimize.v1beta.Report
Inheritance
java.lang.Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessage.Builder > Report.BuilderImplements
ReportOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
Methods
addAllDimensions(Iterable<String> values)
public Report.Builder addAllDimensions(Iterable<String> values)Required. A list of dimensions to include in the report. Supported values:
projectapplicationservice_or_workloadresourceresource_typelocationproduct_display_nameskumonthdayhourTo aggregate results by time, specify at least one time dimension (
month,day, orhour). All time dimensions use Pacific Time, respect Daylight Saving Time (DST), and follow these ISO 8601 formats:month:YYYY-MM(e.g.,2024-01)day:YYYY-MM-DD(e.g.,2024-01-10)hour:YYYY-MM-DDTHH(e.g.,2024-01-10T00)If the time range filter does not align with the selected time dimension, the range is expanded to encompass the full period of the finest-grained time dimension.
For example, if the filter is
2026-01-10through2026-01-12and themonthdimension is selected, the effective time range expands to include all of January (2026-01-01to2026-02-01).
repeated string dimensions = 2 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
values |
Iterable<String>The dimensions to add. |
| Returns | |
|---|---|
| Type | Description |
Report.Builder |
This builder for chaining. |
addAllMetrics(Iterable<String> values)
public Report.Builder addAllMetrics(Iterable<String> values)Required. A list of metrics to include in the report. Supported values:
costcpu_mean_utilizationcpu_usage_core_secondscpu_allocation_core_secondscpu_p95_utilizationmemory_mean_utilizationmemory_usage_byte_secondsmemory_allocation_byte_secondsmemory_p95_utilization
repeated string metrics = 7 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
values |
Iterable<String>The metrics to add. |
| Returns | |
|---|---|
| Type | Description |
Report.Builder |
This builder for chaining. |
addAllScopes(Iterable<? extends Scope> values)
public Report.Builder addAllScopes(Iterable<? extends Scope> values)Optional. The resource containers for which to fetch data. Default is the project specified in the report's parent.
repeated .google.cloud.appoptimize.v1beta.Scope scopes = 3 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
values |
Iterable<? extends com.google.cloud.appoptimize.v1beta.Scope> |
| Returns | |
|---|---|
| Type | Description |
Report.Builder |
|
addDimensions(String value)
public Report.Builder addDimensions(String value)Required. A list of dimensions to include in the report. Supported values:
projectapplicationservice_or_workloadresourceresource_typelocationproduct_display_nameskumonthdayhourTo aggregate results by time, specify at least one time dimension (
month,day, orhour). All time dimensions use Pacific Time, respect Daylight Saving Time (DST), and follow these ISO 8601 formats:month:YYYY-MM(e.g.,2024-01)day:YYYY-MM-DD(e.g.,2024-01-10)hour:YYYY-MM-DDTHH(e.g.,2024-01-10T00)If the time range filter does not align with the selected time dimension, the range is expanded to encompass the full period of the finest-grained time dimension.
For example, if the filter is
2026-01-10through2026-01-12and themonthdimension is selected, the effective time range expands to include all of January (2026-01-01to2026-02-01).
repeated string dimensions = 2 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe dimensions to add. |
| Returns | |
|---|---|
| Type | Description |
Report.Builder |
This builder for chaining. |
addDimensionsBytes(ByteString value)
public Report.Builder addDimensionsBytes(ByteString value)Required. A list of dimensions to include in the report. Supported values:
projectapplicationservice_or_workloadresourceresource_typelocationproduct_display_nameskumonthdayhourTo aggregate results by time, specify at least one time dimension (
month,day, orhour). All time dimensions use Pacific Time, respect Daylight Saving Time (DST), and follow these ISO 8601 formats:month:YYYY-MM(e.g.,2024-01)day:YYYY-MM-DD(e.g.,2024-01-10)hour:YYYY-MM-DDTHH(e.g.,2024-01-10T00)If the time range filter does not align with the selected time dimension, the range is expanded to encompass the full period of the finest-grained time dimension.
For example, if the filter is
2026-01-10through2026-01-12and themonthdimension is selected, the effective time range expands to include all of January (2026-01-01to2026-02-01).
repeated string dimensions = 2 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes of the dimensions to add. |
| Returns | |
|---|---|
| Type | Description |
Report.Builder |
This builder for chaining. |
addMetrics(String value)
public Report.Builder addMetrics(String value)Required. A list of metrics to include in the report. Supported values:
costcpu_mean_utilizationcpu_usage_core_secondscpu_allocation_core_secondscpu_p95_utilizationmemory_mean_utilizationmemory_usage_byte_secondsmemory_allocation_byte_secondsmemory_p95_utilization
repeated string metrics = 7 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe metrics to add. |
| Returns | |
|---|---|
| Type | Description |
Report.Builder |
This builder for chaining. |
addMetricsBytes(ByteString value)
public Report.Builder addMetricsBytes(ByteString value)Required. A list of metrics to include in the report. Supported values:
costcpu_mean_utilizationcpu_usage_core_secondscpu_allocation_core_secondscpu_p95_utilizationmemory_mean_utilizationmemory_usage_byte_secondsmemory_allocation_byte_secondsmemory_p95_utilization
repeated string metrics = 7 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes of the metrics to add. |
| Returns | |
|---|---|
| Type | Description |
Report.Builder |
This builder for chaining. |
addScopes(Scope value)
public Report.Builder addScopes(Scope value)Optional. The resource containers for which to fetch data. Default is the project specified in the report's parent.
repeated .google.cloud.appoptimize.v1beta.Scope scopes = 3 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
Scope |
| Returns | |
|---|---|
| Type | Description |
Report.Builder |
|
addScopes(Scope.Builder builderForValue)
public Report.Builder addScopes(Scope.Builder builderForValue)Optional. The resource containers for which to fetch data. Default is the project specified in the report's parent.
repeated .google.cloud.appoptimize.v1beta.Scope scopes = 3 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
builderForValue |
Scope.Builder |
| Returns | |
|---|---|
| Type | Description |
Report.Builder |
|
addScopes(int index, Scope value)
public Report.Builder addScopes(int index, Scope value)Optional. The resource containers for which to fetch data. Default is the project specified in the report's parent.
repeated .google.cloud.appoptimize.v1beta.Scope scopes = 3 [(.google.api.field_behavior) = OPTIONAL];
| Parameters | |
|---|---|
| Name | Description |
index |
int |
value |
Scope |
| Returns | |
|---|---|
| Type | Description |
Report.Builder |
|
addScopes(int index, Scope.Builder builderForValue)
public Report.Builder addScopes(int index, Scope.Builder builderForValue)Optional. The resource containers for which to fetch data. Default is the project specified in the report's parent.
repeated .google.cloud.appoptimize.v1beta.Scope scopes = 3 [(.google.api.field_behavior) = OPTIONAL];
| Parameters | |
|---|---|
| Name | Description |
index |
int |
builderForValue |
Scope.Builder |
| Returns | |
|---|---|
| Type | Description |
Report.Builder |
|
addScopesBuilder()
public Scope.Builder addScopesBuilder()Optional. The resource containers for which to fetch data. Default is the project specified in the report's parent.
repeated .google.cloud.appoptimize.v1beta.Scope scopes = 3 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
Scope.Builder |
|
addScopesBuilder(int index)
public Scope.Builder addScopesBuilder(int index)Optional. The resource containers for which to fetch data. Default is the project specified in the report's parent.
repeated .google.cloud.appoptimize.v1beta.Scope scopes = 3 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
Scope.Builder |
|
build()
public Report build()| Returns | |
|---|---|
| Type | Description |
Report |
|
buildPartial()
public Report buildPartial()| Returns | |
|---|---|
| Type | Description |
Report |
|
clear()
public Report.Builder clear()| Returns | |
|---|---|
| Type | Description |
Report.Builder |
|
clearDimensions()
public Report.Builder clearDimensions()Required. A list of dimensions to include in the report. Supported values:
projectapplicationservice_or_workloadresourceresource_typelocationproduct_display_nameskumonthdayhourTo aggregate results by time, specify at least one time dimension (
month,day, orhour). All time dimensions use Pacific Time, respect Daylight Saving Time (DST), and follow these ISO 8601 formats:month:YYYY-MM(e.g.,2024-01)day:YYYY-MM-DD(e.g.,2024-01-10)hour:YYYY-MM-DDTHH(e.g.,2024-01-10T00)If the time range filter does not align with the selected time dimension, the range is expanded to encompass the full period of the finest-grained time dimension.
For example, if the filter is
2026-01-10through2026-01-12and themonthdimension is selected, the effective time range expands to include all of January (2026-01-01to2026-02-01).
repeated string dimensions = 2 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
Report.Builder |
This builder for chaining. |
clearExpiration()
public Report.Builder clearExpiration()| Returns | |
|---|---|
| Type | Description |
Report.Builder |
|
clearExpireTime()
public Report.Builder clearExpireTime()Output only. Timestamp in UTC of when this report expires. Once the report expires, it will no longer be accessible and the report's underlying data will be deleted.
.google.protobuf.Timestamp expire_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns | |
|---|---|
| Type | Description |
Report.Builder |
|
clearFilter()
public Report.Builder clearFilter()Optional. A Common Expression Language (CEL) expression used to filter the data for the report.
Predicates may refer to any dimension. Filtering must conform to these constraints:
- All string field predicates must use exact string matches.
- Multiple predicates referring to the same string field must be joined using the logical OR operator ('||').
- All other predicates must be joined using the logical AND operator
(
&&). - A predicate on a time dimension (e.g.,
day) specifying the start time must use a greater-than-or-equal-to comparison (>=). A predicate on a time dimension specifying the end time must use a less-than comparison (
<).Examples:
Filter by a specific resource type:
"resource_type == 'compute.googleapis.com/Instance'"Filter data points that fall within a specific absolute time interval:
"hour >= timestamp('2024-01-01T00:00:00Z') && hour < timestamp('2024-02-01T00:00:00Z')"Filter data points that fall within the past 72 hours:
"hour >= now - duration('72h')"Combine string predicate with time interval predicate:
"(location == 'us-east1' || location == 'us-west1') && hour >= timestamp('2023-12-01T00:00:00Z') && hour < timestamp('2024-02-01T00:00:00Z')"If the filter omits time dimensions (
month,day,hour), the report defaults to a 7-day range ending at the previous Pacific Time midnight, with Daylight Saving Time (DST) applied.For example, if the current Pacific Time is
2026-01-05T12:00:00, the default range is2025-12-29T00:00:00to2026-01-05T00:00:00Pacific time.
string filter = 4 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
Report.Builder |
This builder for chaining. |
clearMetrics()
public Report.Builder clearMetrics()Required. A list of metrics to include in the report. Supported values:
costcpu_mean_utilizationcpu_usage_core_secondscpu_allocation_core_secondscpu_p95_utilizationmemory_mean_utilizationmemory_usage_byte_secondsmemory_allocation_byte_secondsmemory_p95_utilization
repeated string metrics = 7 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
Report.Builder |
This builder for chaining. |
clearName()
public Report.Builder clearName()Identifier. The name of this report.
string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
| Returns | |
|---|---|
| Type | Description |
Report.Builder |
This builder for chaining. |
clearScopes()
public Report.Builder clearScopes()Optional. The resource containers for which to fetch data. Default is the project specified in the report's parent.
repeated .google.cloud.appoptimize.v1beta.Scope scopes = 3 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
Report.Builder |
|
getDefaultInstanceForType()
public Report getDefaultInstanceForType()| Returns | |
|---|---|
| Type | Description |
Report |
|
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
getDimensions(int index)
public String getDimensions(int index)Required. A list of dimensions to include in the report. Supported values:
projectapplicationservice_or_workloadresourceresource_typelocationproduct_display_nameskumonthdayhourTo aggregate results by time, specify at least one time dimension (
month,day, orhour). All time dimensions use Pacific Time, respect Daylight Saving Time (DST), and follow these ISO 8601 formats:month:YYYY-MM(e.g.,2024-01)day:YYYY-MM-DD(e.g.,2024-01-10)hour:YYYY-MM-DDTHH(e.g.,2024-01-10T00)If the time range filter does not align with the selected time dimension, the range is expanded to encompass the full period of the finest-grained time dimension.
For example, if the filter is
2026-01-10through2026-01-12and themonthdimension is selected, the effective time range expands to include all of January (2026-01-01to2026-02-01).
repeated string dimensions = 2 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
index |
intThe index of the element to return. |
| Returns | |
|---|---|
| Type | Description |
String |
The dimensions at the given index. |
getDimensionsBytes(int index)
public ByteString getDimensionsBytes(int index)Required. A list of dimensions to include in the report. Supported values:
projectapplicationservice_or_workloadresourceresource_typelocationproduct_display_nameskumonthdayhourTo aggregate results by time, specify at least one time dimension (
month,day, orhour). All time dimensions use Pacific Time, respect Daylight Saving Time (DST), and follow these ISO 8601 formats:month:YYYY-MM(e.g.,2024-01)day:YYYY-MM-DD(e.g.,2024-01-10)hour:YYYY-MM-DDTHH(e.g.,2024-01-10T00)If the time range filter does not align with the selected time dimension, the range is expanded to encompass the full period of the finest-grained time dimension.
For example, if the filter is
2026-01-10through2026-01-12and themonthdimension is selected, the effective time range expands to include all of January (2026-01-01to2026-02-01).
repeated string dimensions = 2 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
index |
intThe index of the value to return. |
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes of the dimensions at the given index. |
getDimensionsCount()
public int getDimensionsCount()Required. A list of dimensions to include in the report. Supported values:
projectapplicationservice_or_workloadresourceresource_typelocationproduct_display_nameskumonthdayhourTo aggregate results by time, specify at least one time dimension (
month,day, orhour). All time dimensions use Pacific Time, respect Daylight Saving Time (DST), and follow these ISO 8601 formats:month:YYYY-MM(e.g.,2024-01)day:YYYY-MM-DD(e.g.,2024-01-10)hour:YYYY-MM-DDTHH(e.g.,2024-01-10T00)If the time range filter does not align with the selected time dimension, the range is expanded to encompass the full period of the finest-grained time dimension.
For example, if the filter is
2026-01-10through2026-01-12and themonthdimension is selected, the effective time range expands to include all of January (2026-01-01to2026-02-01).
repeated string dimensions = 2 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
int |
The count of dimensions. |
getDimensionsList()
public ProtocolStringList getDimensionsList()Required. A list of dimensions to include in the report. Supported values:
projectapplicationservice_or_workloadresourceresource_typelocationproduct_display_nameskumonthdayhourTo aggregate results by time, specify at least one time dimension (
month,day, orhour). All time dimensions use Pacific Time, respect Daylight Saving Time (DST), and follow these ISO 8601 formats:month:YYYY-MM(e.g.,2024-01)day:YYYY-MM-DD(e.g.,2024-01-10)hour:YYYY-MM-DDTHH(e.g.,2024-01-10T00)If the time range filter does not align with the selected time dimension, the range is expanded to encompass the full period of the finest-grained time dimension.
For example, if the filter is
2026-01-10through2026-01-12and themonthdimension is selected, the effective time range expands to include all of January (2026-01-01to2026-02-01).
repeated string dimensions = 2 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
ProtocolStringList |
A list containing the dimensions. |
getExpirationCase()
public Report.ExpirationCase getExpirationCase()| Returns | |
|---|---|
| Type | Description |
Report.ExpirationCase |
|
getExpireTime()
public Timestamp getExpireTime()Output only. Timestamp in UTC of when this report expires. Once the report expires, it will no longer be accessible and the report's underlying data will be deleted.
.google.protobuf.Timestamp expire_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns | |
|---|---|
| Type | Description |
Timestamp |
The expireTime. |
getExpireTimeBuilder()
public Timestamp.Builder getExpireTimeBuilder()Output only. Timestamp in UTC of when this report expires. Once the report expires, it will no longer be accessible and the report's underlying data will be deleted.
.google.protobuf.Timestamp expire_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns | |
|---|---|
| Type | Description |
Builder |
|
getExpireTimeOrBuilder()
public TimestampOrBuilder getExpireTimeOrBuilder()Output only. Timestamp in UTC of when this report expires. Once the report expires, it will no longer be accessible and the report's underlying data will be deleted.
.google.protobuf.Timestamp expire_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns | |
|---|---|
| Type | Description |
TimestampOrBuilder |
|
getFilter()
public String getFilter()Optional. A Common Expression Language (CEL) expression used to filter the data for the report.
Predicates may refer to any dimension. Filtering must conform to these constraints:
- All string field predicates must use exact string matches.
- Multiple predicates referring to the same string field must be joined using the logical OR operator ('||').
- All other predicates must be joined using the logical AND operator
(
&&). - A predicate on a time dimension (e.g.,
day) specifying the start time must use a greater-than-or-equal-to comparison (>=). A predicate on a time dimension specifying the end time must use a less-than comparison (
<).Examples:
Filter by a specific resource type:
"resource_type == 'compute.googleapis.com/Instance'"Filter data points that fall within a specific absolute time interval:
"hour >= timestamp('2024-01-01T00:00:00Z') && hour < timestamp('2024-02-01T00:00:00Z')"Filter data points that fall within the past 72 hours:
"hour >= now - duration('72h')"Combine string predicate with time interval predicate:
"(location == 'us-east1' || location == 'us-west1') && hour >= timestamp('2023-12-01T00:00:00Z') && hour < timestamp('2024-02-01T00:00:00Z')"If the filter omits time dimensions (
month,day,hour), the report defaults to a 7-day range ending at the previous Pacific Time midnight, with Daylight Saving Time (DST) applied.For example, if the current Pacific Time is
2026-01-05T12:00:00, the default range is2025-12-29T00:00:00to2026-01-05T00:00:00Pacific time.
string filter = 4 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
String |
The filter. |
getFilterBytes()
public ByteString getFilterBytes()Optional. A Common Expression Language (CEL) expression used to filter the data for the report.
Predicates may refer to any dimension. Filtering must conform to these constraints:
- All string field predicates must use exact string matches.
- Multiple predicates referring to the same string field must be joined using the logical OR operator ('||').
- All other predicates must be joined using the logical AND operator
(
&&). - A predicate on a time dimension (e.g.,
day) specifying the start time must use a greater-than-or-equal-to comparison (>=). A predicate on a time dimension specifying the end time must use a less-than comparison (
<).Examples:
Filter by a specific resource type:
"resource_type == 'compute.googleapis.com/Instance'"Filter data points that fall within a specific absolute time interval:
"hour >= timestamp('2024-01-01T00:00:00Z') && hour < timestamp('2024-02-01T00:00:00Z')"Filter data points that fall within the past 72 hours:
"hour >= now - duration('72h')"Combine string predicate with time interval predicate:
"(location == 'us-east1' || location == 'us-west1') && hour >= timestamp('2023-12-01T00:00:00Z') && hour < timestamp('2024-02-01T00:00:00Z')"If the filter omits time dimensions (
month,day,hour), the report defaults to a 7-day range ending at the previous Pacific Time midnight, with Daylight Saving Time (DST) applied.For example, if the current Pacific Time is
2026-01-05T12:00:00, the default range is2025-12-29T00:00:00to2026-01-05T00:00:00Pacific time.
string filter = 4 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes for filter. |
getMetrics(int index)
public String getMetrics(int index)Required. A list of metrics to include in the report. Supported values:
costcpu_mean_utilizationcpu_usage_core_secondscpu_allocation_core_secondscpu_p95_utilizationmemory_mean_utilizationmemory_usage_byte_secondsmemory_allocation_byte_secondsmemory_p95_utilization
repeated string metrics = 7 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
index |
intThe index of the element to return. |
| Returns | |
|---|---|
| Type | Description |
String |
The metrics at the given index. |
getMetricsBytes(int index)
public ByteString getMetricsBytes(int index)Required. A list of metrics to include in the report. Supported values:
costcpu_mean_utilizationcpu_usage_core_secondscpu_allocation_core_secondscpu_p95_utilizationmemory_mean_utilizationmemory_usage_byte_secondsmemory_allocation_byte_secondsmemory_p95_utilization
repeated string metrics = 7 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
index |
intThe index of the value to return. |
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes of the metrics at the given index. |
getMetricsCount()
public int getMetricsCount()Required. A list of metrics to include in the report. Supported values:
costcpu_mean_utilizationcpu_usage_core_secondscpu_allocation_core_secondscpu_p95_utilizationmemory_mean_utilizationmemory_usage_byte_secondsmemory_allocation_byte_secondsmemory_p95_utilization
repeated string metrics = 7 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
int |
The count of metrics. |
getMetricsList()
public ProtocolStringList getMetricsList()Required. A list of metrics to include in the report. Supported values:
costcpu_mean_utilizationcpu_usage_core_secondscpu_allocation_core_secondscpu_p95_utilizationmemory_mean_utilizationmemory_usage_byte_secondsmemory_allocation_byte_secondsmemory_p95_utilization
repeated string metrics = 7 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
ProtocolStringList |
A list containing the metrics. |
getName()
public String getName()Identifier. The name of this report.
string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
| Returns | |
|---|---|
| Type | Description |
String |
The name. |
getNameBytes()
public ByteString getNameBytes()Identifier. The name of this report.
string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes for name. |
getScopes(int index)
public Scope getScopes(int index)Optional. The resource containers for which to fetch data. Default is the project specified in the report's parent.
repeated .google.cloud.appoptimize.v1beta.Scope scopes = 3 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
Scope |
|
getScopesBuilder(int index)
public Scope.Builder getScopesBuilder(int index)Optional. The resource containers for which to fetch data. Default is the project specified in the report's parent.
repeated .google.cloud.appoptimize.v1beta.Scope scopes = 3 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
Scope.Builder |
|
getScopesBuilderList()
public List<Scope.Builder> getScopesBuilderList()Optional. The resource containers for which to fetch data. Default is the project specified in the report's parent.
repeated .google.cloud.appoptimize.v1beta.Scope scopes = 3 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
List<Builder> |
|
getScopesCount()
public int getScopesCount()Optional. The resource containers for which to fetch data. Default is the project specified in the report's parent.
repeated .google.cloud.appoptimize.v1beta.Scope scopes = 3 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
int |
|
getScopesList()
public List<Scope> getScopesList()Optional. The resource containers for which to fetch data. Default is the project specified in the report's parent.
repeated .google.cloud.appoptimize.v1beta.Scope scopes = 3 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
List<Scope> |
|
getScopesOrBuilder(int index)
public ScopeOrBuilder getScopesOrBuilder(int index)Optional. The resource containers for which to fetch data. Default is the project specified in the report's parent.
repeated .google.cloud.appoptimize.v1beta.Scope scopes = 3 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
ScopeOrBuilder |
|
getScopesOrBuilderList()
public List<? extends ScopeOrBuilder> getScopesOrBuilderList()Optional. The resource containers for which to fetch data. Default is the project specified in the report's parent.
repeated .google.cloud.appoptimize.v1beta.Scope scopes = 3 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
List<? extends com.google.cloud.appoptimize.v1beta.ScopeOrBuilder> |
|
hasExpireTime()
public boolean hasExpireTime()Output only. Timestamp in UTC of when this report expires. Once the report expires, it will no longer be accessible and the report's underlying data will be deleted.
.google.protobuf.Timestamp expire_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the expireTime field is set. |
internalGetFieldAccessorTable()
protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()| Returns | |
|---|---|
| Type | Description |
FieldAccessorTable |
|
isInitialized()
public final boolean isInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
mergeExpireTime(Timestamp value)
public Report.Builder mergeExpireTime(Timestamp value)Output only. Timestamp in UTC of when this report expires. Once the report expires, it will no longer be accessible and the report's underlying data will be deleted.
.google.protobuf.Timestamp expire_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Parameter | |
|---|---|
| Name | Description |
value |
Timestamp |
| Returns | |
|---|---|
| Type | Description |
Report.Builder |
|
mergeFrom(Report other)
public Report.Builder mergeFrom(Report other)| Parameter | |
|---|---|
| Name | Description |
other |
Report |
| Returns | |
|---|---|
| Type | Description |
Report.Builder |
|
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public Report.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
Report.Builder |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
mergeFrom(Message other)
public Report.Builder mergeFrom(Message other)| Parameter | |
|---|---|
| Name | Description |
other |
Message |
| Returns | |
|---|---|
| Type | Description |
Report.Builder |
|
removeScopes(int index)
public Report.Builder removeScopes(int index)Optional. The resource containers for which to fetch data. Default is the project specified in the report's parent.
repeated .google.cloud.appoptimize.v1beta.Scope scopes = 3 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
Report.Builder |
|
setDimensions(int index, String value)
public Report.Builder setDimensions(int index, String value)Required. A list of dimensions to include in the report. Supported values:
projectapplicationservice_or_workloadresourceresource_typelocationproduct_display_nameskumonthdayhourTo aggregate results by time, specify at least one time dimension (
month,day, orhour). All time dimensions use Pacific Time, respect Daylight Saving Time (DST), and follow these ISO 8601 formats:month:YYYY-MM(e.g.,2024-01)day:YYYY-MM-DD(e.g.,2024-01-10)hour:YYYY-MM-DDTHH(e.g.,2024-01-10T00)If the time range filter does not align with the selected time dimension, the range is expanded to encompass the full period of the finest-grained time dimension.
For example, if the filter is
2026-01-10through2026-01-12and themonthdimension is selected, the effective time range expands to include all of January (2026-01-01to2026-02-01).
repeated string dimensions = 2 [(.google.api.field_behavior) = REQUIRED];
| Parameters | |
|---|---|
| Name | Description |
index |
intThe index to set the value at. |
value |
StringThe dimensions to set. |
| Returns | |
|---|---|
| Type | Description |
Report.Builder |
This builder for chaining. |
setExpireTime(Timestamp value)
public Report.Builder setExpireTime(Timestamp value)Output only. Timestamp in UTC of when this report expires. Once the report expires, it will no longer be accessible and the report's underlying data will be deleted.
.google.protobuf.Timestamp expire_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Parameter | |
|---|---|
| Name | Description |
value |
Timestamp |
| Returns | |
|---|---|
| Type | Description |
Report.Builder |
|
setExpireTime(Timestamp.Builder builderForValue)
public Report.Builder setExpireTime(Timestamp.Builder builderForValue)Output only. Timestamp in UTC of when this report expires. Once the report expires, it will no longer be accessible and the report's underlying data will be deleted.
.google.protobuf.Timestamp expire_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Parameter | |
|---|---|
| Name | Description |
builderForValue |
Builder |
| Returns | |
|---|---|
| Type | Description |
Report.Builder |
|
setFilter(String value)
public Report.Builder setFilter(String value)Optional. A Common Expression Language (CEL) expression used to filter the data for the report.
Predicates may refer to any dimension. Filtering must conform to these constraints:
- All string field predicates must use exact string matches.
- Multiple predicates referring to the same string field must be joined using the logical OR operator ('||').
- All other predicates must be joined using the logical AND operator
(
&&). - A predicate on a time dimension (e.g.,
day) specifying the start time must use a greater-than-or-equal-to comparison (>=). A predicate on a time dimension specifying the end time must use a less-than comparison (
<).Examples:
Filter by a specific resource type:
"resource_type == 'compute.googleapis.com/Instance'"Filter data points that fall within a specific absolute time interval:
"hour >= timestamp('2024-01-01T00:00:00Z') && hour < timestamp('2024-02-01T00:00:00Z')"Filter data points that fall within the past 72 hours:
"hour >= now - duration('72h')"Combine string predicate with time interval predicate:
"(location == 'us-east1' || location == 'us-west1') && hour >= timestamp('2023-12-01T00:00:00Z') && hour < timestamp('2024-02-01T00:00:00Z')"If the filter omits time dimensions (
month,day,hour), the report defaults to a 7-day range ending at the previous Pacific Time midnight, with Daylight Saving Time (DST) applied.For example, if the current Pacific Time is
2026-01-05T12:00:00, the default range is2025-12-29T00:00:00to2026-01-05T00:00:00Pacific time.
string filter = 4 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe filter to set. |
| Returns | |
|---|---|
| Type | Description |
Report.Builder |
This builder for chaining. |
setFilterBytes(ByteString value)
public Report.Builder setFilterBytes(ByteString value)Optional. A Common Expression Language (CEL) expression used to filter the data for the report.
Predicates may refer to any dimension. Filtering must conform to these constraints:
- All string field predicates must use exact string matches.
- Multiple predicates referring to the same string field must be joined using the logical OR operator ('||').
- All other predicates must be joined using the logical AND operator
(
&&). - A predicate on a time dimension (e.g.,
day) specifying the start time must use a greater-than-or-equal-to comparison (>=). A predicate on a time dimension specifying the end time must use a less-than comparison (
<).Examples:
Filter by a specific resource type:
"resource_type == 'compute.googleapis.com/Instance'"Filter data points that fall within a specific absolute time interval:
"hour >= timestamp('2024-01-01T00:00:00Z') && hour < timestamp('2024-02-01T00:00:00Z')"Filter data points that fall within the past 72 hours:
"hour >= now - duration('72h')"Combine string predicate with time interval predicate:
"(location == 'us-east1' || location == 'us-west1') && hour >= timestamp('2023-12-01T00:00:00Z') && hour < timestamp('2024-02-01T00:00:00Z')"If the filter omits time dimensions (
month,day,hour), the report defaults to a 7-day range ending at the previous Pacific Time midnight, with Daylight Saving Time (DST) applied.For example, if the current Pacific Time is
2026-01-05T12:00:00, the default range is2025-12-29T00:00:00to2026-01-05T00:00:00Pacific time.
string filter = 4 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes for filter to set. |
| Returns | |
|---|---|
| Type | Description |
Report.Builder |
This builder for chaining. |
setMetrics(int index, String value)
public Report.Builder setMetrics(int index, String value)Required. A list of metrics to include in the report. Supported values:
costcpu_mean_utilizationcpu_usage_core_secondscpu_allocation_core_secondscpu_p95_utilizationmemory_mean_utilizationmemory_usage_byte_secondsmemory_allocation_byte_secondsmemory_p95_utilization
repeated string metrics = 7 [(.google.api.field_behavior) = REQUIRED];
| Parameters | |
|---|---|
| Name | Description |
index |
intThe index to set the value at. |
value |
StringThe metrics to set. |
| Returns | |
|---|---|
| Type | Description |
Report.Builder |
This builder for chaining. |
setName(String value)
public Report.Builder setName(String value)Identifier. The name of this report.
string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe name to set. |
| Returns | |
|---|---|
| Type | Description |
Report.Builder |
This builder for chaining. |
setNameBytes(ByteString value)
public Report.Builder setNameBytes(ByteString value)Identifier. The name of this report.
string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes for name to set. |
| Returns | |
|---|---|
| Type | Description |
Report.Builder |
This builder for chaining. |
setScopes(int index, Scope value)
public Report.Builder setScopes(int index, Scope value)Optional. The resource containers for which to fetch data. Default is the project specified in the report's parent.
repeated .google.cloud.appoptimize.v1beta.Scope scopes = 3 [(.google.api.field_behavior) = OPTIONAL];
| Parameters | |
|---|---|
| Name | Description |
index |
int |
value |
Scope |
| Returns | |
|---|---|
| Type | Description |
Report.Builder |
|
setScopes(int index, Scope.Builder builderForValue)
public Report.Builder setScopes(int index, Scope.Builder builderForValue)Optional. The resource containers for which to fetch data. Default is the project specified in the report's parent.
repeated .google.cloud.appoptimize.v1beta.Scope scopes = 3 [(.google.api.field_behavior) = OPTIONAL];
| Parameters | |
|---|---|
| Name | Description |
index |
int |
builderForValue |
Scope.Builder |
| Returns | |
|---|---|
| Type | Description |
Report.Builder |
|