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 class
LogDestinationName.DestinationType
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static LogDestinationName
billingAccount(String id)
Returns an option which sets and validates project ID resource name for log entries.boolean
equals(Object obj)
static LogDestinationName
folder(String id)
Returns an option which sets and validates project ID resource name for log entries.static LogDestinationName
fromLogName(LogName logName)
Creates aLogDestinationName
object from givenLogName
.String
getDestinationId()
Returns ID value associated withLogDestinationName
objectLogDestinationName.DestinationType
getDestinationType()
Returns destination type option value associated withLogDestinationName
objectint
hashCode()
static LogDestinationName
organization(String id)
Returns an option which sets and validates project ID resource name for log entries.static LogDestinationName
project(String id)
Returns an option which sets and validates project ID resource name for log entries.LogName
toLogName(String logId)
Creates aLogEntry
object for given log ID.String
toString()
-
-
-
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 withLogDestinationName
object
-
getDestinationType
public LogDestinationName.DestinationType getDestinationType()
Returns destination type option value associated withLogDestinationName
object
-
fromLogName
public static LogDestinationName fromLogName(LogName logName)
Creates aLogDestinationName
object from givenLogName
.
-
-