All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.cloud.securitycenter.v1p1beta1.NotificationConfig Maven / Gradle / Ivy

There is a newer version: 0.157.0
Show newest version
/*
 * Copyright 2024 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/cloud/securitycenter/v1p1beta1/notification_config.proto

// Protobuf Java Version: 3.25.3
package com.google.cloud.securitycenter.v1p1beta1;

/**
 *
 *
 * 
 * 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 {@code google.cloud.securitycenter.v1p1beta1.NotificationConfig} */ public final class NotificationConfig extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1p1beta1.NotificationConfig) NotificationConfigOrBuilder { private static final long serialVersionUID = 0L; // Use NotificationConfig.newBuilder() to construct. private NotificationConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private NotificationConfig() { name_ = ""; description_ = ""; eventType_ = 0; pubsubTopic_ = ""; serviceAccount_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new NotificationConfig(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.securitycenter.v1p1beta1.NotificationConfigOuterClass .internal_static_google_cloud_securitycenter_v1p1beta1_NotificationConfig_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.securitycenter.v1p1beta1.NotificationConfigOuterClass .internal_static_google_cloud_securitycenter_v1p1beta1_NotificationConfig_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.class, com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.Builder.class); } /** * * *
   * The type of events.
   * 
* * Protobuf enum {@code google.cloud.securitycenter.v1p1beta1.NotificationConfig.EventType} */ public enum EventType implements com.google.protobuf.ProtocolMessageEnum { /** * * *
     * Unspecified event type.
     * 
* * EVENT_TYPE_UNSPECIFIED = 0; */ EVENT_TYPE_UNSPECIFIED(0), /** * * *
     * Events for findings.
     * 
* * FINDING = 1; */ FINDING(1), UNRECOGNIZED(-1), ; /** * * *
     * Unspecified event type.
     * 
* * EVENT_TYPE_UNSPECIFIED = 0; */ public static final int EVENT_TYPE_UNSPECIFIED_VALUE = 0; /** * * *
     * Events for findings.
     * 
* * FINDING = 1; */ public static final int FINDING_VALUE = 1; public final int getNumber() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalArgumentException( "Can't get the number of an unknown enum value."); } return value; } /** * @param value The numeric wire value of the corresponding enum entry. * @return The enum associated with the given numeric wire value. * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static EventType valueOf(int value) { return forNumber(value); } /** * @param value The numeric wire value of the corresponding enum entry. * @return The enum associated with the given numeric wire value. */ public static EventType forNumber(int value) { switch (value) { case 0: return EVENT_TYPE_UNSPECIFIED; case 1: return FINDING; default: return null; } } public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; } private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { public EventType findValueByNumber(int number) { return EventType.forNumber(number); } }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalStateException( "Can't get the descriptor of an unrecognized enum value."); } return getDescriptor().getValues().get(ordinal()); } public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { return getDescriptor(); } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.getDescriptor() .getEnumTypes() .get(0); } private static final EventType[] VALUES = values(); public static EventType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); } if (desc.getIndex() == -1) { return UNRECOGNIZED; } return VALUES[desc.getIndex()]; } private final int value; private EventType(int value) { this.value = value; } // @@protoc_insertion_point(enum_scope:google.cloud.securitycenter.v1p1beta1.NotificationConfig.EventType) } public interface StreamingConfigOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig) com.google.protobuf.MessageOrBuilder { /** * * *
     * Expression that defines the filter to apply across create/update events
     * of assets or findings as specified by the event type. The expression is a
     * list of zero or more restrictions combined via logical operators `AND`
     * and `OR`. Parentheses are supported, and `OR` has higher precedence than
     * `AND`.
     *
     * Restrictions have the form `<field> <operator> <value>` and may have a
     * `-` character in front of them to indicate negation. The fields map to
     * those defined in the corresponding resource.
     *
     * The supported operators are:
     *
     * * `=` for all value types.
     * * `>`, `<`, `>=`, `<=` for integer values.
     * * `:`, meaning substring matching, for strings.
     *
     * The supported value types are:
     *
     * * string literals in quotes.
     * * integer literals without quotes.
     * * boolean literals `true` and `false` without quotes.
     * 
