Class Notification.Builder (0.23.0)

public static final class Notification.Builder extends GeneratedMessageV3.Builder<Notification.Builder> implements NotificationOrBuilder

A notification object for notifying customers about security and privacy issues.

Protobuf type google.cloud.advisorynotifications.v1.Notification

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addAllMessages(Iterable<? extends Message> values)

public Notification.Builder addAllMessages(Iterable<? extends Message> values)

A list of messages in the notification.

repeated .google.cloud.advisorynotifications.v1.Message messages = 3;

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.advisorynotifications.v1.Message>
Returns
TypeDescription
Notification.Builder

addMessages(Message value)

public Notification.Builder addMessages(Message value)

A list of messages in the notification.

repeated .google.cloud.advisorynotifications.v1.Message messages = 3;

Parameter
NameDescription
valueMessage
Returns
TypeDescription
Notification.Builder

addMessages(Message.Builder builderForValue)

public Notification.Builder addMessages(Message.Builder builderForValue)

A list of messages in the notification.

repeated .google.cloud.advisorynotifications.v1.Message messages = 3;

Parameter
NameDescription
builderForValueMessage.Builder
Returns
TypeDescription
Notification.Builder

addMessages(int index, Message value)

public Notification.Builder addMessages(int index, Message value)

A list of messages in the notification.

repeated .google.cloud.advisorynotifications.v1.Message messages = 3;

Parameters
NameDescription
indexint
valueMessage
Returns
TypeDescription
Notification.Builder

addMessages(int index, Message.Builder builderForValue)

public Notification.Builder addMessages(int index, Message.Builder builderForValue)

A list of messages in the notification.

repeated .google.cloud.advisorynotifications.v1.Message messages = 3;

Parameters
NameDescription
indexint
builderForValueMessage.Builder
Returns
TypeDescription
Notification.Builder

addMessagesBuilder()

public Message.Builder addMessagesBuilder()

A list of messages in the notification.

repeated .google.cloud.advisorynotifications.v1.Message messages = 3;

Returns
TypeDescription
Message.Builder

addMessagesBuilder(int index)

public Message.Builder addMessagesBuilder(int index)

A list of messages in the notification.

repeated .google.cloud.advisorynotifications.v1.Message messages = 3;

Parameter
NameDescription
indexint
Returns
TypeDescription
Message.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Notification.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Notification.Builder
Overrides

build()

public Notification build()
Returns
TypeDescription
Notification

buildPartial()

public Notification buildPartial()
Returns
TypeDescription
Notification

clear()

public Notification.Builder clear()
Returns
TypeDescription
Notification.Builder
Overrides

clearCreateTime()

public Notification.Builder clearCreateTime()

Output only. Time the notification was created.

.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Notification.Builder

clearField(Descriptors.FieldDescriptor field)

public Notification.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
Notification.Builder
Overrides

clearMessages()

public Notification.Builder clearMessages()

A list of messages in the notification.

repeated .google.cloud.advisorynotifications.v1.Message messages = 3;

Returns
TypeDescription
Notification.Builder

clearName()

public Notification.Builder clearName()

The resource name of the notification. Format: organizations/{organization}/locations/{location}/notifications/{notification} or projects/{project}/locations/{location}/notifications/{notification}.

string name = 1;

Returns
TypeDescription
Notification.Builder

This builder for chaining.

clearNotificationType()

public Notification.Builder clearNotificationType()

Type of notification

.google.cloud.advisorynotifications.v1.NotificationType notification_type = 12;

Returns
TypeDescription
Notification.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Notification.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
Notification.Builder
Overrides

clearSubject()

public Notification.Builder clearSubject()

The subject line of the notification.

.google.cloud.advisorynotifications.v1.Subject subject = 2;

Returns
TypeDescription
Notification.Builder

clone()

public Notification.Builder clone()
Returns
TypeDescription
Notification.Builder
Overrides

getCreateTime()

public Timestamp getCreateTime()

Output only. Time the notification was created.

.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Timestamp

The createTime.

getCreateTimeBuilder()

