Class: Google::Apis::MonitoringV3::JsonPathMatcher

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

Overview

Information needed to perform a JSONPath content match. Used for ContentMatcherOption::MATCHES_JSON_PATH and ContentMatcherOption:: NOT_MATCHES_JSON_PATH.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ JsonPathMatcher

Returns a new instance of JsonPathMatcher.



2070
2071
2072
# File 'lib/google/apis/monitoring_v3/classes.rb', line 2070

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

Instance Attribute Details

#json_matcherString

The type of JSONPath match that will be applied to the JSON output ( ContentMatcher.content) Corresponds to the JSON property jsonMatcher

Returns:

  • (String)


2062
2063
2064
# File 'lib/google/apis/monitoring_v3/classes.rb', line 2062

def json_matcher
  @json_matcher
end

#json_pathString

JSONPath within the response output pointing to the expected ContentMatcher:: content to match against. Corresponds to the JSON property jsonPath

Returns:

  • (String)


2068
2069
2070
# File 'lib/google/apis/monitoring_v3/classes.rb', line 2068

def json_path
  @json_path
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2075
2076
2077
2078
# File 'lib/google/apis/monitoring_v3/classes.rb', line 2075

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