From ebe951bfa4a35796d00bb71ca8d676efa989767a Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 25 Feb 2022 19:31:34 -0500 Subject: [PATCH] docs: add generated snippets (#147) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: use gapic-generator-python 0.63.2 docs: add generated snippets PiperOrigin-RevId: 427792504 Source-Link: https://github.com/googleapis/googleapis/commit/55b9e1e0b3106c850d13958352bc0751147b6b15 Source-Link: https://github.com/googleapis/googleapis-gen/commit/bf4e86b753f42cb0edb1fd51fbe840d7da0a1cde Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYmY0ZTg2Yjc1M2Y0MmNiMGVkYjFmZDUxZmJlODQwZDdkYTBhMWNkZSJ9 * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * chore: use gapic-generator-python 0.63.4 chore: fix snippet region tag format chore: fix docstring code block formatting PiperOrigin-RevId: 430730865 Source-Link: https://github.com/googleapis/googleapis/commit/ea5800229f73f94fd7204915a86ed09dcddf429a Source-Link: https://github.com/googleapis/googleapis-gen/commit/ca893ff8af25fc7fe001de1405a517d80446ecca Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiY2E4OTNmZjhhZjI1ZmM3ZmUwMDFkZTE0MDVhNTE3ZDgwNDQ2ZWNjYSJ9 * 🦉 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 Co-authored-by: Charles Engelke --- .../services/grafeas/async_client.py | 267 ++++ .../grafeas_v1/services/grafeas/client.py | 267 ++++ ...eas_v1_grafeas_batch_create_notes_async.py | 45 + ...feas_v1_grafeas_batch_create_notes_sync.py | 45 + ..._grafeas_batch_create_occurrences_async.py | 45 + ...1_grafeas_batch_create_occurrences_sync.py | 45 + ...ed_grafeas_v1_grafeas_create_note_async.py | 46 + ...ted_grafeas_v1_grafeas_create_note_sync.py | 46 + ...feas_v1_grafeas_create_occurrence_async.py | 45 + ...afeas_v1_grafeas_create_occurrence_sync.py | 45 + ...ed_grafeas_v1_grafeas_delete_note_async.py | 43 + ...ted_grafeas_v1_grafeas_delete_note_sync.py | 43 + ...feas_v1_grafeas_delete_occurrence_async.py | 43 + ...afeas_v1_grafeas_delete_occurrence_sync.py | 43 + ...rated_grafeas_v1_grafeas_get_note_async.py | 45 + ...erated_grafeas_v1_grafeas_get_note_sync.py | 45 + ...grafeas_v1_grafeas_get_occurrence_async.py | 45 + ...as_v1_grafeas_get_occurrence_note_async.py | 45 + ...eas_v1_grafeas_get_occurrence_note_sync.py | 45 + ..._grafeas_v1_grafeas_get_occurrence_sync.py | 45 + ..._v1_grafeas_list_note_occurrences_async.py | 46 + ...s_v1_grafeas_list_note_occurrences_sync.py | 46 + ...ted_grafeas_v1_grafeas_list_notes_async.py | 46 + ...ated_grafeas_v1_grafeas_list_notes_sync.py | 46 + ...afeas_v1_grafeas_list_occurrences_async.py | 46 + ...rafeas_v1_grafeas_list_occurrences_sync.py | 46 + ...ed_grafeas_v1_grafeas_update_note_async.py | 45 + ...ted_grafeas_v1_grafeas_update_note_sync.py | 45 + ...feas_v1_grafeas_update_occurrence_async.py | 45 + ...afeas_v1_grafeas_update_occurrence_sync.py | 45 + ...erated_grafeas_batch_create_notes_async.py | 45 + ...nerated_grafeas_batch_create_notes_sync.py | 45 + ..._grafeas_batch_create_occurrences_async.py | 45 + ...d_grafeas_batch_create_occurrences_sync.py | 45 + ..._v1_generated_grafeas_create_note_async.py | 46 + ...s_v1_generated_grafeas_create_note_sync.py | 46 + ...nerated_grafeas_create_occurrence_async.py | 45 + ...enerated_grafeas_create_occurrence_sync.py | 45 + ..._v1_generated_grafeas_delete_note_async.py | 43 + ...s_v1_generated_grafeas_delete_note_sync.py | 43 + ...nerated_grafeas_delete_occurrence_async.py | 43 + ...enerated_grafeas_delete_occurrence_sync.py | 43 + ...sis_v1_generated_grafeas_get_note_async.py | 45 + ...ysis_v1_generated_grafeas_get_note_sync.py | 45 + ..._generated_grafeas_get_occurrence_async.py | 45 + ...rated_grafeas_get_occurrence_note_async.py | 45 + ...erated_grafeas_get_occurrence_note_sync.py | 45 + ...1_generated_grafeas_get_occurrence_sync.py | 45 + ...ted_grafeas_list_note_occurrences_async.py | 46 + ...ated_grafeas_list_note_occurrences_sync.py | 46 + ...s_v1_generated_grafeas_list_notes_async.py | 46 + ...is_v1_generated_grafeas_list_notes_sync.py | 46 + ...enerated_grafeas_list_occurrences_async.py | 46 + ...generated_grafeas_list_occurrences_sync.py | 46 + ..._v1_generated_grafeas_update_note_async.py | 45 + ...s_v1_generated_grafeas_update_note_sync.py | 45 + ...nerated_grafeas_update_occurrence_async.py | 45 + ...enerated_grafeas_update_occurrence_sync.py | 45 + .../snippet_metadata_grafeas_v1.json | 1242 +++++++++++++++++ 59 files changed, 4296 insertions(+) create mode 100644 packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_batch_create_notes_async.py create mode 100644 packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_batch_create_notes_sync.py create mode 100644 packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_batch_create_occurrences_async.py create mode 100644 packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_batch_create_occurrences_sync.py create mode 100644 packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_create_note_async.py create mode 100644 packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_create_note_sync.py create mode 100644 packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_create_occurrence_async.py create mode 100644 packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_create_occurrence_sync.py create mode 100644 packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_delete_note_async.py create mode 100644 packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_delete_note_sync.py create mode 100644 packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_delete_occurrence_async.py create mode 100644 packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_delete_occurrence_sync.py create mode 100644 packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_get_note_async.py create mode 100644 packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_get_note_sync.py create mode 100644 packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_get_occurrence_async.py create mode 100644 packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_get_occurrence_note_async.py create mode 100644 packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_get_occurrence_note_sync.py create mode 100644 packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_get_occurrence_sync.py create mode 100644 packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_list_note_occurrences_async.py create mode 100644 packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_list_note_occurrences_sync.py create mode 100644 packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_list_notes_async.py create mode 100644 packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_list_notes_sync.py create mode 100644 packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_list_occurrences_async.py create mode 100644 packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_list_occurrences_sync.py create mode 100644 packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_update_note_async.py create mode 100644 packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_update_note_sync.py create mode 100644 packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_update_occurrence_async.py create mode 100644 packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_update_occurrence_sync.py create mode 100644 packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_batch_create_notes_async.py create mode 100644 packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_batch_create_notes_sync.py create mode 100644 packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_batch_create_occurrences_async.py create mode 100644 packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_batch_create_occurrences_sync.py create mode 100644 packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_create_note_async.py create mode 100644 packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_create_note_sync.py create mode 100644 packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_create_occurrence_async.py create mode 100644 packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_create_occurrence_sync.py create mode 100644 packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_delete_note_async.py create mode 100644 packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_delete_note_sync.py create mode 100644 packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_delete_occurrence_async.py create mode 100644 packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_delete_occurrence_sync.py create mode 100644 packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_get_note_async.py create mode 100644 packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_get_note_sync.py create mode 100644 packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_get_occurrence_async.py create mode 100644 packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_get_occurrence_note_async.py create mode 100644 packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_get_occurrence_note_sync.py create mode 100644 packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_get_occurrence_sync.py create mode 100644 packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_list_note_occurrences_async.py create mode 100644 packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_list_note_occurrences_sync.py create mode 100644 packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_list_notes_async.py create mode 100644 packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_list_notes_sync.py create mode 100644 packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_list_occurrences_async.py create mode 100644 packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_list_occurrences_sync.py create mode 100644 packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_update_note_async.py create mode 100644 packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_update_note_sync.py create mode 100644 packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_update_occurrence_async.py create mode 100644 packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_update_occurrence_sync.py create mode 100644 packages/grafeas/samples/generated_samples/snippet_metadata_grafeas_v1.json diff --git a/packages/grafeas/grafeas/grafeas_v1/services/grafeas/async_client.py b/packages/grafeas/grafeas/grafeas_v1/services/grafeas/async_client.py index 207b406b0d1d..03c53001fb1b 100644 --- a/packages/grafeas/grafeas/grafeas_v1/services/grafeas/async_client.py +++ b/packages/grafeas/grafeas/grafeas_v1/services/grafeas/async_client.py @@ -150,6 +150,25 @@ async def get_occurrence( ) -> grafeas.Occurrence: r"""Gets the specified occurrence. + .. code-block:: python + + from grafeas import grafeas_v1 + + def sample_get_occurrence(): + # Create a client + client = grafeas_v1.GrafeasClient() + + # Initialize request argument(s) + request = grafeas_v1.GetOccurrenceRequest( + name="name_value", + ) + + # Make the request + response = client.get_occurrence(request=request) + + # Handle the response + print(response) + Args: request (Union[grafeas.grafeas_v1.types.GetOccurrenceRequest, dict]): The request object. Request to get an occurrence. @@ -231,6 +250,26 @@ async def list_occurrences( ) -> pagers.ListOccurrencesAsyncPager: r"""Lists occurrences for the specified project. + .. code-block:: python + + from grafeas import grafeas_v1 + + def sample_list_occurrences(): + # Create a client + client = grafeas_v1.GrafeasClient() + + # Initialize request argument(s) + request = grafeas_v1.ListOccurrencesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_occurrences(request=request) + + # Handle the response + for response in page_result: + print(response) + Args: request (Union[grafeas.grafeas_v1.types.ListOccurrencesRequest, dict]): The request object. Request to list occurrences. @@ -328,6 +367,23 @@ async def delete_occurrence( this method to delete an occurrence when the occurrence is no longer applicable for the given resource. + + .. code-block:: python + + from grafeas import grafeas_v1 + + def sample_delete_occurrence(): + # Create a client + client = grafeas_v1.GrafeasClient() + + # Initialize request argument(s) + request = grafeas_v1.DeleteOccurrenceRequest( + name="name_value", + ) + + # Make the request + client.delete_occurrence(request=request) + Args: request (Union[grafeas.grafeas_v1.types.DeleteOccurrenceRequest, dict]): The request object. Request to delete an occurrence. @@ -402,6 +458,25 @@ async def create_occurrence( ) -> grafeas.Occurrence: r"""Creates a new occurrence. + .. code-block:: python + + from grafeas import grafeas_v1 + + def sample_create_occurrence(): + # Create a client + client = grafeas_v1.GrafeasClient() + + # Initialize request argument(s) + request = grafeas_v1.CreateOccurrenceRequest( + parent="parent_value", + ) + + # Make the request + response = client.create_occurrence(request=request) + + # Handle the response + print(response) + Args: request (Union[grafeas.grafeas_v1.types.CreateOccurrenceRequest, dict]): The request object. Request to create a new occurrence. @@ -481,6 +556,25 @@ async def batch_create_occurrences( ) -> grafeas.BatchCreateOccurrencesResponse: r"""Creates new occurrences in batch. + .. code-block:: python + + from grafeas import grafeas_v1 + + def sample_batch_create_occurrences(): + # Create a client + client = grafeas_v1.GrafeasClient() + + # Initialize request argument(s) + request = grafeas_v1.BatchCreateOccurrencesRequest( + parent="parent_value", + ) + + # Make the request + response = client.batch_create_occurrences(request=request) + + # Handle the response + print(response) + Args: request (Union[grafeas.grafeas_v1.types.BatchCreateOccurrencesRequest, dict]): The request object. Request to create occurrences in @@ -564,6 +658,25 @@ async def update_occurrence( ) -> grafeas.Occurrence: r"""Updates the specified occurrence. + .. code-block:: python + + from grafeas import grafeas_v1 + + def sample_update_occurrence(): + # Create a client + client = grafeas_v1.GrafeasClient() + + # Initialize request argument(s) + request = grafeas_v1.UpdateOccurrenceRequest( + name="name_value", + ) + + # Make the request + response = client.update_occurrence(request=request) + + # Handle the response + print(response) + Args: request (Union[grafeas.grafeas_v1.types.UpdateOccurrenceRequest, dict]): The request object. Request to update an occurrence. @@ -650,6 +763,26 @@ async def get_occurrence_note( Consumer projects can use this method to get a note that belongs to a provider project. + + .. code-block:: python + + from grafeas import grafeas_v1 + + def sample_get_occurrence_note(): + # Create a client + client = grafeas_v1.GrafeasClient() + + # Initialize request argument(s) + request = grafeas_v1.GetOccurrenceNoteRequest( + name="name_value", + ) + + # Make the request + response = client.get_occurrence_note(request=request) + + # Handle the response + print(response) + Args: request (Union[grafeas.grafeas_v1.types.GetOccurrenceNoteRequest, dict]): The request object. Request to get the note to which the @@ -731,6 +864,25 @@ async def get_note( ) -> grafeas.Note: r"""Gets the specified note. + .. code-block:: python + + from grafeas import grafeas_v1 + + def sample_get_note(): + # Create a client + client = grafeas_v1.GrafeasClient() + + # Initialize request argument(s) + request = grafeas_v1.GetNoteRequest( + name="name_value", + ) + + # Make the request + response = client.get_note(request=request) + + # Handle the response + print(response) + Args: request (Union[grafeas.grafeas_v1.types.GetNoteRequest, dict]): The request object. Request to get a note. @@ -812,6 +964,26 @@ async def list_notes( ) -> pagers.ListNotesAsyncPager: r"""Lists notes for the specified project. + .. code-block:: python + + from grafeas import grafeas_v1 + + def sample_list_notes(): + # Create a client + client = grafeas_v1.GrafeasClient() + + # Initialize request argument(s) + request = grafeas_v1.ListNotesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_notes(request=request) + + # Handle the response + for response in page_result: + print(response) + Args: request (Union[grafeas.grafeas_v1.types.ListNotesRequest, dict]): The request object. Request to list notes. @@ -907,6 +1079,22 @@ async def delete_note( ) -> None: r"""Deletes the specified note. + .. code-block:: python + + from grafeas import grafeas_v1 + + def sample_delete_note(): + # Create a client + client = grafeas_v1.GrafeasClient() + + # Initialize request argument(s) + request = grafeas_v1.DeleteNoteRequest( + name="name_value", + ) + + # Make the request + client.delete_note(request=request) + Args: request (Union[grafeas.grafeas_v1.types.DeleteNoteRequest, dict]): The request object. Request to delete a note. @@ -982,6 +1170,26 @@ async def create_note( ) -> grafeas.Note: r"""Creates a new note. + .. code-block:: python + + from grafeas import grafeas_v1 + + def sample_create_note(): + # Create a client + client = grafeas_v1.GrafeasClient() + + # Initialize request argument(s) + request = grafeas_v1.CreateNoteRequest( + parent="parent_value", + note_id="note_id_value", + ) + + # Make the request + response = client.create_note(request=request) + + # Handle the response + print(response) + Args: request (Union[grafeas.grafeas_v1.types.CreateNoteRequest, dict]): The request object. Request to create a new note. @@ -1068,6 +1276,25 @@ async def batch_create_notes( ) -> grafeas.BatchCreateNotesResponse: r"""Creates new notes in batch. + .. code-block:: python + + from grafeas import grafeas_v1 + + def sample_batch_create_notes(): + # Create a client + client = grafeas_v1.GrafeasClient() + + # Initialize request argument(s) + request = grafeas_v1.BatchCreateNotesRequest( + parent="parent_value", + ) + + # Make the request + response = client.batch_create_notes(request=request) + + # Handle the response + print(response) + Args: request (Union[grafeas.grafeas_v1.types.BatchCreateNotesRequest, dict]): The request object. Request to create notes in batch. @@ -1149,6 +1376,25 @@ async def update_note( ) -> grafeas.Note: r"""Updates the specified note. + .. code-block:: python + + from grafeas import grafeas_v1 + + def sample_update_note(): + # Create a client + client = grafeas_v1.GrafeasClient() + + # Initialize request argument(s) + request = grafeas_v1.UpdateNoteRequest( + name="name_value", + ) + + # Make the request + response = client.update_note(request=request) + + # Handle the response + print(response) + Args: request (Union[grafeas.grafeas_v1.types.UpdateNoteRequest, dict]): The request object. Request to update a note. @@ -1237,6 +1483,27 @@ async def list_note_occurrences( occurrences across consumer projects referencing the specified note. + + .. code-block:: python + + from grafeas import grafeas_v1 + + def sample_list_note_occurrences(): + # Create a client + client = grafeas_v1.GrafeasClient() + + # Initialize request argument(s) + request = grafeas_v1.ListNoteOccurrencesRequest( + name="name_value", + ) + + # Make the request + page_result = client.list_note_occurrences(request=request) + + # Handle the response + for response in page_result: + print(response) + Args: request (Union[grafeas.grafeas_v1.types.ListNoteOccurrencesRequest, dict]): The request object. Request to list occurrences for a diff --git a/packages/grafeas/grafeas/grafeas_v1/services/grafeas/client.py b/packages/grafeas/grafeas/grafeas_v1/services/grafeas/client.py index 3997993db60b..ea670c2390bf 100644 --- a/packages/grafeas/grafeas/grafeas_v1/services/grafeas/client.py +++ b/packages/grafeas/grafeas/grafeas_v1/services/grafeas/client.py @@ -287,6 +287,25 @@ def get_occurrence( ) -> grafeas.Occurrence: r"""Gets the specified occurrence. + .. code-block:: python + + from grafeas import grafeas_v1 + + def sample_get_occurrence(): + # Create a client + client = grafeas_v1.GrafeasClient() + + # Initialize request argument(s) + request = grafeas_v1.GetOccurrenceRequest( + name="name_value", + ) + + # Make the request + response = client.get_occurrence(request=request) + + # Handle the response + print(response) + Args: request (Union[grafeas.grafeas_v1.types.GetOccurrenceRequest, dict]): The request object. Request to get an occurrence. @@ -358,6 +377,26 @@ def list_occurrences( ) -> pagers.ListOccurrencesPager: r"""Lists occurrences for the specified project. + .. code-block:: python + + from grafeas import grafeas_v1 + + def sample_list_occurrences(): + # Create a client + client = grafeas_v1.GrafeasClient() + + # Initialize request argument(s) + request = grafeas_v1.ListOccurrencesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_occurrences(request=request) + + # Handle the response + for response in page_result: + print(response) + Args: request (Union[grafeas.grafeas_v1.types.ListOccurrencesRequest, dict]): The request object. Request to list occurrences. @@ -445,6 +484,23 @@ def delete_occurrence( this method to delete an occurrence when the occurrence is no longer applicable for the given resource. + + .. code-block:: python + + from grafeas import grafeas_v1 + + def sample_delete_occurrence(): + # Create a client + client = grafeas_v1.GrafeasClient() + + # Initialize request argument(s) + request = grafeas_v1.DeleteOccurrenceRequest( + name="name_value", + ) + + # Make the request + client.delete_occurrence(request=request) + Args: request (Union[grafeas.grafeas_v1.types.DeleteOccurrenceRequest, dict]): The request object. Request to delete an occurrence. @@ -509,6 +565,25 @@ def create_occurrence( ) -> grafeas.Occurrence: r"""Creates a new occurrence. + .. code-block:: python + + from grafeas import grafeas_v1 + + def sample_create_occurrence(): + # Create a client + client = grafeas_v1.GrafeasClient() + + # Initialize request argument(s) + request = grafeas_v1.CreateOccurrenceRequest( + parent="parent_value", + ) + + # Make the request + response = client.create_occurrence(request=request) + + # Handle the response + print(response) + Args: request (Union[grafeas.grafeas_v1.types.CreateOccurrenceRequest, dict]): The request object. Request to create a new occurrence. @@ -588,6 +663,25 @@ def batch_create_occurrences( ) -> grafeas.BatchCreateOccurrencesResponse: r"""Creates new occurrences in batch. + .. code-block:: python + + from grafeas import grafeas_v1 + + def sample_batch_create_occurrences(): + # Create a client + client = grafeas_v1.GrafeasClient() + + # Initialize request argument(s) + request = grafeas_v1.BatchCreateOccurrencesRequest( + parent="parent_value", + ) + + # Make the request + response = client.batch_create_occurrences(request=request) + + # Handle the response + print(response) + Args: request (Union[grafeas.grafeas_v1.types.BatchCreateOccurrencesRequest, dict]): The request object. Request to create occurrences in @@ -671,6 +765,25 @@ def update_occurrence( ) -> grafeas.Occurrence: r"""Updates the specified occurrence. + .. code-block:: python + + from grafeas import grafeas_v1 + + def sample_update_occurrence(): + # Create a client + client = grafeas_v1.GrafeasClient() + + # Initialize request argument(s) + request = grafeas_v1.UpdateOccurrenceRequest( + name="name_value", + ) + + # Make the request + response = client.update_occurrence(request=request) + + # Handle the response + print(response) + Args: request (Union[grafeas.grafeas_v1.types.UpdateOccurrenceRequest, dict]): The request object. Request to update an occurrence. @@ -757,6 +870,26 @@ def get_occurrence_note( Consumer projects can use this method to get a note that belongs to a provider project. + + .. code-block:: python + + from grafeas import grafeas_v1 + + def sample_get_occurrence_note(): + # Create a client + client = grafeas_v1.GrafeasClient() + + # Initialize request argument(s) + request = grafeas_v1.GetOccurrenceNoteRequest( + name="name_value", + ) + + # Make the request + response = client.get_occurrence_note(request=request) + + # Handle the response + print(response) + Args: request (Union[grafeas.grafeas_v1.types.GetOccurrenceNoteRequest, dict]): The request object. Request to get the note to which the @@ -828,6 +961,25 @@ def get_note( ) -> grafeas.Note: r"""Gets the specified note. + .. code-block:: python + + from grafeas import grafeas_v1 + + def sample_get_note(): + # Create a client + client = grafeas_v1.GrafeasClient() + + # Initialize request argument(s) + request = grafeas_v1.GetNoteRequest( + name="name_value", + ) + + # Make the request + response = client.get_note(request=request) + + # Handle the response + print(response) + Args: request (Union[grafeas.grafeas_v1.types.GetNoteRequest, dict]): The request object. Request to get a note. @@ -899,6 +1051,26 @@ def list_notes( ) -> pagers.ListNotesPager: r"""Lists notes for the specified project. + .. code-block:: python + + from grafeas import grafeas_v1 + + def sample_list_notes(): + # Create a client + client = grafeas_v1.GrafeasClient() + + # Initialize request argument(s) + request = grafeas_v1.ListNotesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_notes(request=request) + + # Handle the response + for response in page_result: + print(response) + Args: request (Union[grafeas.grafeas_v1.types.ListNotesRequest, dict]): The request object. Request to list notes. @@ -984,6 +1156,22 @@ def delete_note( ) -> None: r"""Deletes the specified note. + .. code-block:: python + + from grafeas import grafeas_v1 + + def sample_delete_note(): + # Create a client + client = grafeas_v1.GrafeasClient() + + # Initialize request argument(s) + request = grafeas_v1.DeleteNoteRequest( + name="name_value", + ) + + # Make the request + client.delete_note(request=request) + Args: request (Union[grafeas.grafeas_v1.types.DeleteNoteRequest, dict]): The request object. Request to delete a note. @@ -1049,6 +1237,26 @@ def create_note( ) -> grafeas.Note: r"""Creates a new note. + .. code-block:: python + + from grafeas import grafeas_v1 + + def sample_create_note(): + # Create a client + client = grafeas_v1.GrafeasClient() + + # Initialize request argument(s) + request = grafeas_v1.CreateNoteRequest( + parent="parent_value", + note_id="note_id_value", + ) + + # Make the request + response = client.create_note(request=request) + + # Handle the response + print(response) + Args: request (Union[grafeas.grafeas_v1.types.CreateNoteRequest, dict]): The request object. Request to create a new note. @@ -1135,6 +1343,25 @@ def batch_create_notes( ) -> grafeas.BatchCreateNotesResponse: r"""Creates new notes in batch. + .. code-block:: python + + from grafeas import grafeas_v1 + + def sample_batch_create_notes(): + # Create a client + client = grafeas_v1.GrafeasClient() + + # Initialize request argument(s) + request = grafeas_v1.BatchCreateNotesRequest( + parent="parent_value", + ) + + # Make the request + response = client.batch_create_notes(request=request) + + # Handle the response + print(response) + Args: request (Union[grafeas.grafeas_v1.types.BatchCreateNotesRequest, dict]): The request object. Request to create notes in batch. @@ -1215,6 +1442,25 @@ def update_note( ) -> grafeas.Note: r"""Updates the specified note. + .. code-block:: python + + from grafeas import grafeas_v1 + + def sample_update_note(): + # Create a client + client = grafeas_v1.GrafeasClient() + + # Initialize request argument(s) + request = grafeas_v1.UpdateNoteRequest( + name="name_value", + ) + + # Make the request + response = client.update_note(request=request) + + # Handle the response + print(response) + Args: request (Union[grafeas.grafeas_v1.types.UpdateNoteRequest, dict]): The request object. Request to update a note. @@ -1303,6 +1549,27 @@ def list_note_occurrences( occurrences across consumer projects referencing the specified note. + + .. code-block:: python + + from grafeas import grafeas_v1 + + def sample_list_note_occurrences(): + # Create a client + client = grafeas_v1.GrafeasClient() + + # Initialize request argument(s) + request = grafeas_v1.ListNoteOccurrencesRequest( + name="name_value", + ) + + # Make the request + page_result = client.list_note_occurrences(request=request) + + # Handle the response + for response in page_result: + print(response) + Args: request (Union[grafeas.grafeas_v1.types.ListNoteOccurrencesRequest, dict]): The request object. Request to list occurrences for a diff --git a/packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_batch_create_notes_async.py b/packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_batch_create_notes_async.py new file mode 100644 index 000000000000..ef6b07af46b4 --- /dev/null +++ b/packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_batch_create_notes_async.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for BatchCreateNotes +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install grafeas-grafeas + + +# [START containeranalysis_generated_grafeas_v1_Grafeas_BatchCreateNotes_async] +from grafeas import grafeas_v1 + + +async def sample_batch_create_notes(): + # Create a client + client = grafeas_v1.GrafeasAsyncClient() + + # Initialize request argument(s) + request = grafeas_v1.BatchCreateNotesRequest( + parent="parent_value", + ) + + # Make the request + response = await client.batch_create_notes(request=request) + + # Handle the response + print(response) + +# [END containeranalysis_generated_grafeas_v1_Grafeas_BatchCreateNotes_async] diff --git a/packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_batch_create_notes_sync.py b/packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_batch_create_notes_sync.py new file mode 100644 index 000000000000..0e823063cffb --- /dev/null +++ b/packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_batch_create_notes_sync.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for BatchCreateNotes +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install grafeas-grafeas + + +# [START containeranalysis_generated_grafeas_v1_Grafeas_BatchCreateNotes_sync] +from grafeas import grafeas_v1 + + +def sample_batch_create_notes(): + # Create a client + client = grafeas_v1.GrafeasClient() + + # Initialize request argument(s) + request = grafeas_v1.BatchCreateNotesRequest( + parent="parent_value", + ) + + # Make the request + response = client.batch_create_notes(request=request) + + # Handle the response + print(response) + +# [END containeranalysis_generated_grafeas_v1_Grafeas_BatchCreateNotes_sync] diff --git a/packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_batch_create_occurrences_async.py b/packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_batch_create_occurrences_async.py new file mode 100644 index 000000000000..58b7b7a90433 --- /dev/null +++ b/packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_batch_create_occurrences_async.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for BatchCreateOccurrences +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install grafeas-grafeas + + +# [START containeranalysis_generated_grafeas_v1_Grafeas_BatchCreateOccurrences_async] +from grafeas import grafeas_v1 + + +async def sample_batch_create_occurrences(): + # Create a client + client = grafeas_v1.GrafeasAsyncClient() + + # Initialize request argument(s) + request = grafeas_v1.BatchCreateOccurrencesRequest( + parent="parent_value", + ) + + # Make the request + response = await client.batch_create_occurrences(request=request) + + # Handle the response + print(response) + +# [END containeranalysis_generated_grafeas_v1_Grafeas_BatchCreateOccurrences_async] diff --git a/packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_batch_create_occurrences_sync.py b/packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_batch_create_occurrences_sync.py new file mode 100644 index 000000000000..de13d212fa40 --- /dev/null +++ b/packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_batch_create_occurrences_sync.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for BatchCreateOccurrences +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install grafeas-grafeas + + +# [START containeranalysis_generated_grafeas_v1_Grafeas_BatchCreateOccurrences_sync] +from grafeas import grafeas_v1 + + +def sample_batch_create_occurrences(): + # Create a client + client = grafeas_v1.GrafeasClient() + + # Initialize request argument(s) + request = grafeas_v1.BatchCreateOccurrencesRequest( + parent="parent_value", + ) + + # Make the request + response = client.batch_create_occurrences(request=request) + + # Handle the response + print(response) + +# [END containeranalysis_generated_grafeas_v1_Grafeas_BatchCreateOccurrences_sync] diff --git a/packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_create_note_async.py b/packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_create_note_async.py new file mode 100644 index 000000000000..32fe6a033556 --- /dev/null +++ b/packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_create_note_async.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateNote +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install grafeas-grafeas + + +# [START containeranalysis_generated_grafeas_v1_Grafeas_CreateNote_async] +from grafeas import grafeas_v1 + + +async def sample_create_note(): + # Create a client + client = grafeas_v1.GrafeasAsyncClient() + + # Initialize request argument(s) + request = grafeas_v1.CreateNoteRequest( + parent="parent_value", + note_id="note_id_value", + ) + + # Make the request + response = await client.create_note(request=request) + + # Handle the response + print(response) + +# [END containeranalysis_generated_grafeas_v1_Grafeas_CreateNote_async] diff --git a/packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_create_note_sync.py b/packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_create_note_sync.py new file mode 100644 index 000000000000..32b0fb1fbb2a --- /dev/null +++ b/packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_create_note_sync.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateNote +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install grafeas-grafeas + + +# [START containeranalysis_generated_grafeas_v1_Grafeas_CreateNote_sync] +from grafeas import grafeas_v1 + + +def sample_create_note(): + # Create a client + client = grafeas_v1.GrafeasClient() + + # Initialize request argument(s) + request = grafeas_v1.CreateNoteRequest( + parent="parent_value", + note_id="note_id_value", + ) + + # Make the request + response = client.create_note(request=request) + + # Handle the response + print(response) + +# [END containeranalysis_generated_grafeas_v1_Grafeas_CreateNote_sync] diff --git a/packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_create_occurrence_async.py b/packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_create_occurrence_async.py new file mode 100644 index 000000000000..3a424a00d64e --- /dev/null +++ b/packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_create_occurrence_async.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateOccurrence +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install grafeas-grafeas + + +# [START containeranalysis_generated_grafeas_v1_Grafeas_CreateOccurrence_async] +from grafeas import grafeas_v1 + + +async def sample_create_occurrence(): + # Create a client + client = grafeas_v1.GrafeasAsyncClient() + + # Initialize request argument(s) + request = grafeas_v1.CreateOccurrenceRequest( + parent="parent_value", + ) + + # Make the request + response = await client.create_occurrence(request=request) + + # Handle the response + print(response) + +# [END containeranalysis_generated_grafeas_v1_Grafeas_CreateOccurrence_async] diff --git a/packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_create_occurrence_sync.py b/packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_create_occurrence_sync.py new file mode 100644 index 000000000000..805331e8f004 --- /dev/null +++ b/packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_create_occurrence_sync.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateOccurrence +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install grafeas-grafeas + + +# [START containeranalysis_generated_grafeas_v1_Grafeas_CreateOccurrence_sync] +from grafeas import grafeas_v1 + + +def sample_create_occurrence(): + # Create a client + client = grafeas_v1.GrafeasClient() + + # Initialize request argument(s) + request = grafeas_v1.CreateOccurrenceRequest( + parent="parent_value", + ) + + # Make the request + response = client.create_occurrence(request=request) + + # Handle the response + print(response) + +# [END containeranalysis_generated_grafeas_v1_Grafeas_CreateOccurrence_sync] diff --git a/packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_delete_note_async.py b/packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_delete_note_async.py new file mode 100644 index 000000000000..fd2fd02c0bb7 --- /dev/null +++ b/packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_delete_note_async.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteNote +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install grafeas-grafeas + + +# [START containeranalysis_generated_grafeas_v1_Grafeas_DeleteNote_async] +from grafeas import grafeas_v1 + + +async def sample_delete_note(): + # Create a client + client = grafeas_v1.GrafeasAsyncClient() + + # Initialize request argument(s) + request = grafeas_v1.DeleteNoteRequest( + name="name_value", + ) + + # Make the request + await client.delete_note(request=request) + + +# [END containeranalysis_generated_grafeas_v1_Grafeas_DeleteNote_async] diff --git a/packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_delete_note_sync.py b/packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_delete_note_sync.py new file mode 100644 index 000000000000..ee462f431594 --- /dev/null +++ b/packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_delete_note_sync.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteNote +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install grafeas-grafeas + + +# [START containeranalysis_generated_grafeas_v1_Grafeas_DeleteNote_sync] +from grafeas import grafeas_v1 + + +def sample_delete_note(): + # Create a client + client = grafeas_v1.GrafeasClient() + + # Initialize request argument(s) + request = grafeas_v1.DeleteNoteRequest( + name="name_value", + ) + + # Make the request + client.delete_note(request=request) + + +# [END containeranalysis_generated_grafeas_v1_Grafeas_DeleteNote_sync] diff --git a/packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_delete_occurrence_async.py b/packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_delete_occurrence_async.py new file mode 100644 index 000000000000..a94a256f8691 --- /dev/null +++ b/packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_delete_occurrence_async.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteOccurrence +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install grafeas-grafeas + + +# [START containeranalysis_generated_grafeas_v1_Grafeas_DeleteOccurrence_async] +from grafeas import grafeas_v1 + + +async def sample_delete_occurrence(): + # Create a client + client = grafeas_v1.GrafeasAsyncClient() + + # Initialize request argument(s) + request = grafeas_v1.DeleteOccurrenceRequest( + name="name_value", + ) + + # Make the request + await client.delete_occurrence(request=request) + + +# [END containeranalysis_generated_grafeas_v1_Grafeas_DeleteOccurrence_async] diff --git a/packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_delete_occurrence_sync.py b/packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_delete_occurrence_sync.py new file mode 100644 index 000000000000..2d23a10bee69 --- /dev/null +++ b/packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_delete_occurrence_sync.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteOccurrence +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install grafeas-grafeas + + +# [START containeranalysis_generated_grafeas_v1_Grafeas_DeleteOccurrence_sync] +from grafeas import grafeas_v1 + + +def sample_delete_occurrence(): + # Create a client + client = grafeas_v1.GrafeasClient() + + # Initialize request argument(s) + request = grafeas_v1.DeleteOccurrenceRequest( + name="name_value", + ) + + # Make the request + client.delete_occurrence(request=request) + + +# [END containeranalysis_generated_grafeas_v1_Grafeas_DeleteOccurrence_sync] diff --git a/packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_get_note_async.py b/packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_get_note_async.py new file mode 100644 index 000000000000..51f982dafb6e --- /dev/null +++ b/packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_get_note_async.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetNote +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install grafeas-grafeas + + +# [START containeranalysis_generated_grafeas_v1_Grafeas_GetNote_async] +from grafeas import grafeas_v1 + + +async def sample_get_note(): + # Create a client + client = grafeas_v1.GrafeasAsyncClient() + + # Initialize request argument(s) + request = grafeas_v1.GetNoteRequest( + name="name_value", + ) + + # Make the request + response = await client.get_note(request=request) + + # Handle the response + print(response) + +# [END containeranalysis_generated_grafeas_v1_Grafeas_GetNote_async] diff --git a/packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_get_note_sync.py b/packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_get_note_sync.py new file mode 100644 index 000000000000..7aa96c53bea6 --- /dev/null +++ b/packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_get_note_sync.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetNote +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install grafeas-grafeas + + +# [START containeranalysis_generated_grafeas_v1_Grafeas_GetNote_sync] +from grafeas import grafeas_v1 + + +def sample_get_note(): + # Create a client + client = grafeas_v1.GrafeasClient() + + # Initialize request argument(s) + request = grafeas_v1.GetNoteRequest( + name="name_value", + ) + + # Make the request + response = client.get_note(request=request) + + # Handle the response + print(response) + +# [END containeranalysis_generated_grafeas_v1_Grafeas_GetNote_sync] diff --git a/packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_get_occurrence_async.py b/packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_get_occurrence_async.py new file mode 100644 index 000000000000..4dd79801a4b5 --- /dev/null +++ b/packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_get_occurrence_async.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetOccurrence +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install grafeas-grafeas + + +# [START containeranalysis_generated_grafeas_v1_Grafeas_GetOccurrence_async] +from grafeas import grafeas_v1 + + +async def sample_get_occurrence(): + # Create a client + client = grafeas_v1.GrafeasAsyncClient() + + # Initialize request argument(s) + request = grafeas_v1.GetOccurrenceRequest( + name="name_value", + ) + + # Make the request + response = await client.get_occurrence(request=request) + + # Handle the response + print(response) + +# [END containeranalysis_generated_grafeas_v1_Grafeas_GetOccurrence_async] diff --git a/packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_get_occurrence_note_async.py b/packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_get_occurrence_note_async.py new file mode 100644 index 000000000000..0384c1f5d392 --- /dev/null +++ b/packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_get_occurrence_note_async.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetOccurrenceNote +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install grafeas-grafeas + + +# [START containeranalysis_generated_grafeas_v1_Grafeas_GetOccurrenceNote_async] +from grafeas import grafeas_v1 + + +async def sample_get_occurrence_note(): + # Create a client + client = grafeas_v1.GrafeasAsyncClient() + + # Initialize request argument(s) + request = grafeas_v1.GetOccurrenceNoteRequest( + name="name_value", + ) + + # Make the request + response = await client.get_occurrence_note(request=request) + + # Handle the response + print(response) + +# [END containeranalysis_generated_grafeas_v1_Grafeas_GetOccurrenceNote_async] diff --git a/packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_get_occurrence_note_sync.py b/packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_get_occurrence_note_sync.py new file mode 100644 index 000000000000..b0642ac18ec3 --- /dev/null +++ b/packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_get_occurrence_note_sync.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetOccurrenceNote +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install grafeas-grafeas + + +# [START containeranalysis_generated_grafeas_v1_Grafeas_GetOccurrenceNote_sync] +from grafeas import grafeas_v1 + + +def sample_get_occurrence_note(): + # Create a client + client = grafeas_v1.GrafeasClient() + + # Initialize request argument(s) + request = grafeas_v1.GetOccurrenceNoteRequest( + name="name_value", + ) + + # Make the request + response = client.get_occurrence_note(request=request) + + # Handle the response + print(response) + +# [END containeranalysis_generated_grafeas_v1_Grafeas_GetOccurrenceNote_sync] diff --git a/packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_get_occurrence_sync.py b/packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_get_occurrence_sync.py new file mode 100644 index 000000000000..ab8930390f4a --- /dev/null +++ b/packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_get_occurrence_sync.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetOccurrence +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install grafeas-grafeas + + +# [START containeranalysis_generated_grafeas_v1_Grafeas_GetOccurrence_sync] +from grafeas import grafeas_v1 + + +def sample_get_occurrence(): + # Create a client + client = grafeas_v1.GrafeasClient() + + # Initialize request argument(s) + request = grafeas_v1.GetOccurrenceRequest( + name="name_value", + ) + + # Make the request + response = client.get_occurrence(request=request) + + # Handle the response + print(response) + +# [END containeranalysis_generated_grafeas_v1_Grafeas_GetOccurrence_sync] diff --git a/packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_list_note_occurrences_async.py b/packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_list_note_occurrences_async.py new file mode 100644 index 000000000000..319c3ef2102e --- /dev/null +++ b/packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_list_note_occurrences_async.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListNoteOccurrences +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install grafeas-grafeas + + +# [START containeranalysis_generated_grafeas_v1_Grafeas_ListNoteOccurrences_async] +from grafeas import grafeas_v1 + + +async def sample_list_note_occurrences(): + # Create a client + client = grafeas_v1.GrafeasAsyncClient() + + # Initialize request argument(s) + request = grafeas_v1.ListNoteOccurrencesRequest( + name="name_value", + ) + + # Make the request + page_result = client.list_note_occurrences(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END containeranalysis_generated_grafeas_v1_Grafeas_ListNoteOccurrences_async] diff --git a/packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_list_note_occurrences_sync.py b/packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_list_note_occurrences_sync.py new file mode 100644 index 000000000000..323b75faace4 --- /dev/null +++ b/packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_list_note_occurrences_sync.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListNoteOccurrences +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install grafeas-grafeas + + +# [START containeranalysis_generated_grafeas_v1_Grafeas_ListNoteOccurrences_sync] +from grafeas import grafeas_v1 + + +def sample_list_note_occurrences(): + # Create a client + client = grafeas_v1.GrafeasClient() + + # Initialize request argument(s) + request = grafeas_v1.ListNoteOccurrencesRequest( + name="name_value", + ) + + # Make the request + page_result = client.list_note_occurrences(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END containeranalysis_generated_grafeas_v1_Grafeas_ListNoteOccurrences_sync] diff --git a/packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_list_notes_async.py b/packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_list_notes_async.py new file mode 100644 index 000000000000..00e370a6e933 --- /dev/null +++ b/packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_list_notes_async.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListNotes +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install grafeas-grafeas + + +# [START containeranalysis_generated_grafeas_v1_Grafeas_ListNotes_async] +from grafeas import grafeas_v1 + + +async def sample_list_notes(): + # Create a client + client = grafeas_v1.GrafeasAsyncClient() + + # Initialize request argument(s) + request = grafeas_v1.ListNotesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_notes(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END containeranalysis_generated_grafeas_v1_Grafeas_ListNotes_async] diff --git a/packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_list_notes_sync.py b/packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_list_notes_sync.py new file mode 100644 index 000000000000..23363cc0e07d --- /dev/null +++ b/packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_list_notes_sync.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListNotes +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install grafeas-grafeas + + +# [START containeranalysis_generated_grafeas_v1_Grafeas_ListNotes_sync] +from grafeas import grafeas_v1 + + +def sample_list_notes(): + # Create a client + client = grafeas_v1.GrafeasClient() + + # Initialize request argument(s) + request = grafeas_v1.ListNotesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_notes(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END containeranalysis_generated_grafeas_v1_Grafeas_ListNotes_sync] diff --git a/packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_list_occurrences_async.py b/packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_list_occurrences_async.py new file mode 100644 index 000000000000..678b24de96f2 --- /dev/null +++ b/packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_list_occurrences_async.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListOccurrences +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install grafeas-grafeas + + +# [START containeranalysis_generated_grafeas_v1_Grafeas_ListOccurrences_async] +from grafeas import grafeas_v1 + + +async def sample_list_occurrences(): + # Create a client + client = grafeas_v1.GrafeasAsyncClient() + + # Initialize request argument(s) + request = grafeas_v1.ListOccurrencesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_occurrences(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END containeranalysis_generated_grafeas_v1_Grafeas_ListOccurrences_async] diff --git a/packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_list_occurrences_sync.py b/packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_list_occurrences_sync.py new file mode 100644 index 000000000000..350265f275e1 --- /dev/null +++ b/packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_list_occurrences_sync.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListOccurrences +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install grafeas-grafeas + + +# [START containeranalysis_generated_grafeas_v1_Grafeas_ListOccurrences_sync] +from grafeas import grafeas_v1 + + +def sample_list_occurrences(): + # Create a client + client = grafeas_v1.GrafeasClient() + + # Initialize request argument(s) + request = grafeas_v1.ListOccurrencesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_occurrences(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END containeranalysis_generated_grafeas_v1_Grafeas_ListOccurrences_sync] diff --git a/packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_update_note_async.py b/packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_update_note_async.py new file mode 100644 index 000000000000..3d0350bf98d8 --- /dev/null +++ b/packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_update_note_async.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateNote +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install grafeas-grafeas + + +# [START containeranalysis_generated_grafeas_v1_Grafeas_UpdateNote_async] +from grafeas import grafeas_v1 + + +async def sample_update_note(): + # Create a client + client = grafeas_v1.GrafeasAsyncClient() + + # Initialize request argument(s) + request = grafeas_v1.UpdateNoteRequest( + name="name_value", + ) + + # Make the request + response = await client.update_note(request=request) + + # Handle the response + print(response) + +# [END containeranalysis_generated_grafeas_v1_Grafeas_UpdateNote_async] diff --git a/packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_update_note_sync.py b/packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_update_note_sync.py new file mode 100644 index 000000000000..2192708e4c0c --- /dev/null +++ b/packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_update_note_sync.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateNote +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install grafeas-grafeas + + +# [START containeranalysis_generated_grafeas_v1_Grafeas_UpdateNote_sync] +from grafeas import grafeas_v1 + + +def sample_update_note(): + # Create a client + client = grafeas_v1.GrafeasClient() + + # Initialize request argument(s) + request = grafeas_v1.UpdateNoteRequest( + name="name_value", + ) + + # Make the request + response = client.update_note(request=request) + + # Handle the response + print(response) + +# [END containeranalysis_generated_grafeas_v1_Grafeas_UpdateNote_sync] diff --git a/packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_update_occurrence_async.py b/packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_update_occurrence_async.py new file mode 100644 index 000000000000..2e24e848992c --- /dev/null +++ b/packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_update_occurrence_async.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateOccurrence +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install grafeas-grafeas + + +# [START containeranalysis_generated_grafeas_v1_Grafeas_UpdateOccurrence_async] +from grafeas import grafeas_v1 + + +async def sample_update_occurrence(): + # Create a client + client = grafeas_v1.GrafeasAsyncClient() + + # Initialize request argument(s) + request = grafeas_v1.UpdateOccurrenceRequest( + name="name_value", + ) + + # Make the request + response = await client.update_occurrence(request=request) + + # Handle the response + print(response) + +# [END containeranalysis_generated_grafeas_v1_Grafeas_UpdateOccurrence_async] diff --git a/packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_update_occurrence_sync.py b/packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_update_occurrence_sync.py new file mode 100644 index 000000000000..edd07769ae83 --- /dev/null +++ b/packages/grafeas/samples/generated_samples/containeranalysis_generated_grafeas_v1_grafeas_update_occurrence_sync.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateOccurrence +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install grafeas-grafeas + + +# [START containeranalysis_generated_grafeas_v1_Grafeas_UpdateOccurrence_sync] +from grafeas import grafeas_v1 + + +def sample_update_occurrence(): + # Create a client + client = grafeas_v1.GrafeasClient() + + # Initialize request argument(s) + request = grafeas_v1.UpdateOccurrenceRequest( + name="name_value", + ) + + # Make the request + response = client.update_occurrence(request=request) + + # Handle the response + print(response) + +# [END containeranalysis_generated_grafeas_v1_Grafeas_UpdateOccurrence_sync] diff --git a/packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_batch_create_notes_async.py b/packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_batch_create_notes_async.py new file mode 100644 index 000000000000..831cc4fa6130 --- /dev/null +++ b/packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_batch_create_notes_async.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for BatchCreateNotes +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install grafeas-grafeas + + +# [START containeranalysis_v1_generated_Grafeas_BatchCreateNotes_async] +from grafeas import grafeas_v1 + + +async def sample_batch_create_notes(): + # Create a client + client = grafeas_v1.GrafeasAsyncClient() + + # Initialize request argument(s) + request = grafeas_v1.BatchCreateNotesRequest( + parent="parent_value", + ) + + # Make the request + response = await client.batch_create_notes(request=request) + + # Handle the response + print(response) + +# [END containeranalysis_v1_generated_Grafeas_BatchCreateNotes_async] diff --git a/packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_batch_create_notes_sync.py b/packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_batch_create_notes_sync.py new file mode 100644 index 000000000000..5449f2dcb8ee --- /dev/null +++ b/packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_batch_create_notes_sync.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for BatchCreateNotes +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install grafeas-grafeas + + +# [START containeranalysis_v1_generated_Grafeas_BatchCreateNotes_sync] +from grafeas import grafeas_v1 + + +def sample_batch_create_notes(): + # Create a client + client = grafeas_v1.GrafeasClient() + + # Initialize request argument(s) + request = grafeas_v1.BatchCreateNotesRequest( + parent="parent_value", + ) + + # Make the request + response = client.batch_create_notes(request=request) + + # Handle the response + print(response) + +# [END containeranalysis_v1_generated_Grafeas_BatchCreateNotes_sync] diff --git a/packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_batch_create_occurrences_async.py b/packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_batch_create_occurrences_async.py new file mode 100644 index 000000000000..007500ba29e2 --- /dev/null +++ b/packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_batch_create_occurrences_async.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for BatchCreateOccurrences +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install grafeas-grafeas + + +# [START containeranalysis_v1_generated_Grafeas_BatchCreateOccurrences_async] +from grafeas import grafeas_v1 + + +async def sample_batch_create_occurrences(): + # Create a client + client = grafeas_v1.GrafeasAsyncClient() + + # Initialize request argument(s) + request = grafeas_v1.BatchCreateOccurrencesRequest( + parent="parent_value", + ) + + # Make the request + response = await client.batch_create_occurrences(request=request) + + # Handle the response + print(response) + +# [END containeranalysis_v1_generated_Grafeas_BatchCreateOccurrences_async] diff --git a/packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_batch_create_occurrences_sync.py b/packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_batch_create_occurrences_sync.py new file mode 100644 index 000000000000..d4771536e748 --- /dev/null +++ b/packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_batch_create_occurrences_sync.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for BatchCreateOccurrences +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install grafeas-grafeas + + +# [START containeranalysis_v1_generated_Grafeas_BatchCreateOccurrences_sync] +from grafeas import grafeas_v1 + + +def sample_batch_create_occurrences(): + # Create a client + client = grafeas_v1.GrafeasClient() + + # Initialize request argument(s) + request = grafeas_v1.BatchCreateOccurrencesRequest( + parent="parent_value", + ) + + # Make the request + response = client.batch_create_occurrences(request=request) + + # Handle the response + print(response) + +# [END containeranalysis_v1_generated_Grafeas_BatchCreateOccurrences_sync] diff --git a/packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_create_note_async.py b/packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_create_note_async.py new file mode 100644 index 000000000000..9c93e5a7a145 --- /dev/null +++ b/packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_create_note_async.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateNote +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install grafeas-grafeas + + +# [START containeranalysis_v1_generated_Grafeas_CreateNote_async] +from grafeas import grafeas_v1 + + +async def sample_create_note(): + # Create a client + client = grafeas_v1.GrafeasAsyncClient() + + # Initialize request argument(s) + request = grafeas_v1.CreateNoteRequest( + parent="parent_value", + note_id="note_id_value", + ) + + # Make the request + response = await client.create_note(request=request) + + # Handle the response + print(response) + +# [END containeranalysis_v1_generated_Grafeas_CreateNote_async] diff --git a/packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_create_note_sync.py b/packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_create_note_sync.py new file mode 100644 index 000000000000..efdfd2eabb27 --- /dev/null +++ b/packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_create_note_sync.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateNote +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install grafeas-grafeas + + +# [START containeranalysis_v1_generated_Grafeas_CreateNote_sync] +from grafeas import grafeas_v1 + + +def sample_create_note(): + # Create a client + client = grafeas_v1.GrafeasClient() + + # Initialize request argument(s) + request = grafeas_v1.CreateNoteRequest( + parent="parent_value", + note_id="note_id_value", + ) + + # Make the request + response = client.create_note(request=request) + + # Handle the response + print(response) + +# [END containeranalysis_v1_generated_Grafeas_CreateNote_sync] diff --git a/packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_create_occurrence_async.py b/packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_create_occurrence_async.py new file mode 100644 index 000000000000..f59e4b70112c --- /dev/null +++ b/packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_create_occurrence_async.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateOccurrence +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install grafeas-grafeas + + +# [START containeranalysis_v1_generated_Grafeas_CreateOccurrence_async] +from grafeas import grafeas_v1 + + +async def sample_create_occurrence(): + # Create a client + client = grafeas_v1.GrafeasAsyncClient() + + # Initialize request argument(s) + request = grafeas_v1.CreateOccurrenceRequest( + parent="parent_value", + ) + + # Make the request + response = await client.create_occurrence(request=request) + + # Handle the response + print(response) + +# [END containeranalysis_v1_generated_Grafeas_CreateOccurrence_async] diff --git a/packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_create_occurrence_sync.py b/packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_create_occurrence_sync.py new file mode 100644 index 000000000000..91684d3288e5 --- /dev/null +++ b/packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_create_occurrence_sync.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateOccurrence +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install grafeas-grafeas + + +# [START containeranalysis_v1_generated_Grafeas_CreateOccurrence_sync] +from grafeas import grafeas_v1 + + +def sample_create_occurrence(): + # Create a client + client = grafeas_v1.GrafeasClient() + + # Initialize request argument(s) + request = grafeas_v1.CreateOccurrenceRequest( + parent="parent_value", + ) + + # Make the request + response = client.create_occurrence(request=request) + + # Handle the response + print(response) + +# [END containeranalysis_v1_generated_Grafeas_CreateOccurrence_sync] diff --git a/packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_delete_note_async.py b/packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_delete_note_async.py new file mode 100644 index 000000000000..75d6d42e5431 --- /dev/null +++ b/packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_delete_note_async.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteNote +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install grafeas-grafeas + + +# [START containeranalysis_v1_generated_Grafeas_DeleteNote_async] +from grafeas import grafeas_v1 + + +async def sample_delete_note(): + # Create a client + client = grafeas_v1.GrafeasAsyncClient() + + # Initialize request argument(s) + request = grafeas_v1.DeleteNoteRequest( + name="name_value", + ) + + # Make the request + await client.delete_note(request=request) + + +# [END containeranalysis_v1_generated_Grafeas_DeleteNote_async] diff --git a/packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_delete_note_sync.py b/packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_delete_note_sync.py new file mode 100644 index 000000000000..a6d62d3093b8 --- /dev/null +++ b/packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_delete_note_sync.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteNote +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install grafeas-grafeas + + +# [START containeranalysis_v1_generated_Grafeas_DeleteNote_sync] +from grafeas import grafeas_v1 + + +def sample_delete_note(): + # Create a client + client = grafeas_v1.GrafeasClient() + + # Initialize request argument(s) + request = grafeas_v1.DeleteNoteRequest( + name="name_value", + ) + + # Make the request + client.delete_note(request=request) + + +# [END containeranalysis_v1_generated_Grafeas_DeleteNote_sync] diff --git a/packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_delete_occurrence_async.py b/packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_delete_occurrence_async.py new file mode 100644 index 000000000000..9e5a88dd3098 --- /dev/null +++ b/packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_delete_occurrence_async.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteOccurrence +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install grafeas-grafeas + + +# [START containeranalysis_v1_generated_Grafeas_DeleteOccurrence_async] +from grafeas import grafeas_v1 + + +async def sample_delete_occurrence(): + # Create a client + client = grafeas_v1.GrafeasAsyncClient() + + # Initialize request argument(s) + request = grafeas_v1.DeleteOccurrenceRequest( + name="name_value", + ) + + # Make the request + await client.delete_occurrence(request=request) + + +# [END containeranalysis_v1_generated_Grafeas_DeleteOccurrence_async] diff --git a/packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_delete_occurrence_sync.py b/packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_delete_occurrence_sync.py new file mode 100644 index 000000000000..161c0c4b2b8f --- /dev/null +++ b/packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_delete_occurrence_sync.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteOccurrence +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install grafeas-grafeas + + +# [START containeranalysis_v1_generated_Grafeas_DeleteOccurrence_sync] +from grafeas import grafeas_v1 + + +def sample_delete_occurrence(): + # Create a client + client = grafeas_v1.GrafeasClient() + + # Initialize request argument(s) + request = grafeas_v1.DeleteOccurrenceRequest( + name="name_value", + ) + + # Make the request + client.delete_occurrence(request=request) + + +# [END containeranalysis_v1_generated_Grafeas_DeleteOccurrence_sync] diff --git a/packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_get_note_async.py b/packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_get_note_async.py new file mode 100644 index 000000000000..f42cc08b73e4 --- /dev/null +++ b/packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_get_note_async.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetNote +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install grafeas-grafeas + + +# [START containeranalysis_v1_generated_Grafeas_GetNote_async] +from grafeas import grafeas_v1 + + +async def sample_get_note(): + # Create a client + client = grafeas_v1.GrafeasAsyncClient() + + # Initialize request argument(s) + request = grafeas_v1.GetNoteRequest( + name="name_value", + ) + + # Make the request + response = await client.get_note(request=request) + + # Handle the response + print(response) + +# [END containeranalysis_v1_generated_Grafeas_GetNote_async] diff --git a/packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_get_note_sync.py b/packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_get_note_sync.py new file mode 100644 index 000000000000..3d14714ff730 --- /dev/null +++ b/packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_get_note_sync.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetNote +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install grafeas-grafeas + + +# [START containeranalysis_v1_generated_Grafeas_GetNote_sync] +from grafeas import grafeas_v1 + + +def sample_get_note(): + # Create a client + client = grafeas_v1.GrafeasClient() + + # Initialize request argument(s) + request = grafeas_v1.GetNoteRequest( + name="name_value", + ) + + # Make the request + response = client.get_note(request=request) + + # Handle the response + print(response) + +# [END containeranalysis_v1_generated_Grafeas_GetNote_sync] diff --git a/packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_get_occurrence_async.py b/packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_get_occurrence_async.py new file mode 100644 index 000000000000..ba211c9a1e3a --- /dev/null +++ b/packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_get_occurrence_async.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetOccurrence +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install grafeas-grafeas + + +# [START containeranalysis_v1_generated_Grafeas_GetOccurrence_async] +from grafeas import grafeas_v1 + + +async def sample_get_occurrence(): + # Create a client + client = grafeas_v1.GrafeasAsyncClient() + + # Initialize request argument(s) + request = grafeas_v1.GetOccurrenceRequest( + name="name_value", + ) + + # Make the request + response = await client.get_occurrence(request=request) + + # Handle the response + print(response) + +# [END containeranalysis_v1_generated_Grafeas_GetOccurrence_async] diff --git a/packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_get_occurrence_note_async.py b/packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_get_occurrence_note_async.py new file mode 100644 index 000000000000..ea01135cbe91 --- /dev/null +++ b/packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_get_occurrence_note_async.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetOccurrenceNote +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install grafeas-grafeas + + +# [START containeranalysis_v1_generated_Grafeas_GetOccurrenceNote_async] +from grafeas import grafeas_v1 + + +async def sample_get_occurrence_note(): + # Create a client + client = grafeas_v1.GrafeasAsyncClient() + + # Initialize request argument(s) + request = grafeas_v1.GetOccurrenceNoteRequest( + name="name_value", + ) + + # Make the request + response = await client.get_occurrence_note(request=request) + + # Handle the response + print(response) + +# [END containeranalysis_v1_generated_Grafeas_GetOccurrenceNote_async] diff --git a/packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_get_occurrence_note_sync.py b/packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_get_occurrence_note_sync.py new file mode 100644 index 000000000000..32aa404be627 --- /dev/null +++ b/packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_get_occurrence_note_sync.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetOccurrenceNote +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install grafeas-grafeas + + +# [START containeranalysis_v1_generated_Grafeas_GetOccurrenceNote_sync] +from grafeas import grafeas_v1 + + +def sample_get_occurrence_note(): + # Create a client + client = grafeas_v1.GrafeasClient() + + # Initialize request argument(s) + request = grafeas_v1.GetOccurrenceNoteRequest( + name="name_value", + ) + + # Make the request + response = client.get_occurrence_note(request=request) + + # Handle the response + print(response) + +# [END containeranalysis_v1_generated_Grafeas_GetOccurrenceNote_sync] diff --git a/packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_get_occurrence_sync.py b/packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_get_occurrence_sync.py new file mode 100644 index 000000000000..ce912e0537b2 --- /dev/null +++ b/packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_get_occurrence_sync.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetOccurrence +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install grafeas-grafeas + + +# [START containeranalysis_v1_generated_Grafeas_GetOccurrence_sync] +from grafeas import grafeas_v1 + + +def sample_get_occurrence(): + # Create a client + client = grafeas_v1.GrafeasClient() + + # Initialize request argument(s) + request = grafeas_v1.GetOccurrenceRequest( + name="name_value", + ) + + # Make the request + response = client.get_occurrence(request=request) + + # Handle the response + print(response) + +# [END containeranalysis_v1_generated_Grafeas_GetOccurrence_sync] diff --git a/packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_list_note_occurrences_async.py b/packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_list_note_occurrences_async.py new file mode 100644 index 000000000000..ba2e8be97aa8 --- /dev/null +++ b/packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_list_note_occurrences_async.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListNoteOccurrences +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install grafeas-grafeas + + +# [START containeranalysis_v1_generated_Grafeas_ListNoteOccurrences_async] +from grafeas import grafeas_v1 + + +async def sample_list_note_occurrences(): + # Create a client + client = grafeas_v1.GrafeasAsyncClient() + + # Initialize request argument(s) + request = grafeas_v1.ListNoteOccurrencesRequest( + name="name_value", + ) + + # Make the request + page_result = client.list_note_occurrences(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END containeranalysis_v1_generated_Grafeas_ListNoteOccurrences_async] diff --git a/packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_list_note_occurrences_sync.py b/packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_list_note_occurrences_sync.py new file mode 100644 index 000000000000..9757323d71dc --- /dev/null +++ b/packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_list_note_occurrences_sync.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListNoteOccurrences +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install grafeas-grafeas + + +# [START containeranalysis_v1_generated_Grafeas_ListNoteOccurrences_sync] +from grafeas import grafeas_v1 + + +def sample_list_note_occurrences(): + # Create a client + client = grafeas_v1.GrafeasClient() + + # Initialize request argument(s) + request = grafeas_v1.ListNoteOccurrencesRequest( + name="name_value", + ) + + # Make the request + page_result = client.list_note_occurrences(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END containeranalysis_v1_generated_Grafeas_ListNoteOccurrences_sync] diff --git a/packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_list_notes_async.py b/packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_list_notes_async.py new file mode 100644 index 000000000000..b53c5ad558f4 --- /dev/null +++ b/packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_list_notes_async.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListNotes +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install grafeas-grafeas + + +# [START containeranalysis_v1_generated_Grafeas_ListNotes_async] +from grafeas import grafeas_v1 + + +async def sample_list_notes(): + # Create a client + client = grafeas_v1.GrafeasAsyncClient() + + # Initialize request argument(s) + request = grafeas_v1.ListNotesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_notes(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END containeranalysis_v1_generated_Grafeas_ListNotes_async] diff --git a/packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_list_notes_sync.py b/packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_list_notes_sync.py new file mode 100644 index 000000000000..00b6248bcaf9 --- /dev/null +++ b/packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_list_notes_sync.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListNotes +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install grafeas-grafeas + + +# [START containeranalysis_v1_generated_Grafeas_ListNotes_sync] +from grafeas import grafeas_v1 + + +def sample_list_notes(): + # Create a client + client = grafeas_v1.GrafeasClient() + + # Initialize request argument(s) + request = grafeas_v1.ListNotesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_notes(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END containeranalysis_v1_generated_Grafeas_ListNotes_sync] diff --git a/packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_list_occurrences_async.py b/packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_list_occurrences_async.py new file mode 100644 index 000000000000..777d40fc7e0e --- /dev/null +++ b/packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_list_occurrences_async.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListOccurrences +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install grafeas-grafeas + + +# [START containeranalysis_v1_generated_Grafeas_ListOccurrences_async] +from grafeas import grafeas_v1 + + +async def sample_list_occurrences(): + # Create a client + client = grafeas_v1.GrafeasAsyncClient() + + # Initialize request argument(s) + request = grafeas_v1.ListOccurrencesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_occurrences(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END containeranalysis_v1_generated_Grafeas_ListOccurrences_async] diff --git a/packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_list_occurrences_sync.py b/packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_list_occurrences_sync.py new file mode 100644 index 000000000000..38f19d6ba08e --- /dev/null +++ b/packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_list_occurrences_sync.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListOccurrences +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install grafeas-grafeas + + +# [START containeranalysis_v1_generated_Grafeas_ListOccurrences_sync] +from grafeas import grafeas_v1 + + +def sample_list_occurrences(): + # Create a client + client = grafeas_v1.GrafeasClient() + + # Initialize request argument(s) + request = grafeas_v1.ListOccurrencesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_occurrences(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END containeranalysis_v1_generated_Grafeas_ListOccurrences_sync] diff --git a/packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_update_note_async.py b/packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_update_note_async.py new file mode 100644 index 000000000000..3431e853be96 --- /dev/null +++ b/packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_update_note_async.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateNote +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install grafeas-grafeas + + +# [START containeranalysis_v1_generated_Grafeas_UpdateNote_async] +from grafeas import grafeas_v1 + + +async def sample_update_note(): + # Create a client + client = grafeas_v1.GrafeasAsyncClient() + + # Initialize request argument(s) + request = grafeas_v1.UpdateNoteRequest( + name="name_value", + ) + + # Make the request + response = await client.update_note(request=request) + + # Handle the response + print(response) + +# [END containeranalysis_v1_generated_Grafeas_UpdateNote_async] diff --git a/packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_update_note_sync.py b/packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_update_note_sync.py new file mode 100644 index 000000000000..389397712795 --- /dev/null +++ b/packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_update_note_sync.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateNote +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install grafeas-grafeas + + +# [START containeranalysis_v1_generated_Grafeas_UpdateNote_sync] +from grafeas import grafeas_v1 + + +def sample_update_note(): + # Create a client + client = grafeas_v1.GrafeasClient() + + # Initialize request argument(s) + request = grafeas_v1.UpdateNoteRequest( + name="name_value", + ) + + # Make the request + response = client.update_note(request=request) + + # Handle the response + print(response) + +# [END containeranalysis_v1_generated_Grafeas_UpdateNote_sync] diff --git a/packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_update_occurrence_async.py b/packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_update_occurrence_async.py new file mode 100644 index 000000000000..7e0ab200d826 --- /dev/null +++ b/packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_update_occurrence_async.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateOccurrence +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install grafeas-grafeas + + +# [START containeranalysis_v1_generated_Grafeas_UpdateOccurrence_async] +from grafeas import grafeas_v1 + + +async def sample_update_occurrence(): + # Create a client + client = grafeas_v1.GrafeasAsyncClient() + + # Initialize request argument(s) + request = grafeas_v1.UpdateOccurrenceRequest( + name="name_value", + ) + + # Make the request + response = await client.update_occurrence(request=request) + + # Handle the response + print(response) + +# [END containeranalysis_v1_generated_Grafeas_UpdateOccurrence_async] diff --git a/packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_update_occurrence_sync.py b/packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_update_occurrence_sync.py new file mode 100644 index 000000000000..87475700eb7e --- /dev/null +++ b/packages/grafeas/samples/generated_samples/containeranalysis_v1_generated_grafeas_update_occurrence_sync.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateOccurrence +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install grafeas-grafeas + + +# [START containeranalysis_v1_generated_Grafeas_UpdateOccurrence_sync] +from grafeas import grafeas_v1 + + +def sample_update_occurrence(): + # Create a client + client = grafeas_v1.GrafeasClient() + + # Initialize request argument(s) + request = grafeas_v1.UpdateOccurrenceRequest( + name="name_value", + ) + + # Make the request + response = client.update_occurrence(request=request) + + # Handle the response + print(response) + +# [END containeranalysis_v1_generated_Grafeas_UpdateOccurrence_sync] diff --git a/packages/grafeas/samples/generated_samples/snippet_metadata_grafeas_v1.json b/packages/grafeas/samples/generated_samples/snippet_metadata_grafeas_v1.json new file mode 100644 index 000000000000..ce418ee3beb3 --- /dev/null +++ b/packages/grafeas/samples/generated_samples/snippet_metadata_grafeas_v1.json @@ -0,0 +1,1242 @@ +{ + "snippets": [ + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "Grafeas" + }, + "shortName": "BatchCreateNotes" + } + }, + "file": "containeranalysis_v1_generated_grafeas_batch_create_notes_async.py", + "regionTag": "containeranalysis_v1_generated_Grafeas_BatchCreateNotes_async", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "Grafeas" + }, + "shortName": "BatchCreateNotes" + } + }, + "file": "containeranalysis_v1_generated_grafeas_batch_create_notes_sync.py", + "regionTag": "containeranalysis_v1_generated_Grafeas_BatchCreateNotes_sync", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "Grafeas" + }, + "shortName": "BatchCreateOccurrences" + } + }, + "file": "containeranalysis_v1_generated_grafeas_batch_create_occurrences_async.py", + "regionTag": "containeranalysis_v1_generated_Grafeas_BatchCreateOccurrences_async", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "Grafeas" + }, + "shortName": "BatchCreateOccurrences" + } + }, + "file": "containeranalysis_v1_generated_grafeas_batch_create_occurrences_sync.py", + "regionTag": "containeranalysis_v1_generated_Grafeas_BatchCreateOccurrences_sync", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "Grafeas" + }, + "shortName": "CreateNote" + } + }, + "file": "containeranalysis_v1_generated_grafeas_create_note_async.py", + "regionTag": "containeranalysis_v1_generated_Grafeas_CreateNote_async", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 42, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 43, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "Grafeas" + }, + "shortName": "CreateNote" + } + }, + "file": "containeranalysis_v1_generated_grafeas_create_note_sync.py", + "regionTag": "containeranalysis_v1_generated_Grafeas_CreateNote_sync", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 42, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 43, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "Grafeas" + }, + "shortName": "CreateOccurrence" + } + }, + "file": "containeranalysis_v1_generated_grafeas_create_occurrence_async.py", + "regionTag": "containeranalysis_v1_generated_Grafeas_CreateOccurrence_async", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "Grafeas" + }, + "shortName": "CreateOccurrence" + } + }, + "file": "containeranalysis_v1_generated_grafeas_create_occurrence_sync.py", + "regionTag": "containeranalysis_v1_generated_Grafeas_CreateOccurrence_sync", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "Grafeas" + }, + "shortName": "DeleteNote" + } + }, + "file": "containeranalysis_v1_generated_grafeas_delete_note_async.py", + "regionTag": "containeranalysis_v1_generated_Grafeas_DeleteNote_async", + "segments": [ + { + "end": 42, + "start": 27, + "type": "FULL" + }, + { + "end": 42, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 43, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "Grafeas" + }, + "shortName": "DeleteNote" + } + }, + "file": "containeranalysis_v1_generated_grafeas_delete_note_sync.py", + "regionTag": "containeranalysis_v1_generated_Grafeas_DeleteNote_sync", + "segments": [ + { + "end": 42, + "start": 27, + "type": "FULL" + }, + { + "end": 42, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 43, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "Grafeas" + }, + "shortName": "DeleteOccurrence" + } + }, + "file": "containeranalysis_v1_generated_grafeas_delete_occurrence_async.py", + "regionTag": "containeranalysis_v1_generated_Grafeas_DeleteOccurrence_async", + "segments": [ + { + "end": 42, + "start": 27, + "type": "FULL" + }, + { + "end": 42, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 43, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "Grafeas" + }, + "shortName": "DeleteOccurrence" + } + }, + "file": "containeranalysis_v1_generated_grafeas_delete_occurrence_sync.py", + "regionTag": "containeranalysis_v1_generated_Grafeas_DeleteOccurrence_sync", + "segments": [ + { + "end": 42, + "start": 27, + "type": "FULL" + }, + { + "end": 42, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 43, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "Grafeas" + }, + "shortName": "GetNote" + } + }, + "file": "containeranalysis_v1_generated_grafeas_get_note_async.py", + "regionTag": "containeranalysis_v1_generated_Grafeas_GetNote_async", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "Grafeas" + }, + "shortName": "GetNote" + } + }, + "file": "containeranalysis_v1_generated_grafeas_get_note_sync.py", + "regionTag": "containeranalysis_v1_generated_Grafeas_GetNote_sync", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "Grafeas" + }, + "shortName": "GetOccurrenceNote" + } + }, + "file": "containeranalysis_v1_generated_grafeas_get_occurrence_note_async.py", + "regionTag": "containeranalysis_v1_generated_Grafeas_GetOccurrenceNote_async", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "Grafeas" + }, + "shortName": "GetOccurrenceNote" + } + }, + "file": "containeranalysis_v1_generated_grafeas_get_occurrence_note_sync.py", + "regionTag": "containeranalysis_v1_generated_Grafeas_GetOccurrenceNote_sync", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "Grafeas" + }, + "shortName": "GetOccurrence" + } + }, + "file": "containeranalysis_v1_generated_grafeas_get_occurrence_async.py", + "regionTag": "containeranalysis_v1_generated_Grafeas_GetOccurrence_async", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "Grafeas" + }, + "shortName": "GetOccurrence" + } + }, + "file": "containeranalysis_v1_generated_grafeas_get_occurrence_sync.py", + "regionTag": "containeranalysis_v1_generated_Grafeas_GetOccurrence_sync", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "Grafeas" + }, + "shortName": "ListNoteOccurrences" + } + }, + "file": "containeranalysis_v1_generated_grafeas_list_note_occurrences_async.py", + "regionTag": "containeranalysis_v1_generated_Grafeas_ListNoteOccurrences_async", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "Grafeas" + }, + "shortName": "ListNoteOccurrences" + } + }, + "file": "containeranalysis_v1_generated_grafeas_list_note_occurrences_sync.py", + "regionTag": "containeranalysis_v1_generated_Grafeas_ListNoteOccurrences_sync", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "Grafeas" + }, + "shortName": "ListNotes" + } + }, + "file": "containeranalysis_v1_generated_grafeas_list_notes_async.py", + "regionTag": "containeranalysis_v1_generated_Grafeas_ListNotes_async", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "Grafeas" + }, + "shortName": "ListNotes" + } + }, + "file": "containeranalysis_v1_generated_grafeas_list_notes_sync.py", + "regionTag": "containeranalysis_v1_generated_Grafeas_ListNotes_sync", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "Grafeas" + }, + "shortName": "ListOccurrences" + } + }, + "file": "containeranalysis_v1_generated_grafeas_list_occurrences_async.py", + "regionTag": "containeranalysis_v1_generated_Grafeas_ListOccurrences_async", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "Grafeas" + }, + "shortName": "ListOccurrences" + } + }, + "file": "containeranalysis_v1_generated_grafeas_list_occurrences_sync.py", + "regionTag": "containeranalysis_v1_generated_Grafeas_ListOccurrences_sync", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "Grafeas" + }, + "shortName": "UpdateNote" + } + }, + "file": "containeranalysis_v1_generated_grafeas_update_note_async.py", + "regionTag": "containeranalysis_v1_generated_Grafeas_UpdateNote_async", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "Grafeas" + }, + "shortName": "UpdateNote" + } + }, + "file": "containeranalysis_v1_generated_grafeas_update_note_sync.py", + "regionTag": "containeranalysis_v1_generated_Grafeas_UpdateNote_sync", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "Grafeas" + }, + "shortName": "UpdateOccurrence" + } + }, + "file": "containeranalysis_v1_generated_grafeas_update_occurrence_async.py", + "regionTag": "containeranalysis_v1_generated_Grafeas_UpdateOccurrence_async", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "Grafeas" + }, + "shortName": "UpdateOccurrence" + } + }, + "file": "containeranalysis_v1_generated_grafeas_update_occurrence_sync.py", + "regionTag": "containeranalysis_v1_generated_Grafeas_UpdateOccurrence_sync", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + } + ] +}