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.
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.
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.
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.
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.
[[["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 GrpcRoute.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.GrpcRoute.RouteRuleOrBuilder)\n- [0.15.0](/java/docs/reference/google-cloudevent-types/0.15.0/com.google.events.cloud.networkservices.v1.GrpcRoute.RouteRuleOrBuilder)\n- [0.14.1](/java/docs/reference/google-cloudevent-types/0.14.1/com.google.events.cloud.networkservices.v1.GrpcRoute.RouteRuleOrBuilder) \n\n public static interface GrpcRoute.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 GrpcRoute.RouteAction getAction()\n\nRequired. A detailed rule defining how to route traffic. This field is\nrequired.\n\n`.google.events.cloud.networkservices.v1.GrpcRoute.RouteAction action = 2;`\n\n### getActionOrBuilder()\n\n public abstract GrpcRoute.RouteActionOrBuilder getActionOrBuilder()\n\nRequired. A detailed rule defining how to route traffic. This field is\nrequired.\n\n`.google.events.cloud.networkservices.v1.GrpcRoute.RouteAction action = 2;`\n\n### getMatches(int index)\n\n public abstract GrpcRoute.RouteMatch getMatches(int index)\n\nOptional. Matches define conditions used for matching the rule against\nincoming gRPC requests. Each match is independent, i.e. this rule will be\nmatched if ANY one of the matches is satisfied. If no matches field is\nspecified, this rule will unconditionally match traffic.\n\n`repeated .google.events.cloud.networkservices.v1.GrpcRoute.RouteMatch matches = 1;\n`\n\n### getMatchesCount()\n\n public abstract int getMatchesCount()\n\nOptional. Matches define conditions used for matching the rule against\nincoming gRPC requests. Each match is independent, i.e. this rule will be\nmatched if ANY one of the matches is satisfied. If no matches field is\nspecified, this rule will unconditionally match traffic.\n\n`repeated .google.events.cloud.networkservices.v1.GrpcRoute.RouteMatch matches = 1;\n`\n\n### getMatchesList()\n\n public abstract List\u003cGrpcRoute.RouteMatch\u003e getMatchesList()\n\nOptional. Matches define conditions used for matching the rule against\nincoming gRPC requests. Each match is independent, i.e. this rule will be\nmatched if ANY one of the matches is satisfied. If no matches field is\nspecified, this rule will unconditionally match traffic.\n\n`repeated .google.events.cloud.networkservices.v1.GrpcRoute.RouteMatch matches = 1;\n`\n\n### getMatchesOrBuilder(int index)\n\n public abstract GrpcRoute.RouteMatchOrBuilder getMatchesOrBuilder(int index)\n\nOptional. Matches define conditions used for matching the rule against\nincoming gRPC requests. Each match is independent, i.e. this rule will be\nmatched if ANY one of the matches is satisfied. If no matches field is\nspecified, this rule will unconditionally match traffic.\n\n`repeated .google.events.cloud.networkservices.v1.GrpcRoute.RouteMatch matches = 1;\n`\n\n### getMatchesOrBuilderList()\n\n public abstract List\u003c? extends GrpcRoute.RouteMatchOrBuilder\u003e getMatchesOrBuilderList()\n\nOptional. Matches define conditions used for matching the rule against\nincoming gRPC requests. Each match is independent, i.e. this rule will be\nmatched if ANY one of the matches is satisfied. If no matches field is\nspecified, this rule will unconditionally match traffic.\n\n`repeated .google.events.cloud.networkservices.v1.GrpcRoute.RouteMatch matches = 1;\n`\n\n### hasAction()\n\n public abstract boolean hasAction()\n\nRequired. A detailed rule defining how to route traffic. This field is\nrequired.\n\n`.google.events.cloud.networkservices.v1.GrpcRoute.RouteAction action = 2;`"]]