Class Group.Builder

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

    public static final class Group.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<Group.Builder>
    implements GroupOrBuilder
     The description of a dynamic collection of monitored resources. Each group
     has a filter that is matched against monitored resources and their associated
     metadata. If a group's filter matches an available monitored resource, then
     that resource is a member of that group.  Groups can contain any number of
     monitored resources, and each monitored resource can be a member of any
     number of groups.
    
     Groups can be nested in parent-child hierarchies. The `parentName` field
     identifies an optional parent for each group.  If a group has a parent, then
     the only monitored resources available to be matched by the group's filter
     are the resources contained in the parent group.  In other words, a group
     contains the monitored resources that match its filter and the filters of all
     the group's ancestors.  A group without a parent can contain any monitored
     resource.
    
     For example, consider an infrastructure running a set of instances with two
     user-defined tags: `"environment"` and `"role"`. A parent group has a filter,
     `environment="production"`.  A child of that parent group has a filter,
     `role="transcoder"`.  The parent group contains all instances in the
     production environment, regardless of their roles.  The child group contains
     instances that have the transcoder role *and* are in the production
     environment.
    
     The monitored resources contained in a group can change at any moment,
     depending on what resources exist and what filters are associated with the
     group and its ancestors.
     
    Protobuf type google.monitoring.v3.Group
    • 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<Group.Builder>
      • clear

        public Group.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<Group.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<Group.Builder>
      • getDefaultInstanceForType

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

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

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

        public Group.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<Group.Builder>
      • setField

        public Group.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<Group.Builder>
      • clearField

        public Group.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<Group.Builder>
      • clearOneof

        public Group.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<Group.Builder>
      • setRepeatedField

        public Group.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<Group.Builder>
      • addRepeatedField

        public Group.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<Group.Builder>
      • mergeFrom

        public Group.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<Group.Builder>
      • isInitialized

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

        public Group.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<Group.Builder>
        Throws:
        IOException
      • getName

        public String getName()
         Output only. The name of this group. The format is:
        
             projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID]
        
         When creating a group, this field is ignored and a new name is created
         consisting of the project specified in the call to `CreateGroup`
         and a unique `[GROUP_ID]` that is generated automatically.
         
        string name = 1;
        Specified by:
        getName in interface GroupOrBuilder
        Returns:
        The name.
      • getNameBytes

        public com.google.protobuf.ByteString getNameBytes()
         Output only. The name of this group. The format is:
        
             projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID]
        
         When creating a group, this field is ignored and a new name is created
         consisting of the project specified in the call to `CreateGroup`
         and a unique `[GROUP_ID]` that is generated automatically.
         
        string name = 1;
        Specified by:
        getNameBytes in interface GroupOrBuilder
        Returns:
        The bytes for name.
      • setName

        public Group.Builder setName​(String value)
         Output only. The name of this group. The format is:
        
             projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID]
        
         When creating a group, this field is ignored and a new name is created
         consisting of the project specified in the call to `CreateGroup`
         and a unique `[GROUP_ID]` that is generated automatically.
         
        string name = 1;
        Parameters:
        value - The name to set.
        Returns:
        This builder for chaining.
      • clearName

        public Group.Builder clearName()
         Output only. The name of this group. The format is:
        
             projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID]
        
         When creating a group, this field is ignored and a new name is created
         consisting of the project specified in the call to `CreateGroup`
         and a unique `[GROUP_ID]` that is generated automatically.
         
        string name = 1;
        Returns:
        This builder for chaining.
      • setNameBytes

        public Group.Builder setNameBytes​(com.google.protobuf.ByteString value)
         Output only. The name of this group. The format is:
        
             projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID]
        
         When creating a group, this field is ignored and a new name is created
         consisting of the project specified in the call to `CreateGroup`
         and a unique `[GROUP_ID]` that is generated automatically.
         
        string name = 1;
        Parameters:
        value - The bytes for name to set.
        Returns:
        This builder for chaining.
      • getDisplayName

        public String getDisplayName()
         A user-assigned name for this group, used only for display purposes.
         
        string display_name = 2;
        Specified by:
        getDisplayName in interface GroupOrBuilder
        Returns:
        The displayName.
      • getDisplayNameBytes

        public com.google.protobuf.ByteString getDisplayNameBytes()
         A user-assigned name for this group, used only for display purposes.
         
        string display_name = 2;
        Specified by:
        getDisplayNameBytes in interface GroupOrBuilder
        Returns:
        The bytes for displayName.
      • setDisplayName

        public Group.Builder setDisplayName​(String value)
         A user-assigned name for this group, used only for display purposes.
         
        string display_name = 2;
        Parameters:
        value - The displayName to set.
        Returns:
        This builder for chaining.
      • clearDisplayName

        public Group.Builder clearDisplayName()
         A user-assigned name for this group, used only for display purposes.
         
        string display_name = 2;
        Returns:
        This builder for chaining.
      • setDisplayNameBytes

        public Group.Builder setDisplayNameBytes​(com.google.protobuf.ByteString value)
         A user-assigned name for this group, used only for display purposes.
         
        string display_name = 2;
        Parameters:
        value - The bytes for displayName to set.
        Returns:
        This builder for chaining.
      • getParentName

        public String getParentName()
         The name of the group's parent, if it has one. The format is:
        
             projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID]
        
         For groups with no parent, `parent_name` is the empty string, `""`.
         
        string parent_name = 3;
        Specified by:
        getParentName in interface GroupOrBuilder
        Returns:
        The parentName.
      • getParentNameBytes

        public com.google.protobuf.ByteString getParentNameBytes()
         The name of the group's parent, if it has one. The format is:
        
             projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID]
        
         For groups with no parent, `parent_name` is the empty string, `""`.
         
        string parent_name = 3;
        Specified by:
        getParentNameBytes in interface GroupOrBuilder
        Returns:
        The bytes for parentName.
      • setParentName

        public Group.Builder setParentName​(String value)
         The name of the group's parent, if it has one. The format is:
        
             projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID]
        
         For groups with no parent, `parent_name` is the empty string, `""`.
         
        string parent_name = 3;
        Parameters:
        value - The parentName to set.
        Returns:
        This builder for chaining.
      • clearParentName

        public Group.Builder clearParentName()
         The name of the group's parent, if it has one. The format is:
        
             projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID]
        
         For groups with no parent, `parent_name` is the empty string, `""`.
         
        string parent_name = 3;
        Returns:
        This builder for chaining.
      • setParentNameBytes

        public Group.Builder setParentNameBytes​(com.google.protobuf.ByteString value)
         The name of the group's parent, if it has one. The format is:
        
             projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID]
        
         For groups with no parent, `parent_name` is the empty string, `""`.
         
        string parent_name = 3;
        Parameters:
        value - The bytes for parentName to set.
        Returns:
        This builder for chaining.
      • getFilter

        public String getFilter()
         The filter used to determine which monitored resources belong to this
         group.
         
        string filter = 5;
        Specified by:
        getFilter in interface GroupOrBuilder
        Returns:
        The filter.
      • getFilterBytes

        public com.google.protobuf.ByteString getFilterBytes()
         The filter used to determine which monitored resources belong to this
         group.
         
        string filter = 5;
        Specified by:
        getFilterBytes in interface GroupOrBuilder
        Returns:
        The bytes for filter.
      • setFilter

        public Group.Builder setFilter​(String value)
         The filter used to determine which monitored resources belong to this
         group.
         
        string filter = 5;
        Parameters:
        value - The filter to set.
        Returns:
        This builder for chaining.
      • clearFilter

        public Group.Builder clearFilter()
         The filter used to determine which monitored resources belong to this
         group.
         
        string filter = 5;
        Returns:
        This builder for chaining.
      • setFilterBytes

        public Group.Builder setFilterBytes​(com.google.protobuf.ByteString value)
         The filter used to determine which monitored resources belong to this
         group.
         
        string filter = 5;
        Parameters:
        value - The bytes for filter to set.
        Returns:
        This builder for chaining.
      • getIsCluster

        public boolean getIsCluster()
         If true, the members of this group are considered to be a cluster.
         The system can perform additional analysis on groups that are clusters.
         
        bool is_cluster = 6;
        Specified by:
        getIsCluster in interface GroupOrBuilder
        Returns:
        The isCluster.
      • setIsCluster

        public Group.Builder setIsCluster​(boolean value)
         If true, the members of this group are considered to be a cluster.
         The system can perform additional analysis on groups that are clusters.
         
        bool is_cluster = 6;
        Parameters:
        value - The isCluster to set.
        Returns:
        This builder for chaining.
      • clearIsCluster

        public Group.Builder clearIsCluster()
         If true, the members of this group are considered to be a cluster.
         The system can perform additional analysis on groups that are clusters.
         
        bool is_cluster = 6;
        Returns:
        This builder for chaining.
      • setUnknownFields

        public final Group.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<Group.Builder>
      • mergeUnknownFields

        public final Group.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<Group.Builder>