public Timestamp.Builder getCreateTimeBuilder()

Output only. Time the notification was created.

.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Builder

getCreateTimeOrBuilder()

public TimestampOrBuilder getCreateTimeOrBuilder()

Output only. Time the notification was created.

.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
TimestampOrBuilder

getDefaultInstanceForType()

public Notification getDefaultInstanceForType()
Returns
TypeDescription
Notification

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getMessages(int index)

public Message getMessages(int index)

A list of messages in the notification.

repeated .google.cloud.advisorynotifications.v1.Message messages = 3;

Parameter
NameDescription
indexint
Returns
TypeDescription
Message

getMessagesBuilder(int index)

public Message.Builder getMessagesBuilder(int index)

A list of messages in the notification.

repeated .google.cloud.advisorynotifications.v1.Message messages = 3;

Parameter
NameDescription
indexint
Returns
TypeDescription
Message.Builder

getMessagesBuilderList()

public List<Message.Builder> getMessagesBuilderList()

A list of messages in the notification.

repeated .google.cloud.advisorynotifications.v1.Message messages = 3;

Returns
TypeDescription
List<Builder>

getMessagesCount()

public int getMessagesCount()

A list of messages in the notification.

repeated .google.cloud.advisorynotifications.v1.Message messages = 3;

Returns
TypeDescription
int

getMessagesList()

public List<Message> getMessagesList()

A list of messages in the notification.

repeated .google.cloud.advisorynotifications.v1.Message messages = 3;

Returns
TypeDescription
List<Message>

getMessagesOrBuilder(int index)

public MessageOrBuilder getMessagesOrBuilder(int index)

A list of messages in the notification.

repeated .google.cloud.advisorynotifications.v1.Message messages = 3;

Parameter
NameDescription
indexint
Returns
TypeDescription
MessageOrBuilder

getMessagesOrBuilderList()

public List<? extends MessageOrBuilder> getMessagesOrBuilderList()

A list of messages in the notification.

repeated .google.cloud.advisorynotifications.v1.Message messages = 3;

Returns
TypeDescription
List<? extends com.google.cloud.advisorynotifications.v1.MessageOrBuilder>

getName()

public String getName()

The resource name of the notification. Format: organizations/{organization}/locations/{location}/notifications/{notification} or projects/{project}/locations/{location}/notifications/{notification}.

string name = 1;

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

The resource name of the notification. Format: organizations/{organization}/locations/{location}/notifications/{notification} or projects/{project}/locations/{location}/notifications/{notification}.

string name = 1;

Returns
TypeDescription
ByteString

The bytes for name.

getNotificationType()

public NotificationType getNotificationType()

Type of notification

.google.cloud.advisorynotifications.v1.NotificationType notification_type = 12;

Returns
TypeDescription
NotificationType

The notificationType.

getNotificationTypeValue()

public int getNotificationTypeValue()

Type of notification

.google.cloud.advisorynotifications.v1.NotificationType notification_type = 12;

Returns
TypeDescription
int

The enum numeric value on the wire for notificationType.

getSubject()

public Subject getSubject()

The subject line of the notification.

.google.cloud.advisorynotifications.v1.Subject subject = 2;

Returns
TypeDescription
Subject

The subject.

getSubjectBuilder()

public Subject.Builder getSubjectBuilder()

The subject line of the notification.

.google.cloud.advisorynotifications.v1.Subject subject = 2;

Returns
TypeDescription
Subject.Builder

getSubjectOrBuilder()

public SubjectOrBuilder getSubjectOrBuilder()

The subject line of the notification.

.google.cloud.advisorynotifications.v1.Subject subject = 2;

Returns
TypeDescription
SubjectOrBuilder

hasCreateTime()

public boolean hasCreateTime()

Output only. Time the notification was created.

.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
boolean

Whether the createTime field is set.

hasSubject()

public boolean hasSubject()

The subject line of the notification.

.google.cloud.advisorynotifications.v1.Subject subject = 2;

Returns
TypeDescription
boolean

Whether the subject field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeCreateTime(Timestamp value)

