#
# 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
  module Thrift
    module Operator
      REGEX = 1
      NOT_REGEX = 2
      EQUALS = 3
      NOT_EQUALS = 4
      GREATER_THAN = 5
      GREATER_THAN_OR_EQUALS = 6
      LESS_THAN = 7
      LESS_THAN_OR_EQUALS = 8
      BETWEEN = 9
      LINKS_TO = 10
      LIKE = 11
      NOT_LIKE = 12
      VALUE_MAP = {1 => "REGEX", 2 => "NOT_REGEX", 3 => "EQUALS", 4 => "NOT_EQUALS", 5 => "GREATER_THAN", 6 => "GREATER_THAN_OR_EQUALS", 7 => "LESS_THAN", 8 => "LESS_THAN_OR_EQUALS", 9 => "BETWEEN", 10 => "LINKS_TO", 11 => "LIKE", 12 => "NOT_LIKE"}
      VALID_VALUES = Set.new([REGEX, NOT_REGEX, EQUALS, NOT_EQUALS, GREATER_THAN, GREATER_THAN_OR_EQUALS, LESS_THAN, LESS_THAN_OR_EQUALS, BETWEEN, LINKS_TO, LIKE, NOT_LIKE]).freeze
    end

    module Type
      BOOLEAN = 1
      DOUBLE = 2
      FLOAT = 3
      INTEGER = 4
      LONG = 5
      LINK = 6
      STRING = 7
      TAG = 8
      NULL = 9
      TIMESTAMP = 10
      VALUE_MAP = {1 => "BOOLEAN", 2 => "DOUBLE", 3 => "FLOAT", 4 => "INTEGER", 5 => "LONG", 6 => "LINK", 7 => "STRING", 8 => "TAG", 9 => "NULL", 10 => "TIMESTAMP"}
      VALID_VALUES = Set.new([BOOLEAN, DOUBLE, FLOAT, INTEGER, LONG, LINK, STRING, TAG, NULL, TIMESTAMP]).freeze
    end

    module Diff
      ADDED = 1
      REMOVED = 2
      VALUE_MAP = {1 => "ADDED", 2 => "REMOVED"}
      VALID_VALUES = Set.new([ADDED, REMOVED]).freeze
    end

    # A temporary token that is returned by the
# {@link ConcourseService#login(String, String)} method to grant access
# to secure resources in place of raw credentials.
    class AccessToken
      include ::Thrift::Struct, ::Thrift::Struct_Union
      DATA = 1

      FIELDS = {
        DATA => {:type => ::Thrift::Types::STRING, :name => 'data', :binary => true}
      }

      def struct_fields; FIELDS; end

      def validate
        raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field data is unset!') unless @data
      end

      ::Thrift::Struct.generate_accessors self
    end

    # A token that identifies a Transaction.
    class TransactionToken
      include ::Thrift::Struct, ::Thrift::Struct_Union
      ACCESSTOKEN = 1
      TIMESTAMP = 2

      FIELDS = {
        ACCESSTOKEN => {:type => ::Thrift::Types::STRUCT, :name => 'accessToken', :class => ::Concourse::Thrift::AccessToken},
        TIMESTAMP => {:type => ::Thrift::Types::I64, :name => 'timestamp'}
      }

      def struct_fields; FIELDS; end

      def validate
        raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field accessToken is unset!') unless @accessToken
        raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field timestamp is unset!') unless @timestamp
      end

      ::Thrift::Struct.generate_accessors self
    end

  end
end