* * string filter = 1; * * @return The filter. */ java.lang.String getFilter(); /** * * *
     * Expression that defines the filter to apply across create/update events
     * of assets or findings as specified by the event type. The expression is a
     * list of zero or more restrictions combined via logical operators `AND`
     * and `OR`. Parentheses are supported, and `OR` has higher precedence than
     * `AND`.
     *
     * Restrictions have the form `<field> <operator> <value>` and may have a
     * `-` character in front of them to indicate negation. The fields map to
     * those defined in the corresponding resource.
     *
     * The supported operators are:
     *
     * * `=` for all value types.
     * * `>`, `<`, `>=`, `<=` for integer values.
     * * `:`, meaning substring matching, for strings.
     *
     * The supported value types are:
     *
     * * string literals in quotes.
     * * integer literals without quotes.
     * * boolean literals `true` and `false` without quotes.
     * 
* * string filter = 1; * * @return The bytes for filter. */ com.google.protobuf.ByteString getFilterBytes(); } /** * * *
   * The config for streaming-based notifications, which send each event as soon
   * as it is detected.
   * 
* * Protobuf type {@code google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig} */ public static final class StreamingConfig extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig) StreamingConfigOrBuilder { private static final long serialVersionUID = 0L; // Use StreamingConfig.newBuilder() to construct. private StreamingConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private StreamingConfig() { filter_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new StreamingConfig(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.securitycenter.v1p1beta1.NotificationConfigOuterClass .internal_static_google_cloud_securitycenter_v1p1beta1_NotificationConfig_StreamingConfig_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.securitycenter.v1p1beta1.NotificationConfigOuterClass .internal_static_google_cloud_securitycenter_v1p1beta1_NotificationConfig_StreamingConfig_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig.class, com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig.Builder .class); } public static final int FILTER_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object filter_ = ""; /** * * *
     * Expression that defines the filter to apply across create/update events
     * of assets or findings as specified by the event type. The expression is a
     * list of zero or more restrictions combined via logical operators `AND`
     * and `OR`. Parentheses are supported, and `OR` has higher precedence than
     * `AND`.
     *
     * Restrictions have the form `<field> <operator> <value>` and may have a
     * `-` character in front of them to indicate negation. The fields map to
     * those defined in the corresponding resource.
     *
     * The supported operators are:
     *
     * * `=` for all value types.
     * * `>`, `<`, `>=`, `<=` for integer values.
     * * `:`, meaning substring matching, for strings.
     *
     * The supported value types are:
     *
     * * string literals in quotes.
     * * integer literals without quotes.
     * * boolean literals `true` and `false` without quotes.
     * 
* * string filter = 1; * * @return The filter. */ @java.lang.Override public java.lang.String getFilter() { java.lang.Object ref = filter_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); filter_ = s; return s; } } /** * * *
     * Expression that defines the filter to apply across create/update events
     * of assets or findings as specified by the event type. The expression is a
     * list of zero or more restrictions combined via logical operators `AND`
     * and `OR`. Parentheses are supported, and `OR` has higher precedence than
     * `AND`.
     *
     * Restrictions have the form `<field> <operator> <value>` and may have a
     * `-` character in front of them to indicate negation. The fields map to
     * those defined in the corresponding resource.
     *
     * The supported operators are:
     *
     * * `=` for all value types.
     * * `>`, `<`, `>=`, `<=` for integer values.
     * * `:`, meaning substring matching, for strings.
     *
     * The supported value types are:
     *
     * * string literals in quotes.
     * * integer literals without quotes.
     * * boolean literals `true` and `false` without quotes.
     * 
* * string filter = 1; * * @return The bytes for filter. */ @java.lang.Override public com.google.protobuf.ByteString getFilterBytes() { java.lang.Object ref = filter_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); filter_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, filter_); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, filter_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig)) { return super.equals(obj); } com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig other = (com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig) obj; if (!getFilter().equals(other.getFilter())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + FILTER_FIELD_NUMBER; hash = (53 * hash) + getFilter().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder( com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * * *
     * The config for streaming-based notifications, which send each event as soon
     * as it is detected.
     * 
* * Protobuf type {@code * google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig) com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfigOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.securitycenter.v1p1beta1.NotificationConfigOuterClass .internal_static_google_cloud_securitycenter_v1p1beta1_NotificationConfig_StreamingConfig_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.securitycenter.v1p1beta1.NotificationConfigOuterClass .internal_static_google_cloud_securitycenter_v1p1beta1_NotificationConfig_StreamingConfig_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig.class, com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig.Builder .class); } // Construct using // com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; filter_ = ""; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.securitycenter.v1p1beta1.NotificationConfigOuterClass .internal_static_google_cloud_securitycenter_v1p1beta1_NotificationConfig_StreamingConfig_descriptor; } @java.lang.Override public com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig getDefaultInstanceForType() { return com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig .getDefaultInstance(); } @java.lang.Override public com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig build() { com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig buildPartial() { com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig result = new com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0( com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.filter_ = filter_; } } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig) { return mergeFrom( (com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom( com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig other) { if (other == com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig .getDefaultInstance()) return this; if (!other.getFilter().isEmpty()) { filter_ = other.filter_; bitField0_ |= 0x00000001; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { filter_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 10 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private java.lang.Object filter_ = ""; /** * * *
       * Expression that defines the filter to apply across create/update events
       * of assets or findings as specified by the event type. The expression is a
       * list of zero or more restrictions combined via logical operators `AND`
       * and `OR`. Parentheses are supported, and `OR` has higher precedence than
       * `AND`.
       *
       * Restrictions have the form `<field> <operator> <value>` and may have a
       * `-` character in front of them to indicate negation. The fields map to
       * those defined in the corresponding resource.
       *
       * The supported operators are:
       *
       * * `=` for all value types.
       * * `>`, `<`, `>=`, `<=` for integer values.
       * * `:`, meaning substring matching, for strings.
       *
       * The supported value types are:
       *
       * * string literals in quotes.
       * * integer literals without quotes.
       * * boolean literals `true` and `false` without quotes.
       * 
