Class MetricsScope.Builder (0.41.0)

public static final class MetricsScope.Builder extends GeneratedMessageV3.Builder<MetricsScope.Builder> implements MetricsScopeOrBuilder

Represents a Metrics Scope in Cloud Monitoring, which specifies one or more Google projects and zero or more AWS accounts to monitor together.

Protobuf type google.monitoring.metricsscope.v1.MetricsScope

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addAllMonitoredProjects(Iterable<? extends MonitoredProject> values)

public MetricsScope.Builder addAllMonitoredProjects(Iterable<? extends MonitoredProject> values)

Output only. The list of projects monitored by this Metrics Scope.

repeated .google.monitoring.metricsscope.v1.MonitoredProject monitored_projects = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
values Iterable<? extends com.google.monitoring.metricsscope.v1.MonitoredProject>
Returns
Type Description
MetricsScope.Builder

addMonitoredProjects(MonitoredProject value)

public MetricsScope.Builder addMonitoredProjects(MonitoredProject value)

Output only. The list of projects monitored by this Metrics Scope.

repeated .google.monitoring.metricsscope.v1.MonitoredProject monitored_projects = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value MonitoredProject
Returns
Type Description
MetricsScope.Builder

addMonitoredProjects(MonitoredProject.Builder builderForValue)

public MetricsScope.Builder addMonitoredProjects(MonitoredProject.Builder builderForValue)

Output only. The list of projects monitored by this Metrics Scope.

repeated .google.monitoring.metricsscope.v1.MonitoredProject monitored_projects = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue MonitoredProject.Builder
Returns
Type Description
MetricsScope.Builder

addMonitoredProjects(int index, MonitoredProject value)

public MetricsScope.Builder addMonitoredProjects(int index, MonitoredProject value)

Output only. The list of projects monitored by this Metrics Scope.

repeated .google.monitoring.metricsscope.v1.MonitoredProject monitored_projects = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameters
Name Description
index int
value MonitoredProject
Returns
Type Description
MetricsScope.Builder

addMonitoredProjects(int index, MonitoredProject.Builder builderForValue)

public MetricsScope.Builder addMonitoredProjects(int index, MonitoredProject.Builder builderForValue)

Output only. The list of projects monitored by this Metrics Scope.

repeated .google.monitoring.metricsscope.v1.MonitoredProject monitored_projects = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameters
Name Description
index int
builderForValue MonitoredProject.Builder
Returns
Type Description
MetricsScope.Builder

addMonitoredProjectsBuilder()

public MonitoredProject.Builder addMonitoredProjectsBuilder()

Output only. The list of projects monitored by this Metrics Scope.

repeated .google.monitoring.metricsscope.v1.MonitoredProject monitored_projects = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
MonitoredProject.Builder

addMonitoredProjectsBuilder(int index)

public MonitoredProject.Builder addMonitoredProjectsBuilder(int index)

Output only. The list of projects monitored by this Metrics Scope.

repeated .google.monitoring.metricsscope.v1.MonitoredProject monitored_projects = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int
Returns
Type Description
MonitoredProject.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public MetricsScope.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
MetricsScope.Builder
Overrides

build()

public MetricsScope build()
Returns
Type Description
MetricsScope

buildPartial()

public MetricsScope buildPartial()
Returns
Type Description
MetricsScope

clear()

public MetricsScope.Builder clear()
Returns
Type Description
MetricsScope.Builder
Overrides

clearCreateTime()

public MetricsScope.Builder clearCreateTime()

Output only. The time when this Metrics Scope was created.

.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
MetricsScope.Builder

clearField(Descriptors.FieldDescriptor field)

public MetricsScope.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
MetricsScope.Builder
Overrides

clearMonitoredProjects()

public MetricsScope.Builder clearMonitoredProjects()

Output only. The list of projects monitored by this Metrics Scope.

repeated .google.monitoring.metricsscope.v1.MonitoredProject monitored_projects = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
MetricsScope.Builder

clearName()

public MetricsScope.Builder clearName()

Immutable. The resource name of the Monitoring Metrics Scope. On input, the resource name can be specified with the scoping project ID or number. On output, the resource name is specified with the scoping project number. Example: locations/global/metricsScopes/{SCOPING_PROJECT_ID_OR_NUMBER}

