class SourceInfo(betterproto.Message): """Source information collected at parse time.""" # The syntax version of the source, e.g. `cel1`. syntax_version: str = betterproto.string_field(1) # The location name. All position information attached to an expression is # relative to this location. The location could be a file, UI element, or # similar. For example, `acme/app/AnvilPolicy.cel`. location: str = betterproto.string_field(2) # Monotonically increasing list of code point offsets where newlines `\n` # appear. The line number of a given position is the index `i` where for a # given `id` the `line_offsets[i] < id_positions[id] < line_offsets[i+1]`. # The column may be derivd from `id_positions[id] - line_offsets[i]`. line_offsets: List[int] = betterproto.int32_field(3) # A map from the parse node id (e.g. `Expr.id`) to the code point offset # within the source. positions: Dict[int, int] = betterproto.map_field(4, betterproto.TYPE_INT64, betterproto.TYPE_INT32) # A map from the parse node id where a macro replacement was made to the call # `Expr` that resulted in a macro expansion. For example, `has(value.field)` # is a function call that is replaced by a `test_only` field selection in the # AST. Likewise, the call `list.exists(e, e > 10)` translates to a # comprehension expression. The key in the map corresponds to the expression # id of the expanded macro, and the value is the call `Expr` that was # replaced. macro_calls: Dict[int, "Expr"] = betterproto.map_field(5, betterproto.TYPE_INT64, betterproto.TYPE_MESSAGE)
class CheckedExpr(betterproto.Message): """A CEL expression which has been successfully type checked.""" # A map from expression ids to resolved references. The following entries are # in this table: - An Ident or Select expression is represented here if it # resolves to a declaration. For instance, if `a.b.c` is represented by # `select(select(id(a), b), c)`, and `a.b` resolves to a declaration, while # `c` is a field selection, then the reference is attached to the nested # select expression (but not to the id or or the outer select). In turn, if # `a` resolves to a declaration and `b.c` are field selections, the # reference is attached to the ident expression. - Every Call expression has # an entry here, identifying the function being called. - Every # CreateStruct expression for a message has an entry, identifying the # message. reference_map: Dict[int, "Reference"] = betterproto.map_field( 2, betterproto.TYPE_INT64, betterproto.TYPE_MESSAGE) # A map from expression ids to types. Every expression node which has a type # different than DYN has a mapping here. If an expression has type DYN, it is # omitted from this map to save space. type_map: Dict[int, "Type"] = betterproto.map_field(3, betterproto.TYPE_INT64, betterproto.TYPE_MESSAGE) # The source info derived from input that generated the parsed `expr` and any # optimizations made during the type-checking pass. source_info: "SourceInfo" = betterproto.message_field(5) # The expr version indicates the major / minor version number of the `expr` # representation. The most common reason for a version change will be to # indicate to the CEL runtimes that transformations have been performed on # the expr during static analysis. In some cases, this will save the runtime # the work of applying the same or similar transformations prior to # evaluation. expr_version: str = betterproto.string_field(6) # The checked expression. Semantically equivalent to the parsed `expr`, but # may have structural differences. expr: "Expr" = betterproto.message_field(4)
class JwtAuthentication(betterproto.Message): """ This is the Envoy HTTP filter config for JWT authentication. For example: .. code-block:: yaml providers: provider1: issuer: issuer1 audiences: - audience1 - audience2 remote_jwks: http_uri: uri: https://example.com/.well-known/jwks.json cluster: example_jwks_cluster timeout: 1s provider2: issuer: issuer2 local_jwks: inline_string: jwks_string rules: # Not jwt verification is required for /health path - match: prefix: /health # Jwt verification for provider1 is required for path prefixed with "prefix" - match: prefix: /prefix requires: provider_name: provider1 # Jwt verification for either provider1 or provider2 is required for all other requests. - match: prefix: / requires: requires_any: requirements: - provider_name: provider1 - provider_name: provider2 [#next-free-field: 6] """ # Map of provider names to JwtProviders. .. code-block:: yaml providers: # provider1: issuer: issuer1 audiences: - audience1 # - audience2 remote_jwks: http_uri: uri: # https://example.com/.well-known/jwks.json cluster: # example_jwks_cluster timeout: 1s provider2: issuer: # provider2 local_jwks: inline_string: jwks_string providers: Dict[str, "JwtProvider"] = betterproto.map_field( 1, betterproto.TYPE_STRING, betterproto.TYPE_MESSAGE ) # Specifies requirements based on the route matches. The first matched # requirement will be applied. If there are overlapped match conditions, # please put the most specific match first. Examples .. code-block:: yaml # rules: - match: prefix: /healthz - match: prefix: # /baz requires: provider_name: provider1 - match: # prefix: /foo requires: requires_any: requirements: # - provider_name: provider1 - provider_name: provider2 - # match: prefix: /bar requires: requires_all: # requirements: - provider_name: provider1 - # provider_name: provider2 rules: List["RequirementRule"] = betterproto.message_field(2) # This message specifies Jwt requirements based on stream_info.filterState. # Other HTTP filters can use it to specify Jwt requirements dynamically. The # *rules* field above is checked first, if it could not find any matches, # check this one. filter_state_rules: "FilterStateRule" = betterproto.message_field(3) # When set to true, bypass the `CORS preflight request # <http://www.w3.org/TR/cors/#cross-origin-request-with-preflight>`_ # regardless of JWT requirements specified in the rules. bypass_cors_preflight: bool = betterproto.bool_field(4) # A map of unique requirement_names to JwtRequirements. # :ref:`requirement_name <envoy_v3_api_field_extensions.filters.http.jwt_auth # n.v3.PerRouteConfig.requirement_name>` in `PerRouteConfig` uses this map to # specify a JwtRequirement. requirement_map: Dict[str, "JwtRequirement"] = betterproto.map_field( 5, betterproto.TYPE_STRING, betterproto.TYPE_MESSAGE )
class Object(betterproto.Message): id: str = betterproto.string_field(1) revision: int = betterproto.uint64_field(2) type: "ObjectType" = betterproto.enum_field(3) entity: "Entity" = betterproto.message_field(4, group="obj") relation: "Relation" = betterproto.message_field(5, group="obj") kind: "Kind" = betterproto.message_field(6, group="obj") aspects: Dict[ str, "betterproto_lib_google_protobuf.Any"] = betterproto.map_field( 7, betterproto.TYPE_STRING, betterproto.TYPE_MESSAGE) labels: Dict[str, str] = betterproto.map_field(8, betterproto.TYPE_STRING, betterproto.TYPE_STRING) def __post_init__(self) -> None: super().__post_init__()
class RemoveTagsRequest(betterproto.Message): id: str = betterproto.string_field(1) tags: Dict[str, str] = betterproto.map_field(2, betterproto.TYPE_STRING, betterproto.TYPE_STRING) def __post_init__(self) -> None: super().__post_init__()
class AttributeContextPeer(betterproto.Message): """ This message defines attributes for a node that handles a network request. The node can be either a service or an application that sends, forwards, or receives the request. Service peers should fill in the `service`, `principal`, and `labels` as appropriate. [#next-free-field: 6] """ # The address of the peer, this is typically the IP address. It can also be # UDS path, or others. address: "___config_core_v3__.Address" = betterproto.message_field(1) # The canonical service name of the peer. It should be set to :ref:`the HTTP # x-envoy-downstream-service-cluster # <config_http_conn_man_headers_downstream-service-cluster>` If a more # trusted source of the service name is available through mTLS/secure naming, # it should be used. service: str = betterproto.string_field(2) # The labels associated with the peer. These could be pod labels for # Kubernetes or tags for VMs. The source of the labels could be an X.509 # certificate or other configuration. labels: Dict[str, str] = betterproto.map_field( 3, betterproto.TYPE_STRING, betterproto.TYPE_STRING ) # The authenticated identity of this peer. For example, the identity # associated with the workload such as a service account. If an X.509 # certificate is used to assert the identity this field should be sourced # from `URI Subject Alternative Names`, `DNS Subject Alternate Names` or # `Subject` in that order. The primary identity should be the principal. The # principal format is issuer specific. Example: * SPIFFE format is # `spiffe://trust-domain/path` * Google account format is # `https://accounts.google.com/{userid}` principal: str = betterproto.string_field(4) # The X.509 certificate used to authenticate the identify of this peer. When # present, the certificate contents are encoded in URL and PEM format. certificate: str = betterproto.string_field(5)
class InitializeOperatorLogicV2(betterproto.Message): code: str = betterproto.string_field(1) is_source: bool = betterproto.bool_field(2) output_schema: Dict[str, str] = betterproto.map_field(3, betterproto.TYPE_STRING, betterproto.TYPE_STRING)
class ClusterLoadAssignment(betterproto.Message): """ Each route from RDS will map to a single cluster or traffic split across clusters using weights expressed in the RDS WeightedCluster. With EDS, each cluster is treated independently from a LB perspective, with LB taking place between the Localities within a cluster and at a finer granularity between the hosts within a locality. The percentage of traffic for each endpoint is determined by both its load_balancing_weight, and the load_balancing_weight of its locality. First, a locality will be selected, then an endpoint within that locality will be chose based on its weight. [#next-free-field: 6] """ # Name of the cluster. This will be the :ref:`service_name <envoy_v3_api_fiel # d_config.cluster.v3.Cluster.EdsClusterConfig.service_name>` value if # specified in the cluster :ref:`EdsClusterConfig # <envoy_v3_api_msg_config.cluster.v3.Cluster.EdsClusterConfig>`. cluster_name: str = betterproto.string_field(1) # List of endpoints to load balance to. endpoints: List["LocalityLbEndpoints"] = betterproto.message_field(2) # Map of named endpoints that can be referenced in LocalityLbEndpoints. # [#not-implemented-hide:] named_endpoints: Dict[str, "Endpoint"] = betterproto.map_field( 5, betterproto.TYPE_STRING, betterproto.TYPE_MESSAGE) # Load balancing policy settings. policy: "ClusterLoadAssignmentPolicy" = betterproto.message_field(4)
class GreenHexadecimal(betterproto.Message): hexdict: Dict[int, str] = betterproto.map_field( 1, betterproto.TYPE_INT32, betterproto.TYPE_STRING ) def __post_init__(self) -> None: super().__post_init__()
class MatcherMatcherTreeMatchMap(betterproto.Message): """ A map of configured matchers. Used to allow using a map within a oneof. """ map: Dict[str, "MatcherOnMatch"] = betterproto.map_field( 1, betterproto.TYPE_STRING, betterproto.TYPE_MESSAGE)
class MarkerRecordedEventAttributes(betterproto.Message): marker_name: str = betterproto.string_field(1) details: Dict[str, v1common.Payloads] = betterproto.map_field( 2, betterproto.TYPE_STRING, betterproto.TYPE_MESSAGE) workflow_task_completed_event_id: int = betterproto.int64_field(3) header: v1common.Header = betterproto.message_field(4) failure: v1failure.Failure = betterproto.message_field(5)
class OcnRecord(betterproto.Message): ocn_record: Dict[str, int] = betterproto.map_field(1, betterproto.TYPE_STRING, betterproto.TYPE_INT32) def __post_init__(self) -> None: super().__post_init__()
class Rbac(betterproto.Message): """ Role Based Access Control (RBAC) provides service-level and method-level access control for a service. RBAC policies are additive. The policies are examined in order. A request is allowed once a matching policy is found (suppose the `action` is ALLOW). Here is an example of RBAC configuration. It has two policies: * Service account "cluster.local/ns/default/sa/admin" has full access to the service, and so does "cluster.local/ns/default/sa/superuser". * Any user can read ("GET") the service at paths with prefix "/products", so long as the destination port is either 80 or 443. .. code-block:: yaml action: ALLOW policies: "service-admin": permissions: - any: true principals: - authenticated: principal_name: exact: "cluster.local/ns/default/sa/admin" - authenticated: principal_name: exact: "cluster.local/ns/default/sa/superuser" "product-viewer": permissions: - and_rules: rules: - header: { name: ":method", exact_match: "GET" } - url_path: path: { prefix: "/products" } - or_rules: rules: - destination_port: 80 - destination_port: 443 principals: - any: true """ # The action to take if a policy matches. The request is allowed if and only # if: * `action` is "ALLOWED" and at least one policy matches * `action` # is "DENY" and none of the policies match action: "RbacAction" = betterproto.enum_field(1) # Maps from policy name to policy. A match occurs when at least one policy # matches the request. policies: Dict[str, "Policy"] = betterproto.map_field(2, betterproto.TYPE_STRING, betterproto.TYPE_MESSAGE)
class RecordMarkerCommandAttributes(betterproto.Message): marker_name: str = betterproto.string_field(1) details: Dict[str, v1common.Payloads] = betterproto.map_field( 2, betterproto.TYPE_STRING, betterproto.TYPE_MESSAGE ) header: v1common.Header = betterproto.message_field(3) failure: v1failure.Failure = betterproto.message_field(4)
class PathValues(betterproto.Message): """PathValues is a set of path/value pairs""" # 'values' is a set of change values to apply values: Dict[str, "PathValue"] = betterproto.map_field( 4, betterproto.TYPE_STRING, betterproto.TYPE_MESSAGE )
class ConfigModel(betterproto.Message): name: str = betterproto.string_field(1) version: str = betterproto.string_field(2) modules: List["ConfigModule"] = betterproto.message_field(3) files: Dict[str, str] = betterproto.map_field(4, betterproto.TYPE_STRING, betterproto.TYPE_STRING) get_state_mode: "GetStateMode" = betterproto.enum_field(5)
class Ue(betterproto.Message): """UE entity is merely an ID and a map of arbitrary aspects.""" id: str = betterproto.string_field(1) # Map of aspects as typed values aspects: Dict[str, "betterproto_lib_google_protobuf.Any"] = betterproto.map_field( 2, betterproto.TYPE_STRING, betterproto.TYPE_MESSAGE )
class GetResponse(betterproto.Message): sessions: Dict[str, "Session"] = betterproto.map_field(1, betterproto.TYPE_STRING, betterproto.TYPE_MESSAGE) def __post_init__(self) -> None: super().__post_init__()
class Session(betterproto.Message): session_id: str = betterproto.string_field(1) alive: bool = betterproto.bool_field(2) operations: Dict[str, "Operation"] = betterproto.map_field( 3, betterproto.TYPE_STRING, betterproto.TYPE_MESSAGE) def __post_init__(self) -> None: super().__post_init__()
class Ue(betterproto.Message): id: str = betterproto.string_field(1) aspects: Dict[ str, "betterproto_lib_google_protobuf.Any"] = betterproto.map_field( 2, betterproto.TYPE_STRING, betterproto.TYPE_MESSAGE) def __post_init__(self) -> None: super().__post_init__()
class Account(betterproto.Message): address: bytes = betterproto.bytes_field(1) balance: int = betterproto.uint64_field(2) code: bytes = betterproto.bytes_field(3) keys: List["AccountKey"] = betterproto.message_field(4) contracts: Dict[str, bytes] = betterproto.map_field(5, betterproto.TYPE_STRING, betterproto.TYPE_BYTES)
class E2Node(betterproto.Message): """Aspect for tracking device mastership""" service_models: Dict[str, "ServiceModelInfo"] = betterproto.map_field( 1, betterproto.TYPE_STRING, betterproto.TYPE_MESSAGE) def __post_init__(self) -> None: super().__post_init__()
class MarketSnapshotMessage(betterproto.Message): """Update containing information on books for every asset""" # map from asset code to book update for that code books: Dict[str, "MarketSnapshotMessageBook"] = betterproto.map_field( 1, betterproto.TYPE_STRING, betterproto.TYPE_MESSAGE) # The time at which the market info was found timestamp: str = betterproto.string_field(2)
class MethodMatch(betterproto.Message): # The name of the method. name: "_____type_matcher_v3__.StringMatcher" = betterproto.message_field(1) # Method parameter definition. The key is the parameter index, starting from # 0. The value is the parameter matching type. params_match: Dict[ int, "MethodMatchParameterMatchSpecifier"] = betterproto.map_field( 2, betterproto.TYPE_UINT32, betterproto.TYPE_MESSAGE)
class E2Node(betterproto.Message): """ E2Node aspect; expected value type of "E2NODE" aspect and expected on entities of "E2NODE" kind """ service_models: Dict[str, "ServiceModelInfo"] = betterproto.map_field( 1, betterproto.TYPE_STRING, betterproto.TYPE_MESSAGE)
class Object(betterproto.Message): id: str = betterproto.string_field(1) revision: int = betterproto.uint64_field(2) attributes: Dict[str, str] = betterproto.map_field( 3, betterproto.TYPE_STRING, betterproto.TYPE_STRING ) def __post_init__(self) -> None: super().__post_init__()
class MeasurementParams(betterproto.Message): time_to_trigger: int = betterproto.int32_field(1) frequency_offset: int = betterproto.int32_field(2) pcell_individual_offset: int = betterproto.int32_field(3) ncell_individual_offsets: Dict[int, int] = betterproto.map_field( 4, betterproto.TYPE_UINT64, betterproto.TYPE_INT32 ) hysteresis: int = betterproto.int32_field(5) event_a3_params: "EventA3Params" = betterproto.message_field(6)
class ConfigModel(betterproto.Message): name: str = betterproto.string_field(1) version: str = betterproto.string_field(2) modules: List["ConfigModule"] = betterproto.message_field(3) files: Dict[str, str] = betterproto.map_field(4, betterproto.TYPE_STRING, betterproto.TYPE_STRING) def __post_init__(self) -> None: super().__post_init__()
class Kind(betterproto.Message): name: str = betterproto.string_field(1) # Map of attributes and their default values for this Kind attributes: Dict[str, str] = betterproto.map_field( 2, betterproto.TYPE_STRING, betterproto.TYPE_STRING ) def __post_init__(self) -> None: super().__post_init__()
class AdHoc(betterproto.Message): """Aspect for ad-hoc properties""" properties: Dict[str, str] = betterproto.map_field(1, betterproto.TYPE_STRING, betterproto.TYPE_STRING) def __post_init__(self) -> None: super().__post_init__()