Class NotificationConfig.Builder

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

    public static final class NotificationConfig.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<NotificationConfig.Builder>
    implements NotificationConfigOrBuilder
     Security Command Center notification configs.
    
     A notification config is a Security Command Center resource that contains the
     configuration to send notifications for create/update events of findings,
     assets and etc.
     
    Protobuf type google.cloud.securitycenter.v1p1beta1.NotificationConfig
    • 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<NotificationConfig.Builder>
      • clear

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

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

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

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

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

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

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

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

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

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

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

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

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

        public String getName()
         The relative resource name of this notification config. See:
         https://cloud.google.com/apis/design/resource_names#relative_resource_name
         Example:
         "organizations/{organization_id}/notificationConfigs/notify_public_bucket".
         
        string name = 1;
        Specified by:
        getName in interface NotificationConfigOrBuilder
        Returns:
        The name.
      • getNameBytes

        public com.google.protobuf.ByteString getNameBytes()
         The relative resource name of this notification config. See:
         https://cloud.google.com/apis/design/resource_names#relative_resource_name
         Example:
         "organizations/{organization_id}/notificationConfigs/notify_public_bucket".
         
        string name = 1;
        Specified by:
        getNameBytes in interface NotificationConfigOrBuilder
        Returns:
        The bytes for name.
      • setName

        public NotificationConfig.Builder setName​(String value)
         The relative resource name of this notification config. See:
         https://cloud.google.com/apis/design/resource_names#relative_resource_name
         Example:
         "organizations/{organization_id}/notificationConfigs/notify_public_bucket".
         
        string name = 1;
        Parameters:
        value - The name to set.
        Returns:
        This builder for chaining.
      • clearName

        public NotificationConfig.Builder clearName()
         The relative resource name of this notification config. See:
         https://cloud.google.com/apis/design/resource_names#relative_resource_name
         Example:
         "organizations/{organization_id}/notificationConfigs/notify_public_bucket".
         
        string name = 1;
        Returns:
        This builder for chaining.
      • setNameBytes

        public NotificationConfig.Builder setNameBytes​(com.google.protobuf.ByteString value)
         The relative resource name of this notification config. See:
         https://cloud.google.com/apis/design/resource_names#relative_resource_name
         Example:
         "organizations/{organization_id}/notificationConfigs/notify_public_bucket".
         
        string name = 1;
        Parameters:
        value - The bytes for name to set.
        Returns:
        This builder for chaining.
      • getDescription

        public String getDescription()
         The description of the notification config (max of 1024 characters).
         
        string description = 2;
        Specified by:
        getDescription in interface NotificationConfigOrBuilder
        Returns:
        The description.
      • getDescriptionBytes

        public com.google.protobuf.ByteString getDescriptionBytes()
         The description of the notification config (max of 1024 characters).
         
        string description = 2;
        Specified by:
        getDescriptionBytes in interface NotificationConfigOrBuilder
        Returns:
        The bytes for description.
      • setDescription

        public NotificationConfig.Builder setDescription​(String value)
         The description of the notification config (max of 1024 characters).
         
        string description = 2;
        Parameters:
        value - The description to set.
        Returns:
        This builder for chaining.
      • clearDescription

        public NotificationConfig.Builder clearDescription()
         The description of the notification config (max of 1024 characters).
         
        string description = 2;
        Returns:
        This builder for chaining.
      • setDescriptionBytes

        public NotificationConfig.Builder setDescriptionBytes​(com.google.protobuf.ByteString value)
         The description of the notification config (max of 1024 characters).
         
        string description = 2;
        Parameters:
        value - The bytes for description to set.
        Returns:
        This builder for chaining.
      • getEventTypeValue

        public int getEventTypeValue()
         The type of events the config is for, e.g. FINDING.
         
        .google.cloud.securitycenter.v1p1beta1.NotificationConfig.EventType event_type = 3;
        Specified by:
        getEventTypeValue in interface NotificationConfigOrBuilder
        Returns:
        The enum numeric value on the wire for eventType.
      • setEventTypeValue

        public NotificationConfig.Builder setEventTypeValue​(int value)
         The type of events the config is for, e.g. FINDING.
         
        .google.cloud.securitycenter.v1p1beta1.NotificationConfig.EventType event_type = 3;
        Parameters:
        value - The enum numeric value on the wire for eventType to set.
        Returns:
        This builder for chaining.
      • setEventType

        public NotificationConfig.Builder setEventType​(NotificationConfig.EventType value)
         The type of events the config is for, e.g. FINDING.
         
        .google.cloud.securitycenter.v1p1beta1.NotificationConfig.EventType event_type = 3;
        Parameters:
        value - The eventType to set.
        Returns:
        This builder for chaining.
      • clearEventType

        public NotificationConfig.Builder clearEventType()
         The type of events the config is for, e.g. FINDING.
         
        .google.cloud.securitycenter.v1p1beta1.NotificationConfig.EventType event_type = 3;
        Returns:
        This builder for chaining.
      • getPubsubTopic

        public String getPubsubTopic()
         The Pub/Sub topic to send notifications to. Its format is
         "projects/[project_id]/topics/[topic]".
         
        string pubsub_topic = 4 [(.google.api.resource_reference) = { ... }
        Specified by:
        getPubsubTopic in interface NotificationConfigOrBuilder
        Returns:
        The pubsubTopic.
      • getPubsubTopicBytes

        public com.google.protobuf.ByteString getPubsubTopicBytes()
         The Pub/Sub topic to send notifications to. Its format is
         "projects/[project_id]/topics/[topic]".
         
        string pubsub_topic = 4 [(.google.api.resource_reference) = { ... }
        Specified by:
        getPubsubTopicBytes in interface NotificationConfigOrBuilder
        Returns:
        The bytes for pubsubTopic.
      • setPubsubTopic

        public NotificationConfig.Builder setPubsubTopic​(String value)
         The Pub/Sub topic to send notifications to. Its format is
         "projects/[project_id]/topics/[topic]".
         
        string pubsub_topic = 4 [(.google.api.resource_reference) = { ... }
        Parameters:
        value - The pubsubTopic to set.
        Returns:
        This builder for chaining.
      • clearPubsubTopic

        public NotificationConfig.Builder clearPubsubTopic()
         The Pub/Sub topic to send notifications to. Its format is
         "projects/[project_id]/topics/[topic]".
         
        string pubsub_topic = 4 [(.google.api.resource_reference) = { ... }
        Returns:
        This builder for chaining.
      • setPubsubTopicBytes

        public NotificationConfig.Builder setPubsubTopicBytes​(com.google.protobuf.ByteString value)
         The Pub/Sub topic to send notifications to. Its format is
         "projects/[project_id]/topics/[topic]".
         
        string pubsub_topic = 4 [(.google.api.resource_reference) = { ... }
        Parameters:
        value - The bytes for pubsubTopic to set.
        Returns:
        This builder for chaining.
      • getServiceAccount

        public String getServiceAccount()
         Output only. The service account that needs "pubsub.topics.publish"
         permission to publish to the Pub/Sub topic.
         
        string service_account = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getServiceAccount in interface NotificationConfigOrBuilder
        Returns:
        The serviceAccount.
      • getServiceAccountBytes

        public com.google.protobuf.ByteString getServiceAccountBytes()
         Output only. The service account that needs "pubsub.topics.publish"
         permission to publish to the Pub/Sub topic.
         
        string service_account = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getServiceAccountBytes in interface NotificationConfigOrBuilder
        Returns:
        The bytes for serviceAccount.
      • setServiceAccount

        public NotificationConfig.Builder setServiceAccount​(String value)
         Output only. The service account that needs "pubsub.topics.publish"
         permission to publish to the Pub/Sub topic.
         
        string service_account = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Parameters:
        value - The serviceAccount to set.
        Returns:
        This builder for chaining.
      • clearServiceAccount

        public NotificationConfig.Builder clearServiceAccount()
         Output only. The service account that needs "pubsub.topics.publish"
         permission to publish to the Pub/Sub topic.
         
        string service_account = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Returns:
        This builder for chaining.
      • setServiceAccountBytes

        public NotificationConfig.Builder setServiceAccountBytes​(com.google.protobuf.ByteString value)
         Output only. The service account that needs "pubsub.topics.publish"
         permission to publish to the Pub/Sub topic.
         
        string service_account = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Parameters:
        value - The bytes for serviceAccount to set.
        Returns:
        This builder for chaining.
      • hasStreamingConfig

        public boolean hasStreamingConfig()
         The config for triggering streaming-based notifications.
         
        .google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig streaming_config = 6;
        Specified by:
        hasStreamingConfig in interface NotificationConfigOrBuilder
        Returns:
        Whether the streamingConfig field is set.
      • clearStreamingConfig

        public NotificationConfig.Builder clearStreamingConfig()
         The config for triggering streaming-based notifications.
         
        .google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig streaming_config = 6;
      • getStreamingConfigBuilder

        public NotificationConfig.StreamingConfig.Builder getStreamingConfigBuilder()
         The config for triggering streaming-based notifications.
         
        .google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig streaming_config = 6;
      • setUnknownFields

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

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