public static final class LogsPolicy.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<LogsPolicy.Builder> 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 | Method and Description |
|---|---|
LogsPolicy.Builder |
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
LogsPolicy |
build() |
LogsPolicy |
buildPartial() |
LogsPolicy.Builder |
clear() |
LogsPolicy.Builder |
clearCloudLoggingOption()
Optional.
|
LogsPolicy.Builder |
clearDestination()
If and where logs should be saved.
|
LogsPolicy.Builder |
clearField(com.google.protobuf.Descriptors.FieldDescriptor field) |
LogsPolicy.Builder |
clearLogsPath()
When `destination` is set to `PATH`, you must set this field to the path
where you want logs to be saved.
|
LogsPolicy.Builder |
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) |
LogsPolicy.Builder |
clone() |
LogsPolicy.CloudLoggingOption |
getCloudLoggingOption()
Optional.
|
LogsPolicy.CloudLoggingOption.Builder |
getCloudLoggingOptionBuilder()
Optional.
|
LogsPolicy.CloudLoggingOptionOrBuilder |
getCloudLoggingOptionOrBuilder()
Optional.
|
LogsPolicy |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.Descriptors.Descriptor |
getDescriptorForType() |
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.
|
boolean |
hasCloudLoggingOption()
Optional.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
LogsPolicy.Builder |
mergeCloudLoggingOption(LogsPolicy.CloudLoggingOption value)
Optional.
|
LogsPolicy.Builder |
mergeFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
LogsPolicy.Builder |
mergeFrom(LogsPolicy other) |
LogsPolicy.Builder |
mergeFrom(com.google.protobuf.Message other) |
LogsPolicy.Builder |
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
LogsPolicy.Builder |
setCloudLoggingOption(LogsPolicy.CloudLoggingOption.Builder builderForValue)
Optional.
|
LogsPolicy.Builder |
setCloudLoggingOption(LogsPolicy.CloudLoggingOption value)
Optional.
|
LogsPolicy.Builder |
setDestination(LogsPolicy.Destination value)
If and where logs should be saved.
|
LogsPolicy.Builder |
setDestinationValue(int value)
If and where logs should be saved.
|
LogsPolicy.Builder |
setField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
LogsPolicy.Builder |
setLogsPath(String value)
When `destination` is set to `PATH`, you must set this field to the path
where you want logs to be saved.
|
LogsPolicy.Builder |
setLogsPathBytes(com.google.protobuf.ByteString value)
When `destination` is set to `PATH`, you must set this field to the path
where you want logs to be saved.
|
LogsPolicy.Builder |
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
Object value) |
LogsPolicy.Builder |
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringaddAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, newUninitializedMessageExceptionequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<LogsPolicy.Builder>public LogsPolicy.Builder clear()
clear in interface com.google.protobuf.Message.Builderclear in interface com.google.protobuf.MessageLite.Builderclear in class com.google.protobuf.GeneratedMessageV3.Builder<LogsPolicy.Builder>public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
getDescriptorForType in interface com.google.protobuf.Message.BuildergetDescriptorForType in interface com.google.protobuf.MessageOrBuildergetDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<LogsPolicy.Builder>public LogsPolicy getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic LogsPolicy build()
build in interface com.google.protobuf.Message.Builderbuild in interface com.google.protobuf.MessageLite.Builderpublic LogsPolicy buildPartial()
buildPartial in interface com.google.protobuf.Message.BuilderbuildPartial in interface com.google.protobuf.MessageLite.Builderpublic LogsPolicy.Builder clone()
clone in interface com.google.protobuf.Message.Builderclone in interface com.google.protobuf.MessageLite.Builderclone in class com.google.protobuf.GeneratedMessageV3.Builder<LogsPolicy.Builder>public LogsPolicy.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
setField in interface com.google.protobuf.Message.BuildersetField in class com.google.protobuf.GeneratedMessageV3.Builder<LogsPolicy.Builder>public LogsPolicy.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
clearField in interface com.google.protobuf.Message.BuilderclearField in class com.google.protobuf.GeneratedMessageV3.Builder<LogsPolicy.Builder>public LogsPolicy.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
clearOneof in interface com.google.protobuf.Message.BuilderclearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<LogsPolicy.Builder>public LogsPolicy.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
setRepeatedField in interface com.google.protobuf.Message.BuildersetRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<LogsPolicy.Builder>public LogsPolicy.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
addRepeatedField in interface com.google.protobuf.Message.BuilderaddRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<LogsPolicy.Builder>public LogsPolicy.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<LogsPolicy.Builder>public LogsPolicy.Builder mergeFrom(LogsPolicy other)
public final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<LogsPolicy.Builder>public LogsPolicy.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in interface com.google.protobuf.MessageLite.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<LogsPolicy.Builder>IOExceptionpublic int getDestinationValue()
If and where logs should be saved.
.google.cloud.batch.v1.LogsPolicy.Destination destination = 1;getDestinationValue in interface LogsPolicyOrBuilderpublic LogsPolicy.Builder setDestinationValue(int value)
If and where logs should be saved.
.google.cloud.batch.v1.LogsPolicy.Destination destination = 1;value - The enum numeric value on the wire for destination to set.public LogsPolicy.Destination getDestination()
If and where logs should be saved.
.google.cloud.batch.v1.LogsPolicy.Destination destination = 1;getDestination in interface LogsPolicyOrBuilderpublic LogsPolicy.Builder setDestination(LogsPolicy.Destination value)
If and where logs should be saved.
.google.cloud.batch.v1.LogsPolicy.Destination destination = 1;value - The destination to set.public LogsPolicy.Builder clearDestination()
If and where logs should be saved.
.google.cloud.batch.v1.LogsPolicy.Destination destination = 1;public 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 LogsPolicy.Builder setLogsPath(String value)
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;value - The logsPath to set.public LogsPolicy.Builder clearLogsPath()
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;public LogsPolicy.Builder setLogsPathBytes(com.google.protobuf.ByteString value)
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;value - The bytes for logsPath to set.public 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.Builder setCloudLoggingOption(LogsPolicy.CloudLoggingOption value)
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];
public LogsPolicy.Builder setCloudLoggingOption(LogsPolicy.CloudLoggingOption.Builder builderForValue)
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];
public LogsPolicy.Builder mergeCloudLoggingOption(LogsPolicy.CloudLoggingOption value)
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];
public LogsPolicy.Builder clearCloudLoggingOption()
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];
public LogsPolicy.CloudLoggingOption.Builder getCloudLoggingOptionBuilder()
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];
public 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 LogsPolicy.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
setUnknownFields in interface com.google.protobuf.Message.BuildersetUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<LogsPolicy.Builder>public final LogsPolicy.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
mergeUnknownFields in interface com.google.protobuf.Message.BuildermergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<LogsPolicy.Builder>Copyright © 2025 Google LLC. All rights reserved.