Class: Google::Apis::NetworkservicesV1::GrpcRouteRouteRule

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

Overview

Describes how to route traffic.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GrpcRouteRouteRule

Returns a new instance of GrpcRouteRouteRule.



985
986
987
# File 'lib/google/apis/networkservices_v1/classes.rb', line 985

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

Instance Attribute Details

#actionGoogle::Apis::NetworkservicesV1::GrpcRouteRouteAction

Specifies how to route matched traffic. Corresponds to the JSON property action



975
976
977
# File 'lib/google/apis/networkservices_v1/classes.rb', line 975

def action
  @action
end

#matchesArray<Google::Apis::NetworkservicesV1::GrpcRouteRouteMatch>

Optional. Matches define conditions used for matching the rule against incoming gRPC requests. Each match is independent, i.e. this rule will be matched if ANY one of the matches is satisfied. If no matches field is specified, this rule will unconditionally match traffic. Corresponds to the JSON property matches



983
984
985
# File 'lib/google/apis/networkservices_v1/classes.rb', line 983

def matches
  @matches
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



990
991
992
993
# File 'lib/google/apis/networkservices_v1/classes.rb', line 990

def update!(**args)
  @action = args[:action] if args.key?(:action)
  @matches = args[:matches] if args.key?(:matches)
end