Skip to content

Commit

Permalink
chore: use gapic-generator-python 0.63.1 (#160)
Browse files Browse the repository at this point in the history
- [x] Regenerate this pull request now.

docs: add autogenerated code snippets
PiperOrigin-RevId: 426256923

Source-Link: googleapis/googleapis@9ebabfa

Source-Link: googleapis/googleapis-gen@a881752
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYTg4MTc1MjYzZTYwYTFkNDVkM2E0NDc4NDg2NTJiMGY2NzBiMmNiOCJ9

Closes #114
  • Loading branch information
gcf-owl-bot[bot] authored Feb 4, 2022
1 parent 4284310 commit 9ed6af6
Show file tree
Hide file tree
Showing 19 changed files with 1,496 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,24 @@ async def list_approval_requests(
filtered by state (pending, active, dismissed). The
order is reverse chronological.
.. code-block::
from google.cloud import accessapproval_v1
def sample_list_approval_requests():
# Create a client
client = accessapproval_v1.AccessApprovalClient()
# Initialize request argument(s)
request = accessapproval_v1.ListApprovalRequestsMessage(
)
# Make the request
page_result = client.list_approval_requests(request=request)
for response in page_result:
print(response)
Args:
request (Union[google.cloud.accessapproval_v1.types.ListApprovalRequestsMessage, dict]):
The request object. Request to list approval requests.
Expand Down Expand Up @@ -341,6 +359,25 @@ async def get_approval_request(
r"""Gets an approval request. Returns NOT_FOUND if the request does
not exist.
.. code-block::
from google.cloud import accessapproval_v1
def sample_get_approval_request():
# Create a client
client = accessapproval_v1.AccessApprovalClient()
# Initialize request argument(s)
request = accessapproval_v1.GetApprovalRequestMessage(
)
# Make the request
response = client.get_approval_request(request=request)
# Handle response
print(response)
Args:
request (Union[google.cloud.accessapproval_v1.types.GetApprovalRequestMessage, dict]):
The request object. Request to get an approval request.
Expand Down Expand Up @@ -423,6 +460,25 @@ async def approve_approval_request(
FAILED_PRECONDITION if the request exists but is not in a
pending state.
.. code-block::
from google.cloud import accessapproval_v1
def sample_approve_approval_request():
# Create a client
client = accessapproval_v1.AccessApprovalClient()
# Initialize request argument(s)
request = accessapproval_v1.ApproveApprovalRequestMessage(
)
# Make the request
response = client.approve_approval_request(request=request)
# Handle response
print(response)
Args:
request (Union[google.cloud.accessapproval_v1.types.ApproveApprovalRequestMessage, dict]):
The request object. Request to approve an
Expand Down Expand Up @@ -481,6 +537,25 @@ async def dismiss_approval_request(
Returns FAILED_PRECONDITION if the request exists but is not in
a pending state.
.. code-block::
from google.cloud import accessapproval_v1
def sample_dismiss_approval_request():
# Create a client
client = accessapproval_v1.AccessApprovalClient()
# Initialize request argument(s)
request = accessapproval_v1.DismissApprovalRequestMessage(
)
# Make the request
response = client.dismiss_approval_request(request=request)
# Handle response
print(response)
Args:
request (Union[google.cloud.accessapproval_v1.types.DismissApprovalRequestMessage, dict]):
The request object. Request to dismiss an approval
Expand Down Expand Up @@ -532,6 +607,25 @@ async def get_access_approval_settings(
r"""Gets the settings associated with a project, folder,
or organization.
.. code-block::
from google.cloud import accessapproval_v1
def sample_get_access_approval_settings():
# Create a client
client = accessapproval_v1.AccessApprovalClient()
# Initialize request argument(s)
request = accessapproval_v1.GetAccessApprovalSettingsMessage(
)
# Make the request
response = client.get_access_approval_settings(request=request)
# Handle response
print(response)
Args:
request (Union[google.cloud.accessapproval_v1.types.GetAccessApprovalSettingsMessage, dict]):
The request object. Request to get access approval
Expand Down Expand Up @@ -616,6 +710,25 @@ async def update_access_approval_settings(
organization. Settings to update are determined by the value of
field_mask.
.. code-block::
from google.cloud import accessapproval_v1
def sample_update_access_approval_settings():
# Create a client
client = accessapproval_v1.AccessApprovalClient()
# Initialize request argument(s)
request = accessapproval_v1.UpdateAccessApprovalSettingsMessage(
)
# Make the request
response = client.update_access_approval_settings(request=request)
# Handle response
print(response)
Args:
request (Union[google.cloud.accessapproval_v1.types.UpdateAccessApprovalSettingsMessage, dict]):
The request object. Request to update access approval
Expand Down Expand Up @@ -713,6 +826,22 @@ async def delete_access_approval_settings(
still be enabled at this level as the settings are
inherited.
.. code-block::
from google.cloud import accessapproval_v1
def sample_delete_access_approval_settings():
# Create a client
client = accessapproval_v1.AccessApprovalClient()
# Initialize request argument(s)
request = accessapproval_v1.DeleteAccessApprovalSettingsMessage(
)
# Make the request
response = client.delete_access_approval_settings(request=request)
Args:
request (Union[google.cloud.accessapproval_v1.types.DeleteAccessApprovalSettingsMessage, dict]):
The request object. Request to delete access approval
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,25 @@ def list_approval_requests(
filtered by state (pending, active, dismissed). The
order is reverse chronological.
.. code-block::
from google.cloud import accessapproval_v1
def sample_list_approval_requests():
# Create a client
client = accessapproval_v1.AccessApprovalClient()
# Initialize request argument(s)
request = accessapproval_v1.ListApprovalRequestsMessage(
)
# Make the request
page_result = client.list_approval_requests(request=request)
for response in page_result:
print(response)
Args:
request (Union[google.cloud.accessapproval_v1.types.ListApprovalRequestsMessage, dict]):
The request object. Request to list approval requests.
Expand Down Expand Up @@ -515,6 +534,26 @@ def get_approval_request(
r"""Gets an approval request. Returns NOT_FOUND if the request does
not exist.
.. code-block::
from google.cloud import accessapproval_v1
def sample_get_approval_request():
# Create a client
client = accessapproval_v1.AccessApprovalClient()
# Initialize request argument(s)
request = accessapproval_v1.GetApprovalRequestMessage(
)
# Make the request
response = client.get_approval_request(request=request)
# Handle response
print(response)
Args:
request (Union[google.cloud.accessapproval_v1.types.GetApprovalRequestMessage, dict]):
The request object. Request to get an approval request.
Expand Down Expand Up @@ -588,6 +627,26 @@ def approve_approval_request(
FAILED_PRECONDITION if the request exists but is not in a
pending state.
.. code-block::
from google.cloud import accessapproval_v1
def sample_approve_approval_request():
# Create a client
client = accessapproval_v1.AccessApprovalClient()
# Initialize request argument(s)
request = accessapproval_v1.ApproveApprovalRequestMessage(
)
# Make the request
response = client.approve_approval_request(request=request)
# Handle response
print(response)
Args:
request (Union[google.cloud.accessapproval_v1.types.ApproveApprovalRequestMessage, dict]):
The request object. Request to approve an
Expand Down Expand Up @@ -647,6 +706,26 @@ def dismiss_approval_request(
Returns FAILED_PRECONDITION if the request exists but is not in
a pending state.
.. code-block::
from google.cloud import accessapproval_v1
def sample_dismiss_approval_request():
# Create a client
client = accessapproval_v1.AccessApprovalClient()
# Initialize request argument(s)
request = accessapproval_v1.DismissApprovalRequestMessage(
)
# Make the request
response = client.dismiss_approval_request(request=request)
# Handle response
print(response)
Args:
request (Union[google.cloud.accessapproval_v1.types.DismissApprovalRequestMessage, dict]):
The request object. Request to dismiss an approval
Expand Down Expand Up @@ -699,6 +778,26 @@ def get_access_approval_settings(
r"""Gets the settings associated with a project, folder,
or organization.
.. code-block::
from google.cloud import accessapproval_v1
def sample_get_access_approval_settings():
# Create a client
client = accessapproval_v1.AccessApprovalClient()
# Initialize request argument(s)
request = accessapproval_v1.GetAccessApprovalSettingsMessage(
)
# Make the request
response = client.get_access_approval_settings(request=request)
# Handle response
print(response)
Args:
request (Union[google.cloud.accessapproval_v1.types.GetAccessApprovalSettingsMessage, dict]):
The request object. Request to get access approval
Expand Down Expand Up @@ -776,6 +875,26 @@ def update_access_approval_settings(
organization. Settings to update are determined by the value of
field_mask.
.. code-block::
from google.cloud import accessapproval_v1
def sample_update_access_approval_settings():
# Create a client
client = accessapproval_v1.AccessApprovalClient()
# Initialize request argument(s)
request = accessapproval_v1.UpdateAccessApprovalSettingsMessage(
)
# Make the request
response = client.update_access_approval_settings(request=request)
# Handle response
print(response)
Args:
request (Union[google.cloud.accessapproval_v1.types.UpdateAccessApprovalSettingsMessage, dict]):
The request object. Request to update access approval
Expand Down Expand Up @@ -875,6 +994,23 @@ def delete_access_approval_settings(
still be enabled at this level as the settings are
inherited.
.. code-block::
from google.cloud import accessapproval_v1
def sample_delete_access_approval_settings():
# Create a client
client = accessapproval_v1.AccessApprovalClient()
# Initialize request argument(s)
request = accessapproval_v1.DeleteAccessApprovalSettingsMessage(
)
# Make the request
response = client.delete_access_approval_settings(request=request)
Args:
request (Union[google.cloud.accessapproval_v1.types.DeleteAccessApprovalSettingsMessage, dict]):
The request object. Request to delete access approval
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
See https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/AUTHORING_GUIDE.md
See https://github.com/GoogleCloudPlatform/python-docs-samples/blob/main/AUTHORING_GUIDE.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
See https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/CONTRIBUTING.md
See https://github.com/GoogleCloudPlatform/python-docs-samples/blob/main/CONTRIBUTING.md
Loading

0 comments on commit 9ed6af6

Please sign in to comment.