Class: Google::Apis::TestingV1::TrafficRule

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ TrafficRule

Returns a new instance of TrafficRule.



3050
3051
3052
# File 'lib/google/apis/testing_v1/classes.rb', line 3050

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#bandwidthFloat

Bandwidth in kbits/second. Corresponds to the JSON property bandwidth

Returns:

  • (Float)


3028
3029
3030
# File 'lib/google/apis/testing_v1/classes.rb', line 3028

def bandwidth
  @bandwidth
end

#burstFloat

Burst size in kbits. Corresponds to the JSON property burst

Returns:

  • (Float)


3033
3034
3035
# File 'lib/google/apis/testing_v1/classes.rb', line 3033

def burst
  @burst
end

#delayString

Packet delay, must be >= 0. Corresponds to the JSON property delay

Returns:

  • (String)


3038
3039
3040
# File 'lib/google/apis/testing_v1/classes.rb', line 3038

def delay
  @delay
end

#packet_duplication_ratioFloat

Packet duplication ratio (0.0 - 1.0). Corresponds to the JSON property packetDuplicationRatio

Returns:

  • (Float)


3043
3044
3045
# File 'lib/google/apis/testing_v1/classes.rb', line 3043

def packet_duplication_ratio
  @packet_duplication_ratio
end

#packet_loss_ratioFloat

Packet loss ratio (0.0 - 1.0). Corresponds to the JSON property packetLossRatio

Returns:

  • (Float)


3048
3049
3050
# File 'lib/google/apis/testing_v1/classes.rb', line 3048

def packet_loss_ratio
  @packet_loss_ratio
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3055
3056
3057
3058
3059
3060
3061
# File 'lib/google/apis/testing_v1/classes.rb', line 3055

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