Class L7Allow
- Namespace
- Openshell.Sandbox.V1
- Assembly
- OpenShell.Sdk.dll
Allowed action definition for L7 rules.
public sealed class L7Allow : IMessage<L7Allow>, IEquatable<L7Allow>, IDeepCloneable<L7Allow>, IBufferMessage, IMessage
- Inheritance
-
L7Allow
- Inherited Members
Constructors
L7Allow()
public L7Allow()
L7Allow(L7Allow)
public L7Allow(L7Allow other)
Parameters
otherL7Allow
Fields
CommandFieldNumber
Field number for the "command" field.
public const int CommandFieldNumber = 3
Field Value
FieldsFieldNumber
Field number for the "fields" field.
public const int FieldsFieldNumber = 7
Field Value
MethodFieldNumber
Field number for the "method" field.
public const int MethodFieldNumber = 1
Field Value
OperationNameFieldNumber
Field number for the "operation_name" field.
public const int OperationNameFieldNumber = 6
Field Value
OperationTypeFieldNumber
Field number for the "operation_type" field.
public const int OperationTypeFieldNumber = 5
Field Value
ParamsFieldNumber
Field number for the "params" field.
public const int ParamsFieldNumber = 9
Field Value
PathFieldNumber
Field number for the "path" field.
public const int PathFieldNumber = 2
Field Value
QueryFieldNumber
Field number for the "query" field.
public const int QueryFieldNumber = 4
Field Value
Properties
Command
SQL command (SQL): SELECT, INSERT, etc. or "*" for any.
public string Command { get; set; }
Property Value
Descriptor
public static MessageDescriptor Descriptor { get; }
Property Value
- MessageDescriptor
Fields
GraphQL root field globs. Allow rules match only when every selected root field matches one of the configured globs. Omit to match all fields.
public RepeatedField<string> Fields { get; }
Property Value
- RepeatedField<string>
Method
Protocol method: HTTP method (REST/WebSocket), JSON-RPC method name, or "*" for any when supported by the protocol.
public string Method { get; set; }
Property Value
OperationName
GraphQL operation name glob. "*" matches any operation name.
public string OperationName { get; set; }
Property Value
OperationType
GraphQL operation type: "query", "mutation", "subscription", or "*" for any.
public string OperationType { get; set; }
Property Value
Params
MCP params matcher map. Currently only params.name is supported for tools/call filtering. Generic protocol "json-rpc" rejects params matchers.
public MapField<string, L7QueryMatcher> Params { get; }
Property Value
- MapField<string, L7QueryMatcher>
Parser
public static MessageParser<L7Allow> Parser { get; }
Property Value
- MessageParser<L7Allow>
Path
URL path glob pattern (REST): "/repos/", "" for any.
public string Path { get; set; }
Property Value
Query
Query parameter matcher map (REST).
Key is the decoded query parameter name (case-sensitive).
Value supports either a single glob (glob) or a list (any).
public MapField<string, L7QueryMatcher> Query { get; }
Property Value
- MapField<string, L7QueryMatcher>
Methods
CalculateSize()
Calculates the size of this message in Protocol Buffer wire format, in bytes.
public int CalculateSize()
Returns
- int
The number of bytes required to write this message to a coded output stream.
Clone()
Creates a deep clone of this object.
public L7Allow Clone()
Returns
- L7Allow
A deep clone of this object.
Equals(L7Allow)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(L7Allow other)
Parameters
otherL7AllowAn object to compare with this object.
Returns
Equals(object)
Determines whether the specified object is equal to the current object.
public override bool Equals(object other)
Parameters
otherobject
Returns
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.
MergeFrom(CodedInputStream)
Merges the data from the specified coded input stream with the current message.
public void MergeFrom(CodedInputStream input)
Parameters
inputCodedInputStream
Remarks
See the user guide for precise merge semantics.
MergeFrom(L7Allow)
Merges the given message into this one.
public void MergeFrom(L7Allow other)
Parameters
otherL7Allow
Remarks
See the user guide for precise merge semantics.
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.
WriteTo(CodedOutputStream)
Writes the data to the given coded output stream.
public void WriteTo(CodedOutputStream output)
Parameters
outputCodedOutputStreamCoded output stream to write the data to. Must not be null.