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

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

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ TrafficRule

Returns a new instance of TrafficRule



1910
1911
1912
# File 'generated/google/apis/testing_v1/classes.rb', line 1910

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

Instance Attribute Details

#bandwidthFloat

Bandwidth in kbits/second Corresponds to the JSON property bandwidth

Returns:

  • (Float)


1888
1889
1890
# File 'generated/google/apis/testing_v1/classes.rb', line 1888

def bandwidth
  @bandwidth
end

#burstFloat

Burst size in kbits Corresponds to the JSON property burst

Returns:

  • (Float)


1893
1894
1895
# File 'generated/google/apis/testing_v1/classes.rb', line 1893

def burst
  @burst
end

#delayString

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

Returns:

  • (String)


1898
1899
1900
# File 'generated/google/apis/testing_v1/classes.rb', line 1898

def delay
  @delay
end

#packet_duplication_ratioFloat

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

Returns:

  • (Float)


1903
1904
1905
# File 'generated/google/apis/testing_v1/classes.rb', line 1903

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)


1908
1909
1910
# File 'generated/google/apis/testing_v1/classes.rb', line 1908

def packet_loss_ratio
  @packet_loss_ratio
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1915
1916
1917
1918
1919
1920
1921
# File 'generated/google/apis/testing_v1/classes.rb', line 1915

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