Class Notification.Builder (0.31.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
Type Description
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
Name Description
values Iterable<? extends com.google.cloud.advisorynotifications.v1.Message>
Returns
Type Description
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
Name Description
value Message
Returns
Type Description
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
Name Description
builderForValue Message.Builder
Returns
Type Description
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
Name Description
index int
value Message
Returns
Type Description
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
Name Description
index int
builderForValue Message.Builder
Returns
Type Description
Notification.Builder

addMessagesBuilder()

public Message.Builder addMessagesBuilder()

A list of messages in the notification.

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

Returns
Type Description
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
Name Description
index int
Returns
Type Description
Message.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Notification.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Notification.Builder
Overrides

build()

public Notification build()
Returns
Type Description
Notification

buildPartial()

public Notification buildPartial()
Returns
Type Description
Notification

clear()

public Notification.Builder clear()
Returns
Type Description
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
Type Description
Notification.Builder

clearField(Descriptors.FieldDescriptor field)

public Notification.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
Notification.Builder
Overrides

clearMessages()

public Notification.Builder clearMessages()

A list of messages in the notification.

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

Returns
Type Description
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
Type Description
Notification.Builder

This builder for chaining.

clearNotificationType()

public Notification.Builder clearNotificationType()

Type of notification

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

Returns
Type Description
Notification.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Notification.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
Notification.Builder
Overrides

clearSubject()

public Notification.Builder clearSubject()

The subject line of the notification.

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

Returns
Type Description
Notification.Builder

clone()

public Notification.Builder clone()
Returns
Type Description
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
Type Description
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
Type Description
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
Type Description
TimestampOrBuilder

getDefaultInstanceForType()

public Notification getDefaultInstanceForType()
Returns
Type Description
Notification

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
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
Name Description
index int
Returns
Type Description
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
Name Description
index int
Returns
Type Description
Message.Builder

getMessagesBuilderList()

public List<Message.Builder> getMessagesBuilderList()

A list of messages in the notification.

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

Returns
Type Description
List<Builder>

getMessagesCount()

public int getMessagesCount()

A list of messages in the notification.

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

Returns
Type Description
int

getMessagesList()

public List<Message> getMessagesList()

A list of messages in the notification.

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

Returns
Type Description
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
Name Description
index int
Returns
Type Description
MessageOrBuilder

getMessagesOrBuilderList()

public List<? extends MessageOrBuilder> getMessagesOrBuilderList()

A list of messages in the notification.

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

Returns
Type Description
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
Type Description
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
Type Description
ByteString

The bytes for name.

getNotificationType()

public NotificationType getNotificationType()

Type of notification

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

Returns
Type Description
NotificationType

The notificationType.

getNotificationTypeValue()

public int getNotificationTypeValue()

Type of notification

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

Returns
Type Description
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
Type Description
Subject

The subject.

getSubjectBuilder()

public Subject.Builder getSubjectBuilder()

The subject line of the notification.

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

Returns
Type Description
Subject.Builder

getSubjectOrBuilder()

public SubjectOrBuilder getSubjectOrBuilder()

The subject line of the notification.

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

Returns
Type Description
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
Type Description
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
Type Description
boolean

Whether the subject field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
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
Name Description
value Timestamp
Returns
Type Description
Notification.Builder

mergeFrom(Notification other)

public Notification.Builder mergeFrom(Notification other)
Parameter
Name Description
other Notification
Returns
Type Description
Notification.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Notification.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Notification.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public Notification.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
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
Name Description
value Subject
Returns
Type Description
Notification.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Notification.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
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
Name Description
index int
Returns
Type Description
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
Name Description
value Timestamp
Returns
Type Description
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
Name Description
builderForValue Builder
Returns
Type Description
Notification.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public Notification.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
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
Name Description
index int
value Message
Returns
Type Description
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
Name Description
index int
builderForValue Message.Builder
Returns
Type Description
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
Name Description
value String

The name to set.

Returns
Type Description
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
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
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
Name Description
value NotificationType

The notificationType to set.

Returns
Type Description
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
Name Description
value int

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

Returns
Type Description
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
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
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
Name Description
value Subject
Returns
Type Description
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
Name Description
builderForValue Subject.Builder
Returns
Type Description
Notification.Builder

setUnknownFields(UnknownFieldSet unknownFields)

public final Notification.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Notification.Builder
Overrides