Class LogDestinationName (3.17.1)

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 LogDestinationName fromLogName(LogName logName)

Creates a LogDestinationName object from given LogName.

Parameter
Name Description
logName LogName
Returns
Type Description
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 LogName toLogName(String logId)

Creates a LogEntry object for given log ID.

Parameter
Name Description
logId String
Returns
Type Description
LogName