* * string filter = 1; * * @return The filter. */ public java.lang.String getFilter() { java.lang.Object ref = filter_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); filter_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
       * Expression that defines the filter to apply across create/update events
       * of assets or findings as specified by the event type. The expression is a
       * list of zero or more restrictions combined via logical operators `AND`
       * and `OR`. Parentheses are supported, and `OR` has higher precedence than
       * `AND`.
       *
       * Restrictions have the form `<field> <operator> <value>` and may have a
       * `-` character in front of them to indicate negation. The fields map to
       * those defined in the corresponding resource.
       *
       * The supported operators are:
       *
       * * `=` for all value types.
       * * `>`, `<`, `>=`, `<=` for integer values.
       * * `:`, meaning substring matching, for strings.
       *
       * The supported value types are:
       *
       * * string literals in quotes.
       * * integer literals without quotes.
       * * boolean literals `true` and `false` without quotes.
       * 
* * string filter = 1; * * @return The bytes for filter. */ public com.google.protobuf.ByteString getFilterBytes() { java.lang.Object ref = filter_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); filter_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
       * Expression that defines the filter to apply across create/update events
       * of assets or findings as specified by the event type. The expression is a
       * list of zero or more restrictions combined via logical operators `AND`
       * and `OR`. Parentheses are supported, and `OR` has higher precedence than
       * `AND`.
       *
       * Restrictions have the form `<field> <operator> <value>` and may have a
       * `-` character in front of them to indicate negation. The fields map to
       * those defined in the corresponding resource.
       *
       * The supported operators are:
       *
       * * `=` for all value types.
       * * `>`, `<`, `>=`, `<=` for integer values.
       * * `:`, meaning substring matching, for strings.
       *
       * The supported value types are:
       *
       * * string literals in quotes.
       * * integer literals without quotes.
       * * boolean literals `true` and `false` without quotes.
       * 
