Class: SML::GetProfilePack::Request

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby-sml/sml-getprofilepack.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(server_id, username, password, with_raw_data, begin_time, end_time, parameter_treepath, object_list, das_details) ⇒ Request

Returns a new instance of Request.



14
15
16
17
18
19
20
21
22
23
24
# File 'lib/ruby-sml/sml-getprofilepack.rb', line 14

def initialize(server_id, username, password, with_raw_data, begin_time, end_time, parameter_treepath, object_list, das_details)
  @server_id = server_id
  @username = username
  @password = password
  @with_raw_data = with_raw_data
  @begin_time = begin_time
  @end_time = end_time
  @parameter_treepath = parameter_treepath
  @object_list = object_list
  @das_details = das_details
end

Instance Attribute Details

#begin_timeObject

Returns the value of attribute begin_time.



12
13
14
# File 'lib/ruby-sml/sml-getprofilepack.rb', line 12

def begin_time
  @begin_time
end

#das_detailsObject

Returns the value of attribute das_details.



12
13
14
# File 'lib/ruby-sml/sml-getprofilepack.rb', line 12

def das_details
  @das_details
end

#end_timeObject

Returns the value of attribute end_time.



12
13
14
# File 'lib/ruby-sml/sml-getprofilepack.rb', line 12

def end_time
  @end_time
end

#object_listObject

Returns the value of attribute object_list.



12
13
14
# File 'lib/ruby-sml/sml-getprofilepack.rb', line 12

def object_list
  @object_list
end

#parameter_treepathObject

Returns the value of attribute parameter_treepath.



12
13
14
# File 'lib/ruby-sml/sml-getprofilepack.rb', line 12

def parameter_treepath
  @parameter_treepath
end

#passwordObject

Returns the value of attribute password.



12
13
14
# File 'lib/ruby-sml/sml-getprofilepack.rb', line 12

def password
  @password
end

#server_idObject

Returns the value of attribute server_id.



12
13
14
# File 'lib/ruby-sml/sml-getprofilepack.rb', line 12

def server_id
  @server_id
end

#usernameObject

Returns the value of attribute username.



12
13
14
# File 'lib/ruby-sml/sml-getprofilepack.rb', line 12

def username
  @username
end

#with_raw_dataObject

Returns the value of attribute with_raw_data.



12
13
14
# File 'lib/ruby-sml/sml-getprofilepack.rb', line 12

def with_raw_data
  @with_raw_data
end

Class Method Details

.construct(array_rep) ⇒ Object



26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/ruby-sml/sml-getprofilepack.rb', line 26

def self.construct(array_rep)
  return nil if array_rep.nil?
  server_id = array_rep.shift
  username = array_rep.shift
  password = array_rep.shift
  with_raw_data = array_rep.shift
  array_rep.shift unless with_raw_data.nil?
  begin_time = SML::Time.construct(array_rep.shift)
  end_time = SML::Time.construct(array_rep.shift)
  parameter_treepath = SML::Treepath.construct(array_rep.shift)
  object_list = array_rep.shift
  das_details = SML::Tree.construct(array_rep.shift)

  return nil if parameter_treepath.nil?
  return SML::GetProfilePack::Request.new(server_id, username, password, with_raw_data, begin_time, end_time, parameter_treepath, object_list, das_details)
end

Instance Method Details

#to_aObject



42
43
44
45
46
# File 'lib/ruby-sml/sml-getprofilepack.rb', line 42

def to_a
  result = [] << server_id << username << password << with_raw_data
  result << :bool unless with_raw_data.nil?
  return result << begin_time.to_a << end_time.to_a << parameter_treepath.to_a << object_list << das_details.to_a
end