Skip to content
This repository has been archived by the owner on Feb 13, 2024. It is now read-only.

Commit

Permalink
fix!: removed fields from SafeSearchAnnotation message (#356)
Browse files Browse the repository at this point in the history
- [ ] Regenerate this pull request now.

PiperOrigin-RevId: 459858846

Source-Link: googleapis/googleapis@21ef848

Source-Link: googleapis/googleapis-gen@26af3a3
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMjZhZjNhMzg0YmU0MDc3YzVmMDEwMDUyMWEyNjNmZDliZDhmYzdlNyJ9

chore: use gapic-generator-python 1.1.1
PiperOrigin-RevId: 459095142

Source-Link: googleapis/googleapis@4f1be99

Source-Link: googleapis/googleapis-gen@ae686d9
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYWU2ODZkOWNkZTRmYzNlMzZkMGFjMDJlZmI4NjQzYjE1ODkwYzFlZCJ9


PiperOrigin-RevId: 456827138

Source-Link: googleapis/googleapis@23f1a15

Source-Link: googleapis/googleapis-gen@4075a85
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNDA3NWE4NTE0ZjY3NjY5MWVjMTU2Njg4YTViYmYxODNhYTk4OTNjZSJ9

chore: use gapic-generator-python 1.0.0

PiperOrigin-RevId: 451250442

Source-Link: googleapis/googleapis@cca5e81

Source-Link: googleapis/googleapis-gen@0b219da
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMGIyMTlkYTE2MWE4YmRjYzNjNmY3YjJlZmNkODIxMDUxODJhMzBjYSJ9

fix!: Product search related messages and enums changed in an incompatible way
fix!: NormalizedBoundingPoly message removed

PiperOrigin-RevId: 446837836

Source-Link: googleapis/googleapis@4c8ac5c

Source-Link: googleapis/googleapis-gen@8f7398f
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOGY3Mzk4ZmJkNzlhNGZiNmE0YWIxZjZhMTQ1NDc4NTIxMjE5ODZmZCJ9



PiperOrigin-RevId: 446836546

Source-Link: googleapis/googleapis@ca17771

Source-Link: googleapis/googleapis-gen@2957b3d
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMjk1N2IzZDc4ZmMyNDM1NGIzMDg5NjkwN2RlMTM1NDEzYjhlN2E0OSJ9
  • Loading branch information
gcf-owl-bot[bot] authored Jul 18, 2022
1 parent 61a6994 commit 807684d
Show file tree
Hide file tree
Showing 35 changed files with 546 additions and 229 deletions.
42 changes: 0 additions & 42 deletions google/cloud/vision_v1/types/image_annotator.py
Original file line number Diff line number Diff line change
Expand Up @@ -598,24 +598,6 @@ class SafeSearchAnnotation(proto.Message):
strategically covered nudity, lewd or
provocative poses, or close-ups of sensitive
body areas.
adult_confidence (float):
Confidence of adult_score. Range [0, 1]. 0 means not
confident, 1 means very confident.
spoof_confidence (float):
Confidence of spoof_score. Range [0, 1]. 0 means not
confident, 1 means very confident.
medical_confidence (float):
Confidence of medical_score. Range [0, 1]. 0 means not
confident, 1 means very confident.
violence_confidence (float):
Confidence of violence_score. Range [0, 1]. 0 means not
confident, 1 means very confident.
racy_confidence (float):
Confidence of racy_score. Range [0, 1]. 0 means not
confident, 1 means very confident.
nsfw_confidence (float):
Confidence of nsfw_score. Range [0, 1]. 0 means not
confident, 1 means very confident.
"""

adult = proto.Field(
Expand Down Expand Up @@ -643,30 +625,6 @@ class SafeSearchAnnotation(proto.Message):
number=9,
enum="Likelihood",
)
adult_confidence = proto.Field(
proto.FLOAT,
number=16,
)
spoof_confidence = proto.Field(
proto.FLOAT,
number=18,
)
medical_confidence = proto.Field(
proto.FLOAT,
number=20,
)
violence_confidence = proto.Field(
proto.FLOAT,
number=22,
)
racy_confidence = proto.Field(
proto.FLOAT,
number=24,
)
nsfw_confidence = proto.Field(
proto.FLOAT,
number=26,
)


class LatLongRect(proto.Message):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,7 @@ def __init__(
quota_project_id=client_options.quota_project_id,
client_info=client_info,
always_use_jwt_access=True,
api_audience=client_options.api_audience,
)

def batch_annotate_images(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ def __init__(
quota_project_id: Optional[str] = None,
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
always_use_jwt_access: Optional[bool] = False,
api_audience: Optional[str] = None,
**kwargs,
) -> None:
"""Instantiate the transport.
Expand Down Expand Up @@ -84,11 +85,6 @@ def __init__(
be used for service account credentials.
"""

# Save the hostname. Default to port 443 (HTTPS) if none is specified.
if ":" not in host:
host += ":443"
self._host = host

scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES}

# Save the scopes.
Expand All @@ -109,6 +105,11 @@ def __init__(
credentials, _ = google.auth.default(
**scopes_kwargs, quota_project_id=quota_project_id
)
# Don't apply audience if the credentials file passed from user.
if hasattr(credentials, "with_gdch_audience"):
credentials = credentials.with_gdch_audience(
api_audience if api_audience else host
)

# If the credentials are service account credentials, then always try to use self signed JWT.
if (
Expand All @@ -121,6 +122,11 @@ def __init__(
# Save the credentials.
self._credentials = credentials

# Save the hostname. Default to port 443 (HTTPS) if none is specified.
if ":" not in host:
host += ":443"
self._host = host

def _prep_wrapped_messages(self, client_info):
# Precompute the wrapped methods.
self._wrapped_methods = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ def __init__(
quota_project_id: Optional[str] = None,
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
always_use_jwt_access: Optional[bool] = False,
api_audience: Optional[str] = None,
) -> None:
"""Instantiate the transport.
Expand Down Expand Up @@ -156,6 +157,7 @@ def __init__(
quota_project_id=quota_project_id,
client_info=client_info,
always_use_jwt_access=always_use_jwt_access,
api_audience=api_audience,
)

if not self._grpc_channel:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ def __init__(
quota_project_id=None,
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
always_use_jwt_access: Optional[bool] = False,
api_audience: Optional[str] = None,
) -> None:
"""Instantiate the transport.
Expand Down Expand Up @@ -201,6 +202,7 @@ def __init__(
quota_project_id=quota_project_id,
client_info=client_info,
always_use_jwt_access=always_use_jwt_access,
api_audience=api_audience,
)

if not self._grpc_channel:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,7 @@ def __init__(
quota_project_id=client_options.quota_project_id,
client_info=client_info,
always_use_jwt_access=True,
api_audience=client_options.api_audience,
)

def batch_annotate_images(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ def __init__(
quota_project_id: Optional[str] = None,
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
always_use_jwt_access: Optional[bool] = False,
api_audience: Optional[str] = None,
**kwargs,
) -> None:
"""Instantiate the transport.
Expand Down Expand Up @@ -86,11 +87,6 @@ def __init__(
be used for service account credentials.
"""

# Save the hostname. Default to port 443 (HTTPS) if none is specified.
if ":" not in host:
host += ":443"
self._host = host

scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES}

# Save the scopes.
Expand All @@ -111,6 +107,11 @@ def __init__(
credentials, _ = google.auth.default(
**scopes_kwargs, quota_project_id=quota_project_id
)
# Don't apply audience if the credentials file passed from user.
if hasattr(credentials, "with_gdch_audience"):
credentials = credentials.with_gdch_audience(
api_audience if api_audience else host
)

# If the credentials are service account credentials, then always try to use self signed JWT.
if (
Expand All @@ -123,6 +124,11 @@ def __init__(
# Save the credentials.
self._credentials = credentials

# Save the hostname. Default to port 443 (HTTPS) if none is specified.
if ":" not in host:
host += ":443"
self._host = host

def _prep_wrapped_messages(self, client_info):
# Precompute the wrapped methods.
self._wrapped_methods = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ def __init__(
quota_project_id: Optional[str] = None,
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
always_use_jwt_access: Optional[bool] = False,
api_audience: Optional[str] = None,
) -> None:
"""Instantiate the transport.
Expand Down Expand Up @@ -159,6 +160,7 @@ def __init__(
quota_project_id=quota_project_id,
client_info=client_info,
always_use_jwt_access=always_use_jwt_access,
api_audience=api_audience,
)

if not self._grpc_channel:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ def __init__(
quota_project_id=None,
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
always_use_jwt_access: Optional[bool] = False,
api_audience: Optional[str] = None,
) -> None:
"""Instantiate the transport.
Expand Down Expand Up @@ -204,6 +205,7 @@ def __init__(
quota_project_id=quota_project_id,
client_info=client_info,
always_use_jwt_access=always_use_jwt_access,
api_audience=api_audience,
)

if not self._grpc_channel:
Expand Down
6 changes: 0 additions & 6 deletions google/cloud/vision_v1p3beta1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
from .services.product_search import ProductSearchAsyncClient

from .types.geometry import BoundingPoly
from .types.geometry import NormalizedBoundingPoly
from .types.geometry import NormalizedVertex
from .types.geometry import Position
from .types.geometry import Vertex
Expand Down Expand Up @@ -64,8 +63,6 @@
from .types.image_annotator import Likelihood
from .types.product_search import ProductSearchParams
from .types.product_search import ProductSearchResults
from .types.product_search import ProductSearchCategory
from .types.product_search import ProductSearchResultsView
from .types.product_search_service import AddProductToProductSetRequest
from .types.product_search_service import BatchOperationMetadata
from .types.product_search_service import CreateProductRequest
Expand Down Expand Up @@ -168,19 +165,16 @@ class ImageAnnotatorClient(VisionHelpers, IacImageAnnotatorClient):
"ListReferenceImagesResponse",
"LocalizedObjectAnnotation",
"LocationInfo",
"NormalizedBoundingPoly",
"NormalizedVertex",
"OperationMetadata",
"OutputConfig",
"Page",
"Paragraph",
"Position",
"Product",
"ProductSearchCategory",
"ProductSearchClient",
"ProductSearchParams",
"ProductSearchResults",
"ProductSearchResultsView",
"ProductSet",
"Property",
"ReferenceImage",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,7 @@ def __init__(
quota_project_id=client_options.quota_project_id,
client_info=client_info,
always_use_jwt_access=True,
api_audience=client_options.api_audience,
)

def batch_annotate_images(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ def __init__(
quota_project_id: Optional[str] = None,
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
always_use_jwt_access: Optional[bool] = False,
api_audience: Optional[str] = None,
**kwargs,
) -> None:
"""Instantiate the transport.
Expand Down Expand Up @@ -86,11 +87,6 @@ def __init__(
be used for service account credentials.
"""

# Save the hostname. Default to port 443 (HTTPS) if none is specified.
if ":" not in host:
host += ":443"
self._host = host

scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES}

# Save the scopes.
Expand All @@ -111,6 +107,11 @@ def __init__(
credentials, _ = google.auth.default(
**scopes_kwargs, quota_project_id=quota_project_id
)
# Don't apply audience if the credentials file passed from user.
if hasattr(credentials, "with_gdch_audience"):
credentials = credentials.with_gdch_audience(
api_audience if api_audience else host
)

# If the credentials are service account credentials, then always try to use self signed JWT.
if (
Expand All @@ -123,6 +124,11 @@ def __init__(
# Save the credentials.
self._credentials = credentials

# Save the hostname. Default to port 443 (HTTPS) if none is specified.
if ":" not in host:
host += ":443"
self._host = host

def _prep_wrapped_messages(self, client_info):
# Precompute the wrapped methods.
self._wrapped_methods = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ def __init__(
quota_project_id: Optional[str] = None,
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
always_use_jwt_access: Optional[bool] = False,
api_audience: Optional[str] = None,
) -> None:
"""Instantiate the transport.
Expand Down Expand Up @@ -159,6 +160,7 @@ def __init__(
quota_project_id=quota_project_id,
client_info=client_info,
always_use_jwt_access=always_use_jwt_access,
api_audience=api_audience,
)

if not self._grpc_channel:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ def __init__(
quota_project_id=None,
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
always_use_jwt_access: Optional[bool] = False,
api_audience: Optional[str] = None,
) -> None:
"""Instantiate the transport.
Expand Down Expand Up @@ -204,6 +205,7 @@ def __init__(
quota_project_id=quota_project_id,
client_info=client_info,
always_use_jwt_access=always_use_jwt_access,
api_audience=api_audience,
)

if not self._grpc_channel:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,7 @@ def __init__(
quota_project_id=client_options.quota_project_id,
client_info=client_info,
always_use_jwt_access=True,
api_audience=client_options.api_audience,
)

def create_product_set(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ def __init__(
quota_project_id: Optional[str] = None,
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
always_use_jwt_access: Optional[bool] = False,
api_audience: Optional[str] = None,
**kwargs,
) -> None:
"""Instantiate the transport.
Expand Down Expand Up @@ -87,11 +88,6 @@ def __init__(
be used for service account credentials.
"""

# Save the hostname. Default to port 443 (HTTPS) if none is specified.
if ":" not in host:
host += ":443"
self._host = host

scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES}

# Save the scopes.
Expand All @@ -112,6 +108,11 @@ def __init__(
credentials, _ = google.auth.default(
**scopes_kwargs, quota_project_id=quota_project_id
)
# Don't apply audience if the credentials file passed from user.
if hasattr(credentials, "with_gdch_audience"):
credentials = credentials.with_gdch_audience(
api_audience if api_audience else host
)

# If the credentials are service account credentials, then always try to use self signed JWT.
if (
Expand All @@ -124,6 +125,11 @@ def __init__(
# Save the credentials.
self._credentials = credentials

# Save the hostname. Default to port 443 (HTTPS) if none is specified.
if ":" not in host:
host += ":443"
self._host = host

def _prep_wrapped_messages(self, client_info):
# Precompute the wrapped methods.
self._wrapped_methods = {
Expand Down
Loading

0 comments on commit 807684d

Please sign in to comment.