Class: Lib::TL1::Huawei::Message::LstOntVoipPstnUser

Inherits:
Input
  • Object
show all
Defined in:
lib/lib/tl1/huawei/message/lst_ont_voip_pstn_user.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(did: nil, dev: nil, frame_number: nil, slot_number: nil, port_number: nil, ont_id: nil, ont_key: nil, ont_port_id: nil, off_query_flag: false, show_option: []) ⇒ LstOntVoipPstnUser

Returns a new instance of LstOntVoipPstnUser.



13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/lib/tl1/huawei/message/lst_ont_voip_pstn_user.rb', line 13

def initialize(
  did: nil, dev: nil, frame_number: nil, slot_number: nil, port_number: nil, ont_id: nil,
  ont_key: nil, ont_port_id: nil, off_query_flag: false, show_option: []
)
  @did = did
  @dev = dev
  @frame_number = frame_number
  @slot_number = slot_number
  @port_number = port_number
  @ont_id = ont_id
  @ont_key = ont_key
  @ont_port_id = ont_port_id
  self.off_query_flag = off_query_flag
  @show_option = show_option
  super(
    aid: hash_to_string(
      did: did, dev: dev, fn: frame_number, sn: slot_number, pn: port_number,
      ont_id: ont_id, ont_key: ont_key, ont_port_id: ont_port_id
    )
  )
end

Instance Attribute Details

#devObject (readonly)

Returns the value of attribute dev.



10
11
12
# File 'lib/lib/tl1/huawei/message/lst_ont_voip_pstn_user.rb', line 10

def dev
  @dev
end

#didObject (readonly)

Returns the value of attribute did.



10
11
12
# File 'lib/lib/tl1/huawei/message/lst_ont_voip_pstn_user.rb', line 10

def did
  @did
end

#frame_numberObject (readonly) Also known as: fn

Returns the value of attribute frame_number.



10
11
12
# File 'lib/lib/tl1/huawei/message/lst_ont_voip_pstn_user.rb', line 10

def frame_number
  @frame_number
end

#off_query_flagObject

Returns the value of attribute off_query_flag.



10
11
12
# File 'lib/lib/tl1/huawei/message/lst_ont_voip_pstn_user.rb', line 10

def off_query_flag
  @off_query_flag
end

#ont_idObject (readonly)

Returns the value of attribute ont_id.



10
11
12
# File 'lib/lib/tl1/huawei/message/lst_ont_voip_pstn_user.rb', line 10

def ont_id
  @ont_id
end

#ont_keyObject (readonly)

Returns the value of attribute ont_key.



10
11
12
# File 'lib/lib/tl1/huawei/message/lst_ont_voip_pstn_user.rb', line 10

def ont_key
  @ont_key
end

#ont_port_idObject (readonly)

Returns the value of attribute ont_port_id.



10
11
12
# File 'lib/lib/tl1/huawei/message/lst_ont_voip_pstn_user.rb', line 10

def ont_port_id
  @ont_port_id
end

#port_numberObject (readonly) Also known as: pn

Returns the value of attribute port_number.



10
11
12
# File 'lib/lib/tl1/huawei/message/lst_ont_voip_pstn_user.rb', line 10

def port_number
  @port_number
end

#show_optionObject (readonly)

Returns the value of attribute show_option.



10
11
12
# File 'lib/lib/tl1/huawei/message/lst_ont_voip_pstn_user.rb', line 10

def show_option
  @show_option
end

#slot_numberObject (readonly) Also known as: sn

Returns the value of attribute slot_number.



10
11
12
# File 'lib/lib/tl1/huawei/message/lst_ont_voip_pstn_user.rb', line 10

def slot_number
  @slot_number
end

Instance Method Details

#payloadObject



35
36
37
38
39
40
41
42
43
# File 'lib/lib/tl1/huawei/message/lst_ont_voip_pstn_user.rb', line 35

def payload
  return @payload if @payload

  tmp_payload = off_query_flag
  tmp_payload += ',' if !tmp_payload.empty? && !show_option.empty?
  tmp_payload += show_option
  self.payload = tmp_payload
  @payload
end