Class MetricsScope.Builder (0.9.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
TypeDescription
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
NameDescription
valuesIterable<? extends com.google.monitoring.metricsscope.v1.MonitoredProject>
Returns
TypeDescription
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
NameDescription
valueMonitoredProject
Returns
TypeDescription
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
NameDescription
builderForValueMonitoredProject.Builder
Returns
TypeDescription
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
NameDescription
indexint
valueMonitoredProject
Returns
TypeDescription
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
NameDescription
indexint
builderForValueMonitoredProject.Builder
Returns
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
MonitoredProject.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public MetricsScope.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
MetricsScope.Builder
Overrides

build()

public MetricsScope build()
Returns
TypeDescription
MetricsScope

buildPartial()

public MetricsScope buildPartial()
Returns
TypeDescription
MetricsScope

clear()

public MetricsScope.Builder clear()
Returns
TypeDescription
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
TypeDescription
MetricsScope.Builder

clearField(Descriptors.FieldDescriptor field)

public MetricsScope.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
MetricsScope.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public MetricsScope.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
TypeDescription
MetricsScope.Builder

clone()

public MetricsScope.Builder clone()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
TimestampOrBuilder

getDefaultInstanceForType()

public MetricsScope getDefaultInstanceForType()
Returns
TypeDescription
MetricsScope

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
boolean

Whether the updateTime field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
MetricsScope.Builder

mergeFrom(MetricsScope other)

public MetricsScope.Builder mergeFrom(MetricsScope other)
Parameter
NameDescription
otherMetricsScope
Returns
TypeDescription
MetricsScope.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public MetricsScope.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
MetricsScope.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public MetricsScope.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
MetricsScope.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final MetricsScope.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
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
NameDescription
builderForValueBuilder
Returns
TypeDescription
MetricsScope.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public MetricsScope.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
indexint
valueMonitoredProject
Returns
TypeDescription
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
NameDescription
indexint
builderForValueMonitoredProject.Builder
Returns
TypeDescription
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
NameDescription
valueString

The name to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
MetricsScope.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final MetricsScope.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
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
NameDescription
builderForValueBuilder
Returns
TypeDescription
MetricsScope.Builder