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:
  • Method Details

    • 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
    • toLogName

      public LogName toLogName(String logId)
      Creates a LogEntry object for given log ID.
    • getDestinationId

      public String getDestinationId()
      Returns ID value associated with LogDestinationName object
    • getDestinationType

      public LogDestinationName.DestinationType getDestinationType()
      Returns destination type option value associated with LogDestinationName object
    • fromLogName

      public static LogDestinationName fromLogName(LogName logName)
      Creates a LogDestinationName object from given LogName.
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object