public Notification.Builder mergeCreateTime(Timestamp value)

Output only. Time the notification was created.

.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
Notification.Builder

mergeFrom(Notification other)

public Notification.Builder mergeFrom(Notification other)
Parameter
NameDescription
otherNotification
Returns
TypeDescription
Notification.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Notification.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Notification.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public Notification.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
Notification.Builder
Overrides

mergeSubject(Subject value)

public Notification.Builder mergeSubject(Subject value)

The subject line of the notification.

.google.cloud.advisorynotifications.v1.Subject subject = 2;

Parameter
NameDescription
valueSubject
Returns
TypeDescription
Notification.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Notification.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Notification.Builder
Overrides

removeMessages(int index)

public Notification.Builder removeMessages(int index)

A list of messages in the notification.

repeated .google.cloud.advisorynotifications.v1.Message messages = 3;

Parameter
NameDescription
indexint
Returns
TypeDescription
Notification.Builder

setCreateTime(Timestamp value)

public Notification.Builder setCreateTime(Timestamp value)

Output only. Time the notification was created.

.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
Notification.Builder

setCreateTime(Timestamp.Builder builderForValue)

public Notification.Builder setCreateTime(Timestamp.Builder builderForValue)

Output only. Time the notification was created.

.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
Notification.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public Notification.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Notification.Builder
Overrides

setMessages(int index, Message value)

public Notification.Builder setMessages(int index, Message value)

A list of messages in the notification.

repeated .google.cloud.advisorynotifications.v1.Message messages = 3;

Parameters
NameDescription
indexint
valueMessage
Returns
TypeDescription
Notification.Builder

setMessages(int index, Message.Builder builderForValue)

public Notification.Builder setMessages(int index, Message.Builder builderForValue)

A list of messages in the notification.

repeated .google.cloud.advisorynotifications.v1.Message messages = 3;

Parameters
NameDescription
indexint
builderForValueMessage.Builder
Returns
TypeDescription
Notification.Builder

setName(String value)

public Notification.Builder setName(String value)

The resource name of the notification. Format: organizations/{organization}/locations/{location}/notifications/{notification} or projects/{project}/locations/{location}/notifications/{notification}.

string name = 1;

Parameter
NameDescription
valueString

The name to set.

Returns
TypeDescription
Notification.Builder

This builder for chaining.

setNameBytes(ByteString value)

public Notification.Builder setNameBytes(ByteString value)

The resource name of the notification. Format: organizations/{organization}/locations/{location}/notifications/{notification} or projects/{project}/locations/{location}/notifications/{notification}.

string name = 1;

Parameter
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
Notification.Builder

This builder for chaining.

setNotificationType(NotificationType value)

public Notification.Builder setNotificationType(NotificationType value)

Type of notification

.google.cloud.advisorynotifications.v1.NotificationType notification_type = 12;

Parameter
NameDescription
valueNotificationType

The notificationType to set.

Returns
TypeDescription
Notification.Builder

This builder for chaining.

setNotificationTypeValue(int value)

public Notification.Builder setNotificationTypeValue(int value)

Type of notification

.google.cloud.advisorynotifications.v1.NotificationType notification_type = 12;

Parameter
NameDescription
valueint

The enum numeric value on the wire for notificationType to set.

Returns
TypeDescription
Notification.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public Notification.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
Notification.Builder
Overrides

setSubject(Subject value)

public Notification.Builder setSubject(Subject value)

The subject line of the notification.

.google.cloud.advisorynotifications.v1.Subject subject = 2;

Parameter
NameDescription
valueSubject
Returns
TypeDescription
Notification.Builder

setSubject(Subject.Builder builderForValue)

public Notification.Builder setSubject(Subject.Builder builderForValue)

The subject line of the notification.

.google.cloud.advisorynotifications.v1.Subject subject = 2;

Parameter
NameDescription
builderForValueSubject.Builder
Returns
TypeDescription
Notification.Builder

setUnknownFields(UnknownFieldSet unknownFields)

public final Notification.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Notification.Builder
Overrides