A list of matches define conditions used for matching the rule against
incoming HTTP 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.
If a default rule is desired to be configured, add a rule with no matches
specified to the end of the rules list.
A list of matches define conditions used for matching the rule against
incoming HTTP 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.
If a default rule is desired to be configured, add a rule with no matches
specified to the end of the rules list.
A list of matches define conditions used for matching the rule against
incoming HTTP 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.
If a default rule is desired to be configured, add a rule with no matches
specified to the end of the rules list.
A list of matches define conditions used for matching the rule against
incoming HTTP 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.
If a default rule is desired to be configured, add a rule with no matches
specified to the end of the rules list.
A list of matches define conditions used for matching the rule against
incoming HTTP 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.
If a default rule is desired to be configured, add a rule with no matches
specified to the end of the rules list.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[],[],null,["# Interface HttpRoute.RouteRuleOrBuilder (0.16.0)\n\nVersion latestkeyboard_arrow_down\n\n- [0.16.0 (latest)](/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.networkservices.v1.HttpRoute.RouteRuleOrBuilder)\n- [0.15.0](/java/docs/reference/google-cloudevent-types/0.15.0/com.google.events.cloud.networkservices.v1.HttpRoute.RouteRuleOrBuilder)\n- [0.14.1](/java/docs/reference/google-cloudevent-types/0.14.1/com.google.events.cloud.networkservices.v1.HttpRoute.RouteRuleOrBuilder) \n\n public static interface HttpRoute.RouteRuleOrBuilder extends MessageOrBuilder\n\nImplements\n----------\n\n[MessageOrBuilder](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.MessageOrBuilder.html)\n\nMethods\n-------\n\n### getAction()\n\n public abstract HttpRoute.RouteAction getAction()\n\nThe detailed rule defining how to route matched traffic.\n\n`.google.events.cloud.networkservices.v1.HttpRoute.RouteAction action = 2;`\n\n### getActionOrBuilder()\n\n public abstract HttpRoute.RouteActionOrBuilder getActionOrBuilder()\n\nThe detailed rule defining how to route matched traffic.\n\n`.google.events.cloud.networkservices.v1.HttpRoute.RouteAction action = 2;`\n\n### getMatches(int index)\n\n public abstract HttpRoute.RouteMatch getMatches(int index)\n\nA list of matches define conditions used for matching the rule against\nincoming HTTP requests. Each match is independent, i.e. this rule will be\nmatched if ANY one of the matches is satisfied.\nIf no matches field is specified, this rule will unconditionally match\ntraffic.\nIf a default rule is desired to be configured, add a rule with no matches\nspecified to the end of the rules list.\n\n`repeated .google.events.cloud.networkservices.v1.HttpRoute.RouteMatch matches = 1;\n`\n\n### getMatchesCount()\n\n public abstract int getMatchesCount()\n\nA list of matches define conditions used for matching the rule against\nincoming HTTP requests. Each match is independent, i.e. this rule will be\nmatched if ANY one of the matches is satisfied.\nIf no matches field is specified, this rule will unconditionally match\ntraffic.\nIf a default rule is desired to be configured, add a rule with no matches\nspecified to the end of the rules list.\n\n`repeated .google.events.cloud.networkservices.v1.HttpRoute.RouteMatch matches = 1;\n`\n\n### getMatchesList()\n\n public abstract List\u003cHttpRoute.RouteMatch\u003e getMatchesList()\n\nA list of matches define conditions used for matching the rule against\nincoming HTTP requests. Each match is independent, i.e. this rule will be\nmatched if ANY one of the matches is satisfied.\nIf no matches field is specified, this rule will unconditionally match\ntraffic.\nIf a default rule is desired to be configured, add a rule with no matches\nspecified to the end of the rules list.\n\n`repeated .google.events.cloud.networkservices.v1.HttpRoute.RouteMatch matches = 1;\n`\n\n### getMatchesOrBuilder(int index)\n\n public abstract HttpRoute.RouteMatchOrBuilder getMatchesOrBuilder(int index)\n\nA list of matches define conditions used for matching the rule against\nincoming HTTP requests. Each match is independent, i.e. this rule will be\nmatched if ANY one of the matches is satisfied.\nIf no matches field is specified, this rule will unconditionally match\ntraffic.\nIf a default rule is desired to be configured, add a rule with no matches\nspecified to the end of the rules list.\n\n`repeated .google.events.cloud.networkservices.v1.HttpRoute.RouteMatch matches = 1;\n`\n\n### getMatchesOrBuilderList()\n\n public abstract List\u003c? extends HttpRoute.RouteMatchOrBuilder\u003e getMatchesOrBuilderList()\n\nA list of matches define conditions used for matching the rule against\nincoming HTTP requests. Each match is independent, i.e. this rule will be\nmatched if ANY one of the matches is satisfied.\nIf no matches field is specified, this rule will unconditionally match\ntraffic.\nIf a default rule is desired to be configured, add a rule with no matches\nspecified to the end of the rules list.\n\n`repeated .google.events.cloud.networkservices.v1.HttpRoute.RouteMatch matches = 1;\n`\n\n### hasAction()\n\n public abstract boolean hasAction()\n\nThe detailed rule defining how to route matched traffic.\n\n`.google.events.cloud.networkservices.v1.HttpRoute.RouteAction action = 2;`"]]