Class TransferTypes.NotificationConfig.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<TransferTypes.NotificationConfig.Builder>
com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig.Builder
- All Implemented Interfaces:
com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,TransferTypes.NotificationConfigOrBuilder,Cloneable
- Enclosing class:
- TransferTypes.NotificationConfig
public static final class TransferTypes.NotificationConfig.Builder
extends com.google.protobuf.GeneratedMessage.Builder<TransferTypes.NotificationConfig.Builder>
implements TransferTypes.NotificationConfigOrBuilder
Specification to configure notifications published to Pub/Sub. Notifications are published to the customer-provided topic using the following `PubsubMessage.attributes`: * `"eventType"`: one of the [EventType][google.storagetransfer.v1.NotificationConfig.EventType] values * `"payloadFormat"`: one of the [PayloadFormat][google.storagetransfer.v1.NotificationConfig.PayloadFormat] values * `"projectId"`: the [project_id][google.storagetransfer.v1.TransferOperation.project_id] of the `TransferOperation` * `"transferJobName"`: the [transfer_job_name][google.storagetransfer.v1.TransferOperation.transfer_job_name] of the `TransferOperation` * `"transferOperationName"`: the [name][google.storagetransfer.v1.TransferOperation.name] of the `TransferOperation` The `PubsubMessage.data` contains a [TransferOperation][google.storagetransfer.v1.TransferOperation] resource formatted according to the specified `PayloadFormat`.Protobuf type
google.storagetransfer.v1.NotificationConfig-
Method Summary
Modifier and TypeMethodDescriptionaddAllEventTypes(Iterable<? extends TransferTypes.NotificationConfig.EventType> values) Event types for which a notification is desired.addAllEventTypesValue(Iterable<Integer> values) Event types for which a notification is desired.Event types for which a notification is desired.addEventTypesValue(int value) Event types for which a notification is desired.build()clear()Event types for which a notification is desired.Required.Required.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorgetEventTypes(int index) Event types for which a notification is desired.intEvent types for which a notification is desired.Event types for which a notification is desired.intgetEventTypesValue(int index) Event types for which a notification is desired.Event types for which a notification is desired.Required.intRequired.Required.com.google.protobuf.ByteStringRequired.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) setEventTypes(int index, TransferTypes.NotificationConfig.EventType value) Event types for which a notification is desired.setEventTypesValue(int index, int value) Event types for which a notification is desired.Required.setPayloadFormatValue(int value) Required.setPubsubTopic(String value) Required.setPubsubTopicBytes(com.google.protobuf.ByteString value) Required.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<TransferTypes.NotificationConfig.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<TransferTypes.NotificationConfig.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<TransferTypes.NotificationConfig.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<TransferTypes.NotificationConfig.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<TransferTypes.NotificationConfig.Builder>
-
mergeFrom
public TransferTypes.NotificationConfig.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<TransferTypes.NotificationConfig.Builder>- Throws:
IOException
-
getPubsubTopic
Required. The `Topic.name` of the Pub/Sub topic to which to publish notifications. Must be of the format: `projects/{project}/topics/{topic}`. Not matching this format results in an [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error.string pubsub_topic = 1 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getPubsubTopicin interfaceTransferTypes.NotificationConfigOrBuilder- Returns:
- The pubsubTopic.
-
getPubsubTopicBytes
public com.google.protobuf.ByteString getPubsubTopicBytes()Required. The `Topic.name` of the Pub/Sub topic to which to publish notifications. Must be of the format: `projects/{project}/topics/{topic}`. Not matching this format results in an [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error.string pubsub_topic = 1 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getPubsubTopicBytesin interfaceTransferTypes.NotificationConfigOrBuilder- Returns:
- The bytes for pubsubTopic.
-
setPubsubTopic
Required. The `Topic.name` of the Pub/Sub topic to which to publish notifications. Must be of the format: `projects/{project}/topics/{topic}`. Not matching this format results in an [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error.string pubsub_topic = 1 [(.google.api.field_behavior) = REQUIRED];- Parameters:
value- The pubsubTopic to set.- Returns:
- This builder for chaining.
-
clearPubsubTopic
Required. The `Topic.name` of the Pub/Sub topic to which to publish notifications. Must be of the format: `projects/{project}/topics/{topic}`. Not matching this format results in an [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error.string pubsub_topic = 1 [(.google.api.field_behavior) = REQUIRED];- Returns:
- This builder for chaining.
-
setPubsubTopicBytes
public TransferTypes.NotificationConfig.Builder setPubsubTopicBytes(com.google.protobuf.ByteString value) Required. The `Topic.name` of the Pub/Sub topic to which to publish notifications. Must be of the format: `projects/{project}/topics/{topic}`. Not matching this format results in an [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error.string pubsub_topic = 1 [(.google.api.field_behavior) = REQUIRED];- Parameters:
value- The bytes for pubsubTopic to set.- Returns:
- This builder for chaining.
-
getEventTypesList
Event types for which a notification is desired. If empty, send notifications for all event types.
repeated .google.storagetransfer.v1.NotificationConfig.EventType event_types = 2;- Specified by:
getEventTypesListin interfaceTransferTypes.NotificationConfigOrBuilder- Returns:
- A list containing the eventTypes.
-
getEventTypesCount
public int getEventTypesCount()Event types for which a notification is desired. If empty, send notifications for all event types.
repeated .google.storagetransfer.v1.NotificationConfig.EventType event_types = 2;- Specified by:
getEventTypesCountin interfaceTransferTypes.NotificationConfigOrBuilder- Returns:
- The count of eventTypes.
-
getEventTypes
Event types for which a notification is desired. If empty, send notifications for all event types.
repeated .google.storagetransfer.v1.NotificationConfig.EventType event_types = 2;- Specified by:
getEventTypesin interfaceTransferTypes.NotificationConfigOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The eventTypes at the given index.
-
setEventTypes
public TransferTypes.NotificationConfig.Builder setEventTypes(int index, TransferTypes.NotificationConfig.EventType value) Event types for which a notification is desired. If empty, send notifications for all event types.
repeated .google.storagetransfer.v1.NotificationConfig.EventType event_types = 2;- Parameters:
index- The index to set the value at.value- The eventTypes to set.- Returns:
- This builder for chaining.
-
addEventTypes
public TransferTypes.NotificationConfig.Builder addEventTypes(TransferTypes.NotificationConfig.EventType value) Event types for which a notification is desired. If empty, send notifications for all event types.
repeated .google.storagetransfer.v1.NotificationConfig.EventType event_types = 2;- Parameters:
value- The eventTypes to add.- Returns:
- This builder for chaining.
-
addAllEventTypes
public TransferTypes.NotificationConfig.Builder addAllEventTypes(Iterable<? extends TransferTypes.NotificationConfig.EventType> values) Event types for which a notification is desired. If empty, send notifications for all event types.
repeated .google.storagetransfer.v1.NotificationConfig.EventType event_types = 2;- Parameters:
values- The eventTypes to add.- Returns:
- This builder for chaining.
-
clearEventTypes
Event types for which a notification is desired. If empty, send notifications for all event types.
repeated .google.storagetransfer.v1.NotificationConfig.EventType event_types = 2;- Returns:
- This builder for chaining.
-
getEventTypesValueList
Event types for which a notification is desired. If empty, send notifications for all event types.
repeated .google.storagetransfer.v1.NotificationConfig.EventType event_types = 2;- Specified by:
getEventTypesValueListin interfaceTransferTypes.NotificationConfigOrBuilder- Returns:
- A list containing the enum numeric values on the wire for eventTypes.
-
getEventTypesValue
public int getEventTypesValue(int index) Event types for which a notification is desired. If empty, send notifications for all event types.
repeated .google.storagetransfer.v1.NotificationConfig.EventType event_types = 2;- Specified by:
getEventTypesValuein interfaceTransferTypes.NotificationConfigOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The enum numeric value on the wire of eventTypes at the given index.
-
setEventTypesValue
Event types for which a notification is desired. If empty, send notifications for all event types.
repeated .google.storagetransfer.v1.NotificationConfig.EventType event_types = 2;- Parameters:
index- The index to set the value at.value- The enum numeric value on the wire for eventTypes to set.- Returns:
- This builder for chaining.
-
addEventTypesValue
Event types for which a notification is desired. If empty, send notifications for all event types.
repeated .google.storagetransfer.v1.NotificationConfig.EventType event_types = 2;- Parameters:
value- The enum numeric value on the wire for eventTypes to add.- Returns:
- This builder for chaining.
-
addAllEventTypesValue
Event types for which a notification is desired. If empty, send notifications for all event types.
repeated .google.storagetransfer.v1.NotificationConfig.EventType event_types = 2;- Parameters:
values- The enum numeric values on the wire for eventTypes to add.- Returns:
- This builder for chaining.
-
getPayloadFormatValue
public int getPayloadFormatValue()Required. The desired format of the notification message payloads.
.google.storagetransfer.v1.NotificationConfig.PayloadFormat payload_format = 3 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getPayloadFormatValuein interfaceTransferTypes.NotificationConfigOrBuilder- Returns:
- The enum numeric value on the wire for payloadFormat.
-
setPayloadFormatValue
Required. The desired format of the notification message payloads.
.google.storagetransfer.v1.NotificationConfig.PayloadFormat payload_format = 3 [(.google.api.field_behavior) = REQUIRED];- Parameters:
value- The enum numeric value on the wire for payloadFormat to set.- Returns:
- This builder for chaining.
-
getPayloadFormat
Required. The desired format of the notification message payloads.
.google.storagetransfer.v1.NotificationConfig.PayloadFormat payload_format = 3 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getPayloadFormatin interfaceTransferTypes.NotificationConfigOrBuilder- Returns:
- The payloadFormat.
-
setPayloadFormat
public TransferTypes.NotificationConfig.Builder setPayloadFormat(TransferTypes.NotificationConfig.PayloadFormat value) Required. The desired format of the notification message payloads.
.google.storagetransfer.v1.NotificationConfig.PayloadFormat payload_format = 3 [(.google.api.field_behavior) = REQUIRED];- Parameters:
value- The payloadFormat to set.- Returns:
- This builder for chaining.
-
clearPayloadFormat
Required. The desired format of the notification message payloads.
.google.storagetransfer.v1.NotificationConfig.PayloadFormat payload_format = 3 [(.google.api.field_behavior) = REQUIRED];- Returns:
- This builder for chaining.
-