Class CreateSinkRequest.Builder (3.20.2)

public static final class CreateSinkRequest.Builder extends GeneratedMessageV3.Builder<CreateSinkRequest.Builder> implements CreateSinkRequestOrBuilder

The parameters to CreateSink.

Protobuf type google.logging.v2.CreateSinkRequest

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public CreateSinkRequest build()
Returns
Type Description
CreateSinkRequest

buildPartial()

public CreateSinkRequest buildPartial()
Returns
Type Description
CreateSinkRequest

clear()

public CreateSinkRequest.Builder clear()
Returns
Type Description
CreateSinkRequest.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearParent()

public CreateSinkRequest.Builder clearParent()

Required. The resource in which to create the sink:

 "projects/[PROJECT_ID]"
 "organizations/[ORGANIZATION_ID]"
 "billingAccounts/[BILLING_ACCOUNT_ID]"
 "folders/[FOLDER_ID]"

For examples:

"projects/my-project" "organizations/123456789"

string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
CreateSinkRequest.Builder

This builder for chaining.

clearSink()

public CreateSinkRequest.Builder clearSink()

Required. The new sink, whose name parameter is a sink identifier that is not already in use.

.google.logging.v2.LogSink sink = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
CreateSinkRequest.Builder

clearUniqueWriterIdentity()

public CreateSinkRequest.Builder clearUniqueWriterIdentity()

Optional. Determines the kind of IAM identity returned as writer_identity in the new sink. If this value is omitted or set to false, and if the sink's parent is a project, then the value returned as writer_identity is the same group or service account used by Cloud Logging before the addition of writer identities to this API. The sink's destination must be in the same project as the sink itself.

If this field is set to true, or if the sink is owned by a non-project resource such as an organization, then the value of writer_identity will be a unique service account used only for exports from the new sink. For more information, see writer_identity in LogSink.

bool unique_writer_identity = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
CreateSinkRequest.Builder

This builder for chaining.

clone()

public CreateSinkRequest.Builder clone()
Returns
Type Description
CreateSinkRequest.Builder
Overrides

getDefaultInstanceForType()

public CreateSinkRequest getDefaultInstanceForType()
Returns
Type Description
CreateSinkRequest

getDescriptorForType()

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

getParent()

public String getParent()

Required. The resource in which to create the sink:

 "projects/[PROJECT_ID]"
 "organizations/[ORGANIZATION_ID]"
 "billingAccounts/[BILLING_ACCOUNT_ID]"
 "folders/[FOLDER_ID]"

For examples:

"projects/my-project" "organizations/123456789"

string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
String

The parent.

getParentBytes()

public ByteString getParentBytes()

Required. The resource in which to create the sink:

 "projects/[PROJECT_ID]"
 "organizations/[ORGANIZATION_ID]"
 "billingAccounts/[BILLING_ACCOUNT_ID]"
 "folders/[FOLDER_ID]"

For examples:

"projects/my-project" "organizations/123456789"

string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for parent.

getSink()

public LogSink getSink()

Required. The new sink, whose name parameter is a sink identifier that is not already in use.

.google.logging.v2.LogSink sink = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
LogSink

The sink.

getSinkBuilder()

public LogSink.Builder getSinkBuilder()

Required. The new sink, whose name parameter is a sink identifier that is not already in use.

.google.logging.v2.LogSink sink = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
LogSink.Builder

getSinkOrBuilder()

public LogSinkOrBuilder getSinkOrBuilder()

Required. The new sink, whose name parameter is a sink identifier that is not already in use.

.google.logging.v2.LogSink sink = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
LogSinkOrBuilder

getUniqueWriterIdentity()

public boolean getUniqueWriterIdentity()

Optional. Determines the kind of IAM identity returned as writer_identity in the new sink. If this value is omitted or set to false, and if the sink's parent is a project, then the value returned as writer_identity is the same group or service account used by Cloud Logging before the addition of writer identities to this API. The sink's destination must be in the same project as the sink itself.

If this field is set to true, or if the sink is owned by a non-project resource such as an organization, then the value of writer_identity will be a unique service account used only for exports from the new sink. For more information, see writer_identity in LogSink.

bool unique_writer_identity = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

The uniqueWriterIdentity.

hasSink()

public boolean hasSink()

Required. The new sink, whose name parameter is a sink identifier that is not already in use.

.google.logging.v2.LogSink sink = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
boolean

Whether the sink field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(CreateSinkRequest other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeSink(LogSink value)

public CreateSinkRequest.Builder mergeSink(LogSink value)

Required. The new sink, whose name parameter is a sink identifier that is not already in use.

.google.logging.v2.LogSink sink = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value LogSink
Returns
Type Description
CreateSinkRequest.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setField(Descriptors.FieldDescriptor field, Object value)

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

setParent(String value)

public CreateSinkRequest.Builder setParent(String value)

Required. The resource in which to create the sink:

 "projects/[PROJECT_ID]"
 "organizations/[ORGANIZATION_ID]"
 "billingAccounts/[BILLING_ACCOUNT_ID]"
 "folders/[FOLDER_ID]"

For examples:

"projects/my-project" "organizations/123456789"

string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value String

The parent to set.

Returns
Type Description
CreateSinkRequest.Builder

This builder for chaining.

setParentBytes(ByteString value)

public CreateSinkRequest.Builder setParentBytes(ByteString value)

Required. The resource in which to create the sink:

 "projects/[PROJECT_ID]"
 "organizations/[ORGANIZATION_ID]"
 "billingAccounts/[BILLING_ACCOUNT_ID]"
 "folders/[FOLDER_ID]"

For examples:

"projects/my-project" "organizations/123456789"

string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value ByteString

The bytes for parent to set.

Returns
Type Description
CreateSinkRequest.Builder

This builder for chaining.

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

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

setSink(LogSink value)

public CreateSinkRequest.Builder setSink(LogSink value)

Required. The new sink, whose name parameter is a sink identifier that is not already in use.

.google.logging.v2.LogSink sink = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value LogSink
Returns
Type Description
CreateSinkRequest.Builder

setSink(LogSink.Builder builderForValue)

public CreateSinkRequest.Builder setSink(LogSink.Builder builderForValue)

Required. The new sink, whose name parameter is a sink identifier that is not already in use.

.google.logging.v2.LogSink sink = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
builderForValue LogSink.Builder
Returns
Type Description
CreateSinkRequest.Builder

setUniqueWriterIdentity(boolean value)

public CreateSinkRequest.Builder setUniqueWriterIdentity(boolean value)

Optional. Determines the kind of IAM identity returned as writer_identity in the new sink. If this value is omitted or set to false, and if the sink's parent is a project, then the value returned as writer_identity is the same group or service account used by Cloud Logging before the addition of writer identities to this API. The sink's destination must be in the same project as the sink itself.

If this field is set to true, or if the sink is owned by a non-project resource such as an organization, then the value of writer_identity will be a unique service account used only for exports from the new sink. For more information, see writer_identity in LogSink.

bool unique_writer_identity = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value boolean

The uniqueWriterIdentity to set.

Returns
Type Description
CreateSinkRequest.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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