Class LogDestinationName (3.14.6)

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
NameDescription
idString

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

Returns
TypeDescription
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
NameDescription
idString

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

Returns
TypeDescription
LogDestinationName

fromLogName(LogName logName)

public static @Nullable LogDestinationName fromLogName(LogName logName)

Creates a LogDestinationName object from given LogName.

Parameter
NameDescription
logNameLogName
Returns
TypeDescription
@org.jspecify.annotations.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
NameDescription
idString

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

Returns
TypeDescription
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
NameDescription
idString

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

Returns
TypeDescription
LogDestinationName

Methods

getDestinationId()

public String getDestinationId()

Returns ID value associated with LogDestinationName object

Returns
TypeDescription
String

getDestinationType()

public LogDestinationName.DestinationType getDestinationType()

Returns destination type option value associated with LogDestinationName object

Returns
TypeDescription
LogDestinationName.DestinationType

toLogName(String logId)

public @Nullable LogName toLogName(String logId)

Creates a LogEntry object for given log ID.

Parameter
NameDescription
logIdString
Returns
TypeDescription
@org.jspecify.annotations.Nullable com.google.logging.v2.LogName