#
# Autogenerated by Thrift Compiler (0.9.3)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#

require 'thrift'

module Concourse
  # Signals that an attempt to conditionally add or insert data based on a
# condition that should be unique, cannot happen because the condition is not
# unique.
  class DuplicateEntryException < ::Thrift::Exception
    include ::Thrift::Struct, ::Thrift::Struct_Union
    def initialize(message=nil)
      super()
      self.message = message
    end

    MESSAGE = 1

    FIELDS = {
      MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'}
    }

    def struct_fields; FIELDS; end

    def validate
    end

    ::Thrift::Struct.generate_accessors self
  end

  # Signals that an invalid argument was submitted.
  class InvalidArgumentException < ::Thrift::Exception
    include ::Thrift::Struct, ::Thrift::Struct_Union
    def initialize(message=nil)
      super()
      self.message = message
    end

    MESSAGE = 1

    FIELDS = {
      MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'}
    }

    def struct_fields; FIELDS; end

    def validate
    end

    ::Thrift::Struct.generate_accessors self
  end

  # Signals that an unexpected or invalid token was reached while parsing.
  class ParseException < ::Thrift::Exception
    include ::Thrift::Struct, ::Thrift::Struct_Union
    def initialize(message=nil)
      super()
      self.message = message
    end

    MESSAGE = 1

    FIELDS = {
      MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'}
    }

    def struct_fields; FIELDS; end

    def validate
    end

    ::Thrift::Struct.generate_accessors self
  end

  # Signals that a security violation has occurred and the currently running
# session must end immediately.
  class SecurityException < ::Thrift::Exception
    include ::Thrift::Struct, ::Thrift::Struct_Union
    def initialize(message=nil)
      super()
      self.message = message
    end

    MESSAGE = 1

    FIELDS = {
      MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'}
    }

    def struct_fields; FIELDS; end

    def validate
    end

    ::Thrift::Struct.generate_accessors self
  end

  # The base class for all exceptions that happen during (staged) operations in
# a transaction.
# <p>
# All operations that occur within a transaction should be wrapped in a
# try-catch block so that transaction exceptions can be caught and the
# transaction can be properly aborted.
# 
# <pre>
# try {
#     concourse.stage();
#     concourse.get(&quot;foo&quot;, 1);
#     concourse.add(&quot;foo&quot;, &quot;bar&quot;, 1);
#     concourse.commit();
# }
# catch (TransactionException e) {
#     concourse.abort();
# }
# </pre>
# 
# </p>
# <p>
# <em>Please note that this and all descendant exceptions are unchecked for
# backwards compatibility, but they may be changed to be checked in a future
# API breaking release.</em>
# </p>
  class TransactionException < ::Thrift::Exception
    include ::Thrift::Struct, ::Thrift::Struct_Union

    FIELDS = {

    }

    def struct_fields; FIELDS; end

    def validate
    end

    ::Thrift::Struct.generate_accessors self
  end

  # Thrown when a managed operation fails.
  class ManagementException < ::Thrift::Exception
    include ::Thrift::Struct, ::Thrift::Struct_Union
    def initialize(message=nil)
      super()
      self.message = message
    end

    MESSAGE = 1

    FIELDS = {
      MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'}
    }

    def struct_fields; FIELDS; end

    def validate
    end

    ::Thrift::Struct.generate_accessors self
  end

end
