Class LogDestinationName (3.11.10)

public final class LogDestinationName extends Option

Class for specifying resource name of the log to which this log entry belongs (see 'logName' parameter in https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry)

Inheritance

Object > com.google.cloud.logging.Option > LogDestinationName

Static Methods

billingAccount(String id)

public static LogDestinationName billingAccount(String id)

Returns an option which sets and validates project ID resource name for log entries.

Parameter
Name Description
id String

corresponds to BILLING_ACCOUNT_ID token in 'logName' field described in https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry

Returns
Type Description
LogDestinationName

folder(String id)

public static LogDestinationName folder(String id)

Returns an option which sets and validates project ID resource name for log entries.

Parameter
Name Description
id String

corresponds to FOLDER_ID token in 'logName' field described in https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry

Returns
Type Description
LogDestinationName

fromLogName(LogName logName)

public static @Nullable LogDestinationName fromLogName(LogName logName)

Creates a LogDestinationName object from given LogName.

Parameter
Name Description
logName LogName
Returns
Type Description
@org.jspecify.nullness.Nullable com.google.cloud.logging.LogDestinationName

organization(String id)

public static LogDestinationName organization(String id)

Returns an option which sets and validates project ID resource name for log entries.

Parameter
Name Description
id String

corresponds to ORGANIZATION_ID token in 'logName' field described in https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry

Returns
Type Description
LogDestinationName

project(String id)

public static LogDestinationName project(String id)

Returns an option which sets and validates project ID resource name for log entries.

Parameter
Name Description
id String

corresponds to PROJECT_ID token in 'logName' field described in https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry

Returns
Type Description
LogDestinationName

Methods

getDestinationId()

public String getDestinationId()

Returns ID value associated with LogDestinationName object

Returns
Type Description
String

getDestinationType()

public LogDestinationName.DestinationType getDestinationType()

Returns destination type option value associated with LogDestinationName object

Returns
Type Description
LogDestinationName.DestinationType

toLogName(String logId)

public @Nullable LogName toLogName(String logId)

Creates a LogEntry object for given log ID.

Parameter
Name Description
logId String
Returns
Type Description
@org.jspecify.nullness.Nullable com.google.logging.v2.LogName