Class MetricsScope.Builder

  • All Implemented Interfaces:
    MetricsScopeOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
    Enclosing class:
    MetricsScope

    public static final class MetricsScope.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<MetricsScope.Builder>
    implements MetricsScopeOrBuilder
     Represents a [Metrics
     Scope](https://cloud.google.com/monitoring/settings#concept-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
    • Method Detail

      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<MetricsScope.Builder>
      • clear

        public MetricsScope.Builder clear()
        Specified by:
        clear in interface com.google.protobuf.Message.Builder
        Specified by:
        clear in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clear in class com.google.protobuf.GeneratedMessageV3.Builder<MetricsScope.Builder>
      • getDescriptorForType

        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface com.google.protobuf.Message.Builder
        Specified by:
        getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<MetricsScope.Builder>
      • getDefaultInstanceForType

        public MetricsScope getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
      • build

        public MetricsScope build()
        Specified by:
        build in interface com.google.protobuf.Message.Builder
        Specified by:
        build in interface com.google.protobuf.MessageLite.Builder
      • buildPartial

        public MetricsScope buildPartial()
        Specified by:
        buildPartial in interface com.google.protobuf.Message.Builder
        Specified by:
        buildPartial in interface com.google.protobuf.MessageLite.Builder
      • clone

        public MetricsScope.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<MetricsScope.Builder>
      • setField

        public MetricsScope.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                             Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<MetricsScope.Builder>
      • clearField

        public MetricsScope.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<MetricsScope.Builder>
      • clearOneof

        public MetricsScope.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<MetricsScope.Builder>
      • setRepeatedField

        public MetricsScope.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                     int index,
                                                     Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<MetricsScope.Builder>
      • addRepeatedField

        public MetricsScope.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                     Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<MetricsScope.Builder>
      • mergeFrom

        public MetricsScope.Builder mergeFrom​(com.google.protobuf.Message other)
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<MetricsScope.Builder>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<MetricsScope.Builder>
      • mergeFrom

        public MetricsScope.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                              com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                       throws IOException
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Specified by:
        mergeFrom in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<MetricsScope.Builder>
        Throws:
        IOException
      • 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];
        Specified by:
        getName in interface MetricsScopeOrBuilder
        Returns:
        The name.
      • getNameBytes

        public com.google.protobuf.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];
        Specified by:
        getNameBytes in interface MetricsScopeOrBuilder
        Returns:
        The bytes for name.
      • setName

        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];
        Parameters:
        value - The name to set.
        Returns:
        This builder for chaining.
      • 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:
        This builder for chaining.
      • setNameBytes

        public MetricsScope.Builder setNameBytes​(com.google.protobuf.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];
        Parameters:
        value - The bytes for name to set.
        Returns:
        This builder for chaining.
      • 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];
        Specified by:
        hasCreateTime in interface MetricsScopeOrBuilder
        Returns:
        Whether the createTime field is set.
      • getCreateTime

        public com.google.protobuf.Timestamp getCreateTime()
         Output only. The time when this `Metrics Scope` was created.
         
        .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getCreateTime in interface MetricsScopeOrBuilder
        Returns:
        The createTime.
      • setCreateTime

        public MetricsScope.Builder setCreateTime​(com.google.protobuf.Timestamp value)
         Output only. The time when this `Metrics Scope` was created.
         
        .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • setCreateTime

        public MetricsScope.Builder setCreateTime​(com.google.protobuf.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];
      • mergeCreateTime

        public MetricsScope.Builder mergeCreateTime​(com.google.protobuf.Timestamp value)
         Output only. The time when this `Metrics Scope` was created.
         
        .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • 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];
      • getCreateTimeBuilder

        public com.google.protobuf.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];
      • getCreateTimeOrBuilder

        public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder()
         Output only. The time when this `Metrics Scope` was created.
         
        .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getCreateTimeOrBuilder in interface MetricsScopeOrBuilder
      • 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];
        Specified by:
        hasUpdateTime in interface MetricsScopeOrBuilder
        Returns:
        Whether the updateTime field is set.
      • getUpdateTime

        public com.google.protobuf.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];
        Specified by:
        getUpdateTime in interface MetricsScopeOrBuilder
        Returns:
        The updateTime.
      • setUpdateTime

        public MetricsScope.Builder setUpdateTime​(com.google.protobuf.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];
      • setUpdateTime

        public MetricsScope.Builder setUpdateTime​(com.google.protobuf.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];
      • mergeUpdateTime

        public MetricsScope.Builder mergeUpdateTime​(com.google.protobuf.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];
      • 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];
      • getUpdateTimeBuilder

        public com.google.protobuf.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];
      • getUpdateTimeOrBuilder

        public com.google.protobuf.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];
        Specified by:
        getUpdateTimeOrBuilder in interface MetricsScopeOrBuilder
      • 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];
        Specified by:
        getMonitoredProjectsList in interface MetricsScopeOrBuilder
      • 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];
        Specified by:
        getMonitoredProjectsCount in interface MetricsScopeOrBuilder
      • getMonitoredProjects

        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];
        Specified by:
        getMonitoredProjects in interface MetricsScopeOrBuilder
      • setMonitoredProjects

        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];
      • setMonitoredProjects

        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];
      • addMonitoredProjects

        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];
      • addMonitoredProjects

        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];
      • addMonitoredProjects

        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];
      • addMonitoredProjects

        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];
      • addAllMonitoredProjects

        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];
      • 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];
      • removeMonitoredProjects

        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];
      • getMonitoredProjectsBuilder

        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];
      • getMonitoredProjectsOrBuilder

        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];
        Specified by:
        getMonitoredProjectsOrBuilder in interface MetricsScopeOrBuilder
      • 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];
      • addMonitoredProjectsBuilder

        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];
      • 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];
      • setUnknownFields

        public final MetricsScope.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<MetricsScope.Builder>
      • mergeUnknownFields

        public final MetricsScope.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<MetricsScope.Builder>