* * string filter = 1; * * @param value The filter to set. * @return This builder for chaining. */ public Builder setFilter(java.lang.String value) { if (value == null) { throw new NullPointerException(); } filter_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** * * *
       * Expression that defines the filter to apply across create/update events
       * of assets or findings as specified by the event type. The expression is a
       * list of zero or more restrictions combined via logical operators `AND`
       * and `OR`. Parentheses are supported, and `OR` has higher precedence than
       * `AND`.
       *
       * Restrictions have the form `<field> <operator> <value>` and may have a
       * `-` character in front of them to indicate negation. The fields map to
       * those defined in the corresponding resource.
       *
       * The supported operators are:
       *
       * * `=` for all value types.
       * * `>`, `<`, `>=`, `<=` for integer values.
       * * `:`, meaning substring matching, for strings.
       *
       * The supported value types are:
       *
       * * string literals in quotes.
       * * integer literals without quotes.
       * * boolean literals `true` and `false` without quotes.
       * 
* * string filter = 1; * * @return This builder for chaining. */ public Builder clearFilter() { filter_ = getDefaultInstance().getFilter(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** * * *
       * Expression that defines the filter to apply across create/update events
       * of assets or findings as specified by the event type. The expression is a
       * list of zero or more restrictions combined via logical operators `AND`
       * and `OR`. Parentheses are supported, and `OR` has higher precedence than
       * `AND`.
       *
       * Restrictions have the form `<field> <operator> <value>` and may have a
       * `-` character in front of them to indicate negation. The fields map to
       * those defined in the corresponding resource.
       *
       * The supported operators are:
       *
       * * `=` for all value types.
       * * `>`, `<`, `>=`, `<=` for integer values.
       * * `:`, meaning substring matching, for strings.
       *
       * The supported value types are:
       *
       * * string literals in quotes.
       * * integer literals without quotes.
       * * boolean literals `true` and `false` without quotes.
       * 
* * string filter = 1; * * @param value The bytes for filter to set. * @return This builder for chaining. */ public Builder setFilterBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); filter_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig) } // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig) private static final com.google.cloud.securitycenter.v1p1beta1.NotificationConfig .StreamingConfig DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig(); } public static com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public StreamingConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException() .setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } private int notifyConfigCase_ = 0; @SuppressWarnings("serial") private java.lang.Object notifyConfig_; public enum NotifyConfigCase implements com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { STREAMING_CONFIG(6), NOTIFYCONFIG_NOT_SET(0); private final int value; private NotifyConfigCase(int value) { this.value = value; } /** * @param value The number of the enum to look for. * @return The enum associated with the given number. * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static NotifyConfigCase valueOf(int value) { return forNumber(value); } public static NotifyConfigCase forNumber(int value) { switch (value) { case 6: return STREAMING_CONFIG; case 0: return NOTIFYCONFIG_NOT_SET; default: return null; } } public int getNumber() { return this.value; } }; public NotifyConfigCase getNotifyConfigCase() { return NotifyConfigCase.forNumber(notifyConfigCase_); } public static final int NAME_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; /** * * *
   * 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; * * @return The name. */ @java.lang.Override public java.lang.String getName() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; } } /** * * *
   * 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; * * @return The bytes for name. */ @java.lang.Override public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); name_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int DESCRIPTION_FIELD_NUMBER = 2; @SuppressWarnings("serial") private volatile java.lang.Object description_ = ""; /** * * *
   * The description of the notification config (max of 1024 characters).
   * 
* * string description = 2; * * @return The description. */ @java.lang.Override public java.lang.String getDescription() { java.lang.Object ref = description_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); description_ = s; return s; } } /** * * *
   * The description of the notification config (max of 1024 characters).
   * 
* * string description = 2; * * @return The bytes for description. */ @java.lang.Override public com.google.protobuf.ByteString getDescriptionBytes() { java.lang.Object ref = description_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); description_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int EVENT_TYPE_FIELD_NUMBER = 3; private int eventType_ = 0; /** * * *
   * The type of events the config is for, e.g. FINDING.
   * 
* * .google.cloud.securitycenter.v1p1beta1.NotificationConfig.EventType event_type = 3; * * * @return The enum numeric value on the wire for eventType. */ @java.lang.Override public int getEventTypeValue() { return eventType_; } /** * * *
   * The type of events the config is for, e.g. FINDING.
   * 
* * .google.cloud.securitycenter.v1p1beta1.NotificationConfig.EventType event_type = 3; * * * @return The eventType. */ @java.lang.Override public com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.EventType getEventType() { com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.EventType result = com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.EventType.forNumber( eventType_); return result == null ? com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.EventType.UNRECOGNIZED : result; } public static final int PUBSUB_TOPIC_FIELD_NUMBER = 4; @SuppressWarnings("serial") private volatile java.lang.Object pubsubTopic_ = ""; /** * * *
   * The Pub/Sub topic to send notifications to. Its format is
   * "projects/[project_id]/topics/[topic]".
   * 
* * string pubsub_topic = 4 [(.google.api.resource_reference) = { ... } * * @return The pubsubTopic. */ @java.lang.Override public java.lang.String getPubsubTopic() { java.lang.Object ref = pubsubTopic_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); pubsubTopic_ = s; return s; } } /** * * *
   * The Pub/Sub topic to send notifications to. Its format is
   * "projects/[project_id]/topics/[topic]".
   * 
* * string pubsub_topic = 4 [(.google.api.resource_reference) = { ... } * * @return The bytes for pubsubTopic. */ @java.lang.Override public com.google.protobuf.ByteString getPubsubTopicBytes() { java.lang.Object ref = pubsubTopic_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); pubsubTopic_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int SERVICE_ACCOUNT_FIELD_NUMBER = 5; @SuppressWarnings("serial") private volatile java.lang.Object serviceAccount_ = ""; /** * * *
   * 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]; * * @return The serviceAccount. */ @java.lang.Override public java.lang.String getServiceAccount() { java.lang.Object ref = serviceAccount_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); serviceAccount_ = s; return s; } } /** * * *
   * 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]; * * @return The bytes for serviceAccount. */ @java.lang.Override public com.google.protobuf.ByteString getServiceAccountBytes() { java.lang.Object ref = serviceAccount_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); serviceAccount_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int STREAMING_CONFIG_FIELD_NUMBER = 6; /** * * *
   * The config for triggering streaming-based notifications.
   * 
* * * .google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig streaming_config = 6; * * * @return Whether the streamingConfig field is set. */ @java.lang.Override public boolean hasStreamingConfig() { return notifyConfigCase_ == 6; } /** * * *
   * The config for triggering streaming-based notifications.
   * 
* * * .google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig streaming_config = 6; * * * @return The streamingConfig. */ @java.lang.Override public com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig getStreamingConfig() { if (notifyConfigCase_ == 6) { return (com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig) notifyConfig_; } return com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig .getDefaultInstance(); } /** * * *
   * The config for triggering streaming-based notifications.
   * 
* * * .google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig streaming_config = 6; * */ @java.lang.Override public com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfigOrBuilder getStreamingConfigOrBuilder() { if (notifyConfigCase_ == 6) { return (com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig) notifyConfig_; } return com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig .getDefaultInstance(); } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); } if (eventType_ != com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.EventType .EVENT_TYPE_UNSPECIFIED .getNumber()) { output.writeEnum(3, eventType_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pubsubTopic_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pubsubTopic_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccount_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, serviceAccount_); } if (notifyConfigCase_ == 6) { output.writeMessage( 6, (com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig) notifyConfig_); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); } if (eventType_ != com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.EventType .EVENT_TYPE_UNSPECIFIED .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, eventType_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pubsubTopic_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, pubsubTopic_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccount_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, serviceAccount_); } if (notifyConfigCase_ == 6) { size += com.google.protobuf.CodedOutputStream.computeMessageSize( 6, (com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig) notifyConfig_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.cloud.securitycenter.v1p1beta1.NotificationConfig)) { return super.equals(obj); } com.google.cloud.securitycenter.v1p1beta1.NotificationConfig other = (com.google.cloud.securitycenter.v1p1beta1.NotificationConfig) obj; if (!getName().equals(other.getName())) return false; if (!getDescription().equals(other.getDescription())) return false; if (eventType_ != other.eventType_) return false; if (!getPubsubTopic().equals(other.getPubsubTopic())) return false; if (!getServiceAccount().equals(other.getServiceAccount())) return false; if (!getNotifyConfigCase().equals(other.getNotifyConfigCase())) return false; switch (notifyConfigCase_) { case 6: if (!getStreamingConfig().equals(other.getStreamingConfig())) return false; break; case 0: default: } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; hash = (53 * hash) + getDescription().hashCode(); hash = (37 * hash) + EVENT_TYPE_FIELD_NUMBER; hash = (53 * hash) + eventType_; hash = (37 * hash) + PUBSUB_TOPIC_FIELD_NUMBER; hash = (53 * hash) + getPubsubTopic().hashCode(); hash = (37 * hash) + SERVICE_ACCOUNT_FIELD_NUMBER; hash = (53 * hash) + getServiceAccount().hashCode(); switch (notifyConfigCase_) { case 6: hash = (37 * hash) + STREAMING_CONFIG_FIELD_NUMBER; hash = (53 * hash) + getStreamingConfig().hashCode(); break; case 0: default: } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.cloud.securitycenter.v1p1beta1.NotificationConfig parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.securitycenter.v1p1beta1.NotificationConfig parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.securitycenter.v1p1beta1.NotificationConfig parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.securitycenter.v1p1beta1.NotificationConfig parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.securitycenter.v1p1beta1.NotificationConfig parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.securitycenter.v1p1beta1.NotificationConfig parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.securitycenter.v1p1beta1.NotificationConfig parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.securitycenter.v1p1beta1.NotificationConfig parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.cloud.securitycenter.v1p1beta1.NotificationConfig parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.cloud.securitycenter.v1p1beta1.NotificationConfig parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.cloud.securitycenter.v1p1beta1.NotificationConfig parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.securitycenter.v1p1beta1.NotificationConfig parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder( com.google.cloud.securitycenter.v1p1beta1.NotificationConfig prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * * *
   * 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 {@code google.cloud.securitycenter.v1p1beta1.NotificationConfig} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1p1beta1.NotificationConfig) com.google.cloud.securitycenter.v1p1beta1.NotificationConfigOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.securitycenter.v1p1beta1.NotificationConfigOuterClass .internal_static_google_cloud_securitycenter_v1p1beta1_NotificationConfig_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.securitycenter.v1p1beta1.NotificationConfigOuterClass .internal_static_google_cloud_securitycenter_v1p1beta1_NotificationConfig_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.class, com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.Builder.class); } // Construct using com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; name_ = ""; description_ = ""; eventType_ = 0; pubsubTopic_ = ""; serviceAccount_ = ""; if (streamingConfigBuilder_ != null) { streamingConfigBuilder_.clear(); } notifyConfigCase_ = 0; notifyConfig_ = null; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.securitycenter.v1p1beta1.NotificationConfigOuterClass .internal_static_google_cloud_securitycenter_v1p1beta1_NotificationConfig_descriptor; } @java.lang.Override public com.google.cloud.securitycenter.v1p1beta1.NotificationConfig getDefaultInstanceForType() { return com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.getDefaultInstance(); } @java.lang.Override public com.google.cloud.securitycenter.v1p1beta1.NotificationConfig build() { com.google.cloud.securitycenter.v1p1beta1.NotificationConfig result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.cloud.securitycenter.v1p1beta1.NotificationConfig buildPartial() { com.google.cloud.securitycenter.v1p1beta1.NotificationConfig result = new com.google.cloud.securitycenter.v1p1beta1.NotificationConfig(this); if (bitField0_ != 0) { buildPartial0(result); } buildPartialOneofs(result); onBuilt(); return result; } private void buildPartial0( com.google.cloud.securitycenter.v1p1beta1.NotificationConfig result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.name_ = name_; } if (((from_bitField0_ & 0x00000002) != 0)) { result.description_ = description_; } if (((from_bitField0_ & 0x00000004) != 0)) { result.eventType_ = eventType_; } if (((from_bitField0_ & 0x00000008) != 0)) { result.pubsubTopic_ = pubsubTopic_; } if (((from_bitField0_ & 0x00000010) != 0)) { result.serviceAccount_ = serviceAccount_; } } private void buildPartialOneofs( com.google.cloud.securitycenter.v1p1beta1.NotificationConfig result) { result.notifyConfigCase_ = notifyConfigCase_; result.notifyConfig_ = this.notifyConfig_; if (notifyConfigCase_ == 6 && streamingConfigBuilder_ != null) { result.notifyConfig_ = streamingConfigBuilder_.build(); } } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.securitycenter.v1p1beta1.NotificationConfig) { return mergeFrom((com.google.cloud.securitycenter.v1p1beta1.NotificationConfig) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.cloud.securitycenter.v1p1beta1.NotificationConfig other) { if (other == com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; bitField0_ |= 0x00000001; onChanged(); } if (!other.getDescription().isEmpty()) { description_ = other.description_; bitField0_ |= 0x00000002; onChanged(); } if (other.eventType_ != 0) { setEventTypeValue(other.getEventTypeValue()); } if (!other.getPubsubTopic().isEmpty()) { pubsubTopic_ = other.pubsubTopic_; bitField0_ |= 0x00000008; onChanged(); } if (!other.getServiceAccount().isEmpty()) { serviceAccount_ = other.serviceAccount_; bitField0_ |= 0x00000010; onChanged(); } switch (other.getNotifyConfigCase()) { case STREAMING_CONFIG: { mergeStreamingConfig(other.getStreamingConfig()); break; } case NOTIFYCONFIG_NOT_SET: { break; } } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { name_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 10 case 18: { description_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000002; break; } // case 18 case 24: { eventType_ = input.readEnum(); bitField0_ |= 0x00000004; break; } // case 24 case 34: { pubsubTopic_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000008; break; } // case 34 case 42: { serviceAccount_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000010; break; } // case 42 case 50: { input.readMessage(getStreamingConfigFieldBuilder().getBuilder(), extensionRegistry); notifyConfigCase_ = 6; break; } // case 50 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int notifyConfigCase_ = 0; private java.lang.Object notifyConfig_; public NotifyConfigCase getNotifyConfigCase() { return NotifyConfigCase.forNumber(notifyConfigCase_); } public Builder clearNotifyConfig() { notifyConfigCase_ = 0; notifyConfig_ = null; onChanged(); return this; } private int bitField0_; private java.lang.Object name_ = ""; /** * * *
     * 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; * * @return The name. */ public java.lang.String getName() { java.lang.Object ref = name_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * 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; * * @return The bytes for name. */ public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); name_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * 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; * * @param value The name to set. * @return This builder for chaining. */ public Builder setName(java.lang.String value) { if (value == null) { throw new NullPointerException(); } name_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** * * *
     * 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; * * @return This builder for chaining. */ public Builder clearName() { name_ = getDefaultInstance().getName(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** * * *
     * 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; * * @param value The bytes for name to set. * @return This builder for chaining. */ public Builder setNameBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); name_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } private java.lang.Object description_ = ""; /** * * *
     * The description of the notification config (max of 1024 characters).
     * 
* * string description = 2; * * @return The description. */ public java.lang.String getDescription() { java.lang.Object ref = description_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); description_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * The description of the notification config (max of 1024 characters).
     * 
* * string description = 2; * * @return The bytes for description. */ public com.google.protobuf.ByteString getDescriptionBytes() { java.lang.Object ref = description_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); description_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * The description of the notification config (max of 1024 characters).
     * 
* * string description = 2; * * @param value The description to set. * @return This builder for chaining. */ public Builder setDescription(java.lang.String value) { if (value == null) { throw new NullPointerException(); } description_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** * * *
     * The description of the notification config (max of 1024 characters).
     * 
* * string description = 2; * * @return This builder for chaining. */ public Builder clearDescription() { description_ = getDefaultInstance().getDescription(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** * * *
     * The description of the notification config (max of 1024 characters).
     * 
* * string description = 2; * * @param value The bytes for description to set. * @return This builder for chaining. */ public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); description_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } private int eventType_ = 0; /** * * *
     * The type of events the config is for, e.g. FINDING.
     * 
* * .google.cloud.securitycenter.v1p1beta1.NotificationConfig.EventType event_type = 3; * * * @return The enum numeric value on the wire for eventType. */ @java.lang.Override public int getEventTypeValue() { return eventType_; } /** * * *
     * The type of events the config is for, e.g. FINDING.
     * 
* * .google.cloud.securitycenter.v1p1beta1.NotificationConfig.EventType event_type = 3; * * * @param value The enum numeric value on the wire for eventType to set. * @return This builder for chaining. */ public Builder setEventTypeValue(int value) { eventType_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } /** * * *
     * The type of events the config is for, e.g. FINDING.
     * 
* * .google.cloud.securitycenter.v1p1beta1.NotificationConfig.EventType event_type = 3; * * * @return The eventType. */ @java.lang.Override public com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.EventType getEventType() { com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.EventType result = com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.EventType.forNumber( eventType_); return result == null ? com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.EventType.UNRECOGNIZED : result; } /** * * *
     * The type of events the config is for, e.g. FINDING.
     * 
* * .google.cloud.securitycenter.v1p1beta1.NotificationConfig.EventType event_type = 3; * * * @param value The eventType to set. * @return This builder for chaining. */ public Builder setEventType( com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.EventType value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000004; eventType_ = value.getNumber(); onChanged(); return this; } /** * * *
     * The type of events the config is for, e.g. FINDING.
     * 
* * .google.cloud.securitycenter.v1p1beta1.NotificationConfig.EventType event_type = 3; * * * @return This builder for chaining. */ public Builder clearEventType() { bitField0_ = (bitField0_ & ~0x00000004); eventType_ = 0; onChanged(); return this; } private java.lang.Object pubsubTopic_ = ""; /** * * *
     * The Pub/Sub topic to send notifications to. Its format is
     * "projects/[project_id]/topics/[topic]".
     * 
* * string pubsub_topic = 4 [(.google.api.resource_reference) = { ... } * * @return The pubsubTopic. */ public java.lang.String getPubsubTopic() { java.lang.Object ref = pubsubTopic_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); pubsubTopic_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * The Pub/Sub topic to send notifications to. Its format is
     * "projects/[project_id]/topics/[topic]".
     * 
* * string pubsub_topic = 4 [(.google.api.resource_reference) = { ... } * * @return The bytes for pubsubTopic. */ public com.google.protobuf.ByteString getPubsubTopicBytes() { java.lang.Object ref = pubsubTopic_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); pubsubTopic_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * The Pub/Sub topic to send notifications to. Its format is
     * "projects/[project_id]/topics/[topic]".
     * 
* * string pubsub_topic = 4 [(.google.api.resource_reference) = { ... } * * @param value The pubsubTopic to set. * @return This builder for chaining. */ public Builder setPubsubTopic(java.lang.String value) { if (value == null) { throw new NullPointerException(); } pubsubTopic_ = value; bitField0_ |= 0x00000008; onChanged(); return this; } /** * * *
     * The Pub/Sub topic to send notifications to. Its format is
     * "projects/[project_id]/topics/[topic]".
     * 
* * string pubsub_topic = 4 [(.google.api.resource_reference) = { ... } * * @return This builder for chaining. */ public Builder clearPubsubTopic() { pubsubTopic_ = getDefaultInstance().getPubsubTopic(); bitField0_ = (bitField0_ & ~0x00000008); onChanged(); return this; } /** * * *
     * The Pub/Sub topic to send notifications to. Its format is
     * "projects/[project_id]/topics/[topic]".
     * 
* * string pubsub_topic = 4 [(.google.api.resource_reference) = { ... } * * @param value The bytes for pubsubTopic to set. * @return This builder for chaining. */ public Builder setPubsubTopicBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); pubsubTopic_ = value; bitField0_ |= 0x00000008; onChanged(); return this; } private java.lang.Object serviceAccount_ = ""; /** * * *
     * 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]; * * @return The serviceAccount. */ public java.lang.String getServiceAccount() { java.lang.Object ref = serviceAccount_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); serviceAccount_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * 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]; * * @return The bytes for serviceAccount. */ public com.google.protobuf.ByteString getServiceAccountBytes() { java.lang.Object ref = serviceAccount_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); serviceAccount_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * 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]; * * @param value The serviceAccount to set. * @return This builder for chaining. */ public Builder setServiceAccount(java.lang.String value) { if (value == null) { throw new NullPointerException(); } serviceAccount_ = value; bitField0_ |= 0x00000010; onChanged(); return this; } /** * * *
     * 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]; * * @return This builder for chaining. */ public Builder clearServiceAccount() { serviceAccount_ = getDefaultInstance().getServiceAccount(); bitField0_ = (bitField0_ & ~0x00000010); onChanged(); return this; } /** * * *
     * 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]; * * @param value The bytes for serviceAccount to set. * @return This builder for chaining. */ public Builder setServiceAccountBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); serviceAccount_ = value; bitField0_ |= 0x00000010; onChanged(); return this; } private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig, com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig.Builder, com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfigOrBuilder> streamingConfigBuilder_; /** * * *
     * The config for triggering streaming-based notifications.
     * 
* * * .google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig streaming_config = 6; * * * @return Whether the streamingConfig field is set. */ @java.lang.Override public boolean hasStreamingConfig() { return notifyConfigCase_ == 6; } /** * * *
     * The config for triggering streaming-based notifications.
     * 
* * * .google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig streaming_config = 6; * * * @return The streamingConfig. */ @java.lang.Override public com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig getStreamingConfig() { if (streamingConfigBuilder_ == null) { if (notifyConfigCase_ == 6) { return (com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig) notifyConfig_; } return com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig .getDefaultInstance(); } else { if (notifyConfigCase_ == 6) { return streamingConfigBuilder_.getMessage(); } return com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig .getDefaultInstance(); } } /** * * *
     * The config for triggering streaming-based notifications.
     * 
* * * .google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig streaming_config = 6; * */ public Builder setStreamingConfig( com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig value) { if (streamingConfigBuilder_ == null) { if (value == null) { throw new NullPointerException(); } notifyConfig_ = value; onChanged(); } else { streamingConfigBuilder_.setMessage(value); } notifyConfigCase_ = 6; return this; } /** * * *
     * The config for triggering streaming-based notifications.
     * 
* * * .google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig streaming_config = 6; * */ public Builder setStreamingConfig( com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig.Builder builderForValue) { if (streamingConfigBuilder_ == null) { notifyConfig_ = builderForValue.build(); onChanged(); } else { streamingConfigBuilder_.setMessage(builderForValue.build()); } notifyConfigCase_ = 6; return this; } /** * * *
     * The config for triggering streaming-based notifications.
     * 
* * * .google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig streaming_config = 6; * */ public Builder mergeStreamingConfig( com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig value) { if (streamingConfigBuilder_ == null) { if (notifyConfigCase_ == 6 && notifyConfig_ != com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig .getDefaultInstance()) { notifyConfig_ = com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig .newBuilder( (com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig) notifyConfig_) .mergeFrom(value) .buildPartial(); } else { notifyConfig_ = value; } onChanged(); } else { if (notifyConfigCase_ == 6) { streamingConfigBuilder_.mergeFrom(value); } else { streamingConfigBuilder_.setMessage(value); } } notifyConfigCase_ = 6; return this; } /** * * *
     * The config for triggering streaming-based notifications.
     * 
* * * .google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig streaming_config = 6; * */ public Builder clearStreamingConfig() { if (streamingConfigBuilder_ == null) { if (notifyConfigCase_ == 6) { notifyConfigCase_ = 0; notifyConfig_ = null; onChanged(); } } else { if (notifyConfigCase_ == 6) { notifyConfigCase_ = 0; notifyConfig_ = null; } streamingConfigBuilder_.clear(); } return this; } /** * * *
     * The config for triggering streaming-based notifications.
     * 
* * * .google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig streaming_config = 6; * */ public com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig.Builder getStreamingConfigBuilder() { return getStreamingConfigFieldBuilder().getBuilder(); } /** * * *
     * The config for triggering streaming-based notifications.
     * 
* * * .google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig streaming_config = 6; * */ @java.lang.Override public com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfigOrBuilder getStreamingConfigOrBuilder() { if ((notifyConfigCase_ == 6) && (streamingConfigBuilder_ != null)) { return streamingConfigBuilder_.getMessageOrBuilder(); } else { if (notifyConfigCase_ == 6) { return (com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig) notifyConfig_; } return com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig .getDefaultInstance(); } } /** * * *
     * The config for triggering streaming-based notifications.
     * 
* * * .google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig streaming_config = 6; * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig, com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig.Builder, com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfigOrBuilder> getStreamingConfigFieldBuilder() { if (streamingConfigBuilder_ == null) { if (!(notifyConfigCase_ == 6)) { notifyConfig_ = com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig .getDefaultInstance(); } streamingConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig, com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig .Builder, com.google.cloud.securitycenter.v1p1beta1.NotificationConfig .StreamingConfigOrBuilder>( (com.google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig) notifyConfig_, getParentForChildren(), isClean()); notifyConfig_ = null; } notifyConfigCase_ = 6; onChanged(); return streamingConfigBuilder_; } @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1p1beta1.NotificationConfig) } // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1p1beta1.NotificationConfig) private static final com.google.cloud.securitycenter.v1p1beta1.NotificationConfig DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1p1beta1.NotificationConfig(); } public static com.google.cloud.securitycenter.v1p1beta1.NotificationConfig getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public NotificationConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public com.google.cloud.securitycenter.v1p1beta1.NotificationConfig getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy