syntax = "proto3";

package envoy.type.matcher.v3;

import "envoy/type/matcher/v3/address.proto";
import "envoy/type/matcher/v3/string.proto";

import "udpa/annotations/status.proto";
import "validate/validate.proto";

option java_package = "io.envoyproxy.envoy.type.matcher.v3";
option java_outer_classname = "FilterStateProto";
option java_multiple_files = true;
option go_package = "github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3;matcherv3";
option (udpa.annotations.file_status).package_version_status = ACTIVE;

// [#protodoc-title: Filter state matcher]

// FilterStateMatcher provides a general interface for matching the filter state objects.
message FilterStateMatcher {
  // The filter state key to retrieve the object.
  string key = 1 [(validate.rules).string = {min_len: 1}];

  oneof matcher {
    option (validate.required) = true;

    // Matches the filter state object as a string value.
    StringMatcher string_match = 2;

    // Matches the filter state object as a ip Instance.
    AddressMatcher address_match = 3;
  }
}
