Class GoogleApiSource.ProjectSubscriptions.Builder (1.81.0)

public static final class GoogleApiSource.ProjectSubscriptions.Builder extends GeneratedMessageV3.Builder<GoogleApiSource.ProjectSubscriptions.Builder> implements GoogleApiSource.ProjectSubscriptionsOrBuilder

Config to enable subscribing to all events from a list of projects.

Protobuf type google.cloud.eventarc.v1.GoogleApiSource.ProjectSubscriptions

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addAllList(Iterable<String> values)

public GoogleApiSource.ProjectSubscriptions.Builder addAllList(Iterable<String> values)

Required. A list of projects to receive events from.

All the projects must be in the same org. The listed projects should have the format project/{identifier} where identifier can be either the project id for project number. A single list may contain both formats. At most 100 projects can be listed.

repeated string list = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
values Iterable<String>

The list to add.

Returns
Type Description
GoogleApiSource.ProjectSubscriptions.Builder

This builder for chaining.

addList(String value)

public GoogleApiSource.ProjectSubscriptions.Builder addList(String value)

Required. A list of projects to receive events from.

All the projects must be in the same org. The listed projects should have the format project/{identifier} where identifier can be either the project id for project number. A single list may contain both formats. At most 100 projects can be listed.

repeated string list = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The list to add.

Returns
Type Description
GoogleApiSource.ProjectSubscriptions.Builder

This builder for chaining.

addListBytes(ByteString value)

public GoogleApiSource.ProjectSubscriptions.Builder addListBytes(ByteString value)

Required. A list of projects to receive events from.

All the projects must be in the same org. The listed projects should have the format project/{identifier} where identifier can be either the project id for project number. A single list may contain both formats. At most 100 projects can be listed.

repeated string list = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes of the list to add.

Returns
Type Description
GoogleApiSource.ProjectSubscriptions.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public GoogleApiSource.ProjectSubscriptions build()
Returns
Type Description
GoogleApiSource.ProjectSubscriptions

buildPartial()

public GoogleApiSource.ProjectSubscriptions buildPartial()
Returns
Type Description
GoogleApiSource.ProjectSubscriptions

clear()

public GoogleApiSource.ProjectSubscriptions.Builder clear()
Returns
Type Description
GoogleApiSource.ProjectSubscriptions.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

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

clearList()

public GoogleApiSource.ProjectSubscriptions.Builder clearList()

Required. A list of projects to receive events from.

All the projects must be in the same org. The listed projects should have the format project/{identifier} where identifier can be either the project id for project number. A single list may contain both formats. At most 100 projects can be listed.

repeated string list = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
GoogleApiSource.ProjectSubscriptions.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clone()

public GoogleApiSource.ProjectSubscriptions.Builder clone()
Returns
Type Description
GoogleApiSource.ProjectSubscriptions.Builder
Overrides

getDefaultInstanceForType()

public GoogleApiSource.ProjectSubscriptions getDefaultInstanceForType()
Returns
Type Description
GoogleApiSource.ProjectSubscriptions

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getList(int index)

public String getList(int index)

Required. A list of projects to receive events from.

All the projects must be in the same org. The listed projects should have the format project/{identifier} where identifier can be either the project id for project number. A single list may contain both formats. At most 100 projects can be listed.

repeated string list = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The list at the given index.

getListBytes(int index)

public ByteString getListBytes(int index)

Required. A list of projects to receive events from.

All the projects must be in the same org. The listed projects should have the format project/{identifier} where identifier can be either the project id for project number. A single list may contain both formats. At most 100 projects can be listed.

repeated string list = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the list at the given index.

getListCount()

public int getListCount()

Required. A list of projects to receive events from.

All the projects must be in the same org. The listed projects should have the format project/{identifier} where identifier can be either the project id for project number. A single list may contain both formats. At most 100 projects can be listed.

repeated string list = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

The count of list.

getListList()

public ProtocolStringList getListList()

Required. A list of projects to receive events from.

All the projects must be in the same org. The listed projects should have the format project/{identifier} where identifier can be either the project id for project number. A single list may contain both formats. At most 100 projects can be listed.

repeated string list = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ProtocolStringList

A list containing the list.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(GoogleApiSource.ProjectSubscriptions other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

public GoogleApiSource.ProjectSubscriptions.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
GoogleApiSource.ProjectSubscriptions.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final GoogleApiSource.ProjectSubscriptions.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
GoogleApiSource.ProjectSubscriptions.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public GoogleApiSource.ProjectSubscriptions.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
GoogleApiSource.ProjectSubscriptions.Builder
Overrides

setList(int index, String value)

public GoogleApiSource.ProjectSubscriptions.Builder setList(int index, String value)

Required. A list of projects to receive events from.

All the projects must be in the same org. The listed projects should have the format project/{identifier} where identifier can be either the project id for project number. A single list may contain both formats. At most 100 projects can be listed.

repeated string list = 1 [(.google.api.field_behavior) = REQUIRED];

Parameters
Name Description
index int

The index to set the value at.

value String

The list to set.

Returns
Type Description
GoogleApiSource.ProjectSubscriptions.Builder

This builder for chaining.

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

public GoogleApiSource.ProjectSubscriptions.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
GoogleApiSource.ProjectSubscriptions.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

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