Package com.google.cloud.logging
Class LogDestinationName
- java.lang.Object
-
- com.google.cloud.logging.LogDestinationName
-
- All Implemented Interfaces:
Serializable
public final class LogDestinationName extends Object
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)- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classLogDestinationName.DestinationType
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static LogDestinationNamebillingAccount(String id)Returns an option which sets and validates project ID resource name for log entries.booleanequals(Object obj)static LogDestinationNamefolder(String id)Returns an option which sets and validates project ID resource name for log entries.static LogDestinationNamefromLogName(LogName logName)Creates aLogDestinationNameobject from givenLogName.StringgetDestinationId()Returns ID value associated withLogDestinationNameobjectLogDestinationName.DestinationTypegetDestinationType()Returns destination type option value associated withLogDestinationNameobjectinthashCode()static LogDestinationNameorganization(String id)Returns an option which sets and validates project ID resource name for log entries.static LogDestinationNameproject(String id)Returns an option which sets and validates project ID resource name for log entries.LogNametoLogName(String logId)Creates aLogEntryobject for given log ID.StringtoString()
-
-
-
Method Detail
-
project
public static LogDestinationName project(String id)
Returns an option which sets and validates project ID resource name for log entries.- Parameters:
id- corresponds to PROJECT_ID token in 'logName' field described in https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry
-
folder
public static LogDestinationName folder(String id)
Returns an option which sets and validates project ID resource name for log entries.- Parameters:
id- corresponds to FOLDER_ID token in 'logName' field described in https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry
-
organization
public static LogDestinationName organization(String id)
Returns an option which sets and validates project ID resource name for log entries.- Parameters:
id- corresponds to ORGANIZATION_ID token in 'logName' field described in https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry
-
billingAccount
public static LogDestinationName billingAccount(String id)
Returns an option which sets and validates project ID resource name for log entries.- Parameters:
id- corresponds to BILLING_ACCOUNT_ID token in 'logName' field described in https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry
-
getDestinationId
public String getDestinationId()
Returns ID value associated withLogDestinationNameobject
-
getDestinationType
public LogDestinationName.DestinationType getDestinationType()
Returns destination type option value associated withLogDestinationNameobject
-
fromLogName
public static LogDestinationName fromLogName(LogName logName)
Creates aLogDestinationNameobject from givenLogName.
-
-