syntax = "proto3";

package envoy.type.matcher.v3;

import "envoy/type/v3/range.proto";

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

option java_package = "io.envoyproxy.envoy.type.matcher.v3";
option java_outer_classname = "NumberProto";
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: Number matcher]

// Specifies the way to match a double value.
message DoubleMatcher {
  option (udpa.annotations.versioning).previous_message_type = "envoy.type.matcher.DoubleMatcher";

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

    // If specified, the input double value must be in the range specified here.
    // Note: The range is using half-open interval semantics [start, end).
    type.v3.DoubleRange range = 1;

    // If specified, the input double value must be equal to the value specified here.
    double exact = 2;
  }
}
