Class: ThriftHiveMetastore::Grant_role_args

Inherits:
Object
  • Object
show all
Includes:
Thrift::Struct, Thrift::Struct_Union
Defined in:
lib/thrift/thrift_hive_metastore.rb

Constant Summary collapse

ROLE_NAME =
1
PRINCIPAL_NAME =
2
PRINCIPAL_TYPE =
3
GRANTOR =
4
GRANTORTYPE =
5
GRANT_OPTION =
6
FIELDS =
{
  ROLE_NAME => {:type => ::Thrift::Types::STRING, :name => 'role_name'},
  PRINCIPAL_NAME => {:type => ::Thrift::Types::STRING, :name => 'principal_name'},
  PRINCIPAL_TYPE => {:type => ::Thrift::Types::I32, :name => 'principal_type', :enum_class => ::PrincipalType},
  GRANTOR => {:type => ::Thrift::Types::STRING, :name => 'grantor'},
  GRANTORTYPE => {:type => ::Thrift::Types::I32, :name => 'grantorType', :enum_class => ::PrincipalType},
  GRANT_OPTION => {:type => ::Thrift::Types::BOOL, :name => 'grant_option'}
}

Instance Method Summary collapse

Instance Method Details

#struct_fieldsObject



3460
# File 'lib/thrift/thrift_hive_metastore.rb', line 3460

def struct_fields; FIELDS; end

#validateObject



3462
3463
3464
3465
3466
3467
3468
3469
# File 'lib/thrift/thrift_hive_metastore.rb', line 3462

def validate
  unless @principal_type.nil? || ::PrincipalType::VALID_VALUES.include?(@principal_type)
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field principal_type!')
  end
  unless @grantorType.nil? || ::PrincipalType::VALID_VALUES.include?(@grantorType)
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field grantorType!')
  end
end