# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/batch/v1/task.proto

require 'google/protobuf'

require 'google/api/resource_pb'
require 'google/cloud/batch/v1/volume_pb'
require 'google/protobuf/duration_pb'
require 'google/protobuf/timestamp_pb'

Google::Protobuf::DescriptorPool.generated_pool.build do
  add_file("google/cloud/batch/v1/task.proto", :syntax => :proto3) do
    add_message "google.cloud.batch.v1.ComputeResource" do
      optional :cpu_milli, :int64, 1
      optional :memory_mib, :int64, 2
      optional :boot_disk_mib, :int64, 4
    end
    add_message "google.cloud.batch.v1.StatusEvent" do
      optional :type, :string, 3
      optional :description, :string, 1
      optional :event_time, :message, 2, "google.protobuf.Timestamp"
      optional :task_execution, :message, 4, "google.cloud.batch.v1.TaskExecution"
    end
    add_message "google.cloud.batch.v1.TaskExecution" do
      optional :exit_code, :int32, 1
    end
    add_message "google.cloud.batch.v1.TaskStatus" do
      optional :state, :enum, 1, "google.cloud.batch.v1.TaskStatus.State"
      repeated :status_events, :message, 2, "google.cloud.batch.v1.StatusEvent"
    end
    add_enum "google.cloud.batch.v1.TaskStatus.State" do
      value :STATE_UNSPECIFIED, 0
      value :PENDING, 1
      value :ASSIGNED, 2
      value :RUNNING, 3
      value :FAILED, 4
      value :SUCCEEDED, 5
    end
    add_message "google.cloud.batch.v1.Runnable" do
      optional :ignore_exit_status, :bool, 3
      optional :background, :bool, 4
      optional :always_run, :bool, 5
      optional :environment, :message, 7, "google.cloud.batch.v1.Environment"
      optional :timeout, :message, 8, "google.protobuf.Duration"
      oneof :executable do
        optional :container, :message, 1, "google.cloud.batch.v1.Runnable.Container"
        optional :script, :message, 2, "google.cloud.batch.v1.Runnable.Script"
        optional :barrier, :message, 6, "google.cloud.batch.v1.Runnable.Barrier"
      end
    end
    add_message "google.cloud.batch.v1.Runnable.Container" do
      optional :image_uri, :string, 1
      repeated :commands, :string, 2
      optional :entrypoint, :string, 3
      repeated :volumes, :string, 7
      optional :options, :string, 8
      optional :block_external_network, :bool, 9
      optional :username, :string, 10
      optional :password, :string, 11
    end
    add_message "google.cloud.batch.v1.Runnable.Script" do
      oneof :command do
        optional :path, :string, 1
        optional :text, :string, 2
      end
    end
    add_message "google.cloud.batch.v1.Runnable.Barrier" do
      optional :name, :string, 1
    end
    add_message "google.cloud.batch.v1.TaskSpec" do
      repeated :runnables, :message, 8, "google.cloud.batch.v1.Runnable"
      optional :compute_resource, :message, 3, "google.cloud.batch.v1.ComputeResource"
      optional :max_run_duration, :message, 4, "google.protobuf.Duration"
      optional :max_retry_count, :int32, 5
      repeated :lifecycle_policies, :message, 9, "google.cloud.batch.v1.LifecyclePolicy"
      map :environments, :string, :string, 6
      repeated :volumes, :message, 7, "google.cloud.batch.v1.Volume"
      optional :environment, :message, 10, "google.cloud.batch.v1.Environment"
    end
    add_message "google.cloud.batch.v1.LifecyclePolicy" do
      optional :action, :enum, 1, "google.cloud.batch.v1.LifecyclePolicy.Action"
      optional :action_condition, :message, 2, "google.cloud.batch.v1.LifecyclePolicy.ActionCondition"
    end
    add_message "google.cloud.batch.v1.LifecyclePolicy.ActionCondition" do
      repeated :exit_codes, :int32, 1
    end
    add_enum "google.cloud.batch.v1.LifecyclePolicy.Action" do
      value :ACTION_UNSPECIFIED, 0
      value :RETRY_TASK, 1
      value :FAIL_TASK, 2
    end
    add_message "google.cloud.batch.v1.Task" do
      optional :name, :string, 1
      optional :status, :message, 2, "google.cloud.batch.v1.TaskStatus"
    end
    add_message "google.cloud.batch.v1.Environment" do
      map :variables, :string, :string, 1
      map :secret_variables, :string, :string, 2
      optional :encrypted_variables, :message, 3, "google.cloud.batch.v1.Environment.KMSEnvMap"
    end
    add_message "google.cloud.batch.v1.Environment.KMSEnvMap" do
      optional :key_name, :string, 1
      optional :cipher_text, :string, 2
    end
  end
end

module Google
  module Cloud
    module Batch
      module V1
        ComputeResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.ComputeResource").msgclass
        StatusEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.StatusEvent").msgclass
        TaskExecution = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.TaskExecution").msgclass
        TaskStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.TaskStatus").msgclass
        TaskStatus::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.TaskStatus.State").enummodule
        Runnable = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.Runnable").msgclass
        Runnable::Container = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.Runnable.Container").msgclass
        Runnable::Script = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.Runnable.Script").msgclass
        Runnable::Barrier = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.Runnable.Barrier").msgclass
        TaskSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.TaskSpec").msgclass
        LifecyclePolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.LifecyclePolicy").msgclass
        LifecyclePolicy::ActionCondition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.LifecyclePolicy.ActionCondition").msgclass
        LifecyclePolicy::Action = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.LifecyclePolicy.Action").enummodule
        Task = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.Task").msgclass
        Environment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.Environment").msgclass
        Environment::KMSEnvMap = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.Environment.KMSEnvMap").msgclass
      end
    end
  end
end