Class Logging (2.11.0)

public final class Logging extends GeneratedMessageV3 implements LoggingOrBuilder

Logging configuration of the service. The following example shows how to configure logs to be sent to the producer and consumer projects. In the example, the activity_history log is sent to both the producer and consumer projects, whereas the purchase_history log is only sent to the producer project. monitored_resources:

  • type: library.googleapis.com/branch labels:
    • key: /city description: The city where the library branch is located in.
    • key: /name description: The name of the branch. logs:
  • name: activity_history labels:
    • key: /customer_id
  • name: purchase_history logging: producer_destinations:
    • monitored_resource: library.googleapis.com/branch logs:
      • activity_history
      • purchase_history consumer_destinations:
    • monitored_resource: library.googleapis.com/branch logs:
      • activity_history

Protobuf type google.api.Logging

Implements

LoggingOrBuilder

Static Fields

CONSUMER_DESTINATIONS_FIELD_NUMBER

public static final int CONSUMER_DESTINATIONS_FIELD_NUMBER
Field Value
TypeDescription
int

PRODUCER_DESTINATIONS_FIELD_NUMBER

public static final int PRODUCER_DESTINATIONS_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static Logging getDefaultInstance()
Returns
TypeDescription
Logging

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static Logging.Builder newBuilder()
Returns
TypeDescription
Logging.Builder

newBuilder(Logging prototype)

public static Logging.Builder newBuilder(Logging prototype)
Parameter
NameDescription
prototypeLogging
Returns
TypeDescription
Logging.Builder

parseDelimitedFrom(InputStream input)

public static Logging parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Logging
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Logging parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Logging
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static Logging parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
Logging
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Logging parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Logging
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Logging parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
Logging
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Logging parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Logging
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Logging parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
Logging
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Logging parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Logging
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static Logging parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Logging
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Logging parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Logging
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static Logging parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
Logging
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Logging parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Logging
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<Logging> parser()
Returns
TypeDescription
Parser<Logging>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getConsumerDestinations(int index)

public Logging.LoggingDestination getConsumerDestinations(int index)

Logging configurations for sending logs to the consumer project. There can be multiple consumer destinations, each one must have a different monitored resource type. A log can be used in at most one consumer destination.

repeated .google.api.Logging.LoggingDestination consumer_destinations = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
Logging.LoggingDestination

getConsumerDestinationsCount()

public int getConsumerDestinationsCount()

Logging configurations for sending logs to the consumer project. There can be multiple consumer destinations, each one must have a different monitored resource type. A log can be used in at most one consumer destination.

repeated .google.api.Logging.LoggingDestination consumer_destinations = 2;

Returns
TypeDescription
int

getConsumerDestinationsList()

public List<Logging.LoggingDestination> getConsumerDestinationsList()

Logging configurations for sending logs to the consumer project. There can be multiple consumer destinations, each one must have a different monitored resource type. A log can be used in at most one consumer destination.

repeated .google.api.Logging.LoggingDestination consumer_destinations = 2;

Returns
TypeDescription
List<LoggingDestination>

getConsumerDestinationsOrBuilder(int index)

public Logging.LoggingDestinationOrBuilder getConsumerDestinationsOrBuilder(int index)

Logging configurations for sending logs to the consumer project. There can be multiple consumer destinations, each one must have a different monitored resource type. A log can be used in at most one consumer destination.

repeated .google.api.Logging.LoggingDestination consumer_destinations = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
Logging.LoggingDestinationOrBuilder

getConsumerDestinationsOrBuilderList()

public List<? extends Logging.LoggingDestinationOrBuilder> getConsumerDestinationsOrBuilderList()

Logging configurations for sending logs to the consumer project. There can be multiple consumer destinations, each one must have a different monitored resource type. A log can be used in at most one consumer destination.

repeated .google.api.Logging.LoggingDestination consumer_destinations = 2;

Returns
TypeDescription
List<? extends com.google.api.Logging.LoggingDestinationOrBuilder>

getDefaultInstanceForType()

public Logging getDefaultInstanceForType()
Returns
TypeDescription
Logging

getParserForType()

public Parser<Logging> getParserForType()
Returns
TypeDescription
Parser<Logging>
Overrides

getProducerDestinations(int index)

public Logging.LoggingDestination getProducerDestinations(int index)

Logging configurations for sending logs to the producer project. There can be multiple producer destinations, each one must have a different monitored resource type. A log can be used in at most one producer destination.

repeated .google.api.Logging.LoggingDestination producer_destinations = 1;

Parameter
NameDescription
indexint
Returns
TypeDescription
Logging.LoggingDestination

getProducerDestinationsCount()

public int getProducerDestinationsCount()

Logging configurations for sending logs to the producer project. There can be multiple producer destinations, each one must have a different monitored resource type. A log can be used in at most one producer destination.

repeated .google.api.Logging.LoggingDestination producer_destinations = 1;

Returns
TypeDescription
int

getProducerDestinationsList()

public List<Logging.LoggingDestination> getProducerDestinationsList()

Logging configurations for sending logs to the producer project. There can be multiple producer destinations, each one must have a different monitored resource type. A log can be used in at most one producer destination.

repeated .google.api.Logging.LoggingDestination producer_destinations = 1;

Returns
TypeDescription
List<LoggingDestination>

getProducerDestinationsOrBuilder(int index)

public Logging.LoggingDestinationOrBuilder getProducerDestinationsOrBuilder(int index)

Logging configurations for sending logs to the producer project. There can be multiple producer destinations, each one must have a different monitored resource type. A log can be used in at most one producer destination.

repeated .google.api.Logging.LoggingDestination producer_destinations = 1;

Parameter
NameDescription
indexint
Returns
TypeDescription
Logging.LoggingDestinationOrBuilder

getProducerDestinationsOrBuilderList()

public List<? extends Logging.LoggingDestinationOrBuilder> getProducerDestinationsOrBuilderList()

Logging configurations for sending logs to the producer project. There can be multiple producer destinations, each one must have a different monitored resource type. A log can be used in at most one producer destination.

repeated .google.api.Logging.LoggingDestination producer_destinations = 1;

Returns
TypeDescription
List<? extends com.google.api.Logging.LoggingDestinationOrBuilder>

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public Logging.Builder newBuilderForType()
Returns
TypeDescription
Logging.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Logging.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
Logging.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public Logging.Builder toBuilder()
Returns
TypeDescription
Logging.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides Exceptions
TypeDescription
IOException