Class NotificationConfig.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<NotificationConfig.Builder>
com.google.cloud.securitycenter.v1p1beta1.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.GeneratedMessage.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 Details

    • getDescriptor

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

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<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.GeneratedMessage.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.GeneratedMessage.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
    • 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>
    • mergeFrom

    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.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
    • getNotifyConfigCase

      public NotificationConfig.NotifyConfigCase getNotifyConfigCase()
      Specified by:
      getNotifyConfigCase in interface NotificationConfigOrBuilder
    • clearNotifyConfig

      public NotificationConfig.Builder clearNotifyConfig()
    • 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.
    • getEventType

      public NotificationConfig.EventType getEventType()
       The type of events the config is for, e.g. FINDING.
       
      .google.cloud.securitycenter.v1p1beta1.NotificationConfig.EventType event_type = 3;
      Specified by:
      getEventType in interface NotificationConfigOrBuilder
      Returns:
      The eventType.
    • setEventType

       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.
    • getStreamingConfig

      public NotificationConfig.StreamingConfig getStreamingConfig()
       The config for triggering streaming-based notifications.
       
      .google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig streaming_config = 6;
      Specified by:
      getStreamingConfig in interface NotificationConfigOrBuilder
      Returns:
      The streamingConfig.
    • setStreamingConfig

       The config for triggering streaming-based notifications.
       
      .google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig streaming_config = 6;
    • setStreamingConfig

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

       The config for triggering streaming-based notifications.
       
      .google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig streaming_config = 6;
    • 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;
    • getStreamingConfigOrBuilder

      public NotificationConfig.StreamingConfigOrBuilder getStreamingConfigOrBuilder()
       The config for triggering streaming-based notifications.
       
      .google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig streaming_config = 6;
      Specified by:
      getStreamingConfigOrBuilder in interface NotificationConfigOrBuilder