Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions librarian.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ version: v0.31.0
repo: googleapis/google-cloud-python
sources:
googleapis:
commit: ede8b2e652dc3716b544205ef772b39b86e3d2cb
sha256: 8f7c17af87f6215012010dddaffec3aa5df5668bf0def727577bc0bc6b698193
commit: b8486a2f44f15dc578a9dc1e17b144253079d5c1
sha256: 12411ca5cb6c70d7c873d7058c5182a8d23fa88af8d984b0e73b1c3ad1d83766
tools:
pip:
- name: black
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ class EndpointPolicy(proto.Message):
authentication is disabled(open) for this
endpoint.
client_tls_policy (str):
Optional. A URL referring to a ClientTlsPolicy resource.
Optional. Deprecated: This field is not used and is a no-op.
A URL referring to a ClientTlsPolicy resource.
ClientTlsPolicy can be set to specify the authentication for
traffic from the proxy to the actual endpoints. More
specifically, it is applied to the outgoing traffic from the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
from google.cloud.support_v2.types.support_event_subscription_service import (
CreateSupportEventSubscriptionRequest,
DeleteSupportEventSubscriptionRequest,
ExpungeSupportEventSubscriptionRequest,
GetSupportEventSubscriptionRequest,
ListSupportEventSubscriptionsRequest,
ListSupportEventSubscriptionsResponse,
Expand Down Expand Up @@ -116,6 +117,7 @@
"SupportEventSubscription",
"CreateSupportEventSubscriptionRequest",
"DeleteSupportEventSubscriptionRequest",
"ExpungeSupportEventSubscriptionRequest",
"GetSupportEventSubscriptionRequest",
"ListSupportEventSubscriptionsRequest",
"ListSupportEventSubscriptionsResponse",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
from .types.support_event_subscription_service import (
CreateSupportEventSubscriptionRequest,
DeleteSupportEventSubscriptionRequest,
ExpungeSupportEventSubscriptionRequest,
GetSupportEventSubscriptionRequest,
ListSupportEventSubscriptionsRequest,
ListSupportEventSubscriptionsResponse,
Expand Down Expand Up @@ -200,6 +201,7 @@ def _get_version(dependency_name):
"DeleteSupportEventSubscriptionRequest",
"EscalateCaseRequest",
"Escalation",
"ExpungeSupportEventSubscriptionRequest",
"GetAttachmentRequest",
"GetCaseRequest",
"GetCommentRequest",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,11 @@
"delete_support_event_subscription"
]
},
"ExpungeSupportEventSubscription": {
"methods": [
"expunge_support_event_subscription"
]
},
"GetSupportEventSubscription": {
"methods": [
"get_support_event_subscription"
Expand Down Expand Up @@ -307,6 +312,11 @@
"delete_support_event_subscription"
]
},
"ExpungeSupportEventSubscription": {
"methods": [
"expunge_support_event_subscription"
]
},
"GetSupportEventSubscription": {
"methods": [
"get_support_event_subscription"
Expand Down Expand Up @@ -342,6 +352,11 @@
"delete_support_event_subscription"
]
},
"ExpungeSupportEventSubscription": {
"methods": [
"expunge_support_event_subscription"
]
},
"GetSupportEventSubscription": {
"methods": [
"get_support_event_subscription"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,8 @@ async def list_support_event_subscriptions(
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
) -> pagers.ListSupportEventSubscriptionsAsyncPager:
r"""Lists support event subscriptions.
r"""Lists support event subscriptions for an
organization.

.. code-block:: python

Expand Down Expand Up @@ -1081,6 +1082,146 @@ async def sample_undelete_support_event_subscription():
# Done; return the response.
return response

async def expunge_support_event_subscription(
self,
request: Optional[
Union[
support_event_subscription_service.ExpungeSupportEventSubscriptionRequest,
dict,
]
] = None,
*,
name: Optional[str] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
) -> None:
r"""Expunges a support event subscription.

EXAMPLES:

cURL:

.. code:: shell

support_event_subscription="organizations/123456789/supportEventSubscriptions/abcdef123456"
curl \
--request POST \
--header "Authorization: Bearer $(gcloud auth print-access-token)" \
"https://cloudsupport.googleapis.com/v2/$support_event_subscription:expunge"

Python:

.. code:: python

import googleapiclient.discovery

api_version = "v2"
supportApiService = googleapiclient.discovery.build(
serviceName="cloudsupport",
version=api_version,
discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}",
)

request = supportApiService.supportEventSubscriptions().expunge(
name="organizations/123456789/supportEventSubscriptions/abcdef123456"
)
print(request.execute())

.. code-block:: python

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import support_v2

async def sample_expunge_support_event_subscription():
# Create a client
client = support_v2.SupportEventSubscriptionServiceAsyncClient()

# Initialize request argument(s)
request = support_v2.ExpungeSupportEventSubscriptionRequest(
name="name_value",
)

# Make the request
await client.expunge_support_event_subscription(request=request)

Args:
request (Optional[Union[google.cloud.support_v2.types.ExpungeSupportEventSubscriptionRequest, dict]]):
The request object. Request message for
ExpungeSupportEventSubscription.
name (:class:`str`):
Required. The name of the support event subscription to
expunge. Format:
organizations/{organization_id}/supportEventSubscriptions/{subscription_id}

This corresponds to the ``name`` field
on the ``request`` instance; if ``request`` is provided, this
should not be set.
retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any,
should be retried.
timeout (float): The timeout for this request.
metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
sent along with the request as metadata. Normally, each value must be of type `str`,
but for metadata keys ending with the suffix `-bin`, the corresponding values must
be of type `bytes`.
"""
# Create or coerce a protobuf request object.
# - Quick check: If we got a request object, we should *not* have
# gotten any keyword arguments that map to the request.
flattened_params = [name]
has_flattened_params = (
len([param for param in flattened_params if param is not None]) > 0
)
if request is not None and has_flattened_params:
raise ValueError(
"If the `request` argument is set, then none of "
"the individual field arguments should be set."
)

# - Use the request object if provided (there's no risk of modifying the input as
# there are no flattened fields), or create one.
if not isinstance(
request,
support_event_subscription_service.ExpungeSupportEventSubscriptionRequest,
):
request = support_event_subscription_service.ExpungeSupportEventSubscriptionRequest(
request
)

# If we have keyword arguments corresponding to fields on the
# request, apply these.
if name is not None:
request.name = name

# Wrap the RPC method; this adds retry and timeout information,
# and friendly error handling.
rpc = self._client._transport._wrapped_methods[
self._client._transport.expunge_support_event_subscription
]

# Certain fields should be provided within the metadata header;
# add these here.
metadata = tuple(metadata) + (
gapic_v1.routing_header.to_grpc_metadata((("name", request.name),)),
)

# Validate the universe domain.
self._client._validate_universe_domain()

# Send the request.
await rpc(
request,
retry=retry,
timeout=timeout,
metadata=metadata,
)

async def __aenter__(self) -> "SupportEventSubscriptionServiceAsyncClient":
return self

Expand Down
Loading
Loading