string name = 1 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
MetricsScope.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public MetricsScope.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
MetricsScope.Builder
Overrides

clearUpdateTime()

public MetricsScope.Builder clearUpdateTime()

Output only. The time when this Metrics Scope record was last updated.

.google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
MetricsScope.Builder

clone()

public MetricsScope.Builder clone()
Returns
Type Description
MetricsScope.Builder
Overrides

getCreateTime()

public Timestamp getCreateTime()

Output only. The time when this Metrics Scope was created.

.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The createTime.

getCreateTimeBuilder()

public Timestamp.Builder getCreateTimeBuilder()

Output only. The time when this Metrics Scope was created.

.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Builder

getCreateTimeOrBuilder()

public TimestampOrBuilder getCreateTimeOrBuilder()

Output only. The time when this Metrics Scope was created.

.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

getDefaultInstanceForType()

public MetricsScope getDefaultInstanceForType()
Returns
Type Description
MetricsScope

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getMonitoredProjects(int index)

public MonitoredProject getMonitoredProjects(int index)

Output only. The list of projects monitored by this Metrics Scope.

repeated .google.monitoring.metricsscope.v1.MonitoredProject monitored_projects = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int
Returns
Type Description
MonitoredProject

getMonitoredProjectsBuilder(int index)

public MonitoredProject.Builder getMonitoredProjectsBuilder(int index)

Output only. The list of projects monitored by this Metrics Scope.

repeated .google.monitoring.metricsscope.v1.MonitoredProject monitored_projects = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int
Returns
Type Description
MonitoredProject.Builder

getMonitoredProjectsBuilderList()

public List<MonitoredProject.Builder> getMonitoredProjectsBuilderList()

Output only. The list of projects monitored by this Metrics Scope.

repeated .google.monitoring.metricsscope.v1.MonitoredProject monitored_projects = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
List<Builder>

getMonitoredProjectsCount()

public int getMonitoredProjectsCount()

Output only. The list of projects monitored by this Metrics Scope.

repeated .google.monitoring.metricsscope.v1.MonitoredProject monitored_projects = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

getMonitoredProjectsList()

public List<MonitoredProject> getMonitoredProjectsList()

Output only. The list of projects monitored by this Metrics Scope.

repeated .google.monitoring.metricsscope.v1.MonitoredProject monitored_projects = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
List<MonitoredProject>

getMonitoredProjectsOrBuilder(int index)

public MonitoredProjectOrBuilder getMonitoredProjectsOrBuilder(int index)

Output only. The list of projects monitored by this Metrics Scope.

repeated .google.monitoring.metricsscope.v1.MonitoredProject monitored_projects = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int
Returns
Type Description
MonitoredProjectOrBuilder

getMonitoredProjectsOrBuilderList()

public List<? extends MonitoredProjectOrBuilder> getMonitoredProjectsOrBuilderList()

Output only. The list of projects monitored by this Metrics Scope.

repeated .google.monitoring.metricsscope.v1.MonitoredProject monitored_projects = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
List<? extends com.google.monitoring.metricsscope.v1.MonitoredProjectOrBuilder>

getName()

public String getName()

Immutable. The resource name of the Monitoring Metrics Scope. On input, the resource name can be specified with the scoping project ID or number. On output, the resource name is specified with the scoping project number. Example: locations/global/metricsScopes/{SCOPING_PROJECT_ID_OR_NUMBER}

string name = 1 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Immutable. The resource name of the Monitoring Metrics Scope. On input, the resource name can be specified with the scoping project ID or number. On output, the resource name is specified with the scoping project number. Example: locations/global/metricsScopes/{SCOPING_PROJECT_ID_OR_NUMBER}

string name = 1 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
ByteString

The bytes for name.

getUpdateTime()

public Timestamp getUpdateTime()

Output only. The time when this Metrics Scope record was last updated.

.google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The updateTime.

getUpdateTimeBuilder()

public Timestamp.Builder getUpdateTimeBuilder()

Output only. The time when this Metrics Scope record was last updated.

.google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Builder

getUpdateTimeOrBuilder()

