Class: Google::Apis::TestingV1::TrafficRule
- Inherits:
 - 
      Object
      
        
- Object
 - Google::Apis::TestingV1::TrafficRule
 
 
- Includes:
 - Core::Hashable, Core::JsonObjectSupport
 
- Defined in:
 - generated/google/apis/testing_v1/classes.rb,
generated/google/apis/testing_v1/representations.rb,
generated/google/apis/testing_v1/representations.rb 
Overview
Network emulation parameters
Instance Attribute Summary collapse
- 
  
    
      #bandwidth  ⇒ Float 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Bandwidth in kbits/second Corresponds to the JSON property
bandwidth. - 
  
    
      #burst  ⇒ Float 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Burst size in kbits Corresponds to the JSON property
burst. - 
  
    
      #delay  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Packet delay, must be >= 0 Corresponds to the JSON property
delay. - 
  
    
      #packet_duplication_ratio  ⇒ Float 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Packet duplication ratio (0.0 - 1.0) Corresponds to the JSON property
packetDuplicationRatio. - 
  
    
      #packet_loss_ratio  ⇒ Float 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Packet loss ratio (0.0 - 1.0) Corresponds to the JSON property
packetLossRatio. 
Instance Method Summary collapse
- 
  
    
      #initialize(**args)  ⇒ TrafficRule 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
A new instance of TrafficRule.
 - 
  
    
      #update!(**args)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    
Update properties of this object.
 
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ TrafficRule
Returns a new instance of TrafficRule
      2250 2251 2252  | 
    
      # File 'generated/google/apis/testing_v1/classes.rb', line 2250 def initialize(**args) update!(**args) end  | 
  
Instance Attribute Details
#bandwidth ⇒ Float
Bandwidth in kbits/second
Corresponds to the JSON property bandwidth
      2228 2229 2230  | 
    
      # File 'generated/google/apis/testing_v1/classes.rb', line 2228 def bandwidth @bandwidth end  | 
  
#burst ⇒ Float
Burst size in kbits
Corresponds to the JSON property burst
      2233 2234 2235  | 
    
      # File 'generated/google/apis/testing_v1/classes.rb', line 2233 def burst @burst end  | 
  
#delay ⇒ String
Packet delay, must be >= 0
Corresponds to the JSON property delay
      2238 2239 2240  | 
    
      # File 'generated/google/apis/testing_v1/classes.rb', line 2238 def delay @delay end  | 
  
#packet_duplication_ratio ⇒ Float
Packet duplication ratio (0.0 - 1.0)
Corresponds to the JSON property packetDuplicationRatio
      2243 2244 2245  | 
    
      # File 'generated/google/apis/testing_v1/classes.rb', line 2243 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
      2248 2249 2250  | 
    
      # File 'generated/google/apis/testing_v1/classes.rb', line 2248 def packet_loss_ratio @packet_loss_ratio end  | 
  
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
      2255 2256 2257 2258 2259 2260 2261  | 
    
      # File 'generated/google/apis/testing_v1/classes.rb', line 2255 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  |