Skip to content

Commit

Permalink
fix: Updated resource patterns to comply with https://google.aip.dev/…
Browse files Browse the repository at this point in the history
…123#annotating-resource-types (#17)


PiperOrigin-RevId: 438230444

Source-Link: googleapis/googleapis@1821985

Source-Link: googleapis/googleapis-gen@30cb53f
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMzBjYjUzZjk5ZDI1MmIzNjZhYTgzN2IzOGNmOWQxZjhiMjgzZWM0YSJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] authored Mar 30, 2022
1 parent 29aae4b commit bd30101
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -291,20 +291,20 @@ def parse_dns_authorization_path(path: str) -> Dict[str, str]:
def target_https_proxies_path(
project: str,
location: str,
targetHttpsProxy: str,
target_https_proxy: str,
) -> str:
"""Returns a fully-qualified target_https_proxies string."""
return "projects/{project}/locations/{location}/targetHttpsProxies/{targetHttpsProxy}".format(
return "projects/{project}/locations/{location}/targetHttpsProxies/{target_https_proxy}".format(
project=project,
location=location,
targetHttpsProxy=targetHttpsProxy,
target_https_proxy=target_https_proxy,
)

@staticmethod
def parse_target_https_proxies_path(path: str) -> Dict[str, str]:
"""Parses a target_https_proxies path into its component segments."""
m = re.match(
r"^projects/(?P<project>.+?)/locations/(?P<location>.+?)/targetHttpsProxies/(?P<targetHttpsProxy>.+?)$",
r"^projects/(?P<project>.+?)/locations/(?P<location>.+?)/targetHttpsProxies/(?P<target_https_proxy>.+?)$",
path,
)
return m.groupdict() if m else {}
Expand All @@ -313,20 +313,20 @@ def parse_target_https_proxies_path(path: str) -> Dict[str, str]:
def target_ssl_proxies_path(
project: str,
location: str,
targetSslProxy: str,
target_ssl_proxy: str,
) -> str:
"""Returns a fully-qualified target_ssl_proxies string."""
return "projects/{project}/locations/{location}/targetSslProxies/{targetSslProxy}".format(
return "projects/{project}/locations/{location}/targetSslProxies/{target_ssl_proxy}".format(
project=project,
location=location,
targetSslProxy=targetSslProxy,
target_ssl_proxy=target_ssl_proxy,
)

@staticmethod
def parse_target_ssl_proxies_path(path: str) -> Dict[str, str]:
"""Parses a target_ssl_proxies path into its component segments."""
m = re.match(
r"^projects/(?P<project>.+?)/locations/(?P<location>.+?)/targetSslProxies/(?P<targetSslProxy>.+?)$",
r"^projects/(?P<project>.+?)/locations/(?P<location>.+?)/targetSslProxies/(?P<target_ssl_proxy>.+?)$",
path,
)
return m.groupdict() if m else {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -849,7 +849,10 @@ class Certificate(proto.Message):
san_dnsnames (Sequence[str]):
Output only. The list of Subject Alternative
Names of dnsName type defined in the certificate
(see RFC 5280 4.2.1.6)
(see RFC 5280 4.2.1.6). Managed certificates
that haven't been provisioned yet have this
field populated with a value of the
managed.domains field.
pem_certificate (str):
Output only. The PEM-encoded certificate
chain.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7099,14 +7099,14 @@ def test_parse_dns_authorization_path():
def test_target_https_proxies_path():
project = "whelk"
location = "octopus"
targetHttpsProxy = "oyster"
expected = "projects/{project}/locations/{location}/targetHttpsProxies/{targetHttpsProxy}".format(
target_https_proxy = "oyster"
expected = "projects/{project}/locations/{location}/targetHttpsProxies/{target_https_proxy}".format(
project=project,
location=location,
targetHttpsProxy=targetHttpsProxy,
target_https_proxy=target_https_proxy,
)
actual = CertificateManagerClient.target_https_proxies_path(
project, location, targetHttpsProxy
project, location, target_https_proxy
)
assert expected == actual

Expand All @@ -7115,7 +7115,7 @@ def test_parse_target_https_proxies_path():
expected = {
"project": "nudibranch",
"location": "cuttlefish",
"targetHttpsProxy": "mussel",
"target_https_proxy": "mussel",
}
path = CertificateManagerClient.target_https_proxies_path(**expected)

Expand All @@ -7127,14 +7127,14 @@ def test_parse_target_https_proxies_path():
def test_target_ssl_proxies_path():
project = "winkle"
location = "nautilus"
targetSslProxy = "scallop"
expected = "projects/{project}/locations/{location}/targetSslProxies/{targetSslProxy}".format(
target_ssl_proxy = "scallop"
expected = "projects/{project}/locations/{location}/targetSslProxies/{target_ssl_proxy}".format(
project=project,
location=location,
targetSslProxy=targetSslProxy,
target_ssl_proxy=target_ssl_proxy,
)
actual = CertificateManagerClient.target_ssl_proxies_path(
project, location, targetSslProxy
project, location, target_ssl_proxy
)
assert expected == actual

Expand All @@ -7143,7 +7143,7 @@ def test_parse_target_ssl_proxies_path():
expected = {
"project": "abalone",
"location": "squid",
"targetSslProxy": "clam",
"target_ssl_proxy": "clam",
}
path = CertificateManagerClient.target_ssl_proxies_path(**expected)

Expand Down

0 comments on commit bd30101

Please sign in to comment.