public final class LogsPolicy extends com.google.protobuf.GeneratedMessageV3 implements LogsPolicyOrBuilder
LogsPolicy describes if and how a job's logs are preserved. Logs include information that is automatically written by the Batch service agent and any information that you configured the job's runnables to write to the `stdout` or `stderr` streams.Protobuf type
google.cloud.batch.v1.LogsPolicy| Modifier and Type | Class and Description |
|---|---|
static class |
LogsPolicy.Builder
LogsPolicy describes if and how a job's logs are preserved.
|
static class |
LogsPolicy.CloudLoggingOption
`CloudLoggingOption` contains additional settings for Cloud Logging logs
generated by Batch job.
|
static interface |
LogsPolicy.CloudLoggingOptionOrBuilder |
static class |
LogsPolicy.Destination
The destination (if any) for logs.
|
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter| Modifier and Type | Field and Description |
|---|---|
static int |
CLOUD_LOGGING_OPTION_FIELD_NUMBER |
static int |
DESTINATION_FIELD_NUMBER |
static int |
LOGS_PATH_FIELD_NUMBER |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
LogsPolicy.CloudLoggingOption |
getCloudLoggingOption()
Optional.
|
LogsPolicy.CloudLoggingOptionOrBuilder |
getCloudLoggingOptionOrBuilder()
Optional.
|
static LogsPolicy |
getDefaultInstance() |
LogsPolicy |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
LogsPolicy.Destination |
getDestination()
If and where logs should be saved.
|
int |
getDestinationValue()
If and where logs should be saved.
|
String |
getLogsPath()
When `destination` is set to `PATH`, you must set this field to the path
where you want logs to be saved.
|
com.google.protobuf.ByteString |
getLogsPathBytes()
When `destination` is set to `PATH`, you must set this field to the path
where you want logs to be saved.
|
com.google.protobuf.Parser<LogsPolicy> |
getParserForType() |
int |
getSerializedSize() |
boolean |
hasCloudLoggingOption()
Optional.
|
int |
hashCode() |
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
static LogsPolicy.Builder |
newBuilder() |
static LogsPolicy.Builder |
newBuilder(LogsPolicy prototype) |
LogsPolicy.Builder |
newBuilderForType() |
protected LogsPolicy.Builder |
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) |
protected Object |
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) |
static LogsPolicy |
parseDelimitedFrom(InputStream input) |
static LogsPolicy |
parseDelimitedFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static LogsPolicy |
parseFrom(byte[] data) |
static LogsPolicy |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static LogsPolicy |
parseFrom(ByteBuffer data) |
static LogsPolicy |
parseFrom(ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static LogsPolicy |
parseFrom(com.google.protobuf.ByteString data) |
static LogsPolicy |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static LogsPolicy |
parseFrom(com.google.protobuf.CodedInputStream input) |
static LogsPolicy |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static LogsPolicy |
parseFrom(InputStream input) |
static LogsPolicy |
parseFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<LogsPolicy> |
parser() |
LogsPolicy.Builder |
toBuilder() |
void |
writeTo(com.google.protobuf.CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagfindInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringaddAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic static final int DESTINATION_FIELD_NUMBER
public static final int LOGS_PATH_FIELD_NUMBER
public static final int CLOUD_LOGGING_OPTION_FIELD_NUMBER
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
newInstance in class com.google.protobuf.GeneratedMessageV3public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3public int getDestinationValue()
If and where logs should be saved.
.google.cloud.batch.v1.LogsPolicy.Destination destination = 1;getDestinationValue in interface LogsPolicyOrBuilderpublic LogsPolicy.Destination getDestination()
If and where logs should be saved.
.google.cloud.batch.v1.LogsPolicy.Destination destination = 1;getDestination in interface LogsPolicyOrBuilderpublic String getLogsPath()
When `destination` is set to `PATH`, you must set this field to the path where you want logs to be saved. This path can point to a local directory on the VM or (if congifured) a directory under the mount path of any Cloud Storage bucket, network file system (NFS), or writable persistent disk that is mounted to the job. For example, if the job has a bucket with `mountPath` set to `/mnt/disks/my-bucket`, you can write logs to the root directory of the `remotePath` of that bucket by setting this field to `/mnt/disks/my-bucket/`.
string logs_path = 2;getLogsPath in interface LogsPolicyOrBuilderpublic com.google.protobuf.ByteString getLogsPathBytes()
When `destination` is set to `PATH`, you must set this field to the path where you want logs to be saved. This path can point to a local directory on the VM or (if congifured) a directory under the mount path of any Cloud Storage bucket, network file system (NFS), or writable persistent disk that is mounted to the job. For example, if the job has a bucket with `mountPath` set to `/mnt/disks/my-bucket`, you can write logs to the root directory of the `remotePath` of that bucket by setting this field to `/mnt/disks/my-bucket/`.
string logs_path = 2;getLogsPathBytes in interface LogsPolicyOrBuilderpublic boolean hasCloudLoggingOption()
Optional. When `destination` is set to `CLOUD_LOGGING`, you can optionally set this field to configure additional settings for Cloud Logging.
.google.cloud.batch.v1.LogsPolicy.CloudLoggingOption cloud_logging_option = 3 [(.google.api.field_behavior) = OPTIONAL];
hasCloudLoggingOption in interface LogsPolicyOrBuilderpublic LogsPolicy.CloudLoggingOption getCloudLoggingOption()
Optional. When `destination` is set to `CLOUD_LOGGING`, you can optionally set this field to configure additional settings for Cloud Logging.
.google.cloud.batch.v1.LogsPolicy.CloudLoggingOption cloud_logging_option = 3 [(.google.api.field_behavior) = OPTIONAL];
getCloudLoggingOption in interface LogsPolicyOrBuilderpublic LogsPolicy.CloudLoggingOptionOrBuilder getCloudLoggingOptionOrBuilder()
Optional. When `destination` is set to `CLOUD_LOGGING`, you can optionally set this field to configure additional settings for Cloud Logging.
.google.cloud.batch.v1.LogsPolicy.CloudLoggingOption cloud_logging_option = 3 [(.google.api.field_behavior) = OPTIONAL];
getCloudLoggingOptionOrBuilder in interface LogsPolicyOrBuilderpublic final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3public void writeTo(com.google.protobuf.CodedOutputStream output)
throws IOException
writeTo in interface com.google.protobuf.MessageLitewriteTo in class com.google.protobuf.GeneratedMessageV3IOExceptionpublic int getSerializedSize()
getSerializedSize in interface com.google.protobuf.MessageLitegetSerializedSize in class com.google.protobuf.GeneratedMessageV3public boolean equals(Object obj)
equals in interface com.google.protobuf.Messageequals in class com.google.protobuf.AbstractMessagepublic int hashCode()
hashCode in interface com.google.protobuf.MessagehashCode in class com.google.protobuf.AbstractMessagepublic static LogsPolicy parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static LogsPolicy parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static LogsPolicy parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static LogsPolicy parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static LogsPolicy parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static LogsPolicy parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static LogsPolicy parseFrom(InputStream input) throws IOException
IOExceptionpublic static LogsPolicy parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static LogsPolicy parseDelimitedFrom(InputStream input) throws IOException
IOExceptionpublic static LogsPolicy parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static LogsPolicy parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
IOExceptionpublic static LogsPolicy parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic LogsPolicy.Builder newBuilderForType()
newBuilderForType in interface com.google.protobuf.MessagenewBuilderForType in interface com.google.protobuf.MessageLitepublic static LogsPolicy.Builder newBuilder()
public static LogsPolicy.Builder newBuilder(LogsPolicy prototype)
public LogsPolicy.Builder toBuilder()
toBuilder in interface com.google.protobuf.MessagetoBuilder in interface com.google.protobuf.MessageLiteprotected LogsPolicy.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
newBuilderForType in class com.google.protobuf.GeneratedMessageV3public static LogsPolicy getDefaultInstance()
public static com.google.protobuf.Parser<LogsPolicy> parser()
public com.google.protobuf.Parser<LogsPolicy> getParserForType()
getParserForType in interface com.google.protobuf.MessagegetParserForType in interface com.google.protobuf.MessageLitegetParserForType in class com.google.protobuf.GeneratedMessageV3public LogsPolicy getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderCopyright © 2025 Google LLC. All rights reserved.