public TimestampOrBuilder getUpdateTimeOrBuilder()

Output only. The time when this Metrics Scope record was last updated.

.google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

hasCreateTime()

public boolean hasCreateTime()

Output only. The time when this Metrics Scope was created.

.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the createTime field is set.

hasUpdateTime()

public boolean hasUpdateTime()

Output only. The time when this Metrics Scope record was last updated.

.google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the updateTime field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeCreateTime(Timestamp value)

public MetricsScope.Builder mergeCreateTime(Timestamp value)

Output only. The time when this Metrics Scope was created.

.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
MetricsScope.Builder

mergeFrom(MetricsScope other)

public MetricsScope.Builder mergeFrom(MetricsScope other)
Parameter
Name Description
other MetricsScope
Returns
Type Description
MetricsScope.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public MetricsScope.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
MetricsScope.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public MetricsScope.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
MetricsScope.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final MetricsScope.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
MetricsScope.Builder
Overrides

mergeUpdateTime(Timestamp value)

public MetricsScope.Builder mergeUpdateTime(Timestamp value)

Output only. The time when this Metrics Scope record was last updated.

.google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
MetricsScope.Builder

removeMonitoredProjects(int index)

public MetricsScope.Builder removeMonitoredProjects(int index)

Output only. The list of projects monitored by this Metrics Scope.

repeated .google.monitoring.metricsscope.v1.MonitoredProject monitored_projects = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int
Returns
Type Description
MetricsScope.Builder

setCreateTime(Timestamp value)

public MetricsScope.Builder setCreateTime(Timestamp value)

Output only. The time when this Metrics Scope was created.

.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
MetricsScope.Builder

setCreateTime(Timestamp.Builder builderForValue)

public MetricsScope.Builder setCreateTime(Timestamp.Builder builderForValue)

Output only. The time when this Metrics Scope was created.

.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
MetricsScope.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public MetricsScope.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
MetricsScope.Builder
Overrides

setMonitoredProjects(int index, MonitoredProject value)

public MetricsScope.Builder setMonitoredProjects(int index, MonitoredProject value)

Output only. The list of projects monitored by this Metrics Scope.

repeated .google.monitoring.metricsscope.v1.MonitoredProject monitored_projects = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameters
Name Description
index int
value MonitoredProject
Returns
Type Description
MetricsScope.Builder

setMonitoredProjects(int index, MonitoredProject.Builder builderForValue)

public MetricsScope.Builder setMonitoredProjects(int index, MonitoredProject.Builder builderForValue)

Output only. The list of projects monitored by this Metrics Scope.

repeated .google.monitoring.metricsscope.v1.MonitoredProject monitored_projects = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameters
Name Description
index int
builderForValue MonitoredProject.Builder
Returns
Type Description
MetricsScope.Builder

setName(String value)

public MetricsScope.Builder setName(String value)

Immutable. The resource name of the Monitoring Metrics Scope. On input, the resource name can be specified with the scoping project ID or number. On output, the resource name is specified with the scoping project number. Example: locations/global/metricsScopes/{SCOPING_PROJECT_ID_OR_NUMBER}

string name = 1 [(.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value String

The name to set.

Returns
Type Description
MetricsScope.Builder

This builder for chaining.

setNameBytes(ByteString value)

public MetricsScope.Builder setNameBytes(ByteString value)

Immutable. The resource name of the Monitoring Metrics Scope. On input, the resource name can be specified with the scoping project ID or number. On output, the resource name is specified with the scoping project number. Example: locations/global/metricsScopes/{SCOPING_PROJECT_ID_OR_NUMBER}

string name = 1 [(.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
MetricsScope.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public MetricsScope.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
MetricsScope.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final MetricsScope.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
MetricsScope.Builder
Overrides

setUpdateTime(Timestamp value)

public MetricsScope.Builder setUpdateTime(Timestamp value)

Output only. The time when this Metrics Scope record was last updated.

.google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
MetricsScope.Builder

setUpdateTime(Timestamp.Builder builderForValue)

public MetricsScope.Builder setUpdateTime(Timestamp.Builder builderForValue)

Output only. The time when this Metrics Scope record was last updated.

.google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
MetricsScope.Builder