Class: Google::Apis::TestingV1::TrafficRule
- Inherits:
-
Object
- Object
- Google::Apis::TestingV1::TrafficRule
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/testing_v1/classes.rb,
lib/google/apis/testing_v1/representations.rb,
lib/google/apis/testing_v1/representations.rb
Overview
Network emulation parameters.
Instance Attribute Summary collapse
-
#bandwidth ⇒ Float
Bandwidth in kbits/second.
-
#burst ⇒ Float
Burst size in kbits.
-
#delay ⇒ String
Packet delay, must be >= 0.
-
#packet_duplication_ratio ⇒ Float
Packet duplication ratio (0.0 - 1.0).
-
#packet_loss_ratio ⇒ Float
Packet loss ratio (0.0 - 1.0).
Instance Method Summary collapse
-
#initialize(**args) ⇒ TrafficRule
constructor
A new instance of TrafficRule.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ TrafficRule
Returns a new instance of TrafficRule.
2798 2799 2800 |
# File 'lib/google/apis/testing_v1/classes.rb', line 2798 def initialize(**args) update!(**args) end |
Instance Attribute Details
#bandwidth ⇒ Float
Bandwidth in kbits/second.
Corresponds to the JSON property bandwidth
2776 2777 2778 |
# File 'lib/google/apis/testing_v1/classes.rb', line 2776 def bandwidth @bandwidth end |
#burst ⇒ Float
Burst size in kbits.
Corresponds to the JSON property burst
2781 2782 2783 |
# File 'lib/google/apis/testing_v1/classes.rb', line 2781 def burst @burst end |
#delay ⇒ String
Packet delay, must be >= 0.
Corresponds to the JSON property delay
2786 2787 2788 |
# File 'lib/google/apis/testing_v1/classes.rb', line 2786 def delay @delay end |
#packet_duplication_ratio ⇒ Float
Packet duplication ratio (0.0 - 1.0).
Corresponds to the JSON property packetDuplicationRatio
2791 2792 2793 |
# File 'lib/google/apis/testing_v1/classes.rb', line 2791 def packet_duplication_ratio @packet_duplication_ratio end |
#packet_loss_ratio ⇒ Float
Packet loss ratio (0.0 - 1.0).
Corresponds to the JSON property packetLossRatio
2796 2797 2798 |
# File 'lib/google/apis/testing_v1/classes.rb', line 2796 def packet_loss_ratio @packet_loss_ratio end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
2803 2804 2805 2806 2807 2808 2809 |
# File 'lib/google/apis/testing_v1/classes.rb', line 2803 def update!(**args) @bandwidth = args[:bandwidth] if args.key?(:bandwidth) @burst = args[:burst] if args.key?(:burst) @delay = args[:delay] if args.key?(:delay) @packet_duplication_ratio = args[:packet_duplication_ratio] if args.key?(:packet_duplication_ratio) @packet_loss_ratio = args[:packet_loss_ratio] if args.key?(:packet_loss_ratio) end |