Class LogsPolicy.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<LogsPolicy.Builder>
com.google.cloud.batch.v1alpha.LogsPolicy.Builder
All Implemented Interfaces:
LogsPolicyOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
LogsPolicy

public static final class LogsPolicy.Builder extends com.google.protobuf.GeneratedMessage.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.v1alpha.LogsPolicy
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<LogsPolicy.Builder>
    • clear

      public LogsPolicy.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<LogsPolicy.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<LogsPolicy.Builder>
    • getDefaultInstanceForType

      public LogsPolicy getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public LogsPolicy build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public LogsPolicy buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public LogsPolicy.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<LogsPolicy.Builder>
    • mergeFrom

      public LogsPolicy.Builder mergeFrom(LogsPolicy other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<LogsPolicy.Builder>
    • mergeFrom

      public LogsPolicy.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<LogsPolicy.Builder>
      Throws:
      IOException
    • getDestinationValue

      public int getDestinationValue()
       If and where logs should be saved.
       
      .google.cloud.batch.v1alpha.LogsPolicy.Destination destination = 1;
      Specified by:
      getDestinationValue in interface LogsPolicyOrBuilder
      Returns:
      The enum numeric value on the wire for destination.
    • setDestinationValue

      public LogsPolicy.Builder setDestinationValue(int value)
       If and where logs should be saved.
       
      .google.cloud.batch.v1alpha.LogsPolicy.Destination destination = 1;
      Parameters:
      value - The enum numeric value on the wire for destination to set.
      Returns:
      This builder for chaining.
    • getDestination

      public LogsPolicy.Destination getDestination()
       If and where logs should be saved.
       
      .google.cloud.batch.v1alpha.LogsPolicy.Destination destination = 1;
      Specified by:
      getDestination in interface LogsPolicyOrBuilder
      Returns:
      The destination.
    • setDestination

      public LogsPolicy.Builder setDestination(LogsPolicy.Destination value)
       If and where logs should be saved.
       
      .google.cloud.batch.v1alpha.LogsPolicy.Destination destination = 1;
      Parameters:
      value - The destination to set.
      Returns:
      This builder for chaining.
    • clearDestination

      public LogsPolicy.Builder clearDestination()
       If and where logs should be saved.
       
      .google.cloud.batch.v1alpha.LogsPolicy.Destination destination = 1;
      Returns:
      This builder for chaining.
    • getLogsPath

      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;
      Specified by:
      getLogsPath in interface LogsPolicyOrBuilder
      Returns:
      The logsPath.
    • getLogsPathBytes

      public 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;
      Specified by:
      getLogsPathBytes in interface LogsPolicyOrBuilder
      Returns:
      The bytes for logsPath.
    • setLogsPath

      public 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;
      Parameters:
      value - The logsPath to set.
      Returns:
      This builder for chaining.
    • clearLogsPath

      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;
      Returns:
      This builder for chaining.
    • setLogsPathBytes

      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;
      Parameters:
      value - The bytes for logsPath to set.
      Returns:
      This builder for chaining.
    • hasCloudLoggingOption

      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.v1alpha.LogsPolicy.CloudLoggingOption cloud_logging_option = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      hasCloudLoggingOption in interface LogsPolicyOrBuilder
      Returns:
      Whether the cloudLoggingOption field is set.
    • getCloudLoggingOption

      public 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.v1alpha.LogsPolicy.CloudLoggingOption cloud_logging_option = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getCloudLoggingOption in interface LogsPolicyOrBuilder
      Returns:
      The cloudLoggingOption.
    • setCloudLoggingOption

      public 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.v1alpha.LogsPolicy.CloudLoggingOption cloud_logging_option = 3 [(.google.api.field_behavior) = OPTIONAL];
    • setCloudLoggingOption

      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.v1alpha.LogsPolicy.CloudLoggingOption cloud_logging_option = 3 [(.google.api.field_behavior) = OPTIONAL];
    • mergeCloudLoggingOption

      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.v1alpha.LogsPolicy.CloudLoggingOption cloud_logging_option = 3 [(.google.api.field_behavior) = OPTIONAL];
    • clearCloudLoggingOption

      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.v1alpha.LogsPolicy.CloudLoggingOption cloud_logging_option = 3 [(.google.api.field_behavior) = OPTIONAL];
    • getCloudLoggingOptionBuilder

      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.v1alpha.LogsPolicy.CloudLoggingOption cloud_logging_option = 3 [(.google.api.field_behavior) = OPTIONAL];
    • getCloudLoggingOptionOrBuilder

      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.v1alpha.LogsPolicy.CloudLoggingOption cloud_logging_option = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getCloudLoggingOptionOrBuilder in interface LogsPolicyOrBuilder