Skip to content

Commit 9fa904d

Browse files
docs: Minor formatting (#88)
* chore: Update gapic-generator-python to v1.11.4 PiperOrigin-RevId: 547897126 Source-Link: googleapis/googleapis@c09c75e Source-Link: googleapis/googleapis-gen@45e0ec4 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNDVlMGVjNDM0MzUxN2NkMGFhNjZiNWNhNjQyMzJhMTgwMmMyZjk0NSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * docs: Minor formatting docs: Add clarifications for fields in `RouteAction` message PiperOrigin-RevId: 553528820 Source-Link: googleapis/googleapis@0d9d568 Source-Link: googleapis/googleapis-gen@104e9c5 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMTA0ZTljNTkwMmY2NGFmZDc1YmRiNjUwN2E3NzAyZWFhN2I0MzgwMyJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * fix docs build. Fix proposed upstream here: googleapis/gapic-generator-python#1721 --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com>
1 parent d7894ef commit 9fa904d

File tree

8 files changed

+72
-52
lines changed

8 files changed

+72
-52
lines changed

packages/google-cloud-network-services/google/cloud/network_services_v1/services/network_services/async_client.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3085,8 +3085,7 @@ async def sample_create_tcp_route():
30853085
should not be set.
30863086
tcp_route_id (:class:`str`):
30873087
Required. Short name of the TcpRoute
3088-
resource to be created. E.g. TODO(Add an
3089-
example).
3088+
resource to be created.
30903089
30913090
This corresponds to the ``tcp_route_id`` field
30923091
on the ``request`` instance; if ``request`` is provided, this
@@ -3704,8 +3703,7 @@ async def sample_create_tls_route():
37043703
should not be set.
37053704
tls_route_id (:class:`str`):
37063705
Required. Short name of the TlsRoute
3707-
resource to be created. E.g. TODO(Add an
3708-
example).
3706+
resource to be created.
37093707
37103708
This corresponds to the ``tls_route_id`` field
37113709
on the ``request`` instance; if ``request`` is provided, this

packages/google-cloud-network-services/google/cloud/network_services_v1/services/network_services/client.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3520,8 +3520,7 @@ def sample_create_tcp_route():
35203520
should not be set.
35213521
tcp_route_id (str):
35223522
Required. Short name of the TcpRoute
3523-
resource to be created. E.g. TODO(Add an
3524-
example).
3523+
resource to be created.
35253524
35263525
This corresponds to the ``tcp_route_id`` field
35273526
on the ``request`` instance; if ``request`` is provided, this
@@ -4139,8 +4138,7 @@ def sample_create_tls_route():
41394138
should not be set.
41404139
tls_route_id (str):
41414140
Required. Short name of the TlsRoute
4142-
resource to be created. E.g. TODO(Add an
4143-
example).
4141+
resource to be created.
41444142
41454143
This corresponds to the ``tls_route_id`` field
41464144
on the ``request`` instance; if ``request`` is provided, this

packages/google-cloud-network-services/google/cloud/network_services_v1/types/grpc_route.py

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,14 @@ class GrpcRoute(proto.Message):
7070
with 2 notable exceptions:
7171
7272
- IPs are not allowed.
73-
- A hostname may be prefixed with a wildcard label (\*.).
74-
The wildcard label must appear by itself as the first
75-
label.
73+
- A hostname may be prefixed with a wildcard label
74+
(``*.``). The wildcard label must appear by itself as the
75+
first label.
7676
7777
Hostname can be "precise" which is a domain name without the
78-
terminating dot of a network host (e.g. "foo.example.com")
78+
terminating dot of a network host (e.g. ``foo.example.com``)
7979
or "wildcard", which is a domain name prefixed with a single
80-
wildcard label (e.g. \*.example.com).
80+
wildcard label (e.g. ``*.example.com``).
8181
8282
Note that as per RFC1035 and RFC1123, a label must consist
8383
of lower case alphanumeric characters or '-', and must start
@@ -90,9 +90,10 @@ class GrpcRoute(proto.Message):
9090
rejected.
9191
9292
For example, while it is acceptable for routes for the
93-
hostnames "\*.foo.bar.com" and "\*.bar.com" to be associated
94-
with the same route, it is not possible to associate two
95-
routes both with "\*.bar.com" or both with "bar.com".
93+
hostnames ``*.foo.bar.com`` and ``*.bar.com`` to be
94+
associated with the same route, it is not possible to
95+
associate two routes both with ``*.bar.com`` or both with
96+
``bar.com``.
9697
9798
If a port is specified, then gRPC clients must use the
9899
channel URI with the port to match this rule (i.e.
@@ -272,10 +273,13 @@ class Destination(proto.Message):
272273
Optional. Specifies the proportion of
273274
requests forwarded to the backend referenced by
274275
the serviceName field. This is computed as:
275-
weight/Sum(weights in this destination list).
276-
For non-zero values, there may be some epsilon
277-
from the exact proportion defined here depending
278-
on the precision an implementation supports.
276+
277+
- weight/Sum(weights in this destination list).
278+
For non-zero values, there may be some epsilon
279+
from the exact proportion defined here
280+
depending on the precision an implementation
281+
supports.
282+
279283
If only one serviceName is specified and it has
280284
a weight greater than 0, 100% of the traffic is
281285
forwarded to that backend.

packages/google-cloud-network-services/google/cloud/network_services_v1/types/http_route.py

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,14 @@ class HttpRoute(proto.Message):
6464
exception that:
6565
6666
- IPs are not allowed.
67-
- A hostname may be prefixed with a wildcard label (\*.).
68-
The wildcard label must appear by itself as the first
69-
label.
67+
- A hostname may be prefixed with a wildcard label
68+
(``*.``). The wildcard label must appear by itself as the
69+
first label.
7070
7171
Hostname can be "precise" which is a domain name without the
72-
terminating dot of a network host (e.g. "foo.example.com")
72+
terminating dot of a network host (e.g. ``foo.example.com``)
7373
or "wildcard", which is a domain name prefixed with a single
74-
wildcard label (e.g. \*.example.com).
74+
wildcard label (e.g. ``*.example.com``).
7575
7676
Note that as per RFC1035 and RFC1123, a label must consist
7777
of lower case alphanumeric characters or '-', and must start
@@ -84,10 +84,10 @@ class HttpRoute(proto.Message):
8484
rejected.
8585
8686
For example, while it is acceptable for routes for the
87-
hostnames "\*.foo.bar.com" and "\*.bar.com" to be associated
88-
with the same Mesh (or Gateways under the same scope), it is
89-
not possible to associate two routes both with "\*.bar.com"
90-
or both with "bar.com".
87+
hostnames ``*.foo.bar.com`` and ``*.bar.com`` to be
88+
associated with the same Mesh (or Gateways under the same
89+
scope), it is not possible to associate two routes both with
90+
``*.bar.com`` or both with ``bar.com``.
9191
meshes (MutableSequence[str]):
9292
Optional. Meshes defines a list of meshes this HttpRoute is
9393
attached to, as one of the routing rules to route the
@@ -382,10 +382,13 @@ class Destination(proto.Message):
382382
Specifies the proportion of requests
383383
forwarded to the backend referenced by the
384384
serviceName field. This is computed as:
385-
weight/Sum(weights in this destination list).
386-
For non-zero values, there may be some epsilon
387-
from the exact proportion defined here depending
388-
on the precision an implementation supports.
385+
386+
- weight/Sum(weights in this destination list).
387+
For non-zero values, there may be some epsilon
388+
from the exact proportion defined here
389+
depending on the precision an implementation
390+
supports.
391+
389392
If only one serviceName is specified and it has
390393
a weight greater than 0, 100% of the traffic is
391394
forwarded to that backend.
@@ -805,11 +808,18 @@ class RouteAction(proto.Message):
805808
request_header_modifier (google.cloud.network_services_v1.types.HttpRoute.HeaderModifier):
806809
The specification for modifying the headers
807810
of a matching request prior to delivery of the
808-
request to the destination.
811+
request to the destination. If HeaderModifiers
812+
are set on both the Destination and the
813+
RouteAction, they will be merged. Conflicts
814+
between the two will not be resolved on the
815+
configuration.
809816
response_header_modifier (google.cloud.network_services_v1.types.HttpRoute.HeaderModifier):
810817
The specification for modifying the headers
811818
of a response prior to sending the response back
812-
to the client.
819+
to the client. If HeaderModifiers are set on
820+
both the Destination and the RouteAction, they
821+
will be merged. Conflicts between the two will
822+
not be resolved on the configuration.
813823
url_rewrite (google.cloud.network_services_v1.types.HttpRoute.URLRewrite):
814824
The specification for rewrite URL before
815825
forwarding requests to the destination.

packages/google-cloud-network-services/google/cloud/network_services_v1/types/mesh.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ class Mesh(proto.Message):
6868
traffic to be redirected to this port regardless
6969
of its actual ip:port destination. If unset, a
7070
port '15001' is used as the interception port.
71-
This will is applicable only for sidecar proxy
71+
This is applicable only for sidecar proxy
7272
deployments.
7373
"""
7474

packages/google-cloud-network-services/google/cloud/network_services_v1/types/service_binding.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class ServiceBinding(proto.Message):
4141
name (str):
4242
Required. Name of the ServiceBinding resource. It matches
4343
pattern
44-
``projects/*/locations/global/serviceBindings/service_binding_name>``.
44+
``projects/*/locations/global/serviceBindings/service_binding_name``.
4545
description (str):
4646
Optional. A free-text description of the
4747
resource. Max length 1024 characters.

packages/google-cloud-network-services/google/cloud/network_services_v1/types/tcp_route.py

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ class RouteMatch(proto.Message):
124124
matches a single IP address). Only IPV4
125125
addresses are supported.
126126
Examples:
127+
127128
"10.0.0.1" - matches against this exact IP
128129
address. "10.0.0.0/8" - matches against any IP
129130
address within the 10.0.0.0 subnet and
@@ -151,12 +152,15 @@ class RouteAction(proto.Message):
151152
destinations (MutableSequence[google.cloud.network_services_v1.types.TcpRoute.RouteDestination]):
152153
Optional. The destination services to which
153154
traffic should be forwarded. At least one
154-
destination service is required.
155+
destination service is required. Only one of
156+
route destination or original destination can be
157+
set.
155158
original_destination (bool):
156159
Optional. If true, Router will use the
157160
destination IP and port of the original
158161
connection as the destination of the request.
159-
Default is false.
162+
Default is false. Only one of route destinations
163+
or original destination can be set.
160164
"""
161165

162166
destinations: MutableSequence[
@@ -182,10 +186,13 @@ class RouteDestination(proto.Message):
182186
Optional. Specifies the proportion of
183187
requests forwarded to the backend referenced by
184188
the serviceName field. This is computed as:
185-
weight/Sum(weights in this destination list).
186-
For non-zero values, there may be some epsilon
187-
from the exact proportion defined here depending
188-
on the precision an implementation supports.
189+
190+
- weight/Sum(weights in this destination list).
191+
For non-zero values, there may be some epsilon
192+
from the exact proportion defined here
193+
depending on the precision an implementation
194+
supports.
195+
189196
If only one serviceName is specified and it has
190197
a weight greater than 0, 100% of the traffic is
191198
forwarded to that backend.
@@ -332,7 +339,7 @@ class CreateTcpRouteRequest(proto.Message):
332339
the format ``projects/*/locations/global``.
333340
tcp_route_id (str):
334341
Required. Short name of the TcpRoute resource
335-
to be created. E.g. TODO(Add an example).
342+
to be created.
336343
tcp_route (google.cloud.network_services_v1.types.TcpRoute):
337344
Required. TcpRoute resource to be created.
338345
"""

packages/google-cloud-network-services/google/cloud/network_services_v1/types/tls_route.py

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,12 @@ class RouteMatch(proto.Message):
114114
sni_host (MutableSequence[str]):
115115
Optional. SNI (server name indicator) to match against. SNI
116116
will be matched against all wildcard domains, i.e.
117-
www.example.com will be first matched against
118-
www.example.com, then \*.example.com, then \*.com. Partial
119-
wildcards are not supported, and values like \*w.example.com
120-
are invalid. At least one of sni_host and alpn is required.
121-
Up to 5 sni hosts across all matches can be set.
117+
``www.example.com`` will be first matched against
118+
``www.example.com``, then ``*.example.com``, then ``*.com.``
119+
Partial wildcards are not supported, and values like
120+
\*w.example.com are invalid. At least one of sni_host and
121+
alpn is required. Up to 5 sni hosts across all matches can
122+
be set.
122123
alpn (MutableSequence[str]):
123124
Optional. ALPN (Application-Layer Protocol Negotiation) to
124125
match against. Examples: "http/1.1", "h2". At least one of
@@ -164,8 +165,10 @@ class RouteDestination(proto.Message):
164165
weight (int):
165166
Optional. Specifies the proportion of requests forwareded to
166167
the backend referenced by the service_name field. This is
167-
computed as: weight/Sum(weights in destinations) Weights in
168-
all destinations does not need to sum up to 100.
168+
computed as:
169+
170+
- weight/Sum(weights in destinations) Weights in all
171+
destinations does not need to sum up to 100.
169172
"""
170173

171174
service_name: str = proto.Field(
@@ -298,7 +301,7 @@ class CreateTlsRouteRequest(proto.Message):
298301
the format ``projects/*/locations/global``.
299302
tls_route_id (str):
300303
Required. Short name of the TlsRoute resource
301-
to be created. E.g. TODO(Add an example).
304+
to be created.
302305
tls_route (google.cloud.network_services_v1.types.TlsRoute):
303306
Required. TlsRoute resource to be created.
304307
"""

0 commit comments

Comments
 (0)