Class: Google::Apis::ComputeBeta::NetworkPolicyTrafficClassificationRuleAction

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
lib/google/apis/compute_beta/classes.rb,
lib/google/apis/compute_beta/representations.rb,
lib/google/apis/compute_beta/representations.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ NetworkPolicyTrafficClassificationRuleAction

Returns a new instance of NetworkPolicyTrafficClassificationRuleAction.



38422
38423
38424
# File 'lib/google/apis/compute_beta/classes.rb', line 38422

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

Instance Attribute Details

#dscp_modeString

DSCP mode. When set to AUTO, the DSCP value will be picked automatically based on selected trafficClass. Otherwise,dscpValue needs to be explicitly specified. Corresponds to the JSON property dscpMode

Returns:

  • (String)


38405
38406
38407
# File 'lib/google/apis/compute_beta/classes.rb', line 38405

def dscp_mode
  @dscp_mode
end

#dscp_valueFixnum

Custom DSCP value from 0-63 range. Corresponds to the JSON property dscpValue

Returns:

  • (Fixnum)


38410
38411
38412
# File 'lib/google/apis/compute_beta/classes.rb', line 38410

def dscp_value
  @dscp_value
end

#traffic_classString

The traffic class that should be applied to the matching packet. Corresponds to the JSON property trafficClass

Returns:

  • (String)


38415
38416
38417
# File 'lib/google/apis/compute_beta/classes.rb', line 38415

def traffic_class
  @traffic_class
end

#typeString

Always "apply_traffic_classification" for traffic classification rules. Corresponds to the JSON property type

Returns:

  • (String)


38420
38421
38422
# File 'lib/google/apis/compute_beta/classes.rb', line 38420

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



38427
38428
38429
38430
38431
38432
# File 'lib/google/apis/compute_beta/classes.rb', line 38427

def update!(**args)
  @dscp_mode = args[:dscp_mode] if args.key?(:dscp_mode)
  @dscp_value = args[:dscp_value] if args.key?(:dscp_value)
  @traffic_class = args[:traffic_class] if args.key?(:traffic_class)
  @type = args[:type] if args.key?(:type)
end