From 1964f6453989a55ba74f6e4c663de304a6320dcf Mon Sep 17 00:00:00 2001 From: Bu Sun Kim <8822365+busunkim96@users.noreply.github.com> Date: Tue, 11 Aug 2020 23:15:47 -0700 Subject: [PATCH] fix: remove gapic surface (#42) --- .../grafeas_v1/gapic/grafeas_client.py | 1363 -------- .../transports/grafeas_grpc_transport.py | 291 -- .../grafeas_v1/proto/attestation.proto | 73 - .../grafeas_v1/proto/attestation_pb2.py | 261 -- .../grafeas/grafeas_v1/proto/build.proto | 50 - .../grafeas/grafeas_v1/proto/build_pb2.py | 187 -- .../grafeas/grafeas_v1/proto/common.proto | 103 - .../grafeas/grafeas_v1/proto/cvss.proto | 85 - .../grafeas/grafeas_v1/proto/deployment.proto | 66 - .../grafeas_v1/proto/deployment_pb2.py | 335 -- .../grafeas/grafeas_v1/proto/discovery.proto | 83 - .../grafeas/grafeas_v1/proto/discovery_pb2.py | 371 --- .../grafeas/grafeas_v1/proto/grafeas.proto | 531 --- .../grafeas/grafeas_v1/proto/grafeas_pb2.py | 2880 ----------------- .../grafeas/grafeas_v1/proto/image.proto | 83 - .../grafeas/grafeas_v1/proto/package.proto | 124 - .../grafeas/grafeas_v1/proto/package_pb2.py | 715 ---- .../grafeas/grafeas_v1/proto/provenance.proto | 265 -- .../grafeas_v1/proto/provenance_pb2.py | 1962 ----------- .../grafeas/grafeas_v1/proto/upgrade.proto | 114 - .../grafeas/grafeas_v1/proto/upgrade_pb2.py | 785 ----- .../grafeas_v1/proto/vulnerability.proto | 226 -- .../grafeas_v1/proto/vulnerability_pb2.py | 1279 -------- 23 files changed, 12232 deletions(-) delete mode 100644 packages/grafeas/grafeas/grafeas_v1/gapic/grafeas_client.py delete mode 100644 packages/grafeas/grafeas/grafeas_v1/gapic/transports/grafeas_grpc_transport.py delete mode 100644 packages/grafeas/grafeas/grafeas_v1/proto/attestation.proto delete mode 100644 packages/grafeas/grafeas/grafeas_v1/proto/attestation_pb2.py delete mode 100644 packages/grafeas/grafeas/grafeas_v1/proto/build.proto delete mode 100644 packages/grafeas/grafeas/grafeas_v1/proto/build_pb2.py delete mode 100644 packages/grafeas/grafeas/grafeas_v1/proto/common.proto delete mode 100644 packages/grafeas/grafeas/grafeas_v1/proto/cvss.proto delete mode 100644 packages/grafeas/grafeas/grafeas_v1/proto/deployment.proto delete mode 100644 packages/grafeas/grafeas/grafeas_v1/proto/deployment_pb2.py delete mode 100644 packages/grafeas/grafeas/grafeas_v1/proto/discovery.proto delete mode 100644 packages/grafeas/grafeas/grafeas_v1/proto/discovery_pb2.py delete mode 100644 packages/grafeas/grafeas/grafeas_v1/proto/grafeas.proto delete mode 100644 packages/grafeas/grafeas/grafeas_v1/proto/grafeas_pb2.py delete mode 100644 packages/grafeas/grafeas/grafeas_v1/proto/image.proto delete mode 100644 packages/grafeas/grafeas/grafeas_v1/proto/package.proto delete mode 100644 packages/grafeas/grafeas/grafeas_v1/proto/package_pb2.py delete mode 100644 packages/grafeas/grafeas/grafeas_v1/proto/provenance.proto delete mode 100644 packages/grafeas/grafeas/grafeas_v1/proto/provenance_pb2.py delete mode 100644 packages/grafeas/grafeas/grafeas_v1/proto/upgrade.proto delete mode 100644 packages/grafeas/grafeas/grafeas_v1/proto/upgrade_pb2.py delete mode 100644 packages/grafeas/grafeas/grafeas_v1/proto/vulnerability.proto delete mode 100644 packages/grafeas/grafeas/grafeas_v1/proto/vulnerability_pb2.py diff --git a/packages/grafeas/grafeas/grafeas_v1/gapic/grafeas_client.py b/packages/grafeas/grafeas/grafeas_v1/gapic/grafeas_client.py deleted file mode 100644 index 5c25bdd275ba..000000000000 --- a/packages/grafeas/grafeas/grafeas_v1/gapic/grafeas_client.py +++ /dev/null @@ -1,1363 +0,0 @@ -# -*- 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 -# -# https://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. - -"""Accesses the grafeas.v1 Grafeas API.""" - -import functools -import pkg_resources -import warnings - -from google.oauth2 import service_account -import google.api_core.gapic_v1.client_info -import google.api_core.gapic_v1.config -import google.api_core.gapic_v1.method -import google.api_core.gapic_v1.routing_header -import google.api_core.grpc_helpers -import google.api_core.page_iterator -import google.api_core.path_template -import grpc - -from google.protobuf import empty_pb2 -from google.protobuf import field_mask_pb2 -from grafeas.grafeas_v1.gapic import enums -from grafeas.grafeas_v1.gapic import grafeas_client_config -from grafeas.grafeas_v1.gapic.transports import grafeas_grpc_transport -from grafeas.grafeas_v1.proto import grafeas_pb2 -from grafeas.grafeas_v1.proto import grafeas_pb2_grpc - - -_GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution("grafeas",).version - - -class GrafeasClient(object): - """ - `Grafeas `__ API. - - Retrieves analysis results of Cloud components such as Docker container - images. - - Analysis results are stored as a series of occurrences. An - ``Occurrence`` contains information about a specific analysis instance - on a resource. An occurrence refers to a ``Note``. A note contains - details describing the analysis and is generally stored in a separate - project, called a ``Provider``. Multiple occurrences can refer to the - same note. - - For example, an SSL vulnerability could affect multiple images. In this - case, there would be one note for the vulnerability and an occurrence - for each image with the vulnerability referring to that note. - """ - - # The name of the interface for this client. This is the key used to - # find the method configuration in the client_config dictionary. - _INTERFACE_NAME = "grafeas.v1.Grafeas" - - @classmethod - def note_path(cls, project, note): - """Return a fully-qualified note string.""" - return google.api_core.path_template.expand( - "projects/{project}/notes/{note}", project=project, note=note, - ) - - @classmethod - def occurrence_path(cls, project, occurrence): - """Return a fully-qualified occurrence string.""" - return google.api_core.path_template.expand( - "projects/{project}/occurrences/{occurrence}", - project=project, - occurrence=occurrence, - ) - - @classmethod - def project_path(cls, project): - """Return a fully-qualified project string.""" - return google.api_core.path_template.expand( - "projects/{project}", project=project, - ) - - def __init__(self, transport, client_config=None, client_info=None): - """Constructor. - - Args: - transport (~.GrafeasGrpcTransport): A transport - instance, responsible for actually making the API calls. - The default transport uses the gRPC protocol. - This argument may also be a callable which returns a - transport instance. Callables will be sent the credentials - as the first argument and the default transport class as - the second argument. - - client_config (dict): DEPRECATED. A dictionary of call options for - each method. If not specified, the default configuration is used. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you're developing - your own client library. - """ - # Raise deprecation warnings for things we want to go away. - if client_config is not None: - warnings.warn( - "The `client_config` argument is deprecated.", - PendingDeprecationWarning, - stacklevel=2, - ) - else: - client_config = grafeas_client_config.config - - # Instantiate the transport. - # The transport is responsible for handling serialization and - # deserialization and actually sending data to the service. - self.transport = transport - - if client_info is None: - client_info = google.api_core.gapic_v1.client_info.ClientInfo( - gapic_version=_GAPIC_LIBRARY_VERSION, - ) - else: - client_info.gapic_version = _GAPIC_LIBRARY_VERSION - self._client_info = client_info - - # Parse out the default settings for retry and timeout for each RPC - # from the client configuration. - # (Ordinarily, these are the defaults specified in the `*_config.py` - # file next to this one.) - self._method_configs = google.api_core.gapic_v1.config.parse_method_configs( - client_config["interfaces"][self._INTERFACE_NAME], - ) - - # Save a dictionary of cached API call functions. - # These are the actual callables which invoke the proper - # transport methods, wrapped with `wrap_method` to add retry, - # timeout, and the like. - self._inner_api_calls = {} - - # Service calls - def get_occurrence( - self, - name, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None, - ): - """ - Gets the specified occurrence. - - Example: - >>> from grafeas import grafeas_v1 - >>> from grafeas.grafeas_v1.gapic.transports import grafeas_grpc_transport - >>> - >>> address = "[SERVICE_ADDRESS]" - >>> scopes = ("[SCOPE]") - >>> transport = grafeas_grpc_transport.GrafeasGrpcTransport(address, scopes) - >>> client = grafeas_v1.GrafeasClient(transport) - >>> - >>> name = client.occurrence_path('[PROJECT]', '[OCCURRENCE]') - >>> - >>> response = client.get_occurrence(name) - - Args: - name (str): The name of the occurrence in the form of - ``projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]``. - retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will - be retried using a default configuration. - timeout (Optional[float]): The amount of time, in seconds, to wait - for the request to complete. Note that if ``retry`` is - specified, the timeout applies to each individual attempt. - metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata - that is provided to the method. - - Returns: - A :class:`~grafeas.grafeas_v1.types.Occurrence` instance. - - Raises: - google.api_core.exceptions.GoogleAPICallError: If the request - failed for any reason. - google.api_core.exceptions.RetryError: If the request failed due - to a retryable error and retry attempts failed. - ValueError: If the parameters are invalid. - """ - # Wrap the transport method to add retry and timeout logic. - if "get_occurrence" not in self._inner_api_calls: - self._inner_api_calls[ - "get_occurrence" - ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.get_occurrence, - default_retry=self._method_configs["GetOccurrence"].retry, - default_timeout=self._method_configs["GetOccurrence"].timeout, - client_info=self._client_info, - ) - - request = grafeas_pb2.GetOccurrenceRequest(name=name,) - if metadata is None: - metadata = [] - metadata = list(metadata) - try: - routing_header = [("name", name)] - except AttributeError: - pass - else: - routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( - routing_header - ) - metadata.append(routing_metadata) - - return self._inner_api_calls["get_occurrence"]( - request, retry=retry, timeout=timeout, metadata=metadata - ) - - def list_occurrences( - self, - parent, - filter_=None, - page_size=None, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None, - ): - """ - Lists occurrences for the specified project. - - Example: - >>> from grafeas import grafeas_v1 - >>> from grafeas.grafeas_v1.gapic.transports import grafeas_grpc_transport - >>> - >>> address = "[SERVICE_ADDRESS]" - >>> scopes = ("[SCOPE]") - >>> transport = grafeas_grpc_transport.GrafeasGrpcTransport(address, scopes) - >>> client = grafeas_v1.GrafeasClient(transport) - >>> - >>> parent = client.project_path('[PROJECT]') - >>> - >>> # Iterate over all results - >>> for element in client.list_occurrences(parent): - ... # process element - ... pass - >>> - >>> - >>> # Alternatively: - >>> - >>> # Iterate over results one page at a time - >>> for page in client.list_occurrences(parent).pages: - ... for element in page: - ... # process element - ... pass - - Args: - parent (str): The name of the project to list occurrences for in the form of - ``projects/[PROJECT_ID]``. - filter_ (str): The filter expression. - page_size (int): The maximum number of resources contained in the - underlying API response. If page streaming is performed per- - resource, this parameter does not affect the return value. If page - streaming is performed per-page, this determines the maximum number - of resources in a page. - retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will - be retried using a default configuration. - timeout (Optional[float]): The amount of time, in seconds, to wait - for the request to complete. Note that if ``retry`` is - specified, the timeout applies to each individual attempt. - metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata - that is provided to the method. - - Returns: - A :class:`~google.api_core.page_iterator.PageIterator` instance. - An iterable of :class:`~grafeas.grafeas_v1.types.Occurrence` instances. - You can also iterate over the pages of the response - using its `pages` property. - - Raises: - google.api_core.exceptions.GoogleAPICallError: If the request - failed for any reason. - google.api_core.exceptions.RetryError: If the request failed due - to a retryable error and retry attempts failed. - ValueError: If the parameters are invalid. - """ - # Wrap the transport method to add retry and timeout logic. - if "list_occurrences" not in self._inner_api_calls: - self._inner_api_calls[ - "list_occurrences" - ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.list_occurrences, - default_retry=self._method_configs["ListOccurrences"].retry, - default_timeout=self._method_configs["ListOccurrences"].timeout, - client_info=self._client_info, - ) - - request = grafeas_pb2.ListOccurrencesRequest( - parent=parent, filter=filter_, page_size=page_size, - ) - if metadata is None: - metadata = [] - metadata = list(metadata) - try: - routing_header = [("parent", parent)] - except AttributeError: - pass - else: - routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( - routing_header - ) - metadata.append(routing_metadata) - - iterator = google.api_core.page_iterator.GRPCIterator( - client=None, - method=functools.partial( - self._inner_api_calls["list_occurrences"], - retry=retry, - timeout=timeout, - metadata=metadata, - ), - request=request, - items_field="occurrences", - request_token_field="page_token", - response_token_field="next_page_token", - ) - return iterator - - def delete_occurrence( - self, - name, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None, - ): - """ - Deletes the specified occurrence. For example, use this method to delete an - occurrence when the occurrence is no longer applicable for the given - resource. - - Example: - >>> from grafeas import grafeas_v1 - >>> from grafeas.grafeas_v1.gapic.transports import grafeas_grpc_transport - >>> - >>> address = "[SERVICE_ADDRESS]" - >>> scopes = ("[SCOPE]") - >>> transport = grafeas_grpc_transport.GrafeasGrpcTransport(address, scopes) - >>> client = grafeas_v1.GrafeasClient(transport) - >>> - >>> name = client.occurrence_path('[PROJECT]', '[OCCURRENCE]') - >>> - >>> client.delete_occurrence(name) - - Args: - name (str): The name of the occurrence in the form of - ``projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]``. - retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will - be retried using a default configuration. - timeout (Optional[float]): The amount of time, in seconds, to wait - for the request to complete. Note that if ``retry`` is - specified, the timeout applies to each individual attempt. - metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata - that is provided to the method. - - Raises: - google.api_core.exceptions.GoogleAPICallError: If the request - failed for any reason. - google.api_core.exceptions.RetryError: If the request failed due - to a retryable error and retry attempts failed. - ValueError: If the parameters are invalid. - """ - # Wrap the transport method to add retry and timeout logic. - if "delete_occurrence" not in self._inner_api_calls: - self._inner_api_calls[ - "delete_occurrence" - ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.delete_occurrence, - default_retry=self._method_configs["DeleteOccurrence"].retry, - default_timeout=self._method_configs["DeleteOccurrence"].timeout, - client_info=self._client_info, - ) - - request = grafeas_pb2.DeleteOccurrenceRequest(name=name,) - if metadata is None: - metadata = [] - metadata = list(metadata) - try: - routing_header = [("name", name)] - except AttributeError: - pass - else: - routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( - routing_header - ) - metadata.append(routing_metadata) - - self._inner_api_calls["delete_occurrence"]( - request, retry=retry, timeout=timeout, metadata=metadata - ) - - def create_occurrence( - self, - parent, - occurrence, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None, - ): - """ - Creates a new occurrence. - - Example: - >>> from grafeas import grafeas_v1 - >>> from grafeas.grafeas_v1.gapic.transports import grafeas_grpc_transport - >>> - >>> address = "[SERVICE_ADDRESS]" - >>> scopes = ("[SCOPE]") - >>> transport = grafeas_grpc_transport.GrafeasGrpcTransport(address, scopes) - >>> client = grafeas_v1.GrafeasClient(transport) - >>> - >>> parent = client.project_path('[PROJECT]') - >>> - >>> # TODO: Initialize `occurrence`: - >>> occurrence = {} - >>> - >>> response = client.create_occurrence(parent, occurrence) - - Args: - parent (str): The name of the project in the form of ``projects/[PROJECT_ID]``, - under which the occurrence is to be created. - occurrence (Union[dict, ~grafeas.grafeas_v1.types.Occurrence]): The occurrence to create. - - If a dict is provided, it must be of the same form as the protobuf - message :class:`~grafeas.grafeas_v1.types.Occurrence` - retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will - be retried using a default configuration. - timeout (Optional[float]): The amount of time, in seconds, to wait - for the request to complete. Note that if ``retry`` is - specified, the timeout applies to each individual attempt. - metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata - that is provided to the method. - - Returns: - A :class:`~grafeas.grafeas_v1.types.Occurrence` instance. - - Raises: - google.api_core.exceptions.GoogleAPICallError: If the request - failed for any reason. - google.api_core.exceptions.RetryError: If the request failed due - to a retryable error and retry attempts failed. - ValueError: If the parameters are invalid. - """ - # Wrap the transport method to add retry and timeout logic. - if "create_occurrence" not in self._inner_api_calls: - self._inner_api_calls[ - "create_occurrence" - ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.create_occurrence, - default_retry=self._method_configs["CreateOccurrence"].retry, - default_timeout=self._method_configs["CreateOccurrence"].timeout, - client_info=self._client_info, - ) - - request = grafeas_pb2.CreateOccurrenceRequest( - parent=parent, occurrence=occurrence, - ) - if metadata is None: - metadata = [] - metadata = list(metadata) - try: - routing_header = [("parent", parent)] - except AttributeError: - pass - else: - routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( - routing_header - ) - metadata.append(routing_metadata) - - return self._inner_api_calls["create_occurrence"]( - request, retry=retry, timeout=timeout, metadata=metadata - ) - - def batch_create_occurrences( - self, - parent, - occurrences, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None, - ): - """ - Creates new occurrences in batch. - - Example: - >>> from grafeas import grafeas_v1 - >>> from grafeas.grafeas_v1.gapic.transports import grafeas_grpc_transport - >>> - >>> address = "[SERVICE_ADDRESS]" - >>> scopes = ("[SCOPE]") - >>> transport = grafeas_grpc_transport.GrafeasGrpcTransport(address, scopes) - >>> client = grafeas_v1.GrafeasClient(transport) - >>> - >>> parent = client.project_path('[PROJECT]') - >>> - >>> # TODO: Initialize `occurrences`: - >>> occurrences = [] - >>> - >>> response = client.batch_create_occurrences(parent, occurrences) - - Args: - parent (str): The name of the project in the form of ``projects/[PROJECT_ID]``, - under which the occurrences are to be created. - occurrences (list[Union[dict, ~grafeas.grafeas_v1.types.Occurrence]]): The occurrences to create. Max allowed length is 1000. - - If a dict is provided, it must be of the same form as the protobuf - message :class:`~grafeas.grafeas_v1.types.Occurrence` - retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will - be retried using a default configuration. - timeout (Optional[float]): The amount of time, in seconds, to wait - for the request to complete. Note that if ``retry`` is - specified, the timeout applies to each individual attempt. - metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata - that is provided to the method. - - Returns: - A :class:`~grafeas.grafeas_v1.types.BatchCreateOccurrencesResponse` instance. - - Raises: - google.api_core.exceptions.GoogleAPICallError: If the request - failed for any reason. - google.api_core.exceptions.RetryError: If the request failed due - to a retryable error and retry attempts failed. - ValueError: If the parameters are invalid. - """ - # Wrap the transport method to add retry and timeout logic. - if "batch_create_occurrences" not in self._inner_api_calls: - self._inner_api_calls[ - "batch_create_occurrences" - ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.batch_create_occurrences, - default_retry=self._method_configs["BatchCreateOccurrences"].retry, - default_timeout=self._method_configs["BatchCreateOccurrences"].timeout, - client_info=self._client_info, - ) - - request = grafeas_pb2.BatchCreateOccurrencesRequest( - parent=parent, occurrences=occurrences, - ) - if metadata is None: - metadata = [] - metadata = list(metadata) - try: - routing_header = [("parent", parent)] - except AttributeError: - pass - else: - routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( - routing_header - ) - metadata.append(routing_metadata) - - return self._inner_api_calls["batch_create_occurrences"]( - request, retry=retry, timeout=timeout, metadata=metadata - ) - - def update_occurrence( - self, - name, - occurrence, - update_mask=None, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None, - ): - """ - Updates the specified occurrence. - - Example: - >>> from grafeas import grafeas_v1 - >>> from grafeas.grafeas_v1.gapic.transports import grafeas_grpc_transport - >>> - >>> address = "[SERVICE_ADDRESS]" - >>> scopes = ("[SCOPE]") - >>> transport = grafeas_grpc_transport.GrafeasGrpcTransport(address, scopes) - >>> client = grafeas_v1.GrafeasClient(transport) - >>> - >>> name = client.occurrence_path('[PROJECT]', '[OCCURRENCE]') - >>> - >>> # TODO: Initialize `occurrence`: - >>> occurrence = {} - >>> - >>> response = client.update_occurrence(name, occurrence) - - Args: - name (str): The name of the occurrence in the form of - ``projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]``. - occurrence (Union[dict, ~grafeas.grafeas_v1.types.Occurrence]): The updated occurrence. - - If a dict is provided, it must be of the same form as the protobuf - message :class:`~grafeas.grafeas_v1.types.Occurrence` - update_mask (Union[dict, ~grafeas.grafeas_v1.types.FieldMask]): The fields to update. - - If a dict is provided, it must be of the same form as the protobuf - message :class:`~grafeas.grafeas_v1.types.FieldMask` - retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will - be retried using a default configuration. - timeout (Optional[float]): The amount of time, in seconds, to wait - for the request to complete. Note that if ``retry`` is - specified, the timeout applies to each individual attempt. - metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata - that is provided to the method. - - Returns: - A :class:`~grafeas.grafeas_v1.types.Occurrence` instance. - - Raises: - google.api_core.exceptions.GoogleAPICallError: If the request - failed for any reason. - google.api_core.exceptions.RetryError: If the request failed due - to a retryable error and retry attempts failed. - ValueError: If the parameters are invalid. - """ - # Wrap the transport method to add retry and timeout logic. - if "update_occurrence" not in self._inner_api_calls: - self._inner_api_calls[ - "update_occurrence" - ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.update_occurrence, - default_retry=self._method_configs["UpdateOccurrence"].retry, - default_timeout=self._method_configs["UpdateOccurrence"].timeout, - client_info=self._client_info, - ) - - request = grafeas_pb2.UpdateOccurrenceRequest( - name=name, occurrence=occurrence, update_mask=update_mask, - ) - if metadata is None: - metadata = [] - metadata = list(metadata) - try: - routing_header = [("name", name)] - except AttributeError: - pass - else: - routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( - routing_header - ) - metadata.append(routing_metadata) - - return self._inner_api_calls["update_occurrence"]( - request, retry=retry, timeout=timeout, metadata=metadata - ) - - def get_occurrence_note( - self, - name, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None, - ): - """ - Gets the note attached to the specified occurrence. Consumer projects can - use this method to get a note that belongs to a provider project. - - Example: - >>> from grafeas import grafeas_v1 - >>> from grafeas.grafeas_v1.gapic.transports import grafeas_grpc_transport - >>> - >>> address = "[SERVICE_ADDRESS]" - >>> scopes = ("[SCOPE]") - >>> transport = grafeas_grpc_transport.GrafeasGrpcTransport(address, scopes) - >>> client = grafeas_v1.GrafeasClient(transport) - >>> - >>> name = client.occurrence_path('[PROJECT]', '[OCCURRENCE]') - >>> - >>> response = client.get_occurrence_note(name) - - Args: - name (str): The name of the occurrence in the form of - ``projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]``. - retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will - be retried using a default configuration. - timeout (Optional[float]): The amount of time, in seconds, to wait - for the request to complete. Note that if ``retry`` is - specified, the timeout applies to each individual attempt. - metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata - that is provided to the method. - - Returns: - A :class:`~grafeas.grafeas_v1.types.Note` instance. - - Raises: - google.api_core.exceptions.GoogleAPICallError: If the request - failed for any reason. - google.api_core.exceptions.RetryError: If the request failed due - to a retryable error and retry attempts failed. - ValueError: If the parameters are invalid. - """ - # Wrap the transport method to add retry and timeout logic. - if "get_occurrence_note" not in self._inner_api_calls: - self._inner_api_calls[ - "get_occurrence_note" - ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.get_occurrence_note, - default_retry=self._method_configs["GetOccurrenceNote"].retry, - default_timeout=self._method_configs["GetOccurrenceNote"].timeout, - client_info=self._client_info, - ) - - request = grafeas_pb2.GetOccurrenceNoteRequest(name=name,) - if metadata is None: - metadata = [] - metadata = list(metadata) - try: - routing_header = [("name", name)] - except AttributeError: - pass - else: - routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( - routing_header - ) - metadata.append(routing_metadata) - - return self._inner_api_calls["get_occurrence_note"]( - request, retry=retry, timeout=timeout, metadata=metadata - ) - - def get_note( - self, - name, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None, - ): - """ - Gets the specified note. - - Example: - >>> from grafeas import grafeas_v1 - >>> from grafeas.grafeas_v1.gapic.transports import grafeas_grpc_transport - >>> - >>> address = "[SERVICE_ADDRESS]" - >>> scopes = ("[SCOPE]") - >>> transport = grafeas_grpc_transport.GrafeasGrpcTransport(address, scopes) - >>> client = grafeas_v1.GrafeasClient(transport) - >>> - >>> name = client.note_path('[PROJECT]', '[NOTE]') - >>> - >>> response = client.get_note(name) - - Args: - name (str): The name of the note in the form of - ``projects/[PROVIDER_ID]/notes/[NOTE_ID]``. - retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will - be retried using a default configuration. - timeout (Optional[float]): The amount of time, in seconds, to wait - for the request to complete. Note that if ``retry`` is - specified, the timeout applies to each individual attempt. - metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata - that is provided to the method. - - Returns: - A :class:`~grafeas.grafeas_v1.types.Note` instance. - - Raises: - google.api_core.exceptions.GoogleAPICallError: If the request - failed for any reason. - google.api_core.exceptions.RetryError: If the request failed due - to a retryable error and retry attempts failed. - ValueError: If the parameters are invalid. - """ - # Wrap the transport method to add retry and timeout logic. - if "get_note" not in self._inner_api_calls: - self._inner_api_calls[ - "get_note" - ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.get_note, - default_retry=self._method_configs["GetNote"].retry, - default_timeout=self._method_configs["GetNote"].timeout, - client_info=self._client_info, - ) - - request = grafeas_pb2.GetNoteRequest(name=name,) - if metadata is None: - metadata = [] - metadata = list(metadata) - try: - routing_header = [("name", name)] - except AttributeError: - pass - else: - routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( - routing_header - ) - metadata.append(routing_metadata) - - return self._inner_api_calls["get_note"]( - request, retry=retry, timeout=timeout, metadata=metadata - ) - - def list_notes( - self, - parent, - filter_=None, - page_size=None, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None, - ): - """ - Lists notes for the specified project. - - Example: - >>> from grafeas import grafeas_v1 - >>> from grafeas.grafeas_v1.gapic.transports import grafeas_grpc_transport - >>> - >>> address = "[SERVICE_ADDRESS]" - >>> scopes = ("[SCOPE]") - >>> transport = grafeas_grpc_transport.GrafeasGrpcTransport(address, scopes) - >>> client = grafeas_v1.GrafeasClient(transport) - >>> - >>> parent = client.project_path('[PROJECT]') - >>> - >>> # Iterate over all results - >>> for element in client.list_notes(parent): - ... # process element - ... pass - >>> - >>> - >>> # Alternatively: - >>> - >>> # Iterate over results one page at a time - >>> for page in client.list_notes(parent).pages: - ... for element in page: - ... # process element - ... pass - - Args: - parent (str): The name of the project to list notes for in the form of - ``projects/[PROJECT_ID]``. - filter_ (str): The filter expression. - page_size (int): The maximum number of resources contained in the - underlying API response. If page streaming is performed per- - resource, this parameter does not affect the return value. If page - streaming is performed per-page, this determines the maximum number - of resources in a page. - retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will - be retried using a default configuration. - timeout (Optional[float]): The amount of time, in seconds, to wait - for the request to complete. Note that if ``retry`` is - specified, the timeout applies to each individual attempt. - metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata - that is provided to the method. - - Returns: - A :class:`~google.api_core.page_iterator.PageIterator` instance. - An iterable of :class:`~grafeas.grafeas_v1.types.Note` instances. - You can also iterate over the pages of the response - using its `pages` property. - - Raises: - google.api_core.exceptions.GoogleAPICallError: If the request - failed for any reason. - google.api_core.exceptions.RetryError: If the request failed due - to a retryable error and retry attempts failed. - ValueError: If the parameters are invalid. - """ - # Wrap the transport method to add retry and timeout logic. - if "list_notes" not in self._inner_api_calls: - self._inner_api_calls[ - "list_notes" - ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.list_notes, - default_retry=self._method_configs["ListNotes"].retry, - default_timeout=self._method_configs["ListNotes"].timeout, - client_info=self._client_info, - ) - - request = grafeas_pb2.ListNotesRequest( - parent=parent, filter=filter_, page_size=page_size, - ) - if metadata is None: - metadata = [] - metadata = list(metadata) - try: - routing_header = [("parent", parent)] - except AttributeError: - pass - else: - routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( - routing_header - ) - metadata.append(routing_metadata) - - iterator = google.api_core.page_iterator.GRPCIterator( - client=None, - method=functools.partial( - self._inner_api_calls["list_notes"], - retry=retry, - timeout=timeout, - metadata=metadata, - ), - request=request, - items_field="notes", - request_token_field="page_token", - response_token_field="next_page_token", - ) - return iterator - - def delete_note( - self, - name, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None, - ): - """ - Deletes the specified note. - - Example: - >>> from grafeas import grafeas_v1 - >>> from grafeas.grafeas_v1.gapic.transports import grafeas_grpc_transport - >>> - >>> address = "[SERVICE_ADDRESS]" - >>> scopes = ("[SCOPE]") - >>> transport = grafeas_grpc_transport.GrafeasGrpcTransport(address, scopes) - >>> client = grafeas_v1.GrafeasClient(transport) - >>> - >>> name = client.note_path('[PROJECT]', '[NOTE]') - >>> - >>> client.delete_note(name) - - Args: - name (str): The name of the note in the form of - ``projects/[PROVIDER_ID]/notes/[NOTE_ID]``. - retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will - be retried using a default configuration. - timeout (Optional[float]): The amount of time, in seconds, to wait - for the request to complete. Note that if ``retry`` is - specified, the timeout applies to each individual attempt. - metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata - that is provided to the method. - - Raises: - google.api_core.exceptions.GoogleAPICallError: If the request - failed for any reason. - google.api_core.exceptions.RetryError: If the request failed due - to a retryable error and retry attempts failed. - ValueError: If the parameters are invalid. - """ - # Wrap the transport method to add retry and timeout logic. - if "delete_note" not in self._inner_api_calls: - self._inner_api_calls[ - "delete_note" - ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.delete_note, - default_retry=self._method_configs["DeleteNote"].retry, - default_timeout=self._method_configs["DeleteNote"].timeout, - client_info=self._client_info, - ) - - request = grafeas_pb2.DeleteNoteRequest(name=name,) - if metadata is None: - metadata = [] - metadata = list(metadata) - try: - routing_header = [("name", name)] - except AttributeError: - pass - else: - routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( - routing_header - ) - metadata.append(routing_metadata) - - self._inner_api_calls["delete_note"]( - request, retry=retry, timeout=timeout, metadata=metadata - ) - - def create_note( - self, - parent, - note_id, - note, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None, - ): - """ - Creates a new note. - - Example: - >>> from grafeas import grafeas_v1 - >>> from grafeas.grafeas_v1.gapic.transports import grafeas_grpc_transport - >>> - >>> address = "[SERVICE_ADDRESS]" - >>> scopes = ("[SCOPE]") - >>> transport = grafeas_grpc_transport.GrafeasGrpcTransport(address, scopes) - >>> client = grafeas_v1.GrafeasClient(transport) - >>> - >>> parent = client.project_path('[PROJECT]') - >>> - >>> # TODO: Initialize `note_id`: - >>> note_id = '' - >>> - >>> # TODO: Initialize `note`: - >>> note = {} - >>> - >>> response = client.create_note(parent, note_id, note) - - Args: - parent (str): The name of the project in the form of ``projects/[PROJECT_ID]``, - under which the note is to be created. - note_id (str): The ID to use for this note. - note (Union[dict, ~grafeas.grafeas_v1.types.Note]): The note to create. - - If a dict is provided, it must be of the same form as the protobuf - message :class:`~grafeas.grafeas_v1.types.Note` - retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will - be retried using a default configuration. - timeout (Optional[float]): The amount of time, in seconds, to wait - for the request to complete. Note that if ``retry`` is - specified, the timeout applies to each individual attempt. - metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata - that is provided to the method. - - Returns: - A :class:`~grafeas.grafeas_v1.types.Note` instance. - - Raises: - google.api_core.exceptions.GoogleAPICallError: If the request - failed for any reason. - google.api_core.exceptions.RetryError: If the request failed due - to a retryable error and retry attempts failed. - ValueError: If the parameters are invalid. - """ - # Wrap the transport method to add retry and timeout logic. - if "create_note" not in self._inner_api_calls: - self._inner_api_calls[ - "create_note" - ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.create_note, - default_retry=self._method_configs["CreateNote"].retry, - default_timeout=self._method_configs["CreateNote"].timeout, - client_info=self._client_info, - ) - - request = grafeas_pb2.CreateNoteRequest( - parent=parent, note_id=note_id, note=note, - ) - if metadata is None: - metadata = [] - metadata = list(metadata) - try: - routing_header = [("parent", parent)] - except AttributeError: - pass - else: - routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( - routing_header - ) - metadata.append(routing_metadata) - - return self._inner_api_calls["create_note"]( - request, retry=retry, timeout=timeout, metadata=metadata - ) - - def batch_create_notes( - self, - parent, - notes, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None, - ): - """ - Creates new notes in batch. - - Example: - >>> from grafeas import grafeas_v1 - >>> from grafeas.grafeas_v1.gapic.transports import grafeas_grpc_transport - >>> - >>> address = "[SERVICE_ADDRESS]" - >>> scopes = ("[SCOPE]") - >>> transport = grafeas_grpc_transport.GrafeasGrpcTransport(address, scopes) - >>> client = grafeas_v1.GrafeasClient(transport) - >>> - >>> parent = client.project_path('[PROJECT]') - >>> - >>> # TODO: Initialize `notes`: - >>> notes = {} - >>> - >>> response = client.batch_create_notes(parent, notes) - - Args: - parent (str): The name of the project in the form of ``projects/[PROJECT_ID]``, - under which the notes are to be created. - notes (dict[str -> Union[dict, ~grafeas.grafeas_v1.types.Note]]): The notes to create. Max allowed length is 1000. - - If a dict is provided, it must be of the same form as the protobuf - message :class:`~grafeas.grafeas_v1.types.Note` - retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will - be retried using a default configuration. - timeout (Optional[float]): The amount of time, in seconds, to wait - for the request to complete. Note that if ``retry`` is - specified, the timeout applies to each individual attempt. - metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata - that is provided to the method. - - Returns: - A :class:`~grafeas.grafeas_v1.types.BatchCreateNotesResponse` instance. - - Raises: - google.api_core.exceptions.GoogleAPICallError: If the request - failed for any reason. - google.api_core.exceptions.RetryError: If the request failed due - to a retryable error and retry attempts failed. - ValueError: If the parameters are invalid. - """ - # Wrap the transport method to add retry and timeout logic. - if "batch_create_notes" not in self._inner_api_calls: - self._inner_api_calls[ - "batch_create_notes" - ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.batch_create_notes, - default_retry=self._method_configs["BatchCreateNotes"].retry, - default_timeout=self._method_configs["BatchCreateNotes"].timeout, - client_info=self._client_info, - ) - - request = grafeas_pb2.BatchCreateNotesRequest(parent=parent, notes=notes,) - if metadata is None: - metadata = [] - metadata = list(metadata) - try: - routing_header = [("parent", parent)] - except AttributeError: - pass - else: - routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( - routing_header - ) - metadata.append(routing_metadata) - - return self._inner_api_calls["batch_create_notes"]( - request, retry=retry, timeout=timeout, metadata=metadata - ) - - def update_note( - self, - name, - note, - update_mask=None, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None, - ): - """ - Updates the specified note. - - Example: - >>> from grafeas import grafeas_v1 - >>> from grafeas.grafeas_v1.gapic.transports import grafeas_grpc_transport - >>> - >>> address = "[SERVICE_ADDRESS]" - >>> scopes = ("[SCOPE]") - >>> transport = grafeas_grpc_transport.GrafeasGrpcTransport(address, scopes) - >>> client = grafeas_v1.GrafeasClient(transport) - >>> - >>> name = client.note_path('[PROJECT]', '[NOTE]') - >>> - >>> # TODO: Initialize `note`: - >>> note = {} - >>> - >>> response = client.update_note(name, note) - - Args: - name (str): The name of the note in the form of - ``projects/[PROVIDER_ID]/notes/[NOTE_ID]``. - note (Union[dict, ~grafeas.grafeas_v1.types.Note]): The updated note. - - If a dict is provided, it must be of the same form as the protobuf - message :class:`~grafeas.grafeas_v1.types.Note` - update_mask (Union[dict, ~grafeas.grafeas_v1.types.FieldMask]): The fields to update. - - If a dict is provided, it must be of the same form as the protobuf - message :class:`~grafeas.grafeas_v1.types.FieldMask` - retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will - be retried using a default configuration. - timeout (Optional[float]): The amount of time, in seconds, to wait - for the request to complete. Note that if ``retry`` is - specified, the timeout applies to each individual attempt. - metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata - that is provided to the method. - - Returns: - A :class:`~grafeas.grafeas_v1.types.Note` instance. - - Raises: - google.api_core.exceptions.GoogleAPICallError: If the request - failed for any reason. - google.api_core.exceptions.RetryError: If the request failed due - to a retryable error and retry attempts failed. - ValueError: If the parameters are invalid. - """ - # Wrap the transport method to add retry and timeout logic. - if "update_note" not in self._inner_api_calls: - self._inner_api_calls[ - "update_note" - ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.update_note, - default_retry=self._method_configs["UpdateNote"].retry, - default_timeout=self._method_configs["UpdateNote"].timeout, - client_info=self._client_info, - ) - - request = grafeas_pb2.UpdateNoteRequest( - name=name, note=note, update_mask=update_mask, - ) - if metadata is None: - metadata = [] - metadata = list(metadata) - try: - routing_header = [("name", name)] - except AttributeError: - pass - else: - routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( - routing_header - ) - metadata.append(routing_metadata) - - return self._inner_api_calls["update_note"]( - request, retry=retry, timeout=timeout, metadata=metadata - ) - - def list_note_occurrences( - self, - name, - filter_=None, - page_size=None, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None, - ): - """ - Lists occurrences referencing the specified note. Provider projects can use - this method to get all occurrences across consumer projects referencing the - specified note. - - Example: - >>> from grafeas import grafeas_v1 - >>> from grafeas.grafeas_v1.gapic.transports import grafeas_grpc_transport - >>> - >>> address = "[SERVICE_ADDRESS]" - >>> scopes = ("[SCOPE]") - >>> transport = grafeas_grpc_transport.GrafeasGrpcTransport(address, scopes) - >>> client = grafeas_v1.GrafeasClient(transport) - >>> - >>> name = client.note_path('[PROJECT]', '[NOTE]') - >>> - >>> # Iterate over all results - >>> for element in client.list_note_occurrences(name): - ... # process element - ... pass - >>> - >>> - >>> # Alternatively: - >>> - >>> # Iterate over results one page at a time - >>> for page in client.list_note_occurrences(name).pages: - ... for element in page: - ... # process element - ... pass - - Args: - name (str): The name of the note to list occurrences for in the form of - ``projects/[PROVIDER_ID]/notes/[NOTE_ID]``. - filter_ (str): The filter expression. - page_size (int): The maximum number of resources contained in the - underlying API response. If page streaming is performed per- - resource, this parameter does not affect the return value. If page - streaming is performed per-page, this determines the maximum number - of resources in a page. - retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will - be retried using a default configuration. - timeout (Optional[float]): The amount of time, in seconds, to wait - for the request to complete. Note that if ``retry`` is - specified, the timeout applies to each individual attempt. - metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata - that is provided to the method. - - Returns: - A :class:`~google.api_core.page_iterator.PageIterator` instance. - An iterable of :class:`~grafeas.grafeas_v1.types.Occurrence` instances. - You can also iterate over the pages of the response - using its `pages` property. - - Raises: - google.api_core.exceptions.GoogleAPICallError: If the request - failed for any reason. - google.api_core.exceptions.RetryError: If the request failed due - to a retryable error and retry attempts failed. - ValueError: If the parameters are invalid. - """ - # Wrap the transport method to add retry and timeout logic. - if "list_note_occurrences" not in self._inner_api_calls: - self._inner_api_calls[ - "list_note_occurrences" - ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.list_note_occurrences, - default_retry=self._method_configs["ListNoteOccurrences"].retry, - default_timeout=self._method_configs["ListNoteOccurrences"].timeout, - client_info=self._client_info, - ) - - request = grafeas_pb2.ListNoteOccurrencesRequest( - name=name, filter=filter_, page_size=page_size, - ) - if metadata is None: - metadata = [] - metadata = list(metadata) - try: - routing_header = [("name", name)] - except AttributeError: - pass - else: - routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( - routing_header - ) - metadata.append(routing_metadata) - - iterator = google.api_core.page_iterator.GRPCIterator( - client=None, - method=functools.partial( - self._inner_api_calls["list_note_occurrences"], - retry=retry, - timeout=timeout, - metadata=metadata, - ), - request=request, - items_field="occurrences", - request_token_field="page_token", - response_token_field="next_page_token", - ) - return iterator diff --git a/packages/grafeas/grafeas/grafeas_v1/gapic/transports/grafeas_grpc_transport.py b/packages/grafeas/grafeas/grafeas_v1/gapic/transports/grafeas_grpc_transport.py deleted file mode 100644 index 8a630ead26aa..000000000000 --- a/packages/grafeas/grafeas/grafeas_v1/gapic/transports/grafeas_grpc_transport.py +++ /dev/null @@ -1,291 +0,0 @@ -# -*- 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 -# -# https://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. - - -import google.api_core.grpc_helpers - -from grafeas.grafeas_v1.proto import grafeas_pb2_grpc - - -class GrafeasGrpcTransport(object): - """gRPC transport class providing stubs for - grafeas.v1 Grafeas API. - - The transport provides access to the raw gRPC stubs, - which can be used to take advantage of advanced - features of gRPC. - """ - - def __init__(self, address, scopes, channel=None, credentials=None): - """Instantiate the transport class. - - Args: - address (str): The address where the service is hosted. - scopes (Sequence[str]): The scopes needed to make gRPC calls. - channel (grpc.Channel): A ``Channel`` instance through - which to make calls. This argument is mutually exclusive - with ``credentials``; providing both will raise an exception. - credentials (google.auth.credentials.Credentials): The - authorization credentials to attach to requests. These - credentials identify this application to the service. If none - are specified, the client will attempt to ascertain the - credentials from the environment. - - """ - # If both `channel` and `credentials` are specified, raise an - # exception (channels come with credentials baked in already). - if channel is not None and credentials is not None: - raise ValueError( - "The `channel` and `credentials` arguments are mutually " "exclusive.", - ) - - # Create the channel. - if channel is None: - channel = self.create_channel( - address, - scopes, - credentials=credentials, - options={ - "grpc.max_send_message_length": -1, - "grpc.max_receive_message_length": -1, - }.items(), - ) - - self._channel = channel - - # gRPC uses objects called "stubs" that are bound to the - # channel and provide a basic method for each RPC. - self._stubs = { - "grafeas_stub": grafeas_pb2_grpc.GrafeasStub(channel), - } - - @classmethod - def create_channel(cls, address, scopes, credentials=None, **kwargs): - """Create and return a gRPC channel object. - - Args: - address (str): The host for the channel to use. - scopes (Sequence[str]): The scopes needed to make gRPC calls. - credentials (~.Credentials): The - authorization credentials to attach to requests. These - credentials identify this application to the service. If - none are specified, the client will attempt to ascertain - the credentials from the environment. - kwargs (dict): Keyword arguments, which are passed to the - channel creation. - - Returns: - grpc.Channel: A gRPC channel object. - """ - return google.api_core.grpc_helpers.create_channel( - address, credentials=credentials, scopes=scopes, **kwargs - ) - - @property - def channel(self): - """The gRPC channel used by the transport. - - Returns: - grpc.Channel: A gRPC channel object. - """ - return self._channel - - @property - def get_occurrence(self): - """Return the gRPC stub for :meth:`GrafeasClient.get_occurrence`. - - Gets the specified occurrence. - - Returns: - Callable: A callable which accepts the appropriate - deserialized request object and returns a - deserialized response object. - """ - return self._stubs["grafeas_stub"].GetOccurrence - - @property - def list_occurrences(self): - """Return the gRPC stub for :meth:`GrafeasClient.list_occurrences`. - - Lists occurrences for the specified project. - - Returns: - Callable: A callable which accepts the appropriate - deserialized request object and returns a - deserialized response object. - """ - return self._stubs["grafeas_stub"].ListOccurrences - - @property - def delete_occurrence(self): - """Return the gRPC stub for :meth:`GrafeasClient.delete_occurrence`. - - Deletes the specified occurrence. For example, use this method to delete an - occurrence when the occurrence is no longer applicable for the given - resource. - - Returns: - Callable: A callable which accepts the appropriate - deserialized request object and returns a - deserialized response object. - """ - return self._stubs["grafeas_stub"].DeleteOccurrence - - @property - def create_occurrence(self): - """Return the gRPC stub for :meth:`GrafeasClient.create_occurrence`. - - Creates a new occurrence. - - Returns: - Callable: A callable which accepts the appropriate - deserialized request object and returns a - deserialized response object. - """ - return self._stubs["grafeas_stub"].CreateOccurrence - - @property - def batch_create_occurrences(self): - """Return the gRPC stub for :meth:`GrafeasClient.batch_create_occurrences`. - - Creates new occurrences in batch. - - Returns: - Callable: A callable which accepts the appropriate - deserialized request object and returns a - deserialized response object. - """ - return self._stubs["grafeas_stub"].BatchCreateOccurrences - - @property - def update_occurrence(self): - """Return the gRPC stub for :meth:`GrafeasClient.update_occurrence`. - - Updates the specified occurrence. - - Returns: - Callable: A callable which accepts the appropriate - deserialized request object and returns a - deserialized response object. - """ - return self._stubs["grafeas_stub"].UpdateOccurrence - - @property - def get_occurrence_note(self): - """Return the gRPC stub for :meth:`GrafeasClient.get_occurrence_note`. - - Gets the note attached to the specified occurrence. Consumer projects can - use this method to get a note that belongs to a provider project. - - Returns: - Callable: A callable which accepts the appropriate - deserialized request object and returns a - deserialized response object. - """ - return self._stubs["grafeas_stub"].GetOccurrenceNote - - @property - def get_note(self): - """Return the gRPC stub for :meth:`GrafeasClient.get_note`. - - Gets the specified note. - - Returns: - Callable: A callable which accepts the appropriate - deserialized request object and returns a - deserialized response object. - """ - return self._stubs["grafeas_stub"].GetNote - - @property - def list_notes(self): - """Return the gRPC stub for :meth:`GrafeasClient.list_notes`. - - Lists notes for the specified project. - - Returns: - Callable: A callable which accepts the appropriate - deserialized request object and returns a - deserialized response object. - """ - return self._stubs["grafeas_stub"].ListNotes - - @property - def delete_note(self): - """Return the gRPC stub for :meth:`GrafeasClient.delete_note`. - - Deletes the specified note. - - Returns: - Callable: A callable which accepts the appropriate - deserialized request object and returns a - deserialized response object. - """ - return self._stubs["grafeas_stub"].DeleteNote - - @property - def create_note(self): - """Return the gRPC stub for :meth:`GrafeasClient.create_note`. - - Creates a new note. - - Returns: - Callable: A callable which accepts the appropriate - deserialized request object and returns a - deserialized response object. - """ - return self._stubs["grafeas_stub"].CreateNote - - @property - def batch_create_notes(self): - """Return the gRPC stub for :meth:`GrafeasClient.batch_create_notes`. - - Creates new notes in batch. - - Returns: - Callable: A callable which accepts the appropriate - deserialized request object and returns a - deserialized response object. - """ - return self._stubs["grafeas_stub"].BatchCreateNotes - - @property - def update_note(self): - """Return the gRPC stub for :meth:`GrafeasClient.update_note`. - - Updates the specified note. - - Returns: - Callable: A callable which accepts the appropriate - deserialized request object and returns a - deserialized response object. - """ - return self._stubs["grafeas_stub"].UpdateNote - - @property - def list_note_occurrences(self): - """Return the gRPC stub for :meth:`GrafeasClient.list_note_occurrences`. - - Lists occurrences referencing the specified note. Provider projects can use - this method to get all occurrences across consumer projects referencing the - specified note. - - Returns: - Callable: A callable which accepts the appropriate - deserialized request object and returns a - deserialized response object. - """ - return self._stubs["grafeas_stub"].ListNoteOccurrences diff --git a/packages/grafeas/grafeas/grafeas_v1/proto/attestation.proto b/packages/grafeas/grafeas/grafeas_v1/proto/attestation.proto deleted file mode 100644 index 61423d3eb29e..000000000000 --- a/packages/grafeas/grafeas/grafeas_v1/proto/attestation.proto +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright 2019 The Grafeas Authors. All rights reserved. -// -// 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. - -syntax = "proto3"; - -package grafeas.v1; - -import "grafeas/v1/common.proto"; - -option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; -option java_multiple_files = true; -option java_package = "io.grafeas.v1"; -option objc_class_prefix = "GRA"; - -// An attestation wrapper with a PGP-compatible signature. This message only -// supports `ATTACHED` signatures, where the payload that is signed is included -// alongside the signature itself in the same file. - -// Note kind that represents a logical attestation "role" or "authority". For -// example, an organization might have one `Authority` for "QA" and one for -// "build". This note is intended to act strictly as a grouping mechanism for -// the attached occurrences (Attestations). This grouping mechanism also -// provides a security boundary, since IAM ACLs gate the ability for a principle -// to attach an occurrence to a given note. It also provides a single point of -// lookup to find all attached attestation occurrences, even if they don't all -// live in the same project. -message AttestationNote { - // This submessage provides human-readable hints about the purpose of the - // authority. Because the name of a note acts as its resource reference, it is - // important to disambiguate the canonical name of the Note (which might be a - // UUID for security purposes) from "readable" names more suitable for debug - // output. Note that these hints should not be used to look up authorities in - // security sensitive contexts, such as when looking up attestations to - // verify. - message Hint { - // Required. The human readable name of this attestation authority, for - // example "qa". - string human_readable_name = 1; - } - - // Hint hints at the purpose of the attestation authority. - Hint hint = 1; -} - -// Occurrence that represents a single "attestation". The authenticity of an -// attestation can be verified using the attached signature. If the verifier -// trusts the public key of the signer, then verifying the signature is -// sufficient to establish trust. In this circumstance, the authority to which -// this attestation is attached is primarily useful for lookup (how to find -// this attestation if you already know the authority and artifact to be -// verified) and intent (for which authority this attestation was intended to -// sign. -message AttestationOccurrence { - // Required. The serialized payload that is verified by one or more - // `signatures`. - bytes serialized_payload = 1; - // One or more signatures over `serialized_payload`. Verifier implementations - // should consider this attestation message verified if at least one - // `signature` verifies `serialized_payload`. See `Signature` in common.proto - // for more details on signature structure and verification. - repeated Signature signatures = 2; -} diff --git a/packages/grafeas/grafeas/grafeas_v1/proto/attestation_pb2.py b/packages/grafeas/grafeas/grafeas_v1/proto/attestation_pb2.py deleted file mode 100644 index f9dc87ac0f96..000000000000 --- a/packages/grafeas/grafeas/grafeas_v1/proto/attestation_pb2.py +++ /dev/null @@ -1,261 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: grafeas/grafeas_v1/proto/attestation.proto -"""Generated protocol buffer code.""" -from google.protobuf import descriptor as _descriptor -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection -from google.protobuf import symbol_database as _symbol_database - -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - -from grafeas.grafeas_v1.proto import ( - common_pb2 as grafeas_dot_grafeas__v1_dot_proto_dot_common__pb2, -) - - -DESCRIPTOR = _descriptor.FileDescriptor( - name="grafeas/grafeas_v1/proto/attestation.proto", - package="grafeas.v1", - syntax="proto3", - serialized_options=b"\n\rio.grafeas.v1P\001ZFgoogle.golang.org/genproto/googleapis/grafeas/grafeas_v1/proto;grafeas\242\002\003GRA", - create_key=_descriptor._internal_create_key, - serialized_pb=b'\n*grafeas/grafeas_v1/proto/attestation.proto\x12\ngrafeas.v1\x1a%grafeas/grafeas_v1/proto/common.proto"f\n\x0f\x41ttestationNote\x12.\n\x04hint\x18\x01 \x01(\x0b\x32 .grafeas.v1.AttestationNote.Hint\x1a#\n\x04Hint\x12\x1b\n\x13human_readable_name\x18\x01 \x01(\t"^\n\x15\x41ttestationOccurrence\x12\x1a\n\x12serialized_payload\x18\x01 \x01(\x0c\x12)\n\nsignatures\x18\x02 \x03(\x0b\x32\x15.grafeas.v1.SignatureB_\n\rio.grafeas.v1P\x01ZFgoogle.golang.org/genproto/googleapis/grafeas/grafeas_v1/proto;grafeas\xa2\x02\x03GRAb\x06proto3', - dependencies=[grafeas_dot_grafeas__v1_dot_proto_dot_common__pb2.DESCRIPTOR,], -) - - -_ATTESTATIONNOTE_HINT = _descriptor.Descriptor( - name="Hint", - full_name="grafeas.v1.AttestationNote.Hint", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="human_readable_name", - full_name="grafeas.v1.AttestationNote.Hint.human_readable_name", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=164, - serialized_end=199, -) - -_ATTESTATIONNOTE = _descriptor.Descriptor( - name="AttestationNote", - full_name="grafeas.v1.AttestationNote", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="hint", - full_name="grafeas.v1.AttestationNote.hint", - index=0, - number=1, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[_ATTESTATIONNOTE_HINT,], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=97, - serialized_end=199, -) - - -_ATTESTATIONOCCURRENCE = _descriptor.Descriptor( - name="AttestationOccurrence", - full_name="grafeas.v1.AttestationOccurrence", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="serialized_payload", - full_name="grafeas.v1.AttestationOccurrence.serialized_payload", - index=0, - number=1, - type=12, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"", - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="signatures", - full_name="grafeas.v1.AttestationOccurrence.signatures", - index=1, - number=2, - type=11, - cpp_type=10, - label=3, - has_default_value=False, - default_value=[], - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=201, - serialized_end=295, -) - -_ATTESTATIONNOTE_HINT.containing_type = _ATTESTATIONNOTE -_ATTESTATIONNOTE.fields_by_name["hint"].message_type = _ATTESTATIONNOTE_HINT -_ATTESTATIONOCCURRENCE.fields_by_name[ - "signatures" -].message_type = grafeas_dot_grafeas__v1_dot_proto_dot_common__pb2._SIGNATURE -DESCRIPTOR.message_types_by_name["AttestationNote"] = _ATTESTATIONNOTE -DESCRIPTOR.message_types_by_name["AttestationOccurrence"] = _ATTESTATIONOCCURRENCE -_sym_db.RegisterFileDescriptor(DESCRIPTOR) - -AttestationNote = _reflection.GeneratedProtocolMessageType( - "AttestationNote", - (_message.Message,), - { - "Hint": _reflection.GeneratedProtocolMessageType( - "Hint", - (_message.Message,), - { - "DESCRIPTOR": _ATTESTATIONNOTE_HINT, - "__module__": "grafeas.grafeas_v1.proto.attestation_pb2", - "__doc__": """This submessage provides human-readable hints about the purpose of the - authority. Because the name of a note acts as its resource reference, - it is important to disambiguate the canonical name of the Note (which - might be a UUID for security purposes) from “readable” names more - suitable for debug output. Note that these hints should not be used to - look up authorities in security sensitive contexts, such as when - looking up attestations to verify. - - Attributes: - human_readable_name: - Required. The human readable name of this attestation - authority, for example “qa”. - """, - # @@protoc_insertion_point(class_scope:grafeas.v1.AttestationNote.Hint) - }, - ), - "DESCRIPTOR": _ATTESTATIONNOTE, - "__module__": "grafeas.grafeas_v1.proto.attestation_pb2", - "__doc__": """Note kind that represents a logical attestation “role” or “authority”. - For example, an organization might have one ``Authority`` for “QA” and - one for “build”. This note is intended to act strictly as a grouping - mechanism for the attached occurrences (Attestations). This grouping - mechanism also provides a security boundary, since IAM ACLs gate the - ability for a principle to attach an occurrence to a given note. It - also provides a single point of lookup to find all attached - attestation occurrences, even if they don’t all live in the same - project. - - Attributes: - hint: - Hint hints at the purpose of the attestation authority. - """, - # @@protoc_insertion_point(class_scope:grafeas.v1.AttestationNote) - }, -) -_sym_db.RegisterMessage(AttestationNote) -_sym_db.RegisterMessage(AttestationNote.Hint) - -AttestationOccurrence = _reflection.GeneratedProtocolMessageType( - "AttestationOccurrence", - (_message.Message,), - { - "DESCRIPTOR": _ATTESTATIONOCCURRENCE, - "__module__": "grafeas.grafeas_v1.proto.attestation_pb2", - "__doc__": """Occurrence that represents a single “attestation”. The authenticity of - an attestation can be verified using the attached signature. If the - verifier trusts the public key of the signer, then verifying the - signature is sufficient to establish trust. In this circumstance, the - authority to which this attestation is attached is primarily useful - for lookup (how to find this attestation if you already know the - authority and artifact to be verified) and intent (for which authority - this attestation was intended to sign. - - Attributes: - serialized_payload: - Required. The serialized payload that is verified by one or - more ``signatures``. - signatures: - One or more signatures over ``serialized_payload``. Verifier - implementations should consider this attestation message - verified if at least one ``signature`` verifies - ``serialized_payload``. See ``Signature`` in common.proto for - more details on signature structure and verification. - """, - # @@protoc_insertion_point(class_scope:grafeas.v1.AttestationOccurrence) - }, -) -_sym_db.RegisterMessage(AttestationOccurrence) - - -DESCRIPTOR._options = None -# @@protoc_insertion_point(module_scope) diff --git a/packages/grafeas/grafeas/grafeas_v1/proto/build.proto b/packages/grafeas/grafeas/grafeas_v1/proto/build.proto deleted file mode 100644 index c0e9c7566540..000000000000 --- a/packages/grafeas/grafeas/grafeas_v1/proto/build.proto +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2019 The Grafeas Authors. All rights reserved. -// -// 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. - -syntax = "proto3"; - -package grafeas.v1; - -import "grafeas/v1/provenance.proto"; - -option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; -option java_multiple_files = true; -option java_package = "io.grafeas.v1"; -option objc_class_prefix = "GRA"; - -// Note holding the version of the provider's builder and the signature of the -// provenance message in the build details occurrence. -message BuildNote { - // Required. Immutable. Version of the builder which produced this build. - string builder_version = 1; -} - -// Details of a build occurrence. -message BuildOccurrence { - // Required. The actual provenance for the build. - grafeas.v1.BuildProvenance provenance = 1; - - // Serialized JSON representation of the provenance, used in generating the - // build signature in the corresponding build note. After verifying the - // signature, `provenance_bytes` can be unmarshalled and compared to the - // provenance to confirm that it is unchanged. A base64-encoded string - // representation of the provenance bytes is used for the signature in order - // to interoperate with openssl which expects this format for signature - // verification. - // - // The serialized form is captured both to avoid ambiguity in how the - // provenance is marshalled to json as well to prevent incompatibilities with - // future changes. - string provenance_bytes = 2; -} diff --git a/packages/grafeas/grafeas/grafeas_v1/proto/build_pb2.py b/packages/grafeas/grafeas/grafeas_v1/proto/build_pb2.py deleted file mode 100644 index 941925b589bf..000000000000 --- a/packages/grafeas/grafeas/grafeas_v1/proto/build_pb2.py +++ /dev/null @@ -1,187 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: grafeas/grafeas_v1/proto/build.proto -"""Generated protocol buffer code.""" -from google.protobuf import descriptor as _descriptor -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection -from google.protobuf import symbol_database as _symbol_database - -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - -from grafeas.grafeas_v1.proto import ( - provenance_pb2 as grafeas_dot_grafeas__v1_dot_proto_dot_provenance__pb2, -) - - -DESCRIPTOR = _descriptor.FileDescriptor( - name="grafeas/grafeas_v1/proto/build.proto", - package="grafeas.v1", - syntax="proto3", - serialized_options=b"\n\rio.grafeas.v1P\001ZFgoogle.golang.org/genproto/googleapis/grafeas/grafeas_v1/proto;grafeas\242\002\003GRA", - create_key=_descriptor._internal_create_key, - serialized_pb=b'\n$grafeas/grafeas_v1/proto/build.proto\x12\ngrafeas.v1\x1a)grafeas/grafeas_v1/proto/provenance.proto"$\n\tBuildNote\x12\x17\n\x0f\x62uilder_version\x18\x01 \x01(\t"\\\n\x0f\x42uildOccurrence\x12/\n\nprovenance\x18\x01 \x01(\x0b\x32\x1b.grafeas.v1.BuildProvenance\x12\x18\n\x10provenance_bytes\x18\x02 \x01(\tB_\n\rio.grafeas.v1P\x01ZFgoogle.golang.org/genproto/googleapis/grafeas/grafeas_v1/proto;grafeas\xa2\x02\x03GRAb\x06proto3', - dependencies=[grafeas_dot_grafeas__v1_dot_proto_dot_provenance__pb2.DESCRIPTOR,], -) - - -_BUILDNOTE = _descriptor.Descriptor( - name="BuildNote", - full_name="grafeas.v1.BuildNote", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="builder_version", - full_name="grafeas.v1.BuildNote.builder_version", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=95, - serialized_end=131, -) - - -_BUILDOCCURRENCE = _descriptor.Descriptor( - name="BuildOccurrence", - full_name="grafeas.v1.BuildOccurrence", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="provenance", - full_name="grafeas.v1.BuildOccurrence.provenance", - index=0, - number=1, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="provenance_bytes", - full_name="grafeas.v1.BuildOccurrence.provenance_bytes", - index=1, - number=2, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=133, - serialized_end=225, -) - -_BUILDOCCURRENCE.fields_by_name[ - "provenance" -].message_type = grafeas_dot_grafeas__v1_dot_proto_dot_provenance__pb2._BUILDPROVENANCE -DESCRIPTOR.message_types_by_name["BuildNote"] = _BUILDNOTE -DESCRIPTOR.message_types_by_name["BuildOccurrence"] = _BUILDOCCURRENCE -_sym_db.RegisterFileDescriptor(DESCRIPTOR) - -BuildNote = _reflection.GeneratedProtocolMessageType( - "BuildNote", - (_message.Message,), - { - "DESCRIPTOR": _BUILDNOTE, - "__module__": "grafeas.grafeas_v1.proto.build_pb2", - "__doc__": """Note holding the version of the provider’s builder and the signature - of the provenance message in the build details occurrence. - - Attributes: - builder_version: - Required. Immutable. Version of the builder which produced - this build. - """, - # @@protoc_insertion_point(class_scope:grafeas.v1.BuildNote) - }, -) -_sym_db.RegisterMessage(BuildNote) - -BuildOccurrence = _reflection.GeneratedProtocolMessageType( - "BuildOccurrence", - (_message.Message,), - { - "DESCRIPTOR": _BUILDOCCURRENCE, - "__module__": "grafeas.grafeas_v1.proto.build_pb2", - "__doc__": """Details of a build occurrence. - - Attributes: - provenance: - Required. The actual provenance for the build. - provenance_bytes: - Serialized JSON representation of the provenance, used in - generating the build signature in the corresponding build - note. After verifying the signature, ``provenance_bytes`` can - be unmarshalled and compared to the provenance to confirm that - it is unchanged. A base64-encoded string representation of the - provenance bytes is used for the signature in order to - interoperate with openssl which expects this format for - signature verification. The serialized form is captured both - to avoid ambiguity in how the provenance is marshalled to json - as well to prevent incompatibilities with future changes. - """, - # @@protoc_insertion_point(class_scope:grafeas.v1.BuildOccurrence) - }, -) -_sym_db.RegisterMessage(BuildOccurrence) - - -DESCRIPTOR._options = None -# @@protoc_insertion_point(module_scope) diff --git a/packages/grafeas/grafeas/grafeas_v1/proto/common.proto b/packages/grafeas/grafeas/grafeas_v1/proto/common.proto deleted file mode 100644 index db780bb629c3..000000000000 --- a/packages/grafeas/grafeas/grafeas_v1/proto/common.proto +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright 2019 The Grafeas Authors. All rights reserved. -// -// 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. - -syntax = "proto3"; - -package grafeas.v1; - -option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; -option java_multiple_files = true; -option java_package = "io.grafeas.v1"; -option objc_class_prefix = "GRA"; - -// Kind represents the kinds of notes supported. -enum NoteKind { - // Unknown. - NOTE_KIND_UNSPECIFIED = 0; - // The note and occurrence represent a package vulnerability. - VULNERABILITY = 1; - // The note and occurrence assert build provenance. - BUILD = 2; - // This represents an image basis relationship. - IMAGE = 3; - // This represents a package installed via a package manager. - PACKAGE = 4; - // The note and occurrence track deployment events. - DEPLOYMENT = 5; - // The note and occurrence track the initial discovery status of a resource. - DISCOVERY = 6; - // This represents a logical "role" that can attest to artifacts. - ATTESTATION = 7; - // This represents an available package upgrade. - UPGRADE = 8; -} - -// Metadata for any related URL information. -message RelatedUrl { - // Specific URL associated with the resource. - string url = 1; - // Label to describe usage of the URL. - string label = 2; -} - -// Verifiers (e.g. Kritis implementations) MUST verify signatures -// with respect to the trust anchors defined in policy (e.g. a Kritis policy). -// Typically this means that the verifier has been configured with a map from -// `public_key_id` to public key material (and any required parameters, e.g. -// signing algorithm). -// -// In particular, verification implementations MUST NOT treat the signature -// `public_key_id` as anything more than a key lookup hint. The `public_key_id` -// DOES NOT validate or authenticate a public key; it only provides a mechanism -// for quickly selecting a public key ALREADY CONFIGURED on the verifier through -// a trusted channel. Verification implementations MUST reject signatures in any -// of the following circumstances: -// * The `public_key_id` is not recognized by the verifier. -// * The public key that `public_key_id` refers to does not verify the -// signature with respect to the payload. -// -// The `signature` contents SHOULD NOT be "attached" (where the payload is -// included with the serialized `signature` bytes). Verifiers MUST ignore any -// "attached" payload and only verify signatures with respect to explicitly -// provided payload (e.g. a `payload` field on the proto message that holds -// this Signature, or the canonical serialization of the proto message that -// holds this signature). -message Signature { - // The content of the signature, an opaque bytestring. - // The payload that this signature verifies MUST be unambiguously provided - // with the Signature during verification. A wrapper message might provide - // the payload explicitly. Alternatively, a message might have a canonical - // serialization that can always be unambiguously computed to derive the - // payload. - bytes signature = 1; - - // The identifier for the public key that verifies this signature. - // * The `public_key_id` is required. - // * The `public_key_id` MUST be an RFC3986 conformant URI. - // * When possible, the `public_key_id` SHOULD be an immutable reference, - // such as a cryptographic digest. - // - // Examples of valid `public_key_id`s: - // - // OpenPGP V4 public key fingerprint: - // * "openpgp4fpr:74FAF3B861BDA0870C7B6DEF607E48D2A663AEEA" - // See https://www.iana.org/assignments/uri-schemes/prov/openpgp4fpr for more - // details on this scheme. - // - // RFC6920 digest-named SubjectPublicKeyInfo (digest of the DER - // serialization): - // * "ni:///sha-256;cD9o9Cq6LG3jD0iKXqEi_vdjJGecm_iXkbqVoScViaU" - // * "nih:///sha-256;703f68f42aba2c6de30f488a5ea122fef76324679c9bf89791ba95a1271589a5" - string public_key_id = 2; -} diff --git a/packages/grafeas/grafeas/grafeas_v1/proto/cvss.proto b/packages/grafeas/grafeas/grafeas_v1/proto/cvss.proto deleted file mode 100644 index b41cd633d2a9..000000000000 --- a/packages/grafeas/grafeas/grafeas_v1/proto/cvss.proto +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright 2019 The Grafeas Authors. All rights reserved. -// -// 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. - -syntax = "proto3"; - -package grafeas.v1; - -option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; -option java_multiple_files = true; -option java_package = "io.grafeas.v1"; -option objc_class_prefix = "GRA"; - -// Common Vulnerability Scoring System version 3. -// For details, see https://www.first.org/cvss/specification-document -message CVSSv3 { - // The base score is a function of the base metric scores. - float base_score = 1; - - float exploitability_score = 2; - - float impact_score = 3; - - // Base Metrics - // Represents the intrinsic characteristics of a vulnerability that are - // constant over time and across user environments. - AttackVector attack_vector = 5; - AttackComplexity attack_complexity = 6; - PrivilegesRequired privileges_required = 7; - UserInteraction user_interaction = 8; - Scope scope = 9; - Impact confidentiality_impact = 10; - Impact integrity_impact = 11; - Impact availability_impact = 12; - - enum AttackVector { - ATTACK_VECTOR_UNSPECIFIED = 0; - ATTACK_VECTOR_NETWORK = 1; - ATTACK_VECTOR_ADJACENT = 2; - ATTACK_VECTOR_LOCAL = 3; - ATTACK_VECTOR_PHYSICAL = 4; - } - - enum AttackComplexity { - ATTACK_COMPLEXITY_UNSPECIFIED = 0; - ATTACK_COMPLEXITY_LOW = 1; - ATTACK_COMPLEXITY_HIGH = 2; - } - - enum PrivilegesRequired { - PRIVILEGES_REQUIRED_UNSPECIFIED = 0; - PRIVILEGES_REQUIRED_NONE = 1; - PRIVILEGES_REQUIRED_LOW = 2; - PRIVILEGES_REQUIRED_HIGH = 3; - } - - enum UserInteraction { - USER_INTERACTION_UNSPECIFIED = 0; - USER_INTERACTION_NONE = 1; - USER_INTERACTION_REQUIRED = 2; - } - - enum Scope { - SCOPE_UNSPECIFIED = 0; - SCOPE_UNCHANGED = 1; - SCOPE_CHANGED = 2; - } - - enum Impact { - IMPACT_UNSPECIFIED = 0; - IMPACT_HIGH = 1; - IMPACT_LOW = 2; - IMPACT_NONE = 3; - } -} diff --git a/packages/grafeas/grafeas/grafeas_v1/proto/deployment.proto b/packages/grafeas/grafeas/grafeas_v1/proto/deployment.proto deleted file mode 100644 index 5204004fd646..000000000000 --- a/packages/grafeas/grafeas/grafeas_v1/proto/deployment.proto +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright 2019 The Grafeas Authors. All rights reserved. -// -// 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. - -syntax = "proto3"; - -package grafeas.v1; - -import "google/protobuf/timestamp.proto"; - -option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; -option java_multiple_files = true; -option java_package = "io.grafeas.v1"; -option objc_class_prefix = "GRA"; - -// An artifact that can be deployed in some runtime. -message DeploymentNote { - // Required. Resource URI for the artifact being deployed. - repeated string resource_uri = 1; -} - -// The period during which some deployable was active in a runtime. -message DeploymentOccurrence { - // Identity of the user that triggered this deployment. - string user_email = 1; - - // Required. Beginning of the lifetime of this deployment. - google.protobuf.Timestamp deploy_time = 2; - - // End of the lifetime of this deployment. - google.protobuf.Timestamp undeploy_time = 3; - - // Configuration used to create this deployment. - string config = 4; - - // Address of the runtime element hosting this deployment. - string address = 5; - - // Output only. Resource URI for the artifact being deployed taken from - // the deployable field with the same name. - repeated string resource_uri = 6; - - // Types of platforms. - enum Platform { - // Unknown. - PLATFORM_UNSPECIFIED = 0; - // Google Container Engine. - GKE = 1; - // Google App Engine: Flexible Environment. - FLEX = 2; - // Custom user-defined platform. - CUSTOM = 3; - } - // Platform hosting this deployment. - Platform platform = 7; -} diff --git a/packages/grafeas/grafeas/grafeas_v1/proto/deployment_pb2.py b/packages/grafeas/grafeas/grafeas_v1/proto/deployment_pb2.py deleted file mode 100644 index 7b84d6a4b72d..000000000000 --- a/packages/grafeas/grafeas/grafeas_v1/proto/deployment_pb2.py +++ /dev/null @@ -1,335 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: grafeas/grafeas_v1/proto/deployment.proto -"""Generated protocol buffer code.""" -from google.protobuf import descriptor as _descriptor -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection -from google.protobuf import symbol_database as _symbol_database - -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - -from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 - - -DESCRIPTOR = _descriptor.FileDescriptor( - name="grafeas/grafeas_v1/proto/deployment.proto", - package="grafeas.v1", - syntax="proto3", - serialized_options=b"\n\rio.grafeas.v1P\001ZFgoogle.golang.org/genproto/googleapis/grafeas/grafeas_v1/proto;grafeas\242\002\003GRA", - create_key=_descriptor._internal_create_key, - serialized_pb=b'\n)grafeas/grafeas_v1/proto/deployment.proto\x12\ngrafeas.v1\x1a\x1fgoogle/protobuf/timestamp.proto"&\n\x0e\x44\x65ploymentNote\x12\x14\n\x0cresource_uri\x18\x01 \x03(\t"\xc7\x02\n\x14\x44\x65ploymentOccurrence\x12\x12\n\nuser_email\x18\x01 \x01(\t\x12/\n\x0b\x64\x65ploy_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x31\n\rundeploy_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0e\n\x06\x63onfig\x18\x04 \x01(\t\x12\x0f\n\x07\x61\x64\x64ress\x18\x05 \x01(\t\x12\x14\n\x0cresource_uri\x18\x06 \x03(\t\x12;\n\x08platform\x18\x07 \x01(\x0e\x32).grafeas.v1.DeploymentOccurrence.Platform"C\n\x08Platform\x12\x18\n\x14PLATFORM_UNSPECIFIED\x10\x00\x12\x07\n\x03GKE\x10\x01\x12\x08\n\x04\x46LEX\x10\x02\x12\n\n\x06\x43USTOM\x10\x03\x42_\n\rio.grafeas.v1P\x01ZFgoogle.golang.org/genproto/googleapis/grafeas/grafeas_v1/proto;grafeas\xa2\x02\x03GRAb\x06proto3', - dependencies=[google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR,], -) - - -_DEPLOYMENTOCCURRENCE_PLATFORM = _descriptor.EnumDescriptor( - name="Platform", - full_name="grafeas.v1.DeploymentOccurrence.Platform", - filename=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - values=[ - _descriptor.EnumValueDescriptor( - name="PLATFORM_UNSPECIFIED", - index=0, - number=0, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key, - ), - _descriptor.EnumValueDescriptor( - name="GKE", - index=1, - number=1, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key, - ), - _descriptor.EnumValueDescriptor( - name="FLEX", - index=2, - number=2, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key, - ), - _descriptor.EnumValueDescriptor( - name="CUSTOM", - index=3, - number=3, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key, - ), - ], - containing_type=None, - serialized_options=None, - serialized_start=391, - serialized_end=458, -) -_sym_db.RegisterEnumDescriptor(_DEPLOYMENTOCCURRENCE_PLATFORM) - - -_DEPLOYMENTNOTE = _descriptor.Descriptor( - name="DeploymentNote", - full_name="grafeas.v1.DeploymentNote", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="resource_uri", - full_name="grafeas.v1.DeploymentNote.resource_uri", - index=0, - number=1, - type=9, - cpp_type=9, - label=3, - has_default_value=False, - default_value=[], - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=90, - serialized_end=128, -) - - -_DEPLOYMENTOCCURRENCE = _descriptor.Descriptor( - name="DeploymentOccurrence", - full_name="grafeas.v1.DeploymentOccurrence", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="user_email", - full_name="grafeas.v1.DeploymentOccurrence.user_email", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="deploy_time", - full_name="grafeas.v1.DeploymentOccurrence.deploy_time", - index=1, - number=2, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="undeploy_time", - full_name="grafeas.v1.DeploymentOccurrence.undeploy_time", - index=2, - number=3, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="config", - full_name="grafeas.v1.DeploymentOccurrence.config", - index=3, - number=4, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="address", - full_name="grafeas.v1.DeploymentOccurrence.address", - index=4, - number=5, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="resource_uri", - full_name="grafeas.v1.DeploymentOccurrence.resource_uri", - index=5, - number=6, - type=9, - cpp_type=9, - label=3, - has_default_value=False, - default_value=[], - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="platform", - full_name="grafeas.v1.DeploymentOccurrence.platform", - index=6, - number=7, - type=14, - cpp_type=8, - label=1, - has_default_value=False, - default_value=0, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[_DEPLOYMENTOCCURRENCE_PLATFORM,], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=131, - serialized_end=458, -) - -_DEPLOYMENTOCCURRENCE.fields_by_name[ - "deploy_time" -].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP -_DEPLOYMENTOCCURRENCE.fields_by_name[ - "undeploy_time" -].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP -_DEPLOYMENTOCCURRENCE.fields_by_name[ - "platform" -].enum_type = _DEPLOYMENTOCCURRENCE_PLATFORM -_DEPLOYMENTOCCURRENCE_PLATFORM.containing_type = _DEPLOYMENTOCCURRENCE -DESCRIPTOR.message_types_by_name["DeploymentNote"] = _DEPLOYMENTNOTE -DESCRIPTOR.message_types_by_name["DeploymentOccurrence"] = _DEPLOYMENTOCCURRENCE -_sym_db.RegisterFileDescriptor(DESCRIPTOR) - -DeploymentNote = _reflection.GeneratedProtocolMessageType( - "DeploymentNote", - (_message.Message,), - { - "DESCRIPTOR": _DEPLOYMENTNOTE, - "__module__": "grafeas.grafeas_v1.proto.deployment_pb2", - "__doc__": """An artifact that can be deployed in some runtime. - - Attributes: - resource_uri: - Required. Resource URI for the artifact being deployed. - """, - # @@protoc_insertion_point(class_scope:grafeas.v1.DeploymentNote) - }, -) -_sym_db.RegisterMessage(DeploymentNote) - -DeploymentOccurrence = _reflection.GeneratedProtocolMessageType( - "DeploymentOccurrence", - (_message.Message,), - { - "DESCRIPTOR": _DEPLOYMENTOCCURRENCE, - "__module__": "grafeas.grafeas_v1.proto.deployment_pb2", - "__doc__": """The period during which some deployable was active in a runtime. - - Attributes: - user_email: - Identity of the user that triggered this deployment. - deploy_time: - Required. Beginning of the lifetime of this deployment. - undeploy_time: - End of the lifetime of this deployment. - config: - Configuration used to create this deployment. - address: - Address of the runtime element hosting this deployment. - resource_uri: - Output only. Resource URI for the artifact being deployed - taken from the deployable field with the same name. - platform: - Platform hosting this deployment. - """, - # @@protoc_insertion_point(class_scope:grafeas.v1.DeploymentOccurrence) - }, -) -_sym_db.RegisterMessage(DeploymentOccurrence) - - -DESCRIPTOR._options = None -# @@protoc_insertion_point(module_scope) diff --git a/packages/grafeas/grafeas/grafeas_v1/proto/discovery.proto b/packages/grafeas/grafeas/grafeas_v1/proto/discovery.proto deleted file mode 100644 index e07992557de2..000000000000 --- a/packages/grafeas/grafeas/grafeas_v1/proto/discovery.proto +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright 2019 The Grafeas Authors. All rights reserved. -// -// 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. - -syntax = "proto3"; - -package grafeas.v1; - -import "google/protobuf/timestamp.proto"; -import "google/rpc/status.proto"; -import "grafeas/v1/common.proto"; - -option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; -option java_multiple_files = true; -option java_package = "io.grafeas.v1"; -option objc_class_prefix = "GRA"; - -// A note that indicates a type of analysis a provider would perform. This note -// exists in a provider's project. A `Discovery` occurrence is created in a -// consumer's project at the start of analysis. -message DiscoveryNote { - // Required. Immutable. The kind of analysis that is handled by this - // discovery. - grafeas.v1.NoteKind analysis_kind = 1; -} - -// Provides information about the analysis status of a discovered resource. -message DiscoveryOccurrence { - // Whether the resource is continuously analyzed. - enum ContinuousAnalysis { - // Unknown. - CONTINUOUS_ANALYSIS_UNSPECIFIED = 0; - // The resource is continuously analyzed. - ACTIVE = 1; - // The resource is ignored for continuous analysis. - INACTIVE = 2; - } - - // Whether the resource is continuously analyzed. - ContinuousAnalysis continuous_analysis = 1; - - // Analysis status for a resource. Currently for initial analysis only (not - // updated in continuous analysis). - enum AnalysisStatus { - // Unknown. - ANALYSIS_STATUS_UNSPECIFIED = 0; - // Resource is known but no action has been taken yet. - PENDING = 1; - // Resource is being analyzed. - SCANNING = 2; - // Analysis has finished successfully. - FINISHED_SUCCESS = 3; - // Analysis has finished unsuccessfully, the analysis itself is in a bad - // state. - FINISHED_FAILED = 4; - // The resource is known not to be supported - FINISHED_UNSUPPORTED = 5; - } - - // The status of discovery for the resource. - AnalysisStatus analysis_status = 2; - - // When an error is encountered this will contain a LocalizedMessage under - // details to show to the user. The LocalizedMessage is output only and - // populated by the API. - google.rpc.Status analysis_status_error = 3; - - // The CPE of the resource being scanned. - string cpe = 4; - - // The last time this resource was scanned. - google.protobuf.Timestamp last_scan_time = 5; -} diff --git a/packages/grafeas/grafeas/grafeas_v1/proto/discovery_pb2.py b/packages/grafeas/grafeas/grafeas_v1/proto/discovery_pb2.py deleted file mode 100644 index 9ed4e5589f2e..000000000000 --- a/packages/grafeas/grafeas/grafeas_v1/proto/discovery_pb2.py +++ /dev/null @@ -1,371 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: grafeas/grafeas_v1/proto/discovery.proto -"""Generated protocol buffer code.""" -from google.protobuf import descriptor as _descriptor -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection -from google.protobuf import symbol_database as _symbol_database - -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - -from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 -from google.rpc import status_pb2 as google_dot_rpc_dot_status__pb2 -from grafeas.grafeas_v1.proto import ( - common_pb2 as grafeas_dot_grafeas__v1_dot_proto_dot_common__pb2, -) - - -DESCRIPTOR = _descriptor.FileDescriptor( - name="grafeas/grafeas_v1/proto/discovery.proto", - package="grafeas.v1", - syntax="proto3", - serialized_options=b"\n\rio.grafeas.v1P\001ZFgoogle.golang.org/genproto/googleapis/grafeas/grafeas_v1/proto;grafeas\242\002\003GRA", - create_key=_descriptor._internal_create_key, - serialized_pb=b'\n(grafeas/grafeas_v1/proto/discovery.proto\x12\ngrafeas.v1\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\x1a%grafeas/grafeas_v1/proto/common.proto"<\n\rDiscoveryNote\x12+\n\ranalysis_kind\x18\x01 \x01(\x0e\x32\x14.grafeas.v1.NoteKind"\x8c\x04\n\x13\x44iscoveryOccurrence\x12O\n\x13\x63ontinuous_analysis\x18\x01 \x01(\x0e\x32\x32.grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis\x12G\n\x0f\x61nalysis_status\x18\x02 \x01(\x0e\x32..grafeas.v1.DiscoveryOccurrence.AnalysisStatus\x12\x31\n\x15\x61nalysis_status_error\x18\x03 \x01(\x0b\x32\x12.google.rpc.Status\x12\x0b\n\x03\x63pe\x18\x04 \x01(\t\x12\x32\n\x0elast_scan_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"S\n\x12\x43ontinuousAnalysis\x12#\n\x1f\x43ONTINUOUS_ANALYSIS_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x0c\n\x08INACTIVE\x10\x02"\x91\x01\n\x0e\x41nalysisStatus\x12\x1f\n\x1b\x41NALYSIS_STATUS_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\x0c\n\x08SCANNING\x10\x02\x12\x14\n\x10\x46INISHED_SUCCESS\x10\x03\x12\x13\n\x0f\x46INISHED_FAILED\x10\x04\x12\x18\n\x14\x46INISHED_UNSUPPORTED\x10\x05\x42_\n\rio.grafeas.v1P\x01ZFgoogle.golang.org/genproto/googleapis/grafeas/grafeas_v1/proto;grafeas\xa2\x02\x03GRAb\x06proto3', - dependencies=[ - google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR, - google_dot_rpc_dot_status__pb2.DESCRIPTOR, - grafeas_dot_grafeas__v1_dot_proto_dot_common__pb2.DESCRIPTOR, - ], -) - - -_DISCOVERYOCCURRENCE_CONTINUOUSANALYSIS = _descriptor.EnumDescriptor( - name="ContinuousAnalysis", - full_name="grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis", - filename=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - values=[ - _descriptor.EnumValueDescriptor( - name="CONTINUOUS_ANALYSIS_UNSPECIFIED", - index=0, - number=0, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key, - ), - _descriptor.EnumValueDescriptor( - name="ACTIVE", - index=1, - number=1, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key, - ), - _descriptor.EnumValueDescriptor( - name="INACTIVE", - index=2, - number=2, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key, - ), - ], - containing_type=None, - serialized_options=None, - serialized_start=509, - serialized_end=592, -) -_sym_db.RegisterEnumDescriptor(_DISCOVERYOCCURRENCE_CONTINUOUSANALYSIS) - -_DISCOVERYOCCURRENCE_ANALYSISSTATUS = _descriptor.EnumDescriptor( - name="AnalysisStatus", - full_name="grafeas.v1.DiscoveryOccurrence.AnalysisStatus", - filename=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - values=[ - _descriptor.EnumValueDescriptor( - name="ANALYSIS_STATUS_UNSPECIFIED", - index=0, - number=0, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key, - ), - _descriptor.EnumValueDescriptor( - name="PENDING", - index=1, - number=1, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key, - ), - _descriptor.EnumValueDescriptor( - name="SCANNING", - index=2, - number=2, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key, - ), - _descriptor.EnumValueDescriptor( - name="FINISHED_SUCCESS", - index=3, - number=3, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key, - ), - _descriptor.EnumValueDescriptor( - name="FINISHED_FAILED", - index=4, - number=4, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key, - ), - _descriptor.EnumValueDescriptor( - name="FINISHED_UNSUPPORTED", - index=5, - number=5, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key, - ), - ], - containing_type=None, - serialized_options=None, - serialized_start=595, - serialized_end=740, -) -_sym_db.RegisterEnumDescriptor(_DISCOVERYOCCURRENCE_ANALYSISSTATUS) - - -_DISCOVERYNOTE = _descriptor.Descriptor( - name="DiscoveryNote", - full_name="grafeas.v1.DiscoveryNote", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="analysis_kind", - full_name="grafeas.v1.DiscoveryNote.analysis_kind", - index=0, - number=1, - type=14, - cpp_type=8, - label=1, - has_default_value=False, - default_value=0, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=153, - serialized_end=213, -) - - -_DISCOVERYOCCURRENCE = _descriptor.Descriptor( - name="DiscoveryOccurrence", - full_name="grafeas.v1.DiscoveryOccurrence", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="continuous_analysis", - full_name="grafeas.v1.DiscoveryOccurrence.continuous_analysis", - index=0, - number=1, - type=14, - cpp_type=8, - label=1, - has_default_value=False, - default_value=0, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="analysis_status", - full_name="grafeas.v1.DiscoveryOccurrence.analysis_status", - index=1, - number=2, - type=14, - cpp_type=8, - label=1, - has_default_value=False, - default_value=0, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="analysis_status_error", - full_name="grafeas.v1.DiscoveryOccurrence.analysis_status_error", - index=2, - number=3, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="cpe", - full_name="grafeas.v1.DiscoveryOccurrence.cpe", - index=3, - number=4, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="last_scan_time", - full_name="grafeas.v1.DiscoveryOccurrence.last_scan_time", - index=4, - number=5, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[ - _DISCOVERYOCCURRENCE_CONTINUOUSANALYSIS, - _DISCOVERYOCCURRENCE_ANALYSISSTATUS, - ], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=216, - serialized_end=740, -) - -_DISCOVERYNOTE.fields_by_name[ - "analysis_kind" -].enum_type = grafeas_dot_grafeas__v1_dot_proto_dot_common__pb2._NOTEKIND -_DISCOVERYOCCURRENCE.fields_by_name[ - "continuous_analysis" -].enum_type = _DISCOVERYOCCURRENCE_CONTINUOUSANALYSIS -_DISCOVERYOCCURRENCE.fields_by_name[ - "analysis_status" -].enum_type = _DISCOVERYOCCURRENCE_ANALYSISSTATUS -_DISCOVERYOCCURRENCE.fields_by_name[ - "analysis_status_error" -].message_type = google_dot_rpc_dot_status__pb2._STATUS -_DISCOVERYOCCURRENCE.fields_by_name[ - "last_scan_time" -].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP -_DISCOVERYOCCURRENCE_CONTINUOUSANALYSIS.containing_type = _DISCOVERYOCCURRENCE -_DISCOVERYOCCURRENCE_ANALYSISSTATUS.containing_type = _DISCOVERYOCCURRENCE -DESCRIPTOR.message_types_by_name["DiscoveryNote"] = _DISCOVERYNOTE -DESCRIPTOR.message_types_by_name["DiscoveryOccurrence"] = _DISCOVERYOCCURRENCE -_sym_db.RegisterFileDescriptor(DESCRIPTOR) - -DiscoveryNote = _reflection.GeneratedProtocolMessageType( - "DiscoveryNote", - (_message.Message,), - { - "DESCRIPTOR": _DISCOVERYNOTE, - "__module__": "grafeas.grafeas_v1.proto.discovery_pb2", - "__doc__": """A note that indicates a type of analysis a provider would perform. - This note exists in a provider’s project. A ``Discovery`` occurrence - is created in a consumer’s project at the start of analysis. - - Attributes: - analysis_kind: - Required. Immutable. The kind of analysis that is handled by - this discovery. - """, - # @@protoc_insertion_point(class_scope:grafeas.v1.DiscoveryNote) - }, -) -_sym_db.RegisterMessage(DiscoveryNote) - -DiscoveryOccurrence = _reflection.GeneratedProtocolMessageType( - "DiscoveryOccurrence", - (_message.Message,), - { - "DESCRIPTOR": _DISCOVERYOCCURRENCE, - "__module__": "grafeas.grafeas_v1.proto.discovery_pb2", - "__doc__": """Provides information about the analysis status of a discovered - resource. - - Attributes: - continuous_analysis: - Whether the resource is continuously analyzed. - analysis_status: - The status of discovery for the resource. - analysis_status_error: - When an error is encountered this will contain a - LocalizedMessage under details to show to the user. The - LocalizedMessage is output only and populated by the API. - cpe: - The CPE of the resource being scanned. - last_scan_time: - The last time this resource was scanned. - """, - # @@protoc_insertion_point(class_scope:grafeas.v1.DiscoveryOccurrence) - }, -) -_sym_db.RegisterMessage(DiscoveryOccurrence) - - -DESCRIPTOR._options = None -# @@protoc_insertion_point(module_scope) diff --git a/packages/grafeas/grafeas/grafeas_v1/proto/grafeas.proto b/packages/grafeas/grafeas/grafeas_v1/proto/grafeas.proto deleted file mode 100644 index 57b2fc23e5f9..000000000000 --- a/packages/grafeas/grafeas/grafeas_v1/proto/grafeas.proto +++ /dev/null @@ -1,531 +0,0 @@ -// Copyright 2019 The Grafeas Authors. All rights reserved. -// -// 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. - -syntax = "proto3"; - -package grafeas.v1; - -import "google/api/annotations.proto"; -import "google/api/client.proto"; -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/field_mask.proto"; -import "google/protobuf/timestamp.proto"; -import "grafeas/v1/attestation.proto"; -import "grafeas/v1/build.proto"; -import "grafeas/v1/common.proto"; -import "grafeas/v1/deployment.proto"; -import "grafeas/v1/discovery.proto"; -import "grafeas/v1/image.proto"; -import "grafeas/v1/package.proto"; -import "grafeas/v1/upgrade.proto"; -import "grafeas/v1/vulnerability.proto"; - -option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; -option java_multiple_files = true; -option java_package = "io.grafeas.v1"; -option objc_class_prefix = "GRA"; -option (google.api.resource_definition) = { - type: "grafeas.io/Project" - pattern: "projects/{project}" -}; - -// [Grafeas](https://grafeas.io) API. -// -// Retrieves analysis results of Cloud components such as Docker container -// images. -// -// Analysis results are stored as a series of occurrences. An `Occurrence` -// contains information about a specific analysis instance on a resource. An -// occurrence refers to a `Note`. A note contains details describing the -// analysis and is generally stored in a separate project, called a `Provider`. -// Multiple occurrences can refer to the same note. -// -// For example, an SSL vulnerability could affect multiple images. In this case, -// there would be one note for the vulnerability and an occurrence for each -// image with the vulnerability referring to that note. -service Grafeas { - option (google.api.default_host) = "containeranalysis.googleapis.com"; - - // Gets the specified occurrence. - rpc GetOccurrence(GetOccurrenceRequest) returns (Occurrence) { - option (google.api.http) = { - get: "/v1/{name=projects/*/occurrences/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Lists occurrences for the specified project. - rpc ListOccurrences(ListOccurrencesRequest) - returns (ListOccurrencesResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*}/occurrences" - }; - option (google.api.method_signature) = "parent,filter"; - } - - // Deletes the specified occurrence. For example, use this method to delete an - // occurrence when the occurrence is no longer applicable for the given - // resource. - rpc DeleteOccurrence(DeleteOccurrenceRequest) - returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/occurrences/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Creates a new occurrence. - rpc CreateOccurrence(CreateOccurrenceRequest) returns (Occurrence) { - option (google.api.http) = { - post: "/v1/{parent=projects/*}/occurrences" - body: "occurrence" - }; - option (google.api.method_signature) = "parent,occurrence"; - } - - // Creates new occurrences in batch. - rpc BatchCreateOccurrences(BatchCreateOccurrencesRequest) - returns (BatchCreateOccurrencesResponse) { - option (google.api.http) = { - post: "/v1/{parent=projects/*}/occurrences:batchCreate" - body: "*" - }; - option (google.api.method_signature) = "parent,occurrences"; - } - - // Updates the specified occurrence. - rpc UpdateOccurrence(UpdateOccurrenceRequest) returns (Occurrence) { - option (google.api.http) = { - patch: "/v1/{name=projects/*/occurrences/*}" - body: "occurrence" - }; - option (google.api.method_signature) = "name,occurrence,update_mask"; - } - - // Gets the note attached to the specified occurrence. Consumer projects can - // use this method to get a note that belongs to a provider project. - rpc GetOccurrenceNote(GetOccurrenceNoteRequest) returns (Note) { - option (google.api.http) = { - get: "/v1/{name=projects/*/occurrences/*}/notes" - }; - option (google.api.method_signature) = "name"; - } - - // Gets the specified note. - rpc GetNote(GetNoteRequest) returns (Note) { - option (google.api.http) = { - get: "/v1/{name=projects/*/notes/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Lists notes for the specified project. - rpc ListNotes(ListNotesRequest) returns (ListNotesResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*}/notes" - }; - option (google.api.method_signature) = "parent,filter"; - } - - // Deletes the specified note. - rpc DeleteNote(DeleteNoteRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/notes/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Creates a new note. - rpc CreateNote(CreateNoteRequest) returns (Note) { - option (google.api.http) = { - post: "/v1/{parent=projects/*}/notes" - body: "note" - }; - option (google.api.method_signature) = "parent,note_id,note"; - } - - // Creates new notes in batch. - rpc BatchCreateNotes(BatchCreateNotesRequest) - returns (BatchCreateNotesResponse) { - option (google.api.http) = { - post: "/v1/{parent=projects/*}/notes:batchCreate" - body: "*" - }; - option (google.api.method_signature) = "parent,notes"; - } - - // Updates the specified note. - rpc UpdateNote(UpdateNoteRequest) returns (Note) { - option (google.api.http) = { - patch: "/v1/{name=projects/*/notes/*}" - body: "note" - }; - option (google.api.method_signature) = "name,note,update_mask"; - } - - // Lists occurrences referencing the specified note. Provider projects can use - // this method to get all occurrences across consumer projects referencing the - // specified note. - rpc ListNoteOccurrences(ListNoteOccurrencesRequest) - returns (ListNoteOccurrencesResponse) { - option (google.api.http) = { - get: "/v1/{name=projects/*/notes/*}/occurrences" - }; - option (google.api.method_signature) = "name,filter"; - } -} - -// An instance of an analysis type that has been found on a resource. -message Occurrence { - option (google.api.resource) = { - type: "grafeas.io/Occurrence" - pattern: "projects/{project}/occurrences/{occurrence}" - }; - - // Output only. The name of the occurrence in the form of - // `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. - string name = 1; - - // Required. Immutable. A URI that represents the resource for which the - // occurrence applies. For example, - // `https://gcr.io/project/image@sha256:123abc` for a Docker image. - string resource_uri = 2; - - // Required. Immutable. The analysis note associated with this occurrence, in - // the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. This field can be - // used as a filter in list requests. - string note_name = 3; - - // Output only. This explicitly denotes which of the occurrence details are - // specified. This field can be used as a filter in list requests. - grafeas.v1.NoteKind kind = 4; - - // A description of actions that can be taken to remedy the note. - string remediation = 5; - - // Output only. The time this occurrence was created. - google.protobuf.Timestamp create_time = 6; - - // Output only. The time this occurrence was last updated. - google.protobuf.Timestamp update_time = 7; - - // Required. Immutable. Describes the details of the note kind found on this - // resource. - oneof details { - // Describes a security vulnerability. - grafeas.v1.VulnerabilityOccurrence vulnerability = 8; - // Describes a verifiable build. - grafeas.v1.BuildOccurrence build = 9; - // Describes how this resource derives from the basis in the associated - // note. - grafeas.v1.ImageOccurrence image = 10; - // Describes the installation of a package on the linked resource. - grafeas.v1.PackageOccurrence package = 11; - // Describes the deployment of an artifact on a runtime. - grafeas.v1.DeploymentOccurrence deployment = 12; - // Describes when a resource was discovered. - grafeas.v1.DiscoveryOccurrence discovery = 13; - // Describes an attestation of an artifact. - grafeas.v1.AttestationOccurrence attestation = 14; - // Describes an available package upgrade on the linked resource. - grafeas.v1.UpgradeOccurrence upgrade = 15; - } -} - -// A type of analysis that can be done for a resource. -message Note { - option (google.api.resource) = { - type: "grafeas.io/Note" - pattern: "projects/{project}/notes/{note}" - }; - - // Output only. The name of the note in the form of - // `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. - string name = 1; - - // A one sentence description of this note. - string short_description = 2; - - // A detailed description of this note. - string long_description = 3; - - // Output only. The type of analysis. This field can be used as a filter in - // list requests. - grafeas.v1.NoteKind kind = 4; - - // URLs associated with this note. - repeated grafeas.v1.RelatedUrl related_url = 5; - - // Time of expiration for this note. Empty if note does not expire. - google.protobuf.Timestamp expiration_time = 6; - - // Output only. The time this note was created. This field can be used as a - // filter in list requests. - google.protobuf.Timestamp create_time = 7; - - // Output only. The time this note was last updated. This field can be used as - // a filter in list requests. - google.protobuf.Timestamp update_time = 8; - - // Other notes related to this note. - repeated string related_note_names = 9; - - // Required. Immutable. The type of analysis this note represents. - oneof type { - // A note describing a package vulnerability. - grafeas.v1.VulnerabilityNote vulnerability = 10; - // A note describing build provenance for a verifiable build. - grafeas.v1.BuildNote build = 11; - // A note describing a base image. - grafeas.v1.ImageNote image = 12; - // A note describing a package hosted by various package managers. - grafeas.v1.PackageNote package = 13; - // A note describing something that can be deployed. - grafeas.v1.DeploymentNote deployment = 14; - // A note describing the initial analysis of a resource. - grafeas.v1.DiscoveryNote discovery = 15; - // A note describing an attestation role. - grafeas.v1.AttestationNote attestation = 16; - // A note describing available package upgrades. - grafeas.v1.UpgradeNote upgrade = 17; - } -} - -// Request to get an occurrence. -message GetOccurrenceRequest { - // The name of the occurrence in the form of - // `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference).type = "grafeas.io/Occurrence" - ]; -} - -// Request to list occurrences. -message ListOccurrencesRequest { - // The name of the project to list occurrences for in the form of - // `projects/[PROJECT_ID]`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference).type = "grafeas.io/Project" - ]; - - // The filter expression. - string filter = 2; - - // Number of occurrences to return in the list. Must be positive. Max allowed - // page size is 1000. If not specified, page size defaults to 20. - int32 page_size = 3; - - // Token to provide to skip to a particular spot in the list. - string page_token = 4; -} - -// Response for listing occurrences. -message ListOccurrencesResponse { - // The occurrences requested. - repeated Occurrence occurrences = 1; - // The next pagination token in the list response. It should be used as - // `page_token` for the following request. An empty value means no more - // results. - string next_page_token = 2; -} - -// Request to delete an occurrence. -message DeleteOccurrenceRequest { - // The name of the occurrence in the form of - // `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference).type = "grafeas.io/Occurrence" - ]; -} - -// Request to create a new occurrence. -message CreateOccurrenceRequest { - // The name of the project in the form of `projects/[PROJECT_ID]`, under which - // the occurrence is to be created. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference).type = "grafeas.io/Project" - ]; - // The occurrence to create. - Occurrence occurrence = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// Request to update an occurrence. -message UpdateOccurrenceRequest { - // The name of the occurrence in the form of - // `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference).type = "grafeas.io/Occurrence" - ]; - // The updated occurrence. - Occurrence occurrence = 2 [(google.api.field_behavior) = REQUIRED]; - // The fields to update. - google.protobuf.FieldMask update_mask = 3; -} - -// Request to get a note. -message GetNoteRequest { - // The name of the note in the form of - // `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference).type = "grafeas.io/Note" - ]; -} - -// Request to get the note to which the specified occurrence is attached. -message GetOccurrenceNoteRequest { - // The name of the occurrence in the form of - // `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference).type = "grafeas.io/Occurrence" - ]; -} - -// Request to list notes. -message ListNotesRequest { - // The name of the project to list notes for in the form of - // `projects/[PROJECT_ID]`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference).type = "grafeas.io/Project" - ]; - - // The filter expression. - string filter = 2; - - // Number of notes to return in the list. Must be positive. Max allowed page - // size is 1000. If not specified, page size defaults to 20. - int32 page_size = 3; - - // Token to provide to skip to a particular spot in the list. - string page_token = 4; -} - -// Response for listing notes. -message ListNotesResponse { - // The notes requested. - repeated Note notes = 1; - // The next pagination token in the list response. It should be used as - // `page_token` for the following request. An empty value means no more - // results. - string next_page_token = 2; -} - -// Request to delete a note. -message DeleteNoteRequest { - // The name of the note in the form of - // `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference).type = "grafeas.io/Note" - ]; -} - -// Request to create a new note. -message CreateNoteRequest { - // The name of the project in the form of `projects/[PROJECT_ID]`, under which - // the note is to be created. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference).type = "grafeas.io/Project" - ]; - // The ID to use for this note. - string note_id = 2 [(google.api.field_behavior) = REQUIRED]; - // The note to create. - Note note = 3 [(google.api.field_behavior) = REQUIRED]; -} - -// Request to update a note. -message UpdateNoteRequest { - // The name of the note in the form of - // `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference).type = "grafeas.io/Note" - ]; - // The updated note. - Note note = 2 [(google.api.field_behavior) = REQUIRED]; - // The fields to update. - google.protobuf.FieldMask update_mask = 3; -} - -// Request to list occurrences for a note. -message ListNoteOccurrencesRequest { - // The name of the note to list occurrences for in the form of - // `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference).type = "grafeas.io/Note" - ]; - // The filter expression. - string filter = 2; - // Number of occurrences to return in the list. - int32 page_size = 3; - // Token to provide to skip to a particular spot in the list. - string page_token = 4; -} - -// Response for listing occurrences for a note. -message ListNoteOccurrencesResponse { - // The occurrences attached to the specified note. - repeated Occurrence occurrences = 1; - // Token to provide to skip to a particular spot in the list. - string next_page_token = 2; -} - -// Request to create notes in batch. -message BatchCreateNotesRequest { - // The name of the project in the form of `projects/[PROJECT_ID]`, under which - // the notes are to be created. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference).type = "grafeas.io/Project" - ]; - - // The notes to create. Max allowed length is 1000. - map notes = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// Response for creating notes in batch. -message BatchCreateNotesResponse { - // The notes that were created. - repeated Note notes = 1; -} - -// Request to create occurrences in batch. -message BatchCreateOccurrencesRequest { - // The name of the project in the form of `projects/[PROJECT_ID]`, under which - // the occurrences are to be created. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference).type = "grafeas.io/Project" - ]; - - // The occurrences to create. Max allowed length is 1000. - repeated Occurrence occurrences = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// Response for creating occurrences in batch. -message BatchCreateOccurrencesResponse { - // The occurrences that were created. - repeated Occurrence occurrences = 1; -} diff --git a/packages/grafeas/grafeas/grafeas_v1/proto/grafeas_pb2.py b/packages/grafeas/grafeas/grafeas_v1/proto/grafeas_pb2.py deleted file mode 100644 index 979793531701..000000000000 --- a/packages/grafeas/grafeas/grafeas_v1/proto/grafeas_pb2.py +++ /dev/null @@ -1,2880 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: grafeas/grafeas_v1/proto/grafeas.proto -"""Generated protocol buffer code.""" -from google.protobuf import descriptor as _descriptor -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection -from google.protobuf import symbol_database as _symbol_database - -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - -from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 -from google.api import client_pb2 as google_dot_api_dot_client__pb2 -from google.api import field_behavior_pb2 as google_dot_api_dot_field__behavior__pb2 -from google.api import resource_pb2 as google_dot_api_dot_resource__pb2 -from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 -from google.protobuf import field_mask_pb2 as google_dot_protobuf_dot_field__mask__pb2 -from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 -from grafeas.grafeas_v1.proto import ( - attestation_pb2 as grafeas_dot_grafeas__v1_dot_proto_dot_attestation__pb2, -) -from grafeas.grafeas_v1.proto import ( - build_pb2 as grafeas_dot_grafeas__v1_dot_proto_dot_build__pb2, -) -from grafeas.grafeas_v1.proto import ( - common_pb2 as grafeas_dot_grafeas__v1_dot_proto_dot_common__pb2, -) -from grafeas.grafeas_v1.proto import ( - deployment_pb2 as grafeas_dot_grafeas__v1_dot_proto_dot_deployment__pb2, -) -from grafeas.grafeas_v1.proto import ( - discovery_pb2 as grafeas_dot_grafeas__v1_dot_proto_dot_discovery__pb2, -) -from grafeas.grafeas_v1.proto import ( - image_pb2 as grafeas_dot_grafeas__v1_dot_proto_dot_image__pb2, -) -from grafeas.grafeas_v1.proto import ( - package_pb2 as grafeas_dot_grafeas__v1_dot_proto_dot_package__pb2, -) -from grafeas.grafeas_v1.proto import ( - upgrade_pb2 as grafeas_dot_grafeas__v1_dot_proto_dot_upgrade__pb2, -) -from grafeas.grafeas_v1.proto import ( - vulnerability_pb2 as grafeas_dot_grafeas__v1_dot_proto_dot_vulnerability__pb2, -) - - -DESCRIPTOR = _descriptor.FileDescriptor( - name="grafeas/grafeas_v1/proto/grafeas.proto", - package="grafeas.v1", - syntax="proto3", - serialized_options=b"\n\rio.grafeas.v1P\001ZFgoogle.golang.org/genproto/googleapis/grafeas/grafeas_v1/proto;grafeas\242\002\003GRA\352A(\n\022grafeas.io/Project\022\022projects/{project}", - create_key=_descriptor._internal_create_key, - serialized_pb=b'\n&grafeas/grafeas_v1/proto/grafeas.proto\x12\ngrafeas.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a*grafeas/grafeas_v1/proto/attestation.proto\x1a$grafeas/grafeas_v1/proto/build.proto\x1a%grafeas/grafeas_v1/proto/common.proto\x1a)grafeas/grafeas_v1/proto/deployment.proto\x1a(grafeas/grafeas_v1/proto/discovery.proto\x1a$grafeas/grafeas_v1/proto/image.proto\x1a&grafeas/grafeas_v1/proto/package.proto\x1a&grafeas/grafeas_v1/proto/upgrade.proto\x1a,grafeas/grafeas_v1/proto/vulnerability.proto"\xd8\x05\n\nOccurrence\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0cresource_uri\x18\x02 \x01(\t\x12\x11\n\tnote_name\x18\x03 \x01(\t\x12"\n\x04kind\x18\x04 \x01(\x0e\x32\x14.grafeas.v1.NoteKind\x12\x13\n\x0bremediation\x18\x05 \x01(\t\x12/\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12<\n\rvulnerability\x18\x08 \x01(\x0b\x32#.grafeas.v1.VulnerabilityOccurrenceH\x00\x12,\n\x05\x62uild\x18\t \x01(\x0b\x32\x1b.grafeas.v1.BuildOccurrenceH\x00\x12,\n\x05image\x18\n \x01(\x0b\x32\x1b.grafeas.v1.ImageOccurrenceH\x00\x12\x30\n\x07package\x18\x0b \x01(\x0b\x32\x1d.grafeas.v1.PackageOccurrenceH\x00\x12\x36\n\ndeployment\x18\x0c \x01(\x0b\x32 .grafeas.v1.DeploymentOccurrenceH\x00\x12\x34\n\tdiscovery\x18\r \x01(\x0b\x32\x1f.grafeas.v1.DiscoveryOccurrenceH\x00\x12\x38\n\x0b\x61ttestation\x18\x0e \x01(\x0b\x32!.grafeas.v1.AttestationOccurrenceH\x00\x12\x30\n\x07upgrade\x18\x0f \x01(\x0b\x32\x1d.grafeas.v1.UpgradeOccurrenceH\x00:G\xea\x41\x44\n\x15grafeas.io/Occurrence\x12+projects/{project}/occurrences/{occurrence}B\t\n\x07\x64\x65tails"\x82\x06\n\x04Note\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x19\n\x11short_description\x18\x02 \x01(\t\x12\x18\n\x10long_description\x18\x03 \x01(\t\x12"\n\x04kind\x18\x04 \x01(\x0e\x32\x14.grafeas.v1.NoteKind\x12+\n\x0brelated_url\x18\x05 \x03(\x0b\x32\x16.grafeas.v1.RelatedUrl\x12\x33\n\x0f\x65xpiration_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x1a\n\x12related_note_names\x18\t \x03(\t\x12\x36\n\rvulnerability\x18\n \x01(\x0b\x32\x1d.grafeas.v1.VulnerabilityNoteH\x00\x12&\n\x05\x62uild\x18\x0b \x01(\x0b\x32\x15.grafeas.v1.BuildNoteH\x00\x12&\n\x05image\x18\x0c \x01(\x0b\x32\x15.grafeas.v1.ImageNoteH\x00\x12*\n\x07package\x18\r \x01(\x0b\x32\x17.grafeas.v1.PackageNoteH\x00\x12\x30\n\ndeployment\x18\x0e \x01(\x0b\x32\x1a.grafeas.v1.DeploymentNoteH\x00\x12.\n\tdiscovery\x18\x0f \x01(\x0b\x32\x19.grafeas.v1.DiscoveryNoteH\x00\x12\x32\n\x0b\x61ttestation\x18\x10 \x01(\x0b\x32\x1b.grafeas.v1.AttestationNoteH\x00\x12*\n\x07upgrade\x18\x11 \x01(\x0b\x32\x17.grafeas.v1.UpgradeNoteH\x00:5\xea\x41\x32\n\x0fgrafeas.io/Note\x12\x1fprojects/{project}/notes/{note}B\x06\n\x04type"C\n\x14GetOccurrenceRequest\x12+\n\x04name\x18\x01 \x01(\tB\x1d\xe0\x41\x02\xfa\x41\x17\n\x15grafeas.io/Occurrence"{\n\x16ListOccurrencesRequest\x12*\n\x06parent\x18\x01 \x01(\tB\x1a\xe0\x41\x02\xfa\x41\x14\n\x12grafeas.io/Project\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t"_\n\x17ListOccurrencesResponse\x12+\n\x0boccurrences\x18\x01 \x03(\x0b\x32\x16.grafeas.v1.Occurrence\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"F\n\x17\x44\x65leteOccurrenceRequest\x12+\n\x04name\x18\x01 \x01(\tB\x1d\xe0\x41\x02\xfa\x41\x17\n\x15grafeas.io/Occurrence"v\n\x17\x43reateOccurrenceRequest\x12*\n\x06parent\x18\x01 \x01(\tB\x1a\xe0\x41\x02\xfa\x41\x14\n\x12grafeas.io/Project\x12/\n\noccurrence\x18\x02 \x01(\x0b\x32\x16.grafeas.v1.OccurrenceB\x03\xe0\x41\x02"\xa8\x01\n\x17UpdateOccurrenceRequest\x12+\n\x04name\x18\x01 \x01(\tB\x1d\xe0\x41\x02\xfa\x41\x17\n\x15grafeas.io/Occurrence\x12/\n\noccurrence\x18\x02 \x01(\x0b\x32\x16.grafeas.v1.OccurrenceB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask"7\n\x0eGetNoteRequest\x12%\n\x04name\x18\x01 \x01(\tB\x17\xe0\x41\x02\xfa\x41\x11\n\x0fgrafeas.io/Note"G\n\x18GetOccurrenceNoteRequest\x12+\n\x04name\x18\x01 \x01(\tB\x1d\xe0\x41\x02\xfa\x41\x17\n\x15grafeas.io/Occurrence"u\n\x10ListNotesRequest\x12*\n\x06parent\x18\x01 \x01(\tB\x1a\xe0\x41\x02\xfa\x41\x14\n\x12grafeas.io/Project\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t"M\n\x11ListNotesResponse\x12\x1f\n\x05notes\x18\x01 \x03(\x0b\x32\x10.grafeas.v1.Note\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t":\n\x11\x44\x65leteNoteRequest\x12%\n\x04name\x18\x01 \x01(\tB\x17\xe0\x41\x02\xfa\x41\x11\n\x0fgrafeas.io/Note"z\n\x11\x43reateNoteRequest\x12*\n\x06parent\x18\x01 \x01(\tB\x1a\xe0\x41\x02\xfa\x41\x14\n\x12grafeas.io/Project\x12\x14\n\x07note_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12#\n\x04note\x18\x03 \x01(\x0b\x32\x10.grafeas.v1.NoteB\x03\xe0\x41\x02"\x90\x01\n\x11UpdateNoteRequest\x12%\n\x04name\x18\x01 \x01(\tB\x17\xe0\x41\x02\xfa\x41\x11\n\x0fgrafeas.io/Note\x12#\n\x04note\x18\x02 \x01(\x0b\x32\x10.grafeas.v1.NoteB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask"z\n\x1aListNoteOccurrencesRequest\x12%\n\x04name\x18\x01 \x01(\tB\x17\xe0\x41\x02\xfa\x41\x11\n\x0fgrafeas.io/Note\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t"c\n\x1bListNoteOccurrencesResponse\x12+\n\x0boccurrences\x18\x01 \x03(\x0b\x32\x16.grafeas.v1.Occurrence\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"\xc9\x01\n\x17\x42\x61tchCreateNotesRequest\x12*\n\x06parent\x18\x01 \x01(\tB\x1a\xe0\x41\x02\xfa\x41\x14\n\x12grafeas.io/Project\x12\x42\n\x05notes\x18\x02 \x03(\x0b\x32..grafeas.v1.BatchCreateNotesRequest.NotesEntryB\x03\xe0\x41\x02\x1a>\n\nNotesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1f\n\x05value\x18\x02 \x01(\x0b\x32\x10.grafeas.v1.Note:\x02\x38\x01";\n\x18\x42\x61tchCreateNotesResponse\x12\x1f\n\x05notes\x18\x01 \x03(\x0b\x32\x10.grafeas.v1.Note"}\n\x1d\x42\x61tchCreateOccurrencesRequest\x12*\n\x06parent\x18\x01 \x01(\tB\x1a\xe0\x41\x02\xfa\x41\x14\n\x12grafeas.io/Project\x12\x30\n\x0boccurrences\x18\x02 \x03(\x0b\x32\x16.grafeas.v1.OccurrenceB\x03\xe0\x41\x02"M\n\x1e\x42\x61tchCreateOccurrencesResponse\x12+\n\x0boccurrences\x18\x01 \x03(\x0b\x32\x16.grafeas.v1.Occurrence2\x92\x10\n\x07Grafeas\x12}\n\rGetOccurrence\x12 .grafeas.v1.GetOccurrenceRequest\x1a\x16.grafeas.v1.Occurrence"2\x82\xd3\xe4\x93\x02%\x12#/v1/{name=projects/*/occurrences/*}\xda\x41\x04name\x12\x97\x01\n\x0fListOccurrences\x12".grafeas.v1.ListOccurrencesRequest\x1a#.grafeas.v1.ListOccurrencesResponse";\x82\xd3\xe4\x93\x02%\x12#/v1/{parent=projects/*}/occurrences\xda\x41\rparent,filter\x12\x83\x01\n\x10\x44\x65leteOccurrence\x12#.grafeas.v1.DeleteOccurrenceRequest\x1a\x16.google.protobuf.Empty"2\x82\xd3\xe4\x93\x02%*#/v1/{name=projects/*/occurrences/*}\xda\x41\x04name\x12\x9c\x01\n\x10\x43reateOccurrence\x12#.grafeas.v1.CreateOccurrenceRequest\x1a\x16.grafeas.v1.Occurrence"K\x82\xd3\xe4\x93\x02\x31"#/v1/{parent=projects/*}/occurrences:\noccurrence\xda\x41\x11parent,occurrence\x12\xc0\x01\n\x16\x42\x61tchCreateOccurrences\x12).grafeas.v1.BatchCreateOccurrencesRequest\x1a*.grafeas.v1.BatchCreateOccurrencesResponse"O\x82\xd3\xe4\x93\x02\x34"//v1/{parent=projects/*}/occurrences:batchCreate:\x01*\xda\x41\x12parent,occurrences\x12\xa6\x01\n\x10UpdateOccurrence\x12#.grafeas.v1.UpdateOccurrenceRequest\x1a\x16.grafeas.v1.Occurrence"U\x82\xd3\xe4\x93\x02\x31\x32#/v1/{name=projects/*/occurrences/*}:\noccurrence\xda\x41\x1bname,occurrence,update_mask\x12\x85\x01\n\x11GetOccurrenceNote\x12$.grafeas.v1.GetOccurrenceNoteRequest\x1a\x10.grafeas.v1.Note"8\x82\xd3\xe4\x93\x02+\x12)/v1/{name=projects/*/occurrences/*}/notes\xda\x41\x04name\x12\x65\n\x07GetNote\x12\x1a.grafeas.v1.GetNoteRequest\x1a\x10.grafeas.v1.Note",\x82\xd3\xe4\x93\x02\x1f\x12\x1d/v1/{name=projects/*/notes/*}\xda\x41\x04name\x12\x7f\n\tListNotes\x12\x1c.grafeas.v1.ListNotesRequest\x1a\x1d.grafeas.v1.ListNotesResponse"5\x82\xd3\xe4\x93\x02\x1f\x12\x1d/v1/{parent=projects/*}/notes\xda\x41\rparent,filter\x12q\n\nDeleteNote\x12\x1d.grafeas.v1.DeleteNoteRequest\x1a\x16.google.protobuf.Empty",\x82\xd3\xe4\x93\x02\x1f*\x1d/v1/{name=projects/*/notes/*}\xda\x41\x04name\x12\x80\x01\n\nCreateNote\x12\x1d.grafeas.v1.CreateNoteRequest\x1a\x10.grafeas.v1.Note"A\x82\xd3\xe4\x93\x02%"\x1d/v1/{parent=projects/*}/notes:\x04note\xda\x41\x13parent,note_id,note\x12\xa2\x01\n\x10\x42\x61tchCreateNotes\x12#.grafeas.v1.BatchCreateNotesRequest\x1a$.grafeas.v1.BatchCreateNotesResponse"C\x82\xd3\xe4\x93\x02.")/v1/{parent=projects/*}/notes:batchCreate:\x01*\xda\x41\x0cparent,notes\x12\x82\x01\n\nUpdateNote\x12\x1d.grafeas.v1.UpdateNoteRequest\x1a\x10.grafeas.v1.Note"C\x82\xd3\xe4\x93\x02%2\x1d/v1/{name=projects/*/notes/*}:\x04note\xda\x41\x15name,note,update_mask\x12\xa7\x01\n\x13ListNoteOccurrences\x12&.grafeas.v1.ListNoteOccurrencesRequest\x1a\'.grafeas.v1.ListNoteOccurrencesResponse"?\x82\xd3\xe4\x93\x02+\x12)/v1/{name=projects/*/notes/*}/occurrences\xda\x41\x0bname,filter\x1a#\xca\x41 containeranalysis.googleapis.comB\x8a\x01\n\rio.grafeas.v1P\x01ZFgoogle.golang.org/genproto/googleapis/grafeas/grafeas_v1/proto;grafeas\xa2\x02\x03GRA\xea\x41(\n\x12grafeas.io/Project\x12\x12projects/{project}b\x06proto3', - dependencies=[ - google_dot_api_dot_annotations__pb2.DESCRIPTOR, - google_dot_api_dot_client__pb2.DESCRIPTOR, - google_dot_api_dot_field__behavior__pb2.DESCRIPTOR, - google_dot_api_dot_resource__pb2.DESCRIPTOR, - google_dot_protobuf_dot_empty__pb2.DESCRIPTOR, - google_dot_protobuf_dot_field__mask__pb2.DESCRIPTOR, - google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR, - grafeas_dot_grafeas__v1_dot_proto_dot_attestation__pb2.DESCRIPTOR, - grafeas_dot_grafeas__v1_dot_proto_dot_build__pb2.DESCRIPTOR, - grafeas_dot_grafeas__v1_dot_proto_dot_common__pb2.DESCRIPTOR, - grafeas_dot_grafeas__v1_dot_proto_dot_deployment__pb2.DESCRIPTOR, - grafeas_dot_grafeas__v1_dot_proto_dot_discovery__pb2.DESCRIPTOR, - grafeas_dot_grafeas__v1_dot_proto_dot_image__pb2.DESCRIPTOR, - grafeas_dot_grafeas__v1_dot_proto_dot_package__pb2.DESCRIPTOR, - grafeas_dot_grafeas__v1_dot_proto_dot_upgrade__pb2.DESCRIPTOR, - grafeas_dot_grafeas__v1_dot_proto_dot_vulnerability__pb2.DESCRIPTOR, - ], -) - - -_OCCURRENCE = _descriptor.Descriptor( - name="Occurrence", - full_name="grafeas.v1.Occurrence", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="name", - full_name="grafeas.v1.Occurrence.name", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="resource_uri", - full_name="grafeas.v1.Occurrence.resource_uri", - index=1, - number=2, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="note_name", - full_name="grafeas.v1.Occurrence.note_name", - index=2, - number=3, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="kind", - full_name="grafeas.v1.Occurrence.kind", - index=3, - number=4, - type=14, - cpp_type=8, - label=1, - has_default_value=False, - default_value=0, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="remediation", - full_name="grafeas.v1.Occurrence.remediation", - index=4, - number=5, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="create_time", - full_name="grafeas.v1.Occurrence.create_time", - index=5, - number=6, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="update_time", - full_name="grafeas.v1.Occurrence.update_time", - index=6, - number=7, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="vulnerability", - full_name="grafeas.v1.Occurrence.vulnerability", - index=7, - number=8, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="build", - full_name="grafeas.v1.Occurrence.build", - index=8, - number=9, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="image", - full_name="grafeas.v1.Occurrence.image", - index=9, - number=10, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="package", - full_name="grafeas.v1.Occurrence.package", - index=10, - number=11, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="deployment", - full_name="grafeas.v1.Occurrence.deployment", - index=11, - number=12, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="discovery", - full_name="grafeas.v1.Occurrence.discovery", - index=12, - number=13, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="attestation", - full_name="grafeas.v1.Occurrence.attestation", - index=13, - number=14, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="upgrade", - full_name="grafeas.v1.Occurrence.upgrade", - index=14, - number=15, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=b"\352AD\n\025grafeas.io/Occurrence\022+projects/{project}/occurrences/{occurrence}", - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[ - _descriptor.OneofDescriptor( - name="details", - full_name="grafeas.v1.Occurrence.details", - index=0, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[], - ), - ], - serialized_start=636, - serialized_end=1364, -) - - -_NOTE = _descriptor.Descriptor( - name="Note", - full_name="grafeas.v1.Note", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="name", - full_name="grafeas.v1.Note.name", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="short_description", - full_name="grafeas.v1.Note.short_description", - index=1, - number=2, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="long_description", - full_name="grafeas.v1.Note.long_description", - index=2, - number=3, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="kind", - full_name="grafeas.v1.Note.kind", - index=3, - number=4, - type=14, - cpp_type=8, - label=1, - has_default_value=False, - default_value=0, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="related_url", - full_name="grafeas.v1.Note.related_url", - index=4, - number=5, - type=11, - cpp_type=10, - label=3, - has_default_value=False, - default_value=[], - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="expiration_time", - full_name="grafeas.v1.Note.expiration_time", - index=5, - number=6, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="create_time", - full_name="grafeas.v1.Note.create_time", - index=6, - number=7, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="update_time", - full_name="grafeas.v1.Note.update_time", - index=7, - number=8, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="related_note_names", - full_name="grafeas.v1.Note.related_note_names", - index=8, - number=9, - type=9, - cpp_type=9, - label=3, - has_default_value=False, - default_value=[], - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="vulnerability", - full_name="grafeas.v1.Note.vulnerability", - index=9, - number=10, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="build", - full_name="grafeas.v1.Note.build", - index=10, - number=11, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="image", - full_name="grafeas.v1.Note.image", - index=11, - number=12, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="package", - full_name="grafeas.v1.Note.package", - index=12, - number=13, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="deployment", - full_name="grafeas.v1.Note.deployment", - index=13, - number=14, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="discovery", - full_name="grafeas.v1.Note.discovery", - index=14, - number=15, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="attestation", - full_name="grafeas.v1.Note.attestation", - index=15, - number=16, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="upgrade", - full_name="grafeas.v1.Note.upgrade", - index=16, - number=17, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=b"\352A2\n\017grafeas.io/Note\022\037projects/{project}/notes/{note}", - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[ - _descriptor.OneofDescriptor( - name="type", - full_name="grafeas.v1.Note.type", - index=0, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[], - ), - ], - serialized_start=1367, - serialized_end=2137, -) - - -_GETOCCURRENCEREQUEST = _descriptor.Descriptor( - name="GetOccurrenceRequest", - full_name="grafeas.v1.GetOccurrenceRequest", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="name", - full_name="grafeas.v1.GetOccurrenceRequest.name", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\002\372A\027\n\025grafeas.io/Occurrence", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=2139, - serialized_end=2206, -) - - -_LISTOCCURRENCESREQUEST = _descriptor.Descriptor( - name="ListOccurrencesRequest", - full_name="grafeas.v1.ListOccurrencesRequest", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="parent", - full_name="grafeas.v1.ListOccurrencesRequest.parent", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\002\372A\024\n\022grafeas.io/Project", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="filter", - full_name="grafeas.v1.ListOccurrencesRequest.filter", - index=1, - number=2, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="page_size", - full_name="grafeas.v1.ListOccurrencesRequest.page_size", - index=2, - number=3, - type=5, - cpp_type=1, - label=1, - has_default_value=False, - default_value=0, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="page_token", - full_name="grafeas.v1.ListOccurrencesRequest.page_token", - index=3, - number=4, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=2208, - serialized_end=2331, -) - - -_LISTOCCURRENCESRESPONSE = _descriptor.Descriptor( - name="ListOccurrencesResponse", - full_name="grafeas.v1.ListOccurrencesResponse", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="occurrences", - full_name="grafeas.v1.ListOccurrencesResponse.occurrences", - index=0, - number=1, - type=11, - cpp_type=10, - label=3, - has_default_value=False, - default_value=[], - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="next_page_token", - full_name="grafeas.v1.ListOccurrencesResponse.next_page_token", - index=1, - number=2, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=2333, - serialized_end=2428, -) - - -_DELETEOCCURRENCEREQUEST = _descriptor.Descriptor( - name="DeleteOccurrenceRequest", - full_name="grafeas.v1.DeleteOccurrenceRequest", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="name", - full_name="grafeas.v1.DeleteOccurrenceRequest.name", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\002\372A\027\n\025grafeas.io/Occurrence", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=2430, - serialized_end=2500, -) - - -_CREATEOCCURRENCEREQUEST = _descriptor.Descriptor( - name="CreateOccurrenceRequest", - full_name="grafeas.v1.CreateOccurrenceRequest", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="parent", - full_name="grafeas.v1.CreateOccurrenceRequest.parent", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\002\372A\024\n\022grafeas.io/Project", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="occurrence", - full_name="grafeas.v1.CreateOccurrenceRequest.occurrence", - index=1, - number=2, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\002", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=2502, - serialized_end=2620, -) - - -_UPDATEOCCURRENCEREQUEST = _descriptor.Descriptor( - name="UpdateOccurrenceRequest", - full_name="grafeas.v1.UpdateOccurrenceRequest", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="name", - full_name="grafeas.v1.UpdateOccurrenceRequest.name", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\002\372A\027\n\025grafeas.io/Occurrence", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="occurrence", - full_name="grafeas.v1.UpdateOccurrenceRequest.occurrence", - index=1, - number=2, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\002", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="update_mask", - full_name="grafeas.v1.UpdateOccurrenceRequest.update_mask", - index=2, - number=3, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=2623, - serialized_end=2791, -) - - -_GETNOTEREQUEST = _descriptor.Descriptor( - name="GetNoteRequest", - full_name="grafeas.v1.GetNoteRequest", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="name", - full_name="grafeas.v1.GetNoteRequest.name", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\002\372A\021\n\017grafeas.io/Note", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=2793, - serialized_end=2848, -) - - -_GETOCCURRENCENOTEREQUEST = _descriptor.Descriptor( - name="GetOccurrenceNoteRequest", - full_name="grafeas.v1.GetOccurrenceNoteRequest", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="name", - full_name="grafeas.v1.GetOccurrenceNoteRequest.name", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\002\372A\027\n\025grafeas.io/Occurrence", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=2850, - serialized_end=2921, -) - - -_LISTNOTESREQUEST = _descriptor.Descriptor( - name="ListNotesRequest", - full_name="grafeas.v1.ListNotesRequest", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="parent", - full_name="grafeas.v1.ListNotesRequest.parent", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\002\372A\024\n\022grafeas.io/Project", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="filter", - full_name="grafeas.v1.ListNotesRequest.filter", - index=1, - number=2, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="page_size", - full_name="grafeas.v1.ListNotesRequest.page_size", - index=2, - number=3, - type=5, - cpp_type=1, - label=1, - has_default_value=False, - default_value=0, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="page_token", - full_name="grafeas.v1.ListNotesRequest.page_token", - index=3, - number=4, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=2923, - serialized_end=3040, -) - - -_LISTNOTESRESPONSE = _descriptor.Descriptor( - name="ListNotesResponse", - full_name="grafeas.v1.ListNotesResponse", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="notes", - full_name="grafeas.v1.ListNotesResponse.notes", - index=0, - number=1, - type=11, - cpp_type=10, - label=3, - has_default_value=False, - default_value=[], - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="next_page_token", - full_name="grafeas.v1.ListNotesResponse.next_page_token", - index=1, - number=2, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=3042, - serialized_end=3119, -) - - -_DELETENOTEREQUEST = _descriptor.Descriptor( - name="DeleteNoteRequest", - full_name="grafeas.v1.DeleteNoteRequest", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="name", - full_name="grafeas.v1.DeleteNoteRequest.name", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\002\372A\021\n\017grafeas.io/Note", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=3121, - serialized_end=3179, -) - - -_CREATENOTEREQUEST = _descriptor.Descriptor( - name="CreateNoteRequest", - full_name="grafeas.v1.CreateNoteRequest", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="parent", - full_name="grafeas.v1.CreateNoteRequest.parent", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\002\372A\024\n\022grafeas.io/Project", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="note_id", - full_name="grafeas.v1.CreateNoteRequest.note_id", - index=1, - number=2, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\002", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="note", - full_name="grafeas.v1.CreateNoteRequest.note", - index=2, - number=3, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\002", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=3181, - serialized_end=3303, -) - - -_UPDATENOTEREQUEST = _descriptor.Descriptor( - name="UpdateNoteRequest", - full_name="grafeas.v1.UpdateNoteRequest", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="name", - full_name="grafeas.v1.UpdateNoteRequest.name", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\002\372A\021\n\017grafeas.io/Note", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="note", - full_name="grafeas.v1.UpdateNoteRequest.note", - index=1, - number=2, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\002", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="update_mask", - full_name="grafeas.v1.UpdateNoteRequest.update_mask", - index=2, - number=3, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=3306, - serialized_end=3450, -) - - -_LISTNOTEOCCURRENCESREQUEST = _descriptor.Descriptor( - name="ListNoteOccurrencesRequest", - full_name="grafeas.v1.ListNoteOccurrencesRequest", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="name", - full_name="grafeas.v1.ListNoteOccurrencesRequest.name", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\002\372A\021\n\017grafeas.io/Note", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="filter", - full_name="grafeas.v1.ListNoteOccurrencesRequest.filter", - index=1, - number=2, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="page_size", - full_name="grafeas.v1.ListNoteOccurrencesRequest.page_size", - index=2, - number=3, - type=5, - cpp_type=1, - label=1, - has_default_value=False, - default_value=0, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="page_token", - full_name="grafeas.v1.ListNoteOccurrencesRequest.page_token", - index=3, - number=4, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=3452, - serialized_end=3574, -) - - -_LISTNOTEOCCURRENCESRESPONSE = _descriptor.Descriptor( - name="ListNoteOccurrencesResponse", - full_name="grafeas.v1.ListNoteOccurrencesResponse", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="occurrences", - full_name="grafeas.v1.ListNoteOccurrencesResponse.occurrences", - index=0, - number=1, - type=11, - cpp_type=10, - label=3, - has_default_value=False, - default_value=[], - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="next_page_token", - full_name="grafeas.v1.ListNoteOccurrencesResponse.next_page_token", - index=1, - number=2, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=3576, - serialized_end=3675, -) - - -_BATCHCREATENOTESREQUEST_NOTESENTRY = _descriptor.Descriptor( - name="NotesEntry", - full_name="grafeas.v1.BatchCreateNotesRequest.NotesEntry", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="key", - full_name="grafeas.v1.BatchCreateNotesRequest.NotesEntry.key", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="value", - full_name="grafeas.v1.BatchCreateNotesRequest.NotesEntry.value", - index=1, - number=2, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=b"8\001", - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=3817, - serialized_end=3879, -) - -_BATCHCREATENOTESREQUEST = _descriptor.Descriptor( - name="BatchCreateNotesRequest", - full_name="grafeas.v1.BatchCreateNotesRequest", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="parent", - full_name="grafeas.v1.BatchCreateNotesRequest.parent", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\002\372A\024\n\022grafeas.io/Project", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="notes", - full_name="grafeas.v1.BatchCreateNotesRequest.notes", - index=1, - number=2, - type=11, - cpp_type=10, - label=3, - has_default_value=False, - default_value=[], - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\002", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[_BATCHCREATENOTESREQUEST_NOTESENTRY,], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=3678, - serialized_end=3879, -) - - -_BATCHCREATENOTESRESPONSE = _descriptor.Descriptor( - name="BatchCreateNotesResponse", - full_name="grafeas.v1.BatchCreateNotesResponse", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="notes", - full_name="grafeas.v1.BatchCreateNotesResponse.notes", - index=0, - number=1, - type=11, - cpp_type=10, - label=3, - has_default_value=False, - default_value=[], - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=3881, - serialized_end=3940, -) - - -_BATCHCREATEOCCURRENCESREQUEST = _descriptor.Descriptor( - name="BatchCreateOccurrencesRequest", - full_name="grafeas.v1.BatchCreateOccurrencesRequest", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="parent", - full_name="grafeas.v1.BatchCreateOccurrencesRequest.parent", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\002\372A\024\n\022grafeas.io/Project", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="occurrences", - full_name="grafeas.v1.BatchCreateOccurrencesRequest.occurrences", - index=1, - number=2, - type=11, - cpp_type=10, - label=3, - has_default_value=False, - default_value=[], - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\002", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=3942, - serialized_end=4067, -) - - -_BATCHCREATEOCCURRENCESRESPONSE = _descriptor.Descriptor( - name="BatchCreateOccurrencesResponse", - full_name="grafeas.v1.BatchCreateOccurrencesResponse", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="occurrences", - full_name="grafeas.v1.BatchCreateOccurrencesResponse.occurrences", - index=0, - number=1, - type=11, - cpp_type=10, - label=3, - has_default_value=False, - default_value=[], - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=4069, - serialized_end=4146, -) - -_OCCURRENCE.fields_by_name[ - "kind" -].enum_type = grafeas_dot_grafeas__v1_dot_proto_dot_common__pb2._NOTEKIND -_OCCURRENCE.fields_by_name[ - "create_time" -].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP -_OCCURRENCE.fields_by_name[ - "update_time" -].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP -_OCCURRENCE.fields_by_name[ - "vulnerability" -].message_type = ( - grafeas_dot_grafeas__v1_dot_proto_dot_vulnerability__pb2._VULNERABILITYOCCURRENCE -) -_OCCURRENCE.fields_by_name[ - "build" -].message_type = grafeas_dot_grafeas__v1_dot_proto_dot_build__pb2._BUILDOCCURRENCE -_OCCURRENCE.fields_by_name[ - "image" -].message_type = grafeas_dot_grafeas__v1_dot_proto_dot_image__pb2._IMAGEOCCURRENCE -_OCCURRENCE.fields_by_name[ - "package" -].message_type = grafeas_dot_grafeas__v1_dot_proto_dot_package__pb2._PACKAGEOCCURRENCE -_OCCURRENCE.fields_by_name[ - "deployment" -].message_type = ( - grafeas_dot_grafeas__v1_dot_proto_dot_deployment__pb2._DEPLOYMENTOCCURRENCE -) -_OCCURRENCE.fields_by_name[ - "discovery" -].message_type = ( - grafeas_dot_grafeas__v1_dot_proto_dot_discovery__pb2._DISCOVERYOCCURRENCE -) -_OCCURRENCE.fields_by_name[ - "attestation" -].message_type = ( - grafeas_dot_grafeas__v1_dot_proto_dot_attestation__pb2._ATTESTATIONOCCURRENCE -) -_OCCURRENCE.fields_by_name[ - "upgrade" -].message_type = grafeas_dot_grafeas__v1_dot_proto_dot_upgrade__pb2._UPGRADEOCCURRENCE -_OCCURRENCE.oneofs_by_name["details"].fields.append( - _OCCURRENCE.fields_by_name["vulnerability"] -) -_OCCURRENCE.fields_by_name[ - "vulnerability" -].containing_oneof = _OCCURRENCE.oneofs_by_name["details"] -_OCCURRENCE.oneofs_by_name["details"].fields.append(_OCCURRENCE.fields_by_name["build"]) -_OCCURRENCE.fields_by_name["build"].containing_oneof = _OCCURRENCE.oneofs_by_name[ - "details" -] -_OCCURRENCE.oneofs_by_name["details"].fields.append(_OCCURRENCE.fields_by_name["image"]) -_OCCURRENCE.fields_by_name["image"].containing_oneof = _OCCURRENCE.oneofs_by_name[ - "details" -] -_OCCURRENCE.oneofs_by_name["details"].fields.append( - _OCCURRENCE.fields_by_name["package"] -) -_OCCURRENCE.fields_by_name["package"].containing_oneof = _OCCURRENCE.oneofs_by_name[ - "details" -] -_OCCURRENCE.oneofs_by_name["details"].fields.append( - _OCCURRENCE.fields_by_name["deployment"] -) -_OCCURRENCE.fields_by_name["deployment"].containing_oneof = _OCCURRENCE.oneofs_by_name[ - "details" -] -_OCCURRENCE.oneofs_by_name["details"].fields.append( - _OCCURRENCE.fields_by_name["discovery"] -) -_OCCURRENCE.fields_by_name["discovery"].containing_oneof = _OCCURRENCE.oneofs_by_name[ - "details" -] -_OCCURRENCE.oneofs_by_name["details"].fields.append( - _OCCURRENCE.fields_by_name["attestation"] -) -_OCCURRENCE.fields_by_name["attestation"].containing_oneof = _OCCURRENCE.oneofs_by_name[ - "details" -] -_OCCURRENCE.oneofs_by_name["details"].fields.append( - _OCCURRENCE.fields_by_name["upgrade"] -) -_OCCURRENCE.fields_by_name["upgrade"].containing_oneof = _OCCURRENCE.oneofs_by_name[ - "details" -] -_NOTE.fields_by_name[ - "kind" -].enum_type = grafeas_dot_grafeas__v1_dot_proto_dot_common__pb2._NOTEKIND -_NOTE.fields_by_name[ - "related_url" -].message_type = grafeas_dot_grafeas__v1_dot_proto_dot_common__pb2._RELATEDURL -_NOTE.fields_by_name[ - "expiration_time" -].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP -_NOTE.fields_by_name[ - "create_time" -].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP -_NOTE.fields_by_name[ - "update_time" -].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP -_NOTE.fields_by_name[ - "vulnerability" -].message_type = ( - grafeas_dot_grafeas__v1_dot_proto_dot_vulnerability__pb2._VULNERABILITYNOTE -) -_NOTE.fields_by_name[ - "build" -].message_type = grafeas_dot_grafeas__v1_dot_proto_dot_build__pb2._BUILDNOTE -_NOTE.fields_by_name[ - "image" -].message_type = grafeas_dot_grafeas__v1_dot_proto_dot_image__pb2._IMAGENOTE -_NOTE.fields_by_name[ - "package" -].message_type = grafeas_dot_grafeas__v1_dot_proto_dot_package__pb2._PACKAGENOTE -_NOTE.fields_by_name[ - "deployment" -].message_type = grafeas_dot_grafeas__v1_dot_proto_dot_deployment__pb2._DEPLOYMENTNOTE -_NOTE.fields_by_name[ - "discovery" -].message_type = grafeas_dot_grafeas__v1_dot_proto_dot_discovery__pb2._DISCOVERYNOTE -_NOTE.fields_by_name[ - "attestation" -].message_type = grafeas_dot_grafeas__v1_dot_proto_dot_attestation__pb2._ATTESTATIONNOTE -_NOTE.fields_by_name[ - "upgrade" -].message_type = grafeas_dot_grafeas__v1_dot_proto_dot_upgrade__pb2._UPGRADENOTE -_NOTE.oneofs_by_name["type"].fields.append(_NOTE.fields_by_name["vulnerability"]) -_NOTE.fields_by_name["vulnerability"].containing_oneof = _NOTE.oneofs_by_name["type"] -_NOTE.oneofs_by_name["type"].fields.append(_NOTE.fields_by_name["build"]) -_NOTE.fields_by_name["build"].containing_oneof = _NOTE.oneofs_by_name["type"] -_NOTE.oneofs_by_name["type"].fields.append(_NOTE.fields_by_name["image"]) -_NOTE.fields_by_name["image"].containing_oneof = _NOTE.oneofs_by_name["type"] -_NOTE.oneofs_by_name["type"].fields.append(_NOTE.fields_by_name["package"]) -_NOTE.fields_by_name["package"].containing_oneof = _NOTE.oneofs_by_name["type"] -_NOTE.oneofs_by_name["type"].fields.append(_NOTE.fields_by_name["deployment"]) -_NOTE.fields_by_name["deployment"].containing_oneof = _NOTE.oneofs_by_name["type"] -_NOTE.oneofs_by_name["type"].fields.append(_NOTE.fields_by_name["discovery"]) -_NOTE.fields_by_name["discovery"].containing_oneof = _NOTE.oneofs_by_name["type"] -_NOTE.oneofs_by_name["type"].fields.append(_NOTE.fields_by_name["attestation"]) -_NOTE.fields_by_name["attestation"].containing_oneof = _NOTE.oneofs_by_name["type"] -_NOTE.oneofs_by_name["type"].fields.append(_NOTE.fields_by_name["upgrade"]) -_NOTE.fields_by_name["upgrade"].containing_oneof = _NOTE.oneofs_by_name["type"] -_LISTOCCURRENCESRESPONSE.fields_by_name["occurrences"].message_type = _OCCURRENCE -_CREATEOCCURRENCEREQUEST.fields_by_name["occurrence"].message_type = _OCCURRENCE -_UPDATEOCCURRENCEREQUEST.fields_by_name["occurrence"].message_type = _OCCURRENCE -_UPDATEOCCURRENCEREQUEST.fields_by_name[ - "update_mask" -].message_type = google_dot_protobuf_dot_field__mask__pb2._FIELDMASK -_LISTNOTESRESPONSE.fields_by_name["notes"].message_type = _NOTE -_CREATENOTEREQUEST.fields_by_name["note"].message_type = _NOTE -_UPDATENOTEREQUEST.fields_by_name["note"].message_type = _NOTE -_UPDATENOTEREQUEST.fields_by_name[ - "update_mask" -].message_type = google_dot_protobuf_dot_field__mask__pb2._FIELDMASK -_LISTNOTEOCCURRENCESRESPONSE.fields_by_name["occurrences"].message_type = _OCCURRENCE -_BATCHCREATENOTESREQUEST_NOTESENTRY.fields_by_name["value"].message_type = _NOTE -_BATCHCREATENOTESREQUEST_NOTESENTRY.containing_type = _BATCHCREATENOTESREQUEST -_BATCHCREATENOTESREQUEST.fields_by_name[ - "notes" -].message_type = _BATCHCREATENOTESREQUEST_NOTESENTRY -_BATCHCREATENOTESRESPONSE.fields_by_name["notes"].message_type = _NOTE -_BATCHCREATEOCCURRENCESREQUEST.fields_by_name["occurrences"].message_type = _OCCURRENCE -_BATCHCREATEOCCURRENCESRESPONSE.fields_by_name["occurrences"].message_type = _OCCURRENCE -DESCRIPTOR.message_types_by_name["Occurrence"] = _OCCURRENCE -DESCRIPTOR.message_types_by_name["Note"] = _NOTE -DESCRIPTOR.message_types_by_name["GetOccurrenceRequest"] = _GETOCCURRENCEREQUEST -DESCRIPTOR.message_types_by_name["ListOccurrencesRequest"] = _LISTOCCURRENCESREQUEST -DESCRIPTOR.message_types_by_name["ListOccurrencesResponse"] = _LISTOCCURRENCESRESPONSE -DESCRIPTOR.message_types_by_name["DeleteOccurrenceRequest"] = _DELETEOCCURRENCEREQUEST -DESCRIPTOR.message_types_by_name["CreateOccurrenceRequest"] = _CREATEOCCURRENCEREQUEST -DESCRIPTOR.message_types_by_name["UpdateOccurrenceRequest"] = _UPDATEOCCURRENCEREQUEST -DESCRIPTOR.message_types_by_name["GetNoteRequest"] = _GETNOTEREQUEST -DESCRIPTOR.message_types_by_name["GetOccurrenceNoteRequest"] = _GETOCCURRENCENOTEREQUEST -DESCRIPTOR.message_types_by_name["ListNotesRequest"] = _LISTNOTESREQUEST -DESCRIPTOR.message_types_by_name["ListNotesResponse"] = _LISTNOTESRESPONSE -DESCRIPTOR.message_types_by_name["DeleteNoteRequest"] = _DELETENOTEREQUEST -DESCRIPTOR.message_types_by_name["CreateNoteRequest"] = _CREATENOTEREQUEST -DESCRIPTOR.message_types_by_name["UpdateNoteRequest"] = _UPDATENOTEREQUEST -DESCRIPTOR.message_types_by_name[ - "ListNoteOccurrencesRequest" -] = _LISTNOTEOCCURRENCESREQUEST -DESCRIPTOR.message_types_by_name[ - "ListNoteOccurrencesResponse" -] = _LISTNOTEOCCURRENCESRESPONSE -DESCRIPTOR.message_types_by_name["BatchCreateNotesRequest"] = _BATCHCREATENOTESREQUEST -DESCRIPTOR.message_types_by_name["BatchCreateNotesResponse"] = _BATCHCREATENOTESRESPONSE -DESCRIPTOR.message_types_by_name[ - "BatchCreateOccurrencesRequest" -] = _BATCHCREATEOCCURRENCESREQUEST -DESCRIPTOR.message_types_by_name[ - "BatchCreateOccurrencesResponse" -] = _BATCHCREATEOCCURRENCESRESPONSE -_sym_db.RegisterFileDescriptor(DESCRIPTOR) - -Occurrence = _reflection.GeneratedProtocolMessageType( - "Occurrence", - (_message.Message,), - { - "DESCRIPTOR": _OCCURRENCE, - "__module__": "grafeas.grafeas_v1.proto.grafeas_pb2", - "__doc__": """An instance of an analysis type that has been found on a resource. - - Attributes: - name: - Output only. The name of the occurrence in the form of - ``projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]``. - resource_uri: - Required. Immutable. A URI that represents the resource for - which the occurrence applies. For example, - ``https://gcr.io/project/image@sha256:123abc`` for a Docker - image. - note_name: - Required. Immutable. The analysis note associated with this - occurrence, in the form of - ``projects/[PROVIDER_ID]/notes/[NOTE_ID]``. This field can be - used as a filter in list requests. - kind: - Output only. This explicitly denotes which of the occurrence - details are specified. This field can be used as a filter in - list requests. - remediation: - A description of actions that can be taken to remedy the note. - create_time: - Output only. The time this occurrence was created. - update_time: - Output only. The time this occurrence was last updated. - details: - Required. Immutable. Describes the details of the note kind - found on this resource. - vulnerability: - Describes a security vulnerability. - build: - Describes a verifiable build. - image: - Describes how this resource derives from the basis in the - associated note. - package: - Describes the installation of a package on the linked - resource. - deployment: - Describes the deployment of an artifact on a runtime. - discovery: - Describes when a resource was discovered. - attestation: - Describes an attestation of an artifact. - upgrade: - Describes an available package upgrade on the linked resource. - """, - # @@protoc_insertion_point(class_scope:grafeas.v1.Occurrence) - }, -) -_sym_db.RegisterMessage(Occurrence) - -Note = _reflection.GeneratedProtocolMessageType( - "Note", - (_message.Message,), - { - "DESCRIPTOR": _NOTE, - "__module__": "grafeas.grafeas_v1.proto.grafeas_pb2", - "__doc__": """A type of analysis that can be done for a resource. - - Attributes: - name: - Output only. The name of the note in the form of - ``projects/[PROVIDER_ID]/notes/[NOTE_ID]``. - short_description: - A one sentence description of this note. - long_description: - A detailed description of this note. - kind: - Output only. The type of analysis. This field can be used as a - filter in list requests. - related_url: - URLs associated with this note. - expiration_time: - Time of expiration for this note. Empty if note does not - expire. - create_time: - Output only. The time this note was created. This field can be - used as a filter in list requests. - update_time: - Output only. The time this note was last updated. This field - can be used as a filter in list requests. - related_note_names: - Other notes related to this note. - type: - Required. Immutable. The type of analysis this note - represents. - vulnerability: - A note describing a package vulnerability. - build: - A note describing build provenance for a verifiable build. - image: - A note describing a base image. - package: - A note describing a package hosted by various package - managers. - deployment: - A note describing something that can be deployed. - discovery: - A note describing the initial analysis of a resource. - attestation: - A note describing an attestation role. - upgrade: - A note describing available package upgrades. - """, - # @@protoc_insertion_point(class_scope:grafeas.v1.Note) - }, -) -_sym_db.RegisterMessage(Note) - -GetOccurrenceRequest = _reflection.GeneratedProtocolMessageType( - "GetOccurrenceRequest", - (_message.Message,), - { - "DESCRIPTOR": _GETOCCURRENCEREQUEST, - "__module__": "grafeas.grafeas_v1.proto.grafeas_pb2", - "__doc__": """Request to get an occurrence. - - Attributes: - name: - The name of the occurrence in the form of - ``projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]``. - """, - # @@protoc_insertion_point(class_scope:grafeas.v1.GetOccurrenceRequest) - }, -) -_sym_db.RegisterMessage(GetOccurrenceRequest) - -ListOccurrencesRequest = _reflection.GeneratedProtocolMessageType( - "ListOccurrencesRequest", - (_message.Message,), - { - "DESCRIPTOR": _LISTOCCURRENCESREQUEST, - "__module__": "grafeas.grafeas_v1.proto.grafeas_pb2", - "__doc__": """Request to list occurrences. - - Attributes: - parent: - The name of the project to list occurrences for in the form of - ``projects/[PROJECT_ID]``. - filter: - The filter expression. - page_size: - Number of occurrences to return in the list. Must be positive. - Max allowed page size is 1000. If not specified, page size - defaults to 20. - page_token: - Token to provide to skip to a particular spot in the list. - """, - # @@protoc_insertion_point(class_scope:grafeas.v1.ListOccurrencesRequest) - }, -) -_sym_db.RegisterMessage(ListOccurrencesRequest) - -ListOccurrencesResponse = _reflection.GeneratedProtocolMessageType( - "ListOccurrencesResponse", - (_message.Message,), - { - "DESCRIPTOR": _LISTOCCURRENCESRESPONSE, - "__module__": "grafeas.grafeas_v1.proto.grafeas_pb2", - "__doc__": """Response for listing occurrences. - - Attributes: - occurrences: - The occurrences requested. - next_page_token: - The next pagination token in the list response. It should be - used as ``page_token`` for the following request. An empty - value means no more results. - """, - # @@protoc_insertion_point(class_scope:grafeas.v1.ListOccurrencesResponse) - }, -) -_sym_db.RegisterMessage(ListOccurrencesResponse) - -DeleteOccurrenceRequest = _reflection.GeneratedProtocolMessageType( - "DeleteOccurrenceRequest", - (_message.Message,), - { - "DESCRIPTOR": _DELETEOCCURRENCEREQUEST, - "__module__": "grafeas.grafeas_v1.proto.grafeas_pb2", - "__doc__": """Request to delete an occurrence. - - Attributes: - name: - The name of the occurrence in the form of - ``projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]``. - """, - # @@protoc_insertion_point(class_scope:grafeas.v1.DeleteOccurrenceRequest) - }, -) -_sym_db.RegisterMessage(DeleteOccurrenceRequest) - -CreateOccurrenceRequest = _reflection.GeneratedProtocolMessageType( - "CreateOccurrenceRequest", - (_message.Message,), - { - "DESCRIPTOR": _CREATEOCCURRENCEREQUEST, - "__module__": "grafeas.grafeas_v1.proto.grafeas_pb2", - "__doc__": """Request to create a new occurrence. - - Attributes: - parent: - The name of the project in the form of - ``projects/[PROJECT_ID]``, under which the occurrence is to be - created. - occurrence: - The occurrence to create. - """, - # @@protoc_insertion_point(class_scope:grafeas.v1.CreateOccurrenceRequest) - }, -) -_sym_db.RegisterMessage(CreateOccurrenceRequest) - -UpdateOccurrenceRequest = _reflection.GeneratedProtocolMessageType( - "UpdateOccurrenceRequest", - (_message.Message,), - { - "DESCRIPTOR": _UPDATEOCCURRENCEREQUEST, - "__module__": "grafeas.grafeas_v1.proto.grafeas_pb2", - "__doc__": """Request to update an occurrence. - - Attributes: - name: - The name of the occurrence in the form of - ``projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]``. - occurrence: - The updated occurrence. - update_mask: - The fields to update. - """, - # @@protoc_insertion_point(class_scope:grafeas.v1.UpdateOccurrenceRequest) - }, -) -_sym_db.RegisterMessage(UpdateOccurrenceRequest) - -GetNoteRequest = _reflection.GeneratedProtocolMessageType( - "GetNoteRequest", - (_message.Message,), - { - "DESCRIPTOR": _GETNOTEREQUEST, - "__module__": "grafeas.grafeas_v1.proto.grafeas_pb2", - "__doc__": """Request to get a note. - - Attributes: - name: - The name of the note in the form of - ``projects/[PROVIDER_ID]/notes/[NOTE_ID]``. - """, - # @@protoc_insertion_point(class_scope:grafeas.v1.GetNoteRequest) - }, -) -_sym_db.RegisterMessage(GetNoteRequest) - -GetOccurrenceNoteRequest = _reflection.GeneratedProtocolMessageType( - "GetOccurrenceNoteRequest", - (_message.Message,), - { - "DESCRIPTOR": _GETOCCURRENCENOTEREQUEST, - "__module__": "grafeas.grafeas_v1.proto.grafeas_pb2", - "__doc__": """Request to get the note to which the specified occurrence is attached. - - Attributes: - name: - The name of the occurrence in the form of - ``projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]``. - """, - # @@protoc_insertion_point(class_scope:grafeas.v1.GetOccurrenceNoteRequest) - }, -) -_sym_db.RegisterMessage(GetOccurrenceNoteRequest) - -ListNotesRequest = _reflection.GeneratedProtocolMessageType( - "ListNotesRequest", - (_message.Message,), - { - "DESCRIPTOR": _LISTNOTESREQUEST, - "__module__": "grafeas.grafeas_v1.proto.grafeas_pb2", - "__doc__": """Request to list notes. - - Attributes: - parent: - The name of the project to list notes for in the form of - ``projects/[PROJECT_ID]``. - filter: - The filter expression. - page_size: - Number of notes to return in the list. Must be positive. Max - allowed page size is 1000. If not specified, page size - defaults to 20. - page_token: - Token to provide to skip to a particular spot in the list. - """, - # @@protoc_insertion_point(class_scope:grafeas.v1.ListNotesRequest) - }, -) -_sym_db.RegisterMessage(ListNotesRequest) - -ListNotesResponse = _reflection.GeneratedProtocolMessageType( - "ListNotesResponse", - (_message.Message,), - { - "DESCRIPTOR": _LISTNOTESRESPONSE, - "__module__": "grafeas.grafeas_v1.proto.grafeas_pb2", - "__doc__": """Response for listing notes. - - Attributes: - notes: - The notes requested. - next_page_token: - The next pagination token in the list response. It should be - used as ``page_token`` for the following request. An empty - value means no more results. - """, - # @@protoc_insertion_point(class_scope:grafeas.v1.ListNotesResponse) - }, -) -_sym_db.RegisterMessage(ListNotesResponse) - -DeleteNoteRequest = _reflection.GeneratedProtocolMessageType( - "DeleteNoteRequest", - (_message.Message,), - { - "DESCRIPTOR": _DELETENOTEREQUEST, - "__module__": "grafeas.grafeas_v1.proto.grafeas_pb2", - "__doc__": """Request to delete a note. - - Attributes: - name: - The name of the note in the form of - ``projects/[PROVIDER_ID]/notes/[NOTE_ID]``. - """, - # @@protoc_insertion_point(class_scope:grafeas.v1.DeleteNoteRequest) - }, -) -_sym_db.RegisterMessage(DeleteNoteRequest) - -CreateNoteRequest = _reflection.GeneratedProtocolMessageType( - "CreateNoteRequest", - (_message.Message,), - { - "DESCRIPTOR": _CREATENOTEREQUEST, - "__module__": "grafeas.grafeas_v1.proto.grafeas_pb2", - "__doc__": """Request to create a new note. - - Attributes: - parent: - The name of the project in the form of - ``projects/[PROJECT_ID]``, under which the note is to be - created. - note_id: - The ID to use for this note. - note: - The note to create. - """, - # @@protoc_insertion_point(class_scope:grafeas.v1.CreateNoteRequest) - }, -) -_sym_db.RegisterMessage(CreateNoteRequest) - -UpdateNoteRequest = _reflection.GeneratedProtocolMessageType( - "UpdateNoteRequest", - (_message.Message,), - { - "DESCRIPTOR": _UPDATENOTEREQUEST, - "__module__": "grafeas.grafeas_v1.proto.grafeas_pb2", - "__doc__": """Request to update a note. - - Attributes: - name: - The name of the note in the form of - ``projects/[PROVIDER_ID]/notes/[NOTE_ID]``. - note: - The updated note. - update_mask: - The fields to update. - """, - # @@protoc_insertion_point(class_scope:grafeas.v1.UpdateNoteRequest) - }, -) -_sym_db.RegisterMessage(UpdateNoteRequest) - -ListNoteOccurrencesRequest = _reflection.GeneratedProtocolMessageType( - "ListNoteOccurrencesRequest", - (_message.Message,), - { - "DESCRIPTOR": _LISTNOTEOCCURRENCESREQUEST, - "__module__": "grafeas.grafeas_v1.proto.grafeas_pb2", - "__doc__": """Request to list occurrences for a note. - - Attributes: - name: - The name of the note to list occurrences for in the form of - ``projects/[PROVIDER_ID]/notes/[NOTE_ID]``. - filter: - The filter expression. - page_size: - Number of occurrences to return in the list. - page_token: - Token to provide to skip to a particular spot in the list. - """, - # @@protoc_insertion_point(class_scope:grafeas.v1.ListNoteOccurrencesRequest) - }, -) -_sym_db.RegisterMessage(ListNoteOccurrencesRequest) - -ListNoteOccurrencesResponse = _reflection.GeneratedProtocolMessageType( - "ListNoteOccurrencesResponse", - (_message.Message,), - { - "DESCRIPTOR": _LISTNOTEOCCURRENCESRESPONSE, - "__module__": "grafeas.grafeas_v1.proto.grafeas_pb2", - "__doc__": """Response for listing occurrences for a note. - - Attributes: - occurrences: - The occurrences attached to the specified note. - next_page_token: - Token to provide to skip to a particular spot in the list. - """, - # @@protoc_insertion_point(class_scope:grafeas.v1.ListNoteOccurrencesResponse) - }, -) -_sym_db.RegisterMessage(ListNoteOccurrencesResponse) - -BatchCreateNotesRequest = _reflection.GeneratedProtocolMessageType( - "BatchCreateNotesRequest", - (_message.Message,), - { - "NotesEntry": _reflection.GeneratedProtocolMessageType( - "NotesEntry", - (_message.Message,), - { - "DESCRIPTOR": _BATCHCREATENOTESREQUEST_NOTESENTRY, - "__module__": "grafeas.grafeas_v1.proto.grafeas_pb2" - # @@protoc_insertion_point(class_scope:grafeas.v1.BatchCreateNotesRequest.NotesEntry) - }, - ), - "DESCRIPTOR": _BATCHCREATENOTESREQUEST, - "__module__": "grafeas.grafeas_v1.proto.grafeas_pb2", - "__doc__": """Request to create notes in batch. - - Attributes: - parent: - The name of the project in the form of - ``projects/[PROJECT_ID]``, under which the notes are to be - created. - notes: - The notes to create. Max allowed length is 1000. - """, - # @@protoc_insertion_point(class_scope:grafeas.v1.BatchCreateNotesRequest) - }, -) -_sym_db.RegisterMessage(BatchCreateNotesRequest) -_sym_db.RegisterMessage(BatchCreateNotesRequest.NotesEntry) - -BatchCreateNotesResponse = _reflection.GeneratedProtocolMessageType( - "BatchCreateNotesResponse", - (_message.Message,), - { - "DESCRIPTOR": _BATCHCREATENOTESRESPONSE, - "__module__": "grafeas.grafeas_v1.proto.grafeas_pb2", - "__doc__": """Response for creating notes in batch. - - Attributes: - notes: - The notes that were created. - """, - # @@protoc_insertion_point(class_scope:grafeas.v1.BatchCreateNotesResponse) - }, -) -_sym_db.RegisterMessage(BatchCreateNotesResponse) - -BatchCreateOccurrencesRequest = _reflection.GeneratedProtocolMessageType( - "BatchCreateOccurrencesRequest", - (_message.Message,), - { - "DESCRIPTOR": _BATCHCREATEOCCURRENCESREQUEST, - "__module__": "grafeas.grafeas_v1.proto.grafeas_pb2", - "__doc__": """Request to create occurrences in batch. - - Attributes: - parent: - The name of the project in the form of - ``projects/[PROJECT_ID]``, under which the occurrences are to - be created. - occurrences: - The occurrences to create. Max allowed length is 1000. - """, - # @@protoc_insertion_point(class_scope:grafeas.v1.BatchCreateOccurrencesRequest) - }, -) -_sym_db.RegisterMessage(BatchCreateOccurrencesRequest) - -BatchCreateOccurrencesResponse = _reflection.GeneratedProtocolMessageType( - "BatchCreateOccurrencesResponse", - (_message.Message,), - { - "DESCRIPTOR": _BATCHCREATEOCCURRENCESRESPONSE, - "__module__": "grafeas.grafeas_v1.proto.grafeas_pb2", - "__doc__": """Response for creating occurrences in batch. - - Attributes: - occurrences: - The occurrences that were created. - """, - # @@protoc_insertion_point(class_scope:grafeas.v1.BatchCreateOccurrencesResponse) - }, -) -_sym_db.RegisterMessage(BatchCreateOccurrencesResponse) - - -DESCRIPTOR._options = None -_OCCURRENCE._options = None -_NOTE._options = None -_GETOCCURRENCEREQUEST.fields_by_name["name"]._options = None -_LISTOCCURRENCESREQUEST.fields_by_name["parent"]._options = None -_DELETEOCCURRENCEREQUEST.fields_by_name["name"]._options = None -_CREATEOCCURRENCEREQUEST.fields_by_name["parent"]._options = None -_CREATEOCCURRENCEREQUEST.fields_by_name["occurrence"]._options = None -_UPDATEOCCURRENCEREQUEST.fields_by_name["name"]._options = None -_UPDATEOCCURRENCEREQUEST.fields_by_name["occurrence"]._options = None -_GETNOTEREQUEST.fields_by_name["name"]._options = None -_GETOCCURRENCENOTEREQUEST.fields_by_name["name"]._options = None -_LISTNOTESREQUEST.fields_by_name["parent"]._options = None -_DELETENOTEREQUEST.fields_by_name["name"]._options = None -_CREATENOTEREQUEST.fields_by_name["parent"]._options = None -_CREATENOTEREQUEST.fields_by_name["note_id"]._options = None -_CREATENOTEREQUEST.fields_by_name["note"]._options = None -_UPDATENOTEREQUEST.fields_by_name["name"]._options = None -_UPDATENOTEREQUEST.fields_by_name["note"]._options = None -_LISTNOTEOCCURRENCESREQUEST.fields_by_name["name"]._options = None -_BATCHCREATENOTESREQUEST_NOTESENTRY._options = None -_BATCHCREATENOTESREQUEST.fields_by_name["parent"]._options = None -_BATCHCREATENOTESREQUEST.fields_by_name["notes"]._options = None -_BATCHCREATEOCCURRENCESREQUEST.fields_by_name["parent"]._options = None -_BATCHCREATEOCCURRENCESREQUEST.fields_by_name["occurrences"]._options = None - -_GRAFEAS = _descriptor.ServiceDescriptor( - name="Grafeas", - full_name="grafeas.v1.Grafeas", - file=DESCRIPTOR, - index=0, - serialized_options=b"\312A containeranalysis.googleapis.com", - create_key=_descriptor._internal_create_key, - serialized_start=4149, - serialized_end=6215, - methods=[ - _descriptor.MethodDescriptor( - name="GetOccurrence", - full_name="grafeas.v1.Grafeas.GetOccurrence", - index=0, - containing_service=None, - input_type=_GETOCCURRENCEREQUEST, - output_type=_OCCURRENCE, - serialized_options=b"\202\323\344\223\002%\022#/v1/{name=projects/*/occurrences/*}\332A\004name", - create_key=_descriptor._internal_create_key, - ), - _descriptor.MethodDescriptor( - name="ListOccurrences", - full_name="grafeas.v1.Grafeas.ListOccurrences", - index=1, - containing_service=None, - input_type=_LISTOCCURRENCESREQUEST, - output_type=_LISTOCCURRENCESRESPONSE, - serialized_options=b"\202\323\344\223\002%\022#/v1/{parent=projects/*}/occurrences\332A\rparent,filter", - create_key=_descriptor._internal_create_key, - ), - _descriptor.MethodDescriptor( - name="DeleteOccurrence", - full_name="grafeas.v1.Grafeas.DeleteOccurrence", - index=2, - containing_service=None, - input_type=_DELETEOCCURRENCEREQUEST, - output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - serialized_options=b"\202\323\344\223\002%*#/v1/{name=projects/*/occurrences/*}\332A\004name", - create_key=_descriptor._internal_create_key, - ), - _descriptor.MethodDescriptor( - name="CreateOccurrence", - full_name="grafeas.v1.Grafeas.CreateOccurrence", - index=3, - containing_service=None, - input_type=_CREATEOCCURRENCEREQUEST, - output_type=_OCCURRENCE, - serialized_options=b'\202\323\344\223\0021"#/v1/{parent=projects/*}/occurrences:\noccurrence\332A\021parent,occurrence', - create_key=_descriptor._internal_create_key, - ), - _descriptor.MethodDescriptor( - name="BatchCreateOccurrences", - full_name="grafeas.v1.Grafeas.BatchCreateOccurrences", - index=4, - containing_service=None, - input_type=_BATCHCREATEOCCURRENCESREQUEST, - output_type=_BATCHCREATEOCCURRENCESRESPONSE, - serialized_options=b'\202\323\344\223\0024"//v1/{parent=projects/*}/occurrences:batchCreate:\001*\332A\022parent,occurrences', - create_key=_descriptor._internal_create_key, - ), - _descriptor.MethodDescriptor( - name="UpdateOccurrence", - full_name="grafeas.v1.Grafeas.UpdateOccurrence", - index=5, - containing_service=None, - input_type=_UPDATEOCCURRENCEREQUEST, - output_type=_OCCURRENCE, - serialized_options=b"\202\323\344\223\00212#/v1/{name=projects/*/occurrences/*}:\noccurrence\332A\033name,occurrence,update_mask", - create_key=_descriptor._internal_create_key, - ), - _descriptor.MethodDescriptor( - name="GetOccurrenceNote", - full_name="grafeas.v1.Grafeas.GetOccurrenceNote", - index=6, - containing_service=None, - input_type=_GETOCCURRENCENOTEREQUEST, - output_type=_NOTE, - serialized_options=b"\202\323\344\223\002+\022)/v1/{name=projects/*/occurrences/*}/notes\332A\004name", - create_key=_descriptor._internal_create_key, - ), - _descriptor.MethodDescriptor( - name="GetNote", - full_name="grafeas.v1.Grafeas.GetNote", - index=7, - containing_service=None, - input_type=_GETNOTEREQUEST, - output_type=_NOTE, - serialized_options=b"\202\323\344\223\002\037\022\035/v1/{name=projects/*/notes/*}\332A\004name", - create_key=_descriptor._internal_create_key, - ), - _descriptor.MethodDescriptor( - name="ListNotes", - full_name="grafeas.v1.Grafeas.ListNotes", - index=8, - containing_service=None, - input_type=_LISTNOTESREQUEST, - output_type=_LISTNOTESRESPONSE, - serialized_options=b"\202\323\344\223\002\037\022\035/v1/{parent=projects/*}/notes\332A\rparent,filter", - create_key=_descriptor._internal_create_key, - ), - _descriptor.MethodDescriptor( - name="DeleteNote", - full_name="grafeas.v1.Grafeas.DeleteNote", - index=9, - containing_service=None, - input_type=_DELETENOTEREQUEST, - output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - serialized_options=b"\202\323\344\223\002\037*\035/v1/{name=projects/*/notes/*}\332A\004name", - create_key=_descriptor._internal_create_key, - ), - _descriptor.MethodDescriptor( - name="CreateNote", - full_name="grafeas.v1.Grafeas.CreateNote", - index=10, - containing_service=None, - input_type=_CREATENOTEREQUEST, - output_type=_NOTE, - serialized_options=b'\202\323\344\223\002%"\035/v1/{parent=projects/*}/notes:\004note\332A\023parent,note_id,note', - create_key=_descriptor._internal_create_key, - ), - _descriptor.MethodDescriptor( - name="BatchCreateNotes", - full_name="grafeas.v1.Grafeas.BatchCreateNotes", - index=11, - containing_service=None, - input_type=_BATCHCREATENOTESREQUEST, - output_type=_BATCHCREATENOTESRESPONSE, - serialized_options=b'\202\323\344\223\002.")/v1/{parent=projects/*}/notes:batchCreate:\001*\332A\014parent,notes', - create_key=_descriptor._internal_create_key, - ), - _descriptor.MethodDescriptor( - name="UpdateNote", - full_name="grafeas.v1.Grafeas.UpdateNote", - index=12, - containing_service=None, - input_type=_UPDATENOTEREQUEST, - output_type=_NOTE, - serialized_options=b"\202\323\344\223\002%2\035/v1/{name=projects/*/notes/*}:\004note\332A\025name,note,update_mask", - create_key=_descriptor._internal_create_key, - ), - _descriptor.MethodDescriptor( - name="ListNoteOccurrences", - full_name="grafeas.v1.Grafeas.ListNoteOccurrences", - index=13, - containing_service=None, - input_type=_LISTNOTEOCCURRENCESREQUEST, - output_type=_LISTNOTEOCCURRENCESRESPONSE, - serialized_options=b"\202\323\344\223\002+\022)/v1/{name=projects/*/notes/*}/occurrences\332A\013name,filter", - create_key=_descriptor._internal_create_key, - ), - ], -) -_sym_db.RegisterServiceDescriptor(_GRAFEAS) - -DESCRIPTOR.services_by_name["Grafeas"] = _GRAFEAS - -# @@protoc_insertion_point(module_scope) diff --git a/packages/grafeas/grafeas/grafeas_v1/proto/image.proto b/packages/grafeas/grafeas/grafeas_v1/proto/image.proto deleted file mode 100644 index 9ac162cec22f..000000000000 --- a/packages/grafeas/grafeas/grafeas_v1/proto/image.proto +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright 2019 The Grafeas Authors. All rights reserved. -// -// 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. - -syntax = "proto3"; - -package grafeas.v1; - -option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; -option java_multiple_files = true; -option java_package = "io.grafeas.v1"; -option objc_class_prefix = "GRA"; - -// Layer holds metadata specific to a layer of a Docker image. -message Layer { - // Required. The recovered Dockerfile directive used to construct this layer. - // See https://docs.docker.com/engine/reference/builder/ for more information. - string directive = 1; - - // The recovered arguments to the Dockerfile directive. - string arguments = 2; -} - -// A set of properties that uniquely identify a given Docker image. -message Fingerprint { - // Required. The layer ID of the final layer in the Docker image's v1 - // representation. - string v1_name = 1; - - // Required. The ordered list of v2 blobs that represent a given image. - repeated string v2_blob = 2; - - // Output only. The name of the image's v2 blobs computed via: - // [bottom] := v2_blob[bottom] - // [N] := sha256(v2_blob[N] + " " + v2_name[N+1]) - // Only the name of the final blob is kept. - string v2_name = 3; -} - -// Basis describes the base image portion (Note) of the DockerImage -// relationship. Linked occurrences are derived from this or an equivalent image -// via: -// FROM -// Or an equivalent reference, e.g., a tag of the resource_url. -message ImageNote { - // Required. Immutable. The resource_url for the resource representing the - // basis of associated occurrence images. - string resource_url = 1; - - // Required. Immutable. The fingerprint of the base image. - Fingerprint fingerprint = 2; -} - -// Details of the derived image portion of the DockerImage relationship. This -// image would be produced from a Dockerfile with FROM . -message ImageOccurrence { - // Required. The fingerprint of the derived image. - Fingerprint fingerprint = 1; - - // Output only. The number of layers by which this image differs from the - // associated image basis. - int32 distance = 2; - - // This contains layer-specific metadata, if populated it has length - // "distance" and is ordered with [distance] being the layer immediately - // following the base image and [1] being the final layer. - repeated Layer layer_info = 3; - - // Output only. This contains the base image URL for the derived image - // occurrence. - string base_resource_url = 4; -} diff --git a/packages/grafeas/grafeas/grafeas_v1/proto/package.proto b/packages/grafeas/grafeas/grafeas_v1/proto/package.proto deleted file mode 100644 index b04686d9fc33..000000000000 --- a/packages/grafeas/grafeas/grafeas_v1/proto/package.proto +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright 2019 The Grafeas Authors. All rights reserved. -// -// 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. - -syntax = "proto3"; - -package grafeas.v1; - -option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; -option java_multiple_files = true; -option java_package = "io.grafeas.v1"; -option objc_class_prefix = "GRA"; - -// Instruction set architectures supported by various package managers. -enum Architecture { - // Unknown architecture. - ARCHITECTURE_UNSPECIFIED = 0; - // X86 architecture. - X86 = 1; - // X64 architecture. - X64 = 2; -} - -// This represents a particular channel of distribution for a given package. -// E.g., Debian's jessie-backports dpkg mirror. -message Distribution { - // Required. The cpe_uri in [CPE format](https://cpe.mitre.org/specification/) - // denoting the package manager version distributing a package. - string cpe_uri = 1; - - // The CPU architecture for which packages in this distribution channel were - // built. - Architecture architecture = 2; - - // The latest available version of this package in this distribution channel. - Version latest_version = 3; - - // A freeform string denoting the maintainer of this package. - string maintainer = 4; - - // The distribution channel-specific homepage for this package. - string url = 5; - - // The distribution channel-specific description of this package. - string description = 6; -} - -// An occurrence of a particular package installation found within a system's -// filesystem. E.g., glibc was found in `/var/lib/dpkg/status`. -message Location { - // Required. The CPE URI in [CPE format](https://cpe.mitre.org/specification/) - // denoting the package manager version distributing a package. - string cpe_uri = 1; - - // The version installed at this location. - Version version = 2; - - // The path from which we gathered that this package/version is installed. - string path = 3; -} - -// This represents a particular package that is distributed over various -// channels. E.g., glibc (aka libc6) is distributed by many, at various -// versions. -message PackageNote { - // Required. Immutable. The name of the package. - string name = 1; - - // The various channels by which a package is distributed. - repeated Distribution distribution = 10; -} - -// Details on how a particular software package was installed on a system. -message PackageOccurrence { - // Output only. The name of the installed package. - string name = 1; - - // Required. All of the places within the filesystem versions of this package - // have been found. - repeated Location location = 2; -} - -// Version contains structured information about the version of a package. -message Version { - // Used to correct mistakes in the version numbering scheme. - int32 epoch = 1; - - // Required only when version kind is NORMAL. The main part of the version - // name. - string name = 2; - - // The iteration of the package build from the above version. - string revision = 3; - - // Whether this is an ordinary package version or a sentinel MIN/MAX version. - enum VersionKind { - // Unknown. - VERSION_KIND_UNSPECIFIED = 0; - // A standard package version. - NORMAL = 1; - // A special version representing negative infinity. - MINIMUM = 2; - // A special version representing positive infinity. - MAXIMUM = 3; - }; - - // Required. Distinguishes between sentinel MIN/MAX versions and normal - // versions. - VersionKind kind = 4; - - // Human readable version string. This string is of the form - // :- and is only set when kind is NORMAL. - string full_name = 5; -} diff --git a/packages/grafeas/grafeas/grafeas_v1/proto/package_pb2.py b/packages/grafeas/grafeas/grafeas_v1/proto/package_pb2.py deleted file mode 100644 index ed3207a15326..000000000000 --- a/packages/grafeas/grafeas/grafeas_v1/proto/package_pb2.py +++ /dev/null @@ -1,715 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: grafeas/grafeas_v1/proto/package.proto -"""Generated protocol buffer code.""" -from google.protobuf.internal import enum_type_wrapper -from google.protobuf import descriptor as _descriptor -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection -from google.protobuf import symbol_database as _symbol_database - -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - -DESCRIPTOR = _descriptor.FileDescriptor( - name="grafeas/grafeas_v1/proto/package.proto", - package="grafeas.v1", - syntax="proto3", - serialized_options=b"\n\rio.grafeas.v1P\001ZFgoogle.golang.org/genproto/googleapis/grafeas/grafeas_v1/proto;grafeas\242\002\003GRA", - create_key=_descriptor._internal_create_key, - serialized_pb=b'\n&grafeas/grafeas_v1/proto/package.proto\x12\ngrafeas.v1"\xb2\x01\n\x0c\x44istribution\x12\x0f\n\x07\x63pe_uri\x18\x01 \x01(\t\x12.\n\x0c\x61rchitecture\x18\x02 \x01(\x0e\x32\x18.grafeas.v1.Architecture\x12+\n\x0elatest_version\x18\x03 \x01(\x0b\x32\x13.grafeas.v1.Version\x12\x12\n\nmaintainer\x18\x04 \x01(\t\x12\x0b\n\x03url\x18\x05 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x06 \x01(\t"O\n\x08Location\x12\x0f\n\x07\x63pe_uri\x18\x01 \x01(\t\x12$\n\x07version\x18\x02 \x01(\x0b\x32\x13.grafeas.v1.Version\x12\x0c\n\x04path\x18\x03 \x01(\t"K\n\x0bPackageNote\x12\x0c\n\x04name\x18\x01 \x01(\t\x12.\n\x0c\x64istribution\x18\n \x03(\x0b\x32\x18.grafeas.v1.Distribution"I\n\x11PackageOccurrence\x12\x0c\n\x04name\x18\x01 \x01(\t\x12&\n\x08location\x18\x02 \x03(\x0b\x32\x14.grafeas.v1.Location"\xcd\x01\n\x07Version\x12\r\n\x05\x65poch\x18\x01 \x01(\x05\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x10\n\x08revision\x18\x03 \x01(\t\x12-\n\x04kind\x18\x04 \x01(\x0e\x32\x1f.grafeas.v1.Version.VersionKind\x12\x11\n\tfull_name\x18\x05 \x01(\t"Q\n\x0bVersionKind\x12\x1c\n\x18VERSION_KIND_UNSPECIFIED\x10\x00\x12\n\n\x06NORMAL\x10\x01\x12\x0b\n\x07MINIMUM\x10\x02\x12\x0b\n\x07MAXIMUM\x10\x03*>\n\x0c\x41rchitecture\x12\x1c\n\x18\x41RCHITECTURE_UNSPECIFIED\x10\x00\x12\x07\n\x03X86\x10\x01\x12\x07\n\x03X64\x10\x02\x42_\n\rio.grafeas.v1P\x01ZFgoogle.golang.org/genproto/googleapis/grafeas/grafeas_v1/proto;grafeas\xa2\x02\x03GRAb\x06proto3', -) - -_ARCHITECTURE = _descriptor.EnumDescriptor( - name="Architecture", - full_name="grafeas.v1.Architecture", - filename=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - values=[ - _descriptor.EnumValueDescriptor( - name="ARCHITECTURE_UNSPECIFIED", - index=0, - number=0, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key, - ), - _descriptor.EnumValueDescriptor( - name="X86", - index=1, - number=1, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key, - ), - _descriptor.EnumValueDescriptor( - name="X64", - index=2, - number=2, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key, - ), - ], - containing_type=None, - serialized_options=None, - serialized_start=676, - serialized_end=738, -) -_sym_db.RegisterEnumDescriptor(_ARCHITECTURE) - -Architecture = enum_type_wrapper.EnumTypeWrapper(_ARCHITECTURE) -ARCHITECTURE_UNSPECIFIED = 0 -X86 = 1 -X64 = 2 - - -_VERSION_VERSIONKIND = _descriptor.EnumDescriptor( - name="VersionKind", - full_name="grafeas.v1.Version.VersionKind", - filename=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - values=[ - _descriptor.EnumValueDescriptor( - name="VERSION_KIND_UNSPECIFIED", - index=0, - number=0, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key, - ), - _descriptor.EnumValueDescriptor( - name="NORMAL", - index=1, - number=1, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key, - ), - _descriptor.EnumValueDescriptor( - name="MINIMUM", - index=2, - number=2, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key, - ), - _descriptor.EnumValueDescriptor( - name="MAXIMUM", - index=3, - number=3, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key, - ), - ], - containing_type=None, - serialized_options=None, - serialized_start=593, - serialized_end=674, -) -_sym_db.RegisterEnumDescriptor(_VERSION_VERSIONKIND) - - -_DISTRIBUTION = _descriptor.Descriptor( - name="Distribution", - full_name="grafeas.v1.Distribution", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="cpe_uri", - full_name="grafeas.v1.Distribution.cpe_uri", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="architecture", - full_name="grafeas.v1.Distribution.architecture", - index=1, - number=2, - type=14, - cpp_type=8, - label=1, - has_default_value=False, - default_value=0, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="latest_version", - full_name="grafeas.v1.Distribution.latest_version", - index=2, - number=3, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="maintainer", - full_name="grafeas.v1.Distribution.maintainer", - index=3, - number=4, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="url", - full_name="grafeas.v1.Distribution.url", - index=4, - number=5, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="description", - full_name="grafeas.v1.Distribution.description", - index=5, - number=6, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=55, - serialized_end=233, -) - - -_LOCATION = _descriptor.Descriptor( - name="Location", - full_name="grafeas.v1.Location", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="cpe_uri", - full_name="grafeas.v1.Location.cpe_uri", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="version", - full_name="grafeas.v1.Location.version", - index=1, - number=2, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="path", - full_name="grafeas.v1.Location.path", - index=2, - number=3, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=235, - serialized_end=314, -) - - -_PACKAGENOTE = _descriptor.Descriptor( - name="PackageNote", - full_name="grafeas.v1.PackageNote", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="name", - full_name="grafeas.v1.PackageNote.name", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="distribution", - full_name="grafeas.v1.PackageNote.distribution", - index=1, - number=10, - type=11, - cpp_type=10, - label=3, - has_default_value=False, - default_value=[], - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=316, - serialized_end=391, -) - - -_PACKAGEOCCURRENCE = _descriptor.Descriptor( - name="PackageOccurrence", - full_name="grafeas.v1.PackageOccurrence", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="name", - full_name="grafeas.v1.PackageOccurrence.name", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="location", - full_name="grafeas.v1.PackageOccurrence.location", - index=1, - number=2, - type=11, - cpp_type=10, - label=3, - has_default_value=False, - default_value=[], - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=393, - serialized_end=466, -) - - -_VERSION = _descriptor.Descriptor( - name="Version", - full_name="grafeas.v1.Version", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="epoch", - full_name="grafeas.v1.Version.epoch", - index=0, - number=1, - type=5, - cpp_type=1, - label=1, - has_default_value=False, - default_value=0, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="name", - full_name="grafeas.v1.Version.name", - index=1, - number=2, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="revision", - full_name="grafeas.v1.Version.revision", - index=2, - number=3, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="kind", - full_name="grafeas.v1.Version.kind", - index=3, - number=4, - type=14, - cpp_type=8, - label=1, - has_default_value=False, - default_value=0, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="full_name", - full_name="grafeas.v1.Version.full_name", - index=4, - number=5, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[_VERSION_VERSIONKIND,], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=469, - serialized_end=674, -) - -_DISTRIBUTION.fields_by_name["architecture"].enum_type = _ARCHITECTURE -_DISTRIBUTION.fields_by_name["latest_version"].message_type = _VERSION -_LOCATION.fields_by_name["version"].message_type = _VERSION -_PACKAGENOTE.fields_by_name["distribution"].message_type = _DISTRIBUTION -_PACKAGEOCCURRENCE.fields_by_name["location"].message_type = _LOCATION -_VERSION.fields_by_name["kind"].enum_type = _VERSION_VERSIONKIND -_VERSION_VERSIONKIND.containing_type = _VERSION -DESCRIPTOR.message_types_by_name["Distribution"] = _DISTRIBUTION -DESCRIPTOR.message_types_by_name["Location"] = _LOCATION -DESCRIPTOR.message_types_by_name["PackageNote"] = _PACKAGENOTE -DESCRIPTOR.message_types_by_name["PackageOccurrence"] = _PACKAGEOCCURRENCE -DESCRIPTOR.message_types_by_name["Version"] = _VERSION -DESCRIPTOR.enum_types_by_name["Architecture"] = _ARCHITECTURE -_sym_db.RegisterFileDescriptor(DESCRIPTOR) - -Distribution = _reflection.GeneratedProtocolMessageType( - "Distribution", - (_message.Message,), - { - "DESCRIPTOR": _DISTRIBUTION, - "__module__": "grafeas.grafeas_v1.proto.package_pb2", - "__doc__": """This represents a particular channel of distribution for a given - package. E.g., Debian’s jessie-backports dpkg mirror. - - Attributes: - cpe_uri: - Required. The cpe_uri in `CPE format - `__ denoting the package - manager version distributing a package. - architecture: - The CPU architecture for which packages in this distribution - channel were built. - latest_version: - The latest available version of this package in this - distribution channel. - maintainer: - A freeform string denoting the maintainer of this package. - url: - The distribution channel-specific homepage for this package. - description: - The distribution channel-specific description of this package. - """, - # @@protoc_insertion_point(class_scope:grafeas.v1.Distribution) - }, -) -_sym_db.RegisterMessage(Distribution) - -Location = _reflection.GeneratedProtocolMessageType( - "Location", - (_message.Message,), - { - "DESCRIPTOR": _LOCATION, - "__module__": "grafeas.grafeas_v1.proto.package_pb2", - "__doc__": """An occurrence of a particular package installation found within a - system’s filesystem. E.g., glibc was found in - ``/var/lib/dpkg/status``. - - Attributes: - cpe_uri: - Required. The CPE URI in `CPE format - `__ denoting the package - manager version distributing a package. - version: - The version installed at this location. - path: - The path from which we gathered that this package/version is - installed. - """, - # @@protoc_insertion_point(class_scope:grafeas.v1.Location) - }, -) -_sym_db.RegisterMessage(Location) - -PackageNote = _reflection.GeneratedProtocolMessageType( - "PackageNote", - (_message.Message,), - { - "DESCRIPTOR": _PACKAGENOTE, - "__module__": "grafeas.grafeas_v1.proto.package_pb2", - "__doc__": """This represents a particular package that is distributed over various - channels. E.g., glibc (aka libc6) is distributed by many, at various - versions. - - Attributes: - name: - Required. Immutable. The name of the package. - distribution: - The various channels by which a package is distributed. - """, - # @@protoc_insertion_point(class_scope:grafeas.v1.PackageNote) - }, -) -_sym_db.RegisterMessage(PackageNote) - -PackageOccurrence = _reflection.GeneratedProtocolMessageType( - "PackageOccurrence", - (_message.Message,), - { - "DESCRIPTOR": _PACKAGEOCCURRENCE, - "__module__": "grafeas.grafeas_v1.proto.package_pb2", - "__doc__": """Details on how a particular software package was installed on a - system. - - Attributes: - name: - Output only. The name of the installed package. - location: - Required. All of the places within the filesystem versions of - this package have been found. - """, - # @@protoc_insertion_point(class_scope:grafeas.v1.PackageOccurrence) - }, -) -_sym_db.RegisterMessage(PackageOccurrence) - -Version = _reflection.GeneratedProtocolMessageType( - "Version", - (_message.Message,), - { - "DESCRIPTOR": _VERSION, - "__module__": "grafeas.grafeas_v1.proto.package_pb2", - "__doc__": """Version contains structured information about the version of a - package. - - Attributes: - epoch: - Used to correct mistakes in the version numbering scheme. - name: - Required only when version kind is NORMAL. The main part of - the version name. - revision: - The iteration of the package build from the above version. - kind: - Required. Distinguishes between sentinel MIN/MAX versions and - normal versions. - full_name: - Human readable version string. This string is of the form :- - and is only set when kind is NORMAL. - """, - # @@protoc_insertion_point(class_scope:grafeas.v1.Version) - }, -) -_sym_db.RegisterMessage(Version) - - -DESCRIPTOR._options = None -# @@protoc_insertion_point(module_scope) diff --git a/packages/grafeas/grafeas/grafeas_v1/proto/provenance.proto b/packages/grafeas/grafeas/grafeas_v1/proto/provenance.proto deleted file mode 100644 index 06b109785f8a..000000000000 --- a/packages/grafeas/grafeas/grafeas_v1/proto/provenance.proto +++ /dev/null @@ -1,265 +0,0 @@ -// Copyright 2019 The Grafeas Authors. All rights reserved. -// -// 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. - -syntax = "proto3"; - -package grafeas.v1; - -import "google/protobuf/timestamp.proto"; - -option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; -option java_multiple_files = true; -option java_package = "io.grafeas.v1"; -option objc_class_prefix = "GRA"; - -// Provenance of a build. Contains all information needed to verify the full -// details about the build from source to completion. -message BuildProvenance { - // Required. Unique identifier of the build. - string id = 1; - - // ID of the project. - string project_id = 2; - - // Commands requested by the build. - repeated Command commands = 3; - - // Output of the build. - repeated Artifact built_artifacts = 4; - - // Time at which the build was created. - google.protobuf.Timestamp create_time = 5; - - // Time at which execution of the build was started. - google.protobuf.Timestamp start_time = 6; - - // Time at which execution of the build was finished. - google.protobuf.Timestamp end_time = 7; - - // E-mail address of the user who initiated this build. Note that this was the - // user's e-mail address at the time the build was initiated; this address may - // not represent the same end-user for all time. - string creator = 8; - - // URI where any logs for this provenance were written. - string logs_uri = 9; - - // Details of the Source input to the build. - Source source_provenance = 10; - - // Trigger identifier if the build was triggered automatically; empty if not. - string trigger_id = 11; - - // Special options applied to this build. This is a catch-all field where - // build providers can enter any desired additional details. - map build_options = 12; - - // Version string of the builder at the time this build was executed. - string builder_version = 13; -} - -// Source describes the location of the source used for the build. -message Source { - // If provided, the input binary artifacts for the build came from this - // location. - string artifact_storage_source_uri = 1; - - // Hash(es) of the build source, which can be used to verify that the original - // source integrity was maintained in the build. - // - // The keys to this map are file paths used as build source and the values - // contain the hash values for those files. - // - // If the build source came in a single package such as a gzipped tarfile - // (.tar.gz), the FileHash will be for the single path to that file. - map file_hashes = 2; - - // If provided, the source code used for the build came from this location. - SourceContext context = 3; - - // If provided, some of the source code used for the build may be found in - // these locations, in the case where the source repository had multiple - // remotes or submodules. This list will not include the context specified in - // the context field. - repeated SourceContext additional_contexts = 4; -} - -// Container message for hashes of byte content of files, used in source -// messages to verify integrity of source input to the build. -message FileHashes { - // Required. Collection of file hashes. - repeated Hash file_hash = 1; -} - -// Container message for hash values. -message Hash { - // Required. The type of hash that was performed, e.g. "SHA-256". - string type = 1; - // Required. The hash value. - bytes value = 2; -} - -// Command describes a step performed as part of the build pipeline. -message Command { - // Required. Name of the command, as presented on the command line, or if the - // command is packaged as a Docker container, as presented to `docker pull`. - string name = 1; - - // Environment variables set before running this command. - repeated string env = 2; - - // Command-line arguments used when executing this command. - repeated string args = 3; - - // Working directory (relative to project source root) used when running this - // command. - string dir = 4; - - // Optional unique identifier for this command, used in wait_for to reference - // this command as a dependency. - string id = 5; - - // The ID(s) of the command(s) that this command depends on. - repeated string wait_for = 6; -} - -// Artifact describes a build product. -message Artifact { - // Hash or checksum value of a binary, or Docker Registry 2.0 digest of a - // container. - string checksum = 1; - - // Artifact ID, if any; for container images, this will be a URL by digest - // like `gcr.io/projectID/imagename@sha256:123456`. - string id = 2; - - // Related artifact names. This may be the path to a binary or jar file, or in - // the case of a container build, the name used to push the container image to - // Google Container Registry, as presented to `docker push`. Note that a - // single Artifact ID can have multiple names, for example if two tags are - // applied to one image. - repeated string names = 3; -} - -// A SourceContext is a reference to a tree of files. A SourceContext together -// with a path point to a unique revision of a single file or directory. -message SourceContext { - // A SourceContext can refer any one of the following types of repositories. - oneof context { - // A SourceContext referring to a revision in a Google Cloud Source Repo. - CloudRepoSourceContext cloud_repo = 1; - - // A SourceContext referring to a Gerrit project. - GerritSourceContext gerrit = 2; - - // A SourceContext referring to any third party Git repo (e.g., GitHub). - GitSourceContext git = 3; - } - - // Labels with user defined metadata. - map labels = 4; -} - -// An alias to a repo revision. -message AliasContext { - // The type of an alias. - enum Kind { - // Unknown. - KIND_UNSPECIFIED = 0; - // Git tag. - FIXED = 1; - // Git branch. - MOVABLE = 2; - // Used to specify non-standard aliases. For example, if a Git repo has a - // ref named "refs/foo/bar". - OTHER = 4; - } - - // The alias kind. - Kind kind = 1; - - // The alias name. - string name = 2; -} - -// A CloudRepoSourceContext denotes a particular revision in a Google Cloud -// Source Repo. -message CloudRepoSourceContext { - // The ID of the repo. - RepoId repo_id = 1; - - // A revision in a Cloud Repo can be identified by either its revision ID or - // its alias. - oneof revision { - // A revision ID. - string revision_id = 2; - - // An alias, which may be a branch or tag. - AliasContext alias_context = 3; - } -} - -// A SourceContext referring to a Gerrit project. -message GerritSourceContext { - // The URI of a running Gerrit instance. - string host_uri = 1; - - // The full project name within the host. Projects may be nested, so - // "project/subproject" is a valid project name. The "repo name" is the - // hostURI/project. - string gerrit_project = 2; - - // A revision in a Gerrit project can be identified by either its revision ID - // or its alias. - oneof revision { - // A revision (commit) ID. - string revision_id = 3; - - // An alias, which may be a branch or tag. - AliasContext alias_context = 4; - } -} - -// A GitSourceContext denotes a particular revision in a third party Git -// repository (e.g., GitHub). -message GitSourceContext { - // Git repository URL. - string url = 1; - - // Git commit hash. - string revision_id = 2; -} - -// A unique identifier for a Cloud Repo. -message RepoId { - // A cloud repo can be identified by either its project ID and repository name - // combination, or its globally unique identifier. - oneof id { - // A combination of a project ID and a repo name. - ProjectRepoId project_repo_id = 1; - - // A server-assigned, globally unique identifier. - string uid = 2; - } -} - -// Selects a repo using a Google Cloud Platform project ID (e.g., -// winged-cargo-31) and a repo name within that project. -message ProjectRepoId { - // The ID of the project. - string project_id = 1; - - // The name of the repo. Leave empty for the default repo. - string repo_name = 2; -} diff --git a/packages/grafeas/grafeas/grafeas_v1/proto/provenance_pb2.py b/packages/grafeas/grafeas/grafeas_v1/proto/provenance_pb2.py deleted file mode 100644 index 1b12b4b86e7c..000000000000 --- a/packages/grafeas/grafeas/grafeas_v1/proto/provenance_pb2.py +++ /dev/null @@ -1,1962 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: grafeas/grafeas_v1/proto/provenance.proto -"""Generated protocol buffer code.""" -from google.protobuf import descriptor as _descriptor -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection -from google.protobuf import symbol_database as _symbol_database - -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - -from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 - - -DESCRIPTOR = _descriptor.FileDescriptor( - name="grafeas/grafeas_v1/proto/provenance.proto", - package="grafeas.v1", - syntax="proto3", - serialized_options=b"\n\rio.grafeas.v1P\001ZFgoogle.golang.org/genproto/googleapis/grafeas/grafeas_v1/proto;grafeas\242\002\003GRA", - create_key=_descriptor._internal_create_key, - serialized_pb=b'\n)grafeas/grafeas_v1/proto/provenance.proto\x12\ngrafeas.v1\x1a\x1fgoogle/protobuf/timestamp.proto"\x90\x04\n\x0f\x42uildProvenance\x12\n\n\x02id\x18\x01 \x01(\t\x12\x12\n\nproject_id\x18\x02 \x01(\t\x12%\n\x08\x63ommands\x18\x03 \x03(\x0b\x32\x13.grafeas.v1.Command\x12-\n\x0f\x62uilt_artifacts\x18\x04 \x03(\x0b\x32\x14.grafeas.v1.Artifact\x12/\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12.\n\nstart_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0f\n\x07\x63reator\x18\x08 \x01(\t\x12\x10\n\x08logs_uri\x18\t \x01(\t\x12-\n\x11source_provenance\x18\n \x01(\x0b\x32\x12.grafeas.v1.Source\x12\x12\n\ntrigger_id\x18\x0b \x01(\t\x12\x44\n\rbuild_options\x18\x0c \x03(\x0b\x32-.grafeas.v1.BuildProvenance.BuildOptionsEntry\x12\x17\n\x0f\x62uilder_version\x18\r \x01(\t\x1a\x33\n\x11\x42uildOptionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"\x95\x02\n\x06Source\x12#\n\x1b\x61rtifact_storage_source_uri\x18\x01 \x01(\t\x12\x37\n\x0b\x66ile_hashes\x18\x02 \x03(\x0b\x32".grafeas.v1.Source.FileHashesEntry\x12*\n\x07\x63ontext\x18\x03 \x01(\x0b\x32\x19.grafeas.v1.SourceContext\x12\x36\n\x13\x61\x64\x64itional_contexts\x18\x04 \x03(\x0b\x32\x19.grafeas.v1.SourceContext\x1aI\n\x0f\x46ileHashesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.grafeas.v1.FileHashes:\x02\x38\x01"1\n\nFileHashes\x12#\n\tfile_hash\x18\x01 \x03(\x0b\x32\x10.grafeas.v1.Hash"#\n\x04Hash\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c"]\n\x07\x43ommand\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0b\n\x03\x65nv\x18\x02 \x03(\t\x12\x0c\n\x04\x61rgs\x18\x03 \x03(\t\x12\x0b\n\x03\x64ir\x18\x04 \x01(\t\x12\n\n\x02id\x18\x05 \x01(\t\x12\x10\n\x08wait_for\x18\x06 \x03(\t"7\n\x08\x41rtifact\x12\x10\n\x08\x63hecksum\x18\x01 \x01(\t\x12\n\n\x02id\x18\x02 \x01(\t\x12\r\n\x05names\x18\x03 \x03(\t"\x9a\x02\n\rSourceContext\x12\x38\n\ncloud_repo\x18\x01 \x01(\x0b\x32".grafeas.v1.CloudRepoSourceContextH\x00\x12\x31\n\x06gerrit\x18\x02 \x01(\x0b\x32\x1f.grafeas.v1.GerritSourceContextH\x00\x12+\n\x03git\x18\x03 \x01(\x0b\x32\x1c.grafeas.v1.GitSourceContextH\x00\x12\x35\n\x06labels\x18\x04 \x03(\x0b\x32%.grafeas.v1.SourceContext.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\t\n\x07\x63ontext"\x8a\x01\n\x0c\x41liasContext\x12+\n\x04kind\x18\x01 \x01(\x0e\x32\x1d.grafeas.v1.AliasContext.Kind\x12\x0c\n\x04name\x18\x02 \x01(\t"?\n\x04Kind\x12\x14\n\x10KIND_UNSPECIFIED\x10\x00\x12\t\n\x05\x46IXED\x10\x01\x12\x0b\n\x07MOVABLE\x10\x02\x12\t\n\x05OTHER\x10\x04"\x93\x01\n\x16\x43loudRepoSourceContext\x12#\n\x07repo_id\x18\x01 \x01(\x0b\x32\x12.grafeas.v1.RepoId\x12\x15\n\x0brevision_id\x18\x02 \x01(\tH\x00\x12\x31\n\ralias_context\x18\x03 \x01(\x0b\x32\x18.grafeas.v1.AliasContextH\x00\x42\n\n\x08revision"\x95\x01\n\x13GerritSourceContext\x12\x10\n\x08host_uri\x18\x01 \x01(\t\x12\x16\n\x0egerrit_project\x18\x02 \x01(\t\x12\x15\n\x0brevision_id\x18\x03 \x01(\tH\x00\x12\x31\n\ralias_context\x18\x04 \x01(\x0b\x32\x18.grafeas.v1.AliasContextH\x00\x42\n\n\x08revision"4\n\x10GitSourceContext\x12\x0b\n\x03url\x18\x01 \x01(\t\x12\x13\n\x0brevision_id\x18\x02 \x01(\t"S\n\x06RepoId\x12\x34\n\x0fproject_repo_id\x18\x01 \x01(\x0b\x32\x19.grafeas.v1.ProjectRepoIdH\x00\x12\r\n\x03uid\x18\x02 \x01(\tH\x00\x42\x04\n\x02id"6\n\rProjectRepoId\x12\x12\n\nproject_id\x18\x01 \x01(\t\x12\x11\n\trepo_name\x18\x02 \x01(\tB_\n\rio.grafeas.v1P\x01ZFgoogle.golang.org/genproto/googleapis/grafeas/grafeas_v1/proto;grafeas\xa2\x02\x03GRAb\x06proto3', - dependencies=[google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR,], -) - - -_ALIASCONTEXT_KIND = _descriptor.EnumDescriptor( - name="Kind", - full_name="grafeas.v1.AliasContext.Kind", - filename=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - values=[ - _descriptor.EnumValueDescriptor( - name="KIND_UNSPECIFIED", - index=0, - number=0, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key, - ), - _descriptor.EnumValueDescriptor( - name="FIXED", - index=1, - number=1, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key, - ), - _descriptor.EnumValueDescriptor( - name="MOVABLE", - index=2, - number=2, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key, - ), - _descriptor.EnumValueDescriptor( - name="OTHER", - index=3, - number=4, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key, - ), - ], - containing_type=None, - serialized_options=None, - serialized_start=1502, - serialized_end=1565, -) -_sym_db.RegisterEnumDescriptor(_ALIASCONTEXT_KIND) - - -_BUILDPROVENANCE_BUILDOPTIONSENTRY = _descriptor.Descriptor( - name="BuildOptionsEntry", - full_name="grafeas.v1.BuildProvenance.BuildOptionsEntry", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="key", - full_name="grafeas.v1.BuildProvenance.BuildOptionsEntry.key", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="value", - full_name="grafeas.v1.BuildProvenance.BuildOptionsEntry.value", - index=1, - number=2, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=b"8\001", - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=568, - serialized_end=619, -) - -_BUILDPROVENANCE = _descriptor.Descriptor( - name="BuildProvenance", - full_name="grafeas.v1.BuildProvenance", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="id", - full_name="grafeas.v1.BuildProvenance.id", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="project_id", - full_name="grafeas.v1.BuildProvenance.project_id", - index=1, - number=2, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="commands", - full_name="grafeas.v1.BuildProvenance.commands", - index=2, - number=3, - type=11, - cpp_type=10, - label=3, - has_default_value=False, - default_value=[], - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="built_artifacts", - full_name="grafeas.v1.BuildProvenance.built_artifacts", - index=3, - number=4, - type=11, - cpp_type=10, - label=3, - has_default_value=False, - default_value=[], - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="create_time", - full_name="grafeas.v1.BuildProvenance.create_time", - index=4, - number=5, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="start_time", - full_name="grafeas.v1.BuildProvenance.start_time", - index=5, - number=6, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="end_time", - full_name="grafeas.v1.BuildProvenance.end_time", - index=6, - number=7, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="creator", - full_name="grafeas.v1.BuildProvenance.creator", - index=7, - number=8, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="logs_uri", - full_name="grafeas.v1.BuildProvenance.logs_uri", - index=8, - number=9, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="source_provenance", - full_name="grafeas.v1.BuildProvenance.source_provenance", - index=9, - number=10, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="trigger_id", - full_name="grafeas.v1.BuildProvenance.trigger_id", - index=10, - number=11, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="build_options", - full_name="grafeas.v1.BuildProvenance.build_options", - index=11, - number=12, - type=11, - cpp_type=10, - label=3, - has_default_value=False, - default_value=[], - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="builder_version", - full_name="grafeas.v1.BuildProvenance.builder_version", - index=12, - number=13, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[_BUILDPROVENANCE_BUILDOPTIONSENTRY,], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=91, - serialized_end=619, -) - - -_SOURCE_FILEHASHESENTRY = _descriptor.Descriptor( - name="FileHashesEntry", - full_name="grafeas.v1.Source.FileHashesEntry", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="key", - full_name="grafeas.v1.Source.FileHashesEntry.key", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="value", - full_name="grafeas.v1.Source.FileHashesEntry.value", - index=1, - number=2, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=b"8\001", - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=826, - serialized_end=899, -) - -_SOURCE = _descriptor.Descriptor( - name="Source", - full_name="grafeas.v1.Source", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="artifact_storage_source_uri", - full_name="grafeas.v1.Source.artifact_storage_source_uri", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="file_hashes", - full_name="grafeas.v1.Source.file_hashes", - index=1, - number=2, - type=11, - cpp_type=10, - label=3, - has_default_value=False, - default_value=[], - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="context", - full_name="grafeas.v1.Source.context", - index=2, - number=3, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="additional_contexts", - full_name="grafeas.v1.Source.additional_contexts", - index=3, - number=4, - type=11, - cpp_type=10, - label=3, - has_default_value=False, - default_value=[], - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[_SOURCE_FILEHASHESENTRY,], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=622, - serialized_end=899, -) - - -_FILEHASHES = _descriptor.Descriptor( - name="FileHashes", - full_name="grafeas.v1.FileHashes", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="file_hash", - full_name="grafeas.v1.FileHashes.file_hash", - index=0, - number=1, - type=11, - cpp_type=10, - label=3, - has_default_value=False, - default_value=[], - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=901, - serialized_end=950, -) - - -_HASH = _descriptor.Descriptor( - name="Hash", - full_name="grafeas.v1.Hash", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="type", - full_name="grafeas.v1.Hash.type", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="value", - full_name="grafeas.v1.Hash.value", - index=1, - number=2, - type=12, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"", - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=952, - serialized_end=987, -) - - -_COMMAND = _descriptor.Descriptor( - name="Command", - full_name="grafeas.v1.Command", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="name", - full_name="grafeas.v1.Command.name", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="env", - full_name="grafeas.v1.Command.env", - index=1, - number=2, - type=9, - cpp_type=9, - label=3, - has_default_value=False, - default_value=[], - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="args", - full_name="grafeas.v1.Command.args", - index=2, - number=3, - type=9, - cpp_type=9, - label=3, - has_default_value=False, - default_value=[], - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="dir", - full_name="grafeas.v1.Command.dir", - index=3, - number=4, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="id", - full_name="grafeas.v1.Command.id", - index=4, - number=5, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="wait_for", - full_name="grafeas.v1.Command.wait_for", - index=5, - number=6, - type=9, - cpp_type=9, - label=3, - has_default_value=False, - default_value=[], - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=989, - serialized_end=1082, -) - - -_ARTIFACT = _descriptor.Descriptor( - name="Artifact", - full_name="grafeas.v1.Artifact", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="checksum", - full_name="grafeas.v1.Artifact.checksum", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="id", - full_name="grafeas.v1.Artifact.id", - index=1, - number=2, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="names", - full_name="grafeas.v1.Artifact.names", - index=2, - number=3, - type=9, - cpp_type=9, - label=3, - has_default_value=False, - default_value=[], - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=1084, - serialized_end=1139, -) - - -_SOURCECONTEXT_LABELSENTRY = _descriptor.Descriptor( - name="LabelsEntry", - full_name="grafeas.v1.SourceContext.LabelsEntry", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="key", - full_name="grafeas.v1.SourceContext.LabelsEntry.key", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="value", - full_name="grafeas.v1.SourceContext.LabelsEntry.value", - index=1, - number=2, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=b"8\001", - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=1368, - serialized_end=1413, -) - -_SOURCECONTEXT = _descriptor.Descriptor( - name="SourceContext", - full_name="grafeas.v1.SourceContext", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="cloud_repo", - full_name="grafeas.v1.SourceContext.cloud_repo", - index=0, - number=1, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="gerrit", - full_name="grafeas.v1.SourceContext.gerrit", - index=1, - number=2, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="git", - full_name="grafeas.v1.SourceContext.git", - index=2, - number=3, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="labels", - full_name="grafeas.v1.SourceContext.labels", - index=3, - number=4, - type=11, - cpp_type=10, - label=3, - has_default_value=False, - default_value=[], - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[_SOURCECONTEXT_LABELSENTRY,], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[ - _descriptor.OneofDescriptor( - name="context", - full_name="grafeas.v1.SourceContext.context", - index=0, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[], - ), - ], - serialized_start=1142, - serialized_end=1424, -) - - -_ALIASCONTEXT = _descriptor.Descriptor( - name="AliasContext", - full_name="grafeas.v1.AliasContext", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="kind", - full_name="grafeas.v1.AliasContext.kind", - index=0, - number=1, - type=14, - cpp_type=8, - label=1, - has_default_value=False, - default_value=0, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="name", - full_name="grafeas.v1.AliasContext.name", - index=1, - number=2, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[_ALIASCONTEXT_KIND,], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=1427, - serialized_end=1565, -) - - -_CLOUDREPOSOURCECONTEXT = _descriptor.Descriptor( - name="CloudRepoSourceContext", - full_name="grafeas.v1.CloudRepoSourceContext", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="repo_id", - full_name="grafeas.v1.CloudRepoSourceContext.repo_id", - index=0, - number=1, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="revision_id", - full_name="grafeas.v1.CloudRepoSourceContext.revision_id", - index=1, - number=2, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="alias_context", - full_name="grafeas.v1.CloudRepoSourceContext.alias_context", - index=2, - number=3, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[ - _descriptor.OneofDescriptor( - name="revision", - full_name="grafeas.v1.CloudRepoSourceContext.revision", - index=0, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[], - ), - ], - serialized_start=1568, - serialized_end=1715, -) - - -_GERRITSOURCECONTEXT = _descriptor.Descriptor( - name="GerritSourceContext", - full_name="grafeas.v1.GerritSourceContext", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="host_uri", - full_name="grafeas.v1.GerritSourceContext.host_uri", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="gerrit_project", - full_name="grafeas.v1.GerritSourceContext.gerrit_project", - index=1, - number=2, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="revision_id", - full_name="grafeas.v1.GerritSourceContext.revision_id", - index=2, - number=3, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="alias_context", - full_name="grafeas.v1.GerritSourceContext.alias_context", - index=3, - number=4, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[ - _descriptor.OneofDescriptor( - name="revision", - full_name="grafeas.v1.GerritSourceContext.revision", - index=0, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[], - ), - ], - serialized_start=1718, - serialized_end=1867, -) - - -_GITSOURCECONTEXT = _descriptor.Descriptor( - name="GitSourceContext", - full_name="grafeas.v1.GitSourceContext", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="url", - full_name="grafeas.v1.GitSourceContext.url", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="revision_id", - full_name="grafeas.v1.GitSourceContext.revision_id", - index=1, - number=2, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=1869, - serialized_end=1921, -) - - -_REPOID = _descriptor.Descriptor( - name="RepoId", - full_name="grafeas.v1.RepoId", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="project_repo_id", - full_name="grafeas.v1.RepoId.project_repo_id", - index=0, - number=1, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="uid", - full_name="grafeas.v1.RepoId.uid", - index=1, - number=2, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[ - _descriptor.OneofDescriptor( - name="id", - full_name="grafeas.v1.RepoId.id", - index=0, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[], - ), - ], - serialized_start=1923, - serialized_end=2006, -) - - -_PROJECTREPOID = _descriptor.Descriptor( - name="ProjectRepoId", - full_name="grafeas.v1.ProjectRepoId", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="project_id", - full_name="grafeas.v1.ProjectRepoId.project_id", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="repo_name", - full_name="grafeas.v1.ProjectRepoId.repo_name", - index=1, - number=2, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=2008, - serialized_end=2062, -) - -_BUILDPROVENANCE_BUILDOPTIONSENTRY.containing_type = _BUILDPROVENANCE -_BUILDPROVENANCE.fields_by_name["commands"].message_type = _COMMAND -_BUILDPROVENANCE.fields_by_name["built_artifacts"].message_type = _ARTIFACT -_BUILDPROVENANCE.fields_by_name[ - "create_time" -].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP -_BUILDPROVENANCE.fields_by_name[ - "start_time" -].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP -_BUILDPROVENANCE.fields_by_name[ - "end_time" -].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP -_BUILDPROVENANCE.fields_by_name["source_provenance"].message_type = _SOURCE -_BUILDPROVENANCE.fields_by_name[ - "build_options" -].message_type = _BUILDPROVENANCE_BUILDOPTIONSENTRY -_SOURCE_FILEHASHESENTRY.fields_by_name["value"].message_type = _FILEHASHES -_SOURCE_FILEHASHESENTRY.containing_type = _SOURCE -_SOURCE.fields_by_name["file_hashes"].message_type = _SOURCE_FILEHASHESENTRY -_SOURCE.fields_by_name["context"].message_type = _SOURCECONTEXT -_SOURCE.fields_by_name["additional_contexts"].message_type = _SOURCECONTEXT -_FILEHASHES.fields_by_name["file_hash"].message_type = _HASH -_SOURCECONTEXT_LABELSENTRY.containing_type = _SOURCECONTEXT -_SOURCECONTEXT.fields_by_name["cloud_repo"].message_type = _CLOUDREPOSOURCECONTEXT -_SOURCECONTEXT.fields_by_name["gerrit"].message_type = _GERRITSOURCECONTEXT -_SOURCECONTEXT.fields_by_name["git"].message_type = _GITSOURCECONTEXT -_SOURCECONTEXT.fields_by_name["labels"].message_type = _SOURCECONTEXT_LABELSENTRY -_SOURCECONTEXT.oneofs_by_name["context"].fields.append( - _SOURCECONTEXT.fields_by_name["cloud_repo"] -) -_SOURCECONTEXT.fields_by_name[ - "cloud_repo" -].containing_oneof = _SOURCECONTEXT.oneofs_by_name["context"] -_SOURCECONTEXT.oneofs_by_name["context"].fields.append( - _SOURCECONTEXT.fields_by_name["gerrit"] -) -_SOURCECONTEXT.fields_by_name[ - "gerrit" -].containing_oneof = _SOURCECONTEXT.oneofs_by_name["context"] -_SOURCECONTEXT.oneofs_by_name["context"].fields.append( - _SOURCECONTEXT.fields_by_name["git"] -) -_SOURCECONTEXT.fields_by_name["git"].containing_oneof = _SOURCECONTEXT.oneofs_by_name[ - "context" -] -_ALIASCONTEXT.fields_by_name["kind"].enum_type = _ALIASCONTEXT_KIND -_ALIASCONTEXT_KIND.containing_type = _ALIASCONTEXT -_CLOUDREPOSOURCECONTEXT.fields_by_name["repo_id"].message_type = _REPOID -_CLOUDREPOSOURCECONTEXT.fields_by_name["alias_context"].message_type = _ALIASCONTEXT -_CLOUDREPOSOURCECONTEXT.oneofs_by_name["revision"].fields.append( - _CLOUDREPOSOURCECONTEXT.fields_by_name["revision_id"] -) -_CLOUDREPOSOURCECONTEXT.fields_by_name[ - "revision_id" -].containing_oneof = _CLOUDREPOSOURCECONTEXT.oneofs_by_name["revision"] -_CLOUDREPOSOURCECONTEXT.oneofs_by_name["revision"].fields.append( - _CLOUDREPOSOURCECONTEXT.fields_by_name["alias_context"] -) -_CLOUDREPOSOURCECONTEXT.fields_by_name[ - "alias_context" -].containing_oneof = _CLOUDREPOSOURCECONTEXT.oneofs_by_name["revision"] -_GERRITSOURCECONTEXT.fields_by_name["alias_context"].message_type = _ALIASCONTEXT -_GERRITSOURCECONTEXT.oneofs_by_name["revision"].fields.append( - _GERRITSOURCECONTEXT.fields_by_name["revision_id"] -) -_GERRITSOURCECONTEXT.fields_by_name[ - "revision_id" -].containing_oneof = _GERRITSOURCECONTEXT.oneofs_by_name["revision"] -_GERRITSOURCECONTEXT.oneofs_by_name["revision"].fields.append( - _GERRITSOURCECONTEXT.fields_by_name["alias_context"] -) -_GERRITSOURCECONTEXT.fields_by_name[ - "alias_context" -].containing_oneof = _GERRITSOURCECONTEXT.oneofs_by_name["revision"] -_REPOID.fields_by_name["project_repo_id"].message_type = _PROJECTREPOID -_REPOID.oneofs_by_name["id"].fields.append(_REPOID.fields_by_name["project_repo_id"]) -_REPOID.fields_by_name["project_repo_id"].containing_oneof = _REPOID.oneofs_by_name[ - "id" -] -_REPOID.oneofs_by_name["id"].fields.append(_REPOID.fields_by_name["uid"]) -_REPOID.fields_by_name["uid"].containing_oneof = _REPOID.oneofs_by_name["id"] -DESCRIPTOR.message_types_by_name["BuildProvenance"] = _BUILDPROVENANCE -DESCRIPTOR.message_types_by_name["Source"] = _SOURCE -DESCRIPTOR.message_types_by_name["FileHashes"] = _FILEHASHES -DESCRIPTOR.message_types_by_name["Hash"] = _HASH -DESCRIPTOR.message_types_by_name["Command"] = _COMMAND -DESCRIPTOR.message_types_by_name["Artifact"] = _ARTIFACT -DESCRIPTOR.message_types_by_name["SourceContext"] = _SOURCECONTEXT -DESCRIPTOR.message_types_by_name["AliasContext"] = _ALIASCONTEXT -DESCRIPTOR.message_types_by_name["CloudRepoSourceContext"] = _CLOUDREPOSOURCECONTEXT -DESCRIPTOR.message_types_by_name["GerritSourceContext"] = _GERRITSOURCECONTEXT -DESCRIPTOR.message_types_by_name["GitSourceContext"] = _GITSOURCECONTEXT -DESCRIPTOR.message_types_by_name["RepoId"] = _REPOID -DESCRIPTOR.message_types_by_name["ProjectRepoId"] = _PROJECTREPOID -_sym_db.RegisterFileDescriptor(DESCRIPTOR) - -BuildProvenance = _reflection.GeneratedProtocolMessageType( - "BuildProvenance", - (_message.Message,), - { - "BuildOptionsEntry": _reflection.GeneratedProtocolMessageType( - "BuildOptionsEntry", - (_message.Message,), - { - "DESCRIPTOR": _BUILDPROVENANCE_BUILDOPTIONSENTRY, - "__module__": "grafeas.grafeas_v1.proto.provenance_pb2" - # @@protoc_insertion_point(class_scope:grafeas.v1.BuildProvenance.BuildOptionsEntry) - }, - ), - "DESCRIPTOR": _BUILDPROVENANCE, - "__module__": "grafeas.grafeas_v1.proto.provenance_pb2", - "__doc__": """Provenance of a build. Contains all information needed to verify the - full details about the build from source to completion. - - Attributes: - id: - Required. Unique identifier of the build. - project_id: - ID of the project. - commands: - Commands requested by the build. - built_artifacts: - Output of the build. - create_time: - Time at which the build was created. - start_time: - Time at which execution of the build was started. - end_time: - Time at which execution of the build was finished. - creator: - E-mail address of the user who initiated this build. Note that - this was the user’s e-mail address at the time the build was - initiated; this address may not represent the same end-user - for all time. - logs_uri: - URI where any logs for this provenance were written. - source_provenance: - Details of the Source input to the build. - trigger_id: - Trigger identifier if the build was triggered automatically; - empty if not. - build_options: - Special options applied to this build. This is a catch-all - field where build providers can enter any desired additional - details. - builder_version: - Version string of the builder at the time this build was - executed. - """, - # @@protoc_insertion_point(class_scope:grafeas.v1.BuildProvenance) - }, -) -_sym_db.RegisterMessage(BuildProvenance) -_sym_db.RegisterMessage(BuildProvenance.BuildOptionsEntry) - -Source = _reflection.GeneratedProtocolMessageType( - "Source", - (_message.Message,), - { - "FileHashesEntry": _reflection.GeneratedProtocolMessageType( - "FileHashesEntry", - (_message.Message,), - { - "DESCRIPTOR": _SOURCE_FILEHASHESENTRY, - "__module__": "grafeas.grafeas_v1.proto.provenance_pb2" - # @@protoc_insertion_point(class_scope:grafeas.v1.Source.FileHashesEntry) - }, - ), - "DESCRIPTOR": _SOURCE, - "__module__": "grafeas.grafeas_v1.proto.provenance_pb2", - "__doc__": """Source describes the location of the source used for the build. - - Attributes: - artifact_storage_source_uri: - If provided, the input binary artifacts for the build came - from this location. - file_hashes: - Hash(es) of the build source, which can be used to verify that - the original source integrity was maintained in the build. - The keys to this map are file paths used as build source and - the values contain the hash values for those files. If the - build source came in a single package such as a gzipped - tarfile (.tar.gz), the FileHash will be for the single path to - that file. - context: - If provided, the source code used for the build came from this - location. - additional_contexts: - If provided, some of the source code used for the build may be - found in these locations, in the case where the source - repository had multiple remotes or submodules. This list will - not include the context specified in the context field. - """, - # @@protoc_insertion_point(class_scope:grafeas.v1.Source) - }, -) -_sym_db.RegisterMessage(Source) -_sym_db.RegisterMessage(Source.FileHashesEntry) - -FileHashes = _reflection.GeneratedProtocolMessageType( - "FileHashes", - (_message.Message,), - { - "DESCRIPTOR": _FILEHASHES, - "__module__": "grafeas.grafeas_v1.proto.provenance_pb2", - "__doc__": """Container message for hashes of byte content of files, used in source - messages to verify integrity of source input to the build. - - Attributes: - file_hash: - Required. Collection of file hashes. - """, - # @@protoc_insertion_point(class_scope:grafeas.v1.FileHashes) - }, -) -_sym_db.RegisterMessage(FileHashes) - -Hash = _reflection.GeneratedProtocolMessageType( - "Hash", - (_message.Message,), - { - "DESCRIPTOR": _HASH, - "__module__": "grafeas.grafeas_v1.proto.provenance_pb2", - "__doc__": """Container message for hash values. - - Attributes: - type: - Required. The type of hash that was performed, e.g. “SHA-256”. - value: - Required. The hash value. - """, - # @@protoc_insertion_point(class_scope:grafeas.v1.Hash) - }, -) -_sym_db.RegisterMessage(Hash) - -Command = _reflection.GeneratedProtocolMessageType( - "Command", - (_message.Message,), - { - "DESCRIPTOR": _COMMAND, - "__module__": "grafeas.grafeas_v1.proto.provenance_pb2", - "__doc__": """Command describes a step performed as part of the build pipeline. - - Attributes: - name: - Required. Name of the command, as presented on the command - line, or if the command is packaged as a Docker container, as - presented to ``docker pull``. - env: - Environment variables set before running this command. - args: - Command-line arguments used when executing this command. - dir: - Working directory (relative to project source root) used when - running this command. - id: - Optional unique identifier for this command, used in wait_for - to reference this command as a dependency. - wait_for: - The ID(s) of the command(s) that this command depends on. - """, - # @@protoc_insertion_point(class_scope:grafeas.v1.Command) - }, -) -_sym_db.RegisterMessage(Command) - -Artifact = _reflection.GeneratedProtocolMessageType( - "Artifact", - (_message.Message,), - { - "DESCRIPTOR": _ARTIFACT, - "__module__": "grafeas.grafeas_v1.proto.provenance_pb2", - "__doc__": """Artifact describes a build product. - - Attributes: - checksum: - Hash or checksum value of a binary, or Docker Registry 2.0 - digest of a container. - id: - Artifact ID, if any; for container images, this will be a URL - by digest like ``gcr.io/projectID/imagename@sha256:123456``. - names: - Related artifact names. This may be the path to a binary or - jar file, or in the case of a container build, the name used - to push the container image to Google Container Registry, as - presented to ``docker push``. Note that a single Artifact ID - can have multiple names, for example if two tags are applied - to one image. - """, - # @@protoc_insertion_point(class_scope:grafeas.v1.Artifact) - }, -) -_sym_db.RegisterMessage(Artifact) - -SourceContext = _reflection.GeneratedProtocolMessageType( - "SourceContext", - (_message.Message,), - { - "LabelsEntry": _reflection.GeneratedProtocolMessageType( - "LabelsEntry", - (_message.Message,), - { - "DESCRIPTOR": _SOURCECONTEXT_LABELSENTRY, - "__module__": "grafeas.grafeas_v1.proto.provenance_pb2" - # @@protoc_insertion_point(class_scope:grafeas.v1.SourceContext.LabelsEntry) - }, - ), - "DESCRIPTOR": _SOURCECONTEXT, - "__module__": "grafeas.grafeas_v1.proto.provenance_pb2", - "__doc__": """A SourceContext is a reference to a tree of files. A SourceContext - together with a path point to a unique revision of a single file or - directory. - - Attributes: - context: - A SourceContext can refer any one of the following types of - repositories. - cloud_repo: - A SourceContext referring to a revision in a Google Cloud - Source Repo. - gerrit: - A SourceContext referring to a Gerrit project. - git: - A SourceContext referring to any third party Git repo (e.g., - GitHub). - labels: - Labels with user defined metadata. - """, - # @@protoc_insertion_point(class_scope:grafeas.v1.SourceContext) - }, -) -_sym_db.RegisterMessage(SourceContext) -_sym_db.RegisterMessage(SourceContext.LabelsEntry) - -AliasContext = _reflection.GeneratedProtocolMessageType( - "AliasContext", - (_message.Message,), - { - "DESCRIPTOR": _ALIASCONTEXT, - "__module__": "grafeas.grafeas_v1.proto.provenance_pb2", - "__doc__": """An alias to a repo revision. - - Attributes: - kind: - The alias kind. - name: - The alias name. - """, - # @@protoc_insertion_point(class_scope:grafeas.v1.AliasContext) - }, -) -_sym_db.RegisterMessage(AliasContext) - -CloudRepoSourceContext = _reflection.GeneratedProtocolMessageType( - "CloudRepoSourceContext", - (_message.Message,), - { - "DESCRIPTOR": _CLOUDREPOSOURCECONTEXT, - "__module__": "grafeas.grafeas_v1.proto.provenance_pb2", - "__doc__": """A CloudRepoSourceContext denotes a particular revision in a Google - Cloud Source Repo. - - Attributes: - repo_id: - The ID of the repo. - revision: - A revision in a Cloud Repo can be identified by either its - revision ID or its alias. - revision_id: - A revision ID. - alias_context: - An alias, which may be a branch or tag. - """, - # @@protoc_insertion_point(class_scope:grafeas.v1.CloudRepoSourceContext) - }, -) -_sym_db.RegisterMessage(CloudRepoSourceContext) - -GerritSourceContext = _reflection.GeneratedProtocolMessageType( - "GerritSourceContext", - (_message.Message,), - { - "DESCRIPTOR": _GERRITSOURCECONTEXT, - "__module__": "grafeas.grafeas_v1.proto.provenance_pb2", - "__doc__": """A SourceContext referring to a Gerrit project. - - Attributes: - host_uri: - The URI of a running Gerrit instance. - gerrit_project: - The full project name within the host. Projects may be nested, - so “project/subproject” is a valid project name. The “repo - name” is the hostURI/project. - revision: - A revision in a Gerrit project can be identified by either its - revision ID or its alias. - revision_id: - A revision (commit) ID. - alias_context: - An alias, which may be a branch or tag. - """, - # @@protoc_insertion_point(class_scope:grafeas.v1.GerritSourceContext) - }, -) -_sym_db.RegisterMessage(GerritSourceContext) - -GitSourceContext = _reflection.GeneratedProtocolMessageType( - "GitSourceContext", - (_message.Message,), - { - "DESCRIPTOR": _GITSOURCECONTEXT, - "__module__": "grafeas.grafeas_v1.proto.provenance_pb2", - "__doc__": """A GitSourceContext denotes a particular revision in a third party Git - repository (e.g., GitHub). - - Attributes: - url: - Git repository URL. - revision_id: - Git commit hash. - """, - # @@protoc_insertion_point(class_scope:grafeas.v1.GitSourceContext) - }, -) -_sym_db.RegisterMessage(GitSourceContext) - -RepoId = _reflection.GeneratedProtocolMessageType( - "RepoId", - (_message.Message,), - { - "DESCRIPTOR": _REPOID, - "__module__": "grafeas.grafeas_v1.proto.provenance_pb2", - "__doc__": """A unique identifier for a Cloud Repo. - - Attributes: - id: - A cloud repo can be identified by either its project ID and - repository name combination, or its globally unique - identifier. - project_repo_id: - A combination of a project ID and a repo name. - uid: - A server-assigned, globally unique identifier. - """, - # @@protoc_insertion_point(class_scope:grafeas.v1.RepoId) - }, -) -_sym_db.RegisterMessage(RepoId) - -ProjectRepoId = _reflection.GeneratedProtocolMessageType( - "ProjectRepoId", - (_message.Message,), - { - "DESCRIPTOR": _PROJECTREPOID, - "__module__": "grafeas.grafeas_v1.proto.provenance_pb2", - "__doc__": """Selects a repo using a Google Cloud Platform project ID (e.g., winged- - cargo-31) and a repo name within that project. - - Attributes: - project_id: - The ID of the project. - repo_name: - The name of the repo. Leave empty for the default repo. - """, - # @@protoc_insertion_point(class_scope:grafeas.v1.ProjectRepoId) - }, -) -_sym_db.RegisterMessage(ProjectRepoId) - - -DESCRIPTOR._options = None -_BUILDPROVENANCE_BUILDOPTIONSENTRY._options = None -_SOURCE_FILEHASHESENTRY._options = None -_SOURCECONTEXT_LABELSENTRY._options = None -# @@protoc_insertion_point(module_scope) diff --git a/packages/grafeas/grafeas/grafeas_v1/proto/upgrade.proto b/packages/grafeas/grafeas/grafeas_v1/proto/upgrade.proto deleted file mode 100644 index 89d389299199..000000000000 --- a/packages/grafeas/grafeas/grafeas_v1/proto/upgrade.proto +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright 2019 The Grafeas Authors. All rights reserved. -// -// 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. - -syntax = "proto3"; - -package grafeas.v1; - -import "google/protobuf/timestamp.proto"; -import "grafeas/v1/package.proto"; - -option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; -option java_multiple_files = true; -option java_package = "io.grafeas.v1"; -option objc_class_prefix = "GRA"; - -// An Upgrade Note represents a potential upgrade of a package to a given -// version. For each package version combination (i.e. bash 4.0, bash 4.1, -// bash 4.1.2), there will be an Upgrade Note. For Windows, windows_update field -// represents the information related to the update. -message UpgradeNote { - // Required for non-Windows OS. The package this Upgrade is for. - string package = 1; - // Required for non-Windows OS. The version of the package in machine + human - // readable form. - grafeas.v1.Version version = 2; - // Metadata about the upgrade for each specific operating system. - repeated UpgradeDistribution distributions = 3; - // Required for Windows OS. Represents the metadata about the Windows update. - WindowsUpdate windows_update = 4; -} - -// The Upgrade Distribution represents metadata about the Upgrade for each -// operating system (CPE). Some distributions have additional metadata around -// updates, classifying them into various categories and severities. -message UpgradeDistribution { - // Required - The specific operating system this metadata applies to. See - // https://cpe.mitre.org/specification/. - string cpe_uri = 1; - // The operating system classification of this Upgrade, as specified by the - // upstream operating system upgrade feed. For Windows the classification is - // one of the category_ids listed at - // https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ff357803(v=vs.85) - string classification = 2; - // The severity as specified by the upstream operating system. - string severity = 3; - // The cve tied to this Upgrade. - repeated string cve = 4; -} - -// Windows Update represents the metadata about the update for the Windows -// operating system. The fields in this message come from the Windows Update API -// documented at -// https://docs.microsoft.com/en-us/windows/win32/api/wuapi/nn-wuapi-iupdate. -message WindowsUpdate { - // The unique identifier of the update. - message Identity { - // The revision independent identifier of the update. - string update_id = 1; - // The revision number of the update. - int32 revision = 2; - } - // Required - The unique identifier for the update. - Identity identity = 1; - // The localized title of the update. - string title = 2; - // The localized description of the update. - string description = 3; - // The category to which the update belongs. - message Category { - // The identifier of the category. - string category_id = 1; - // The localized name of the category. - string name = 2; - } - // The list of categories to which the update belongs. - repeated Category categories = 4; - // The Microsoft Knowledge Base article IDs that are associated with the - // update. - repeated string kb_article_ids = 5; - // The hyperlink to the support information for the update. - string support_url = 6; - // The last published timestamp of the update. - google.protobuf.Timestamp last_published_timestamp = 7; -} - -// An Upgrade Occurrence represents that a specific resource_url could install a -// specific upgrade. This presence is supplied via local sources (i.e. it is -// present in the mirror and the running system has noticed its availability). -// For Windows, both distribution and windows_update contain information for the -// Windows update. -message UpgradeOccurrence { - // Required for non-Windows OS. The package this Upgrade is for. - string package = 1; - // Required for non-Windows OS. The version of the package in a machine + - // human readable form. - grafeas.v1.Version parsed_version = 3; - // Metadata about the upgrade for available for the specific operating system - // for the resource_url. This allows efficient filtering, as well as - // making it easier to use the occurrence. - UpgradeDistribution distribution = 4; - // Required for Windows OS. Represents the metadata about the Windows update. - WindowsUpdate windows_update = 5; -} diff --git a/packages/grafeas/grafeas/grafeas_v1/proto/upgrade_pb2.py b/packages/grafeas/grafeas/grafeas_v1/proto/upgrade_pb2.py deleted file mode 100644 index 60566461a596..000000000000 --- a/packages/grafeas/grafeas/grafeas_v1/proto/upgrade_pb2.py +++ /dev/null @@ -1,785 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: grafeas/grafeas_v1/proto/upgrade.proto -"""Generated protocol buffer code.""" -from google.protobuf import descriptor as _descriptor -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection -from google.protobuf import symbol_database as _symbol_database - -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - -from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 -from grafeas.grafeas_v1.proto import ( - package_pb2 as grafeas_dot_grafeas__v1_dot_proto_dot_package__pb2, -) - - -DESCRIPTOR = _descriptor.FileDescriptor( - name="grafeas/grafeas_v1/proto/upgrade.proto", - package="grafeas.v1", - syntax="proto3", - serialized_options=b"\n\rio.grafeas.v1P\001ZFgoogle.golang.org/genproto/googleapis/grafeas/grafeas_v1/proto;grafeas\242\002\003GRA", - create_key=_descriptor._internal_create_key, - serialized_pb=b'\n&grafeas/grafeas_v1/proto/upgrade.proto\x12\ngrafeas.v1\x1a\x1fgoogle/protobuf/timestamp.proto\x1a&grafeas/grafeas_v1/proto/package.proto"\xaf\x01\n\x0bUpgradeNote\x12\x0f\n\x07package\x18\x01 \x01(\t\x12$\n\x07version\x18\x02 \x01(\x0b\x32\x13.grafeas.v1.Version\x12\x36\n\rdistributions\x18\x03 \x03(\x0b\x32\x1f.grafeas.v1.UpgradeDistribution\x12\x31\n\x0ewindows_update\x18\x04 \x01(\x0b\x32\x19.grafeas.v1.WindowsUpdate"]\n\x13UpgradeDistribution\x12\x0f\n\x07\x63pe_uri\x18\x01 \x01(\t\x12\x16\n\x0e\x63lassification\x18\x02 \x01(\t\x12\x10\n\x08severity\x18\x03 \x01(\t\x12\x0b\n\x03\x63ve\x18\x04 \x03(\t"\xec\x02\n\rWindowsUpdate\x12\x34\n\x08identity\x18\x01 \x01(\x0b\x32".grafeas.v1.WindowsUpdate.Identity\x12\r\n\x05title\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x36\n\ncategories\x18\x04 \x03(\x0b\x32".grafeas.v1.WindowsUpdate.Category\x12\x16\n\x0ekb_article_ids\x18\x05 \x03(\t\x12\x13\n\x0bsupport_url\x18\x06 \x01(\t\x12<\n\x18last_published_timestamp\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a/\n\x08Identity\x12\x11\n\tupdate_id\x18\x01 \x01(\t\x12\x10\n\x08revision\x18\x02 \x01(\x05\x1a-\n\x08\x43\x61tegory\x12\x13\n\x0b\x63\x61tegory_id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t"\xbb\x01\n\x11UpgradeOccurrence\x12\x0f\n\x07package\x18\x01 \x01(\t\x12+\n\x0eparsed_version\x18\x03 \x01(\x0b\x32\x13.grafeas.v1.Version\x12\x35\n\x0c\x64istribution\x18\x04 \x01(\x0b\x32\x1f.grafeas.v1.UpgradeDistribution\x12\x31\n\x0ewindows_update\x18\x05 \x01(\x0b\x32\x19.grafeas.v1.WindowsUpdateB_\n\rio.grafeas.v1P\x01ZFgoogle.golang.org/genproto/googleapis/grafeas/grafeas_v1/proto;grafeas\xa2\x02\x03GRAb\x06proto3', - dependencies=[ - google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR, - grafeas_dot_grafeas__v1_dot_proto_dot_package__pb2.DESCRIPTOR, - ], -) - - -_UPGRADENOTE = _descriptor.Descriptor( - name="UpgradeNote", - full_name="grafeas.v1.UpgradeNote", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="package", - full_name="grafeas.v1.UpgradeNote.package", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="version", - full_name="grafeas.v1.UpgradeNote.version", - index=1, - number=2, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="distributions", - full_name="grafeas.v1.UpgradeNote.distributions", - index=2, - number=3, - type=11, - cpp_type=10, - label=3, - has_default_value=False, - default_value=[], - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="windows_update", - full_name="grafeas.v1.UpgradeNote.windows_update", - index=3, - number=4, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=128, - serialized_end=303, -) - - -_UPGRADEDISTRIBUTION = _descriptor.Descriptor( - name="UpgradeDistribution", - full_name="grafeas.v1.UpgradeDistribution", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="cpe_uri", - full_name="grafeas.v1.UpgradeDistribution.cpe_uri", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="classification", - full_name="grafeas.v1.UpgradeDistribution.classification", - index=1, - number=2, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="severity", - full_name="grafeas.v1.UpgradeDistribution.severity", - index=2, - number=3, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="cve", - full_name="grafeas.v1.UpgradeDistribution.cve", - index=3, - number=4, - type=9, - cpp_type=9, - label=3, - has_default_value=False, - default_value=[], - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=305, - serialized_end=398, -) - - -_WINDOWSUPDATE_IDENTITY = _descriptor.Descriptor( - name="Identity", - full_name="grafeas.v1.WindowsUpdate.Identity", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="update_id", - full_name="grafeas.v1.WindowsUpdate.Identity.update_id", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="revision", - full_name="grafeas.v1.WindowsUpdate.Identity.revision", - index=1, - number=2, - type=5, - cpp_type=1, - label=1, - has_default_value=False, - default_value=0, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=671, - serialized_end=718, -) - -_WINDOWSUPDATE_CATEGORY = _descriptor.Descriptor( - name="Category", - full_name="grafeas.v1.WindowsUpdate.Category", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="category_id", - full_name="grafeas.v1.WindowsUpdate.Category.category_id", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="name", - full_name="grafeas.v1.WindowsUpdate.Category.name", - index=1, - number=2, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=720, - serialized_end=765, -) - -_WINDOWSUPDATE = _descriptor.Descriptor( - name="WindowsUpdate", - full_name="grafeas.v1.WindowsUpdate", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="identity", - full_name="grafeas.v1.WindowsUpdate.identity", - index=0, - number=1, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="title", - full_name="grafeas.v1.WindowsUpdate.title", - index=1, - number=2, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="description", - full_name="grafeas.v1.WindowsUpdate.description", - index=2, - number=3, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="categories", - full_name="grafeas.v1.WindowsUpdate.categories", - index=3, - number=4, - type=11, - cpp_type=10, - label=3, - has_default_value=False, - default_value=[], - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="kb_article_ids", - full_name="grafeas.v1.WindowsUpdate.kb_article_ids", - index=4, - number=5, - type=9, - cpp_type=9, - label=3, - has_default_value=False, - default_value=[], - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="support_url", - full_name="grafeas.v1.WindowsUpdate.support_url", - index=5, - number=6, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="last_published_timestamp", - full_name="grafeas.v1.WindowsUpdate.last_published_timestamp", - index=6, - number=7, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[_WINDOWSUPDATE_IDENTITY, _WINDOWSUPDATE_CATEGORY,], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=401, - serialized_end=765, -) - - -_UPGRADEOCCURRENCE = _descriptor.Descriptor( - name="UpgradeOccurrence", - full_name="grafeas.v1.UpgradeOccurrence", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="package", - full_name="grafeas.v1.UpgradeOccurrence.package", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="parsed_version", - full_name="grafeas.v1.UpgradeOccurrence.parsed_version", - index=1, - number=3, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="distribution", - full_name="grafeas.v1.UpgradeOccurrence.distribution", - index=2, - number=4, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="windows_update", - full_name="grafeas.v1.UpgradeOccurrence.windows_update", - index=3, - number=5, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=768, - serialized_end=955, -) - -_UPGRADENOTE.fields_by_name[ - "version" -].message_type = grafeas_dot_grafeas__v1_dot_proto_dot_package__pb2._VERSION -_UPGRADENOTE.fields_by_name["distributions"].message_type = _UPGRADEDISTRIBUTION -_UPGRADENOTE.fields_by_name["windows_update"].message_type = _WINDOWSUPDATE -_WINDOWSUPDATE_IDENTITY.containing_type = _WINDOWSUPDATE -_WINDOWSUPDATE_CATEGORY.containing_type = _WINDOWSUPDATE -_WINDOWSUPDATE.fields_by_name["identity"].message_type = _WINDOWSUPDATE_IDENTITY -_WINDOWSUPDATE.fields_by_name["categories"].message_type = _WINDOWSUPDATE_CATEGORY -_WINDOWSUPDATE.fields_by_name[ - "last_published_timestamp" -].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP -_UPGRADEOCCURRENCE.fields_by_name[ - "parsed_version" -].message_type = grafeas_dot_grafeas__v1_dot_proto_dot_package__pb2._VERSION -_UPGRADEOCCURRENCE.fields_by_name["distribution"].message_type = _UPGRADEDISTRIBUTION -_UPGRADEOCCURRENCE.fields_by_name["windows_update"].message_type = _WINDOWSUPDATE -DESCRIPTOR.message_types_by_name["UpgradeNote"] = _UPGRADENOTE -DESCRIPTOR.message_types_by_name["UpgradeDistribution"] = _UPGRADEDISTRIBUTION -DESCRIPTOR.message_types_by_name["WindowsUpdate"] = _WINDOWSUPDATE -DESCRIPTOR.message_types_by_name["UpgradeOccurrence"] = _UPGRADEOCCURRENCE -_sym_db.RegisterFileDescriptor(DESCRIPTOR) - -UpgradeNote = _reflection.GeneratedProtocolMessageType( - "UpgradeNote", - (_message.Message,), - { - "DESCRIPTOR": _UPGRADENOTE, - "__module__": "grafeas.grafeas_v1.proto.upgrade_pb2", - "__doc__": """An Upgrade Note represents a potential upgrade of a package to a given - version. For each package version combination (i.e. bash 4.0, bash - 4.1, bash 4.1.2), there will be an Upgrade Note. For Windows, - windows_update field represents the information related to the update. - - Attributes: - package: - Required for non-Windows OS. The package this Upgrade is for. - version: - Required for non-Windows OS. The version of the package in - machine + human readable form. - distributions: - Metadata about the upgrade for each specific operating system. - windows_update: - Required for Windows OS. Represents the metadata about the - Windows update. - """, - # @@protoc_insertion_point(class_scope:grafeas.v1.UpgradeNote) - }, -) -_sym_db.RegisterMessage(UpgradeNote) - -UpgradeDistribution = _reflection.GeneratedProtocolMessageType( - "UpgradeDistribution", - (_message.Message,), - { - "DESCRIPTOR": _UPGRADEDISTRIBUTION, - "__module__": "grafeas.grafeas_v1.proto.upgrade_pb2", - "__doc__": """The Upgrade Distribution represents metadata about the Upgrade for - each operating system (CPE). Some distributions have additional - metadata around updates, classifying them into various categories and - severities. - - Attributes: - cpe_uri: - Required - The specific operating system this metadata applies - to. See https://cpe.mitre.org/specification/. - classification: - The operating system classification of this Upgrade, as - specified by the upstream operating system upgrade feed. For - Windows the classification is one of the category_ids listed - at https://docs.microsoft.com/en-us/previous- - versions/windows/desktop/ff357803(v=vs.85) - severity: - The severity as specified by the upstream operating system. - cve: - The cve tied to this Upgrade. - """, - # @@protoc_insertion_point(class_scope:grafeas.v1.UpgradeDistribution) - }, -) -_sym_db.RegisterMessage(UpgradeDistribution) - -WindowsUpdate = _reflection.GeneratedProtocolMessageType( - "WindowsUpdate", - (_message.Message,), - { - "Identity": _reflection.GeneratedProtocolMessageType( - "Identity", - (_message.Message,), - { - "DESCRIPTOR": _WINDOWSUPDATE_IDENTITY, - "__module__": "grafeas.grafeas_v1.proto.upgrade_pb2", - "__doc__": """The unique identifier of the update. - - Attributes: - update_id: - The revision independent identifier of the update. - revision: - The revision number of the update. - """, - # @@protoc_insertion_point(class_scope:grafeas.v1.WindowsUpdate.Identity) - }, - ), - "Category": _reflection.GeneratedProtocolMessageType( - "Category", - (_message.Message,), - { - "DESCRIPTOR": _WINDOWSUPDATE_CATEGORY, - "__module__": "grafeas.grafeas_v1.proto.upgrade_pb2", - "__doc__": """The category to which the update belongs. - - Attributes: - category_id: - The identifier of the category. - name: - The localized name of the category. - """, - # @@protoc_insertion_point(class_scope:grafeas.v1.WindowsUpdate.Category) - }, - ), - "DESCRIPTOR": _WINDOWSUPDATE, - "__module__": "grafeas.grafeas_v1.proto.upgrade_pb2", - "__doc__": """Windows Update represents the metadata about the update for the - Windows operating system. The fields in this message come from the - Windows Update API documented at https://docs.microsoft.com/en- - us/windows/win32/api/wuapi/nn-wuapi-iupdate. - - Attributes: - identity: - Required - The unique identifier for the update. - title: - The localized title of the update. - description: - The localized description of the update. - categories: - The list of categories to which the update belongs. - kb_article_ids: - The Microsoft Knowledge Base article IDs that are associated - with the update. - support_url: - The hyperlink to the support information for the update. - last_published_timestamp: - The last published timestamp of the update. - """, - # @@protoc_insertion_point(class_scope:grafeas.v1.WindowsUpdate) - }, -) -_sym_db.RegisterMessage(WindowsUpdate) -_sym_db.RegisterMessage(WindowsUpdate.Identity) -_sym_db.RegisterMessage(WindowsUpdate.Category) - -UpgradeOccurrence = _reflection.GeneratedProtocolMessageType( - "UpgradeOccurrence", - (_message.Message,), - { - "DESCRIPTOR": _UPGRADEOCCURRENCE, - "__module__": "grafeas.grafeas_v1.proto.upgrade_pb2", - "__doc__": """An Upgrade Occurrence represents that a specific resource_url could - install a specific upgrade. This presence is supplied via local - sources (i.e. it is present in the mirror and the running system has - noticed its availability). For Windows, both distribution and - windows_update contain information for the Windows update. - - Attributes: - package: - Required for non-Windows OS. The package this Upgrade is for. - parsed_version: - Required for non-Windows OS. The version of the package in a - machine + human readable form. - distribution: - Metadata about the upgrade for available for the specific - operating system for the resource_url. This allows efficient - filtering, as well as making it easier to use the occurrence. - windows_update: - Required for Windows OS. Represents the metadata about the - Windows update. - """, - # @@protoc_insertion_point(class_scope:grafeas.v1.UpgradeOccurrence) - }, -) -_sym_db.RegisterMessage(UpgradeOccurrence) - - -DESCRIPTOR._options = None -# @@protoc_insertion_point(module_scope) diff --git a/packages/grafeas/grafeas/grafeas_v1/proto/vulnerability.proto b/packages/grafeas/grafeas/grafeas_v1/proto/vulnerability.proto deleted file mode 100644 index 6c94cdf05025..000000000000 --- a/packages/grafeas/grafeas/grafeas_v1/proto/vulnerability.proto +++ /dev/null @@ -1,226 +0,0 @@ -// Copyright 2019 The Grafeas Authors. All rights reserved. -// -// 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. - -syntax = "proto3"; - -package grafeas.v1; - -import "google/protobuf/timestamp.proto"; -import "grafeas/v1/common.proto"; -import "grafeas/v1/cvss.proto"; -import "grafeas/v1/package.proto"; - -option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; -option java_multiple_files = true; -option java_package = "io.grafeas.v1"; -option objc_class_prefix = "GRA"; - -// Note provider assigned severity/impact ranking. -enum Severity { - // Unknown. - SEVERITY_UNSPECIFIED = 0; - // Minimal severity. - MINIMAL = 1; - // Low severity. - LOW = 2; - // Medium severity. - MEDIUM = 3; - // High severity. - HIGH = 4; - // Critical severity. - CRITICAL = 5; -} - -// A security vulnerability that can be found in resources. -message VulnerabilityNote { - // The CVSS score of this vulnerability. CVSS score is on a scale of 0 - 10 - // where 0 indicates low severity and 10 indicates high severity. - float cvss_score = 1; - - // The note provider assigned severity of this vulnerability. - Severity severity = 2; - - // Details of all known distros and packages affected by this vulnerability. - repeated Detail details = 3; - - // A detail for a distro and package affected by this vulnerability and its - // associated fix (if one is available). - message Detail { - // The distro assigned severity of this vulnerability. - string severity_name = 1; - - // A vendor-specific description of this vulnerability. - string description = 2; - - // The type of package; whether native or non native (e.g., ruby gems, - // node.js packages, etc.). - string package_type = 3; - - // Required. The [CPE URI](https://cpe.mitre.org/specification/) this - // vulnerability affects. - string affected_cpe_uri = 4; - - // Required. The package this vulnerability affects. - string affected_package = 5; - - // The version number at the start of an interval in which this - // vulnerability exists. A vulnerability can affect a package between - // version numbers that are disjoint sets of intervals (example: - // [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be - // represented in its own Detail. If a specific affected version is provided - // by a vulnerability database, affected_version_start and - // affected_version_end will be the same in that Detail. - grafeas.v1.Version affected_version_start = 6; - - // The version number at the end of an interval in which this vulnerability - // exists. A vulnerability can affect a package between version numbers - // that are disjoint sets of intervals (example: [1.0.0-1.1.0], - // [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be represented in its - // own Detail. If a specific affected version is provided by a vulnerability - // database, affected_version_start and affected_version_end will be the - // same in that Detail. - grafeas.v1.Version affected_version_end = 7; - - // The distro recommended [CPE URI](https://cpe.mitre.org/specification/) - // to update to that contains a fix for this vulnerability. It is possible - // for this to be different from the affected_cpe_uri. - string fixed_cpe_uri = 8; - - // The distro recommended package to update to that contains a fix for this - // vulnerability. It is possible for this to be different from the - // affected_package. - string fixed_package = 9; - - // The distro recommended version to update to that contains a - // fix for this vulnerability. Setting this to VersionKind.MAXIMUM means no - // such version is yet available. - grafeas.v1.Version fixed_version = 10; - - // Whether this detail is obsolete. Occurrences are expected not to point to - // obsolete details. - bool is_obsolete = 11; - - // The time this information was last changed at the source. This is an - // upstream timestamp from the underlying information source - e.g. Ubuntu - // security tracker. - google.protobuf.Timestamp source_update_time = 12; - } - - // The full description of the CVSSv3 for this vulnerability. - CVSSv3 cvss_v3 = 4; - - // Windows details get their own format because the information format and - // model don't match a normal detail. Specifically Windows updates are done as - // patches, thus Windows vulnerabilities really are a missing package, rather - // than a package being at an incorrect version. - repeated WindowsDetail windows_details = 5; - - message WindowsDetail { - // Required. The [CPE URI](https://cpe.mitre.org/specification/) this - // vulnerability affects. - string cpe_uri = 1; - - // Required. The name of this vulnerability. - string name = 2; - - // The description of this vulnerability. - string description = 3; - - // Required. The names of the KBs which have hotfixes to mitigate this - // vulnerability. Note that there may be multiple hotfixes (and thus - // multiple KBs) that mitigate a given vulnerability. Currently any listed - // KBs presence is considered a fix. - repeated KnowledgeBase fixing_kbs = 4; - - message KnowledgeBase { - // The KB name (generally of the form KB[0-9]+ (e.g., KB123456)). - string name = 1; - // A link to the KB in the [Windows update catalog] - // (https://www.catalog.update.microsoft.com/). - string url = 2; - } - } - - // The time this information was last changed at the source. This is an - // upstream timestamp from the underlying information source - e.g. Ubuntu - // security tracker. - google.protobuf.Timestamp source_update_time = 6; -} - -// An occurrence of a severity vulnerability on a resource. -message VulnerabilityOccurrence { - // The type of package; whether native or non native (e.g., ruby gems, node.js - // packages, etc.). - string type = 1; - - // Output only. The note provider assigned severity of this vulnerability. - Severity severity = 2; - - // Output only. The CVSS score of this vulnerability. CVSS score is on a - // scale of 0 - 10 where 0 indicates low severity and 10 indicates high - // severity. - float cvss_score = 3; - - // Required. The set of affected locations and their fixes (if available) - // within the associated resource. - repeated PackageIssue package_issue = 4; - - // A detail for a distro and package this vulnerability occurrence was found - // in and its associated fix (if one is available). - message PackageIssue { - // Required. The [CPE URI](https://cpe.mitre.org/specification/) this - // vulnerability was found in. - string affected_cpe_uri = 1; - - // Required. The package this vulnerability was found in. - string affected_package = 2; - - // Required. The version of the package that is installed on the resource - // affected by this vulnerability. - grafeas.v1.Version affected_version = 3; - - // The [CPE URI](https://cpe.mitre.org/specification/) this vulnerability - // was fixed in. It is possible for this to be different from the - // affected_cpe_uri. - string fixed_cpe_uri = 4; - - // The package this vulnerability was fixed in. It is possible for this to - // be different from the affected_package. - string fixed_package = 5; - - // Required. The version of the package this vulnerability was fixed in. - // Setting this to VersionKind.MAXIMUM means no fix is yet available. - grafeas.v1.Version fixed_version = 6; - - // Output only. Whether a fix is available for this package. - bool fix_available = 7; - } - - // Output only. A one sentence description of this vulnerability. - string short_description = 5; - - // Output only. A detailed description of this vulnerability. - string long_description = 6; - - // Output only. URLs related to this vulnerability. - repeated grafeas.v1.RelatedUrl related_urls = 7; - - // The distro assigned severity for this vulnerability when it is available, - // otherwise this is the note provider assigned severity. - Severity effective_severity = 8; - - // Output only. Whether at least one of the affected packages has a fix - // available. - bool fix_available = 9; -} diff --git a/packages/grafeas/grafeas/grafeas_v1/proto/vulnerability_pb2.py b/packages/grafeas/grafeas/grafeas_v1/proto/vulnerability_pb2.py deleted file mode 100644 index 89d07ad4039c..000000000000 --- a/packages/grafeas/grafeas/grafeas_v1/proto/vulnerability_pb2.py +++ /dev/null @@ -1,1279 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: grafeas/grafeas_v1/proto/vulnerability.proto -"""Generated protocol buffer code.""" -from google.protobuf.internal import enum_type_wrapper -from google.protobuf import descriptor as _descriptor -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection -from google.protobuf import symbol_database as _symbol_database - -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - -from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 -from grafeas.grafeas_v1.proto import ( - common_pb2 as grafeas_dot_grafeas__v1_dot_proto_dot_common__pb2, -) -from grafeas.grafeas_v1.proto import ( - cvss_pb2 as grafeas_dot_grafeas__v1_dot_proto_dot_cvss__pb2, -) -from grafeas.grafeas_v1.proto import ( - package_pb2 as grafeas_dot_grafeas__v1_dot_proto_dot_package__pb2, -) - - -DESCRIPTOR = _descriptor.FileDescriptor( - name="grafeas/grafeas_v1/proto/vulnerability.proto", - package="grafeas.v1", - syntax="proto3", - serialized_options=b"\n\rio.grafeas.v1P\001ZFgoogle.golang.org/genproto/googleapis/grafeas/grafeas_v1/proto;grafeas\242\002\003GRA", - create_key=_descriptor._internal_create_key, - serialized_pb=b'\n,grafeas/grafeas_v1/proto/vulnerability.proto\x12\ngrafeas.v1\x1a\x1fgoogle/protobuf/timestamp.proto\x1a%grafeas/grafeas_v1/proto/common.proto\x1a#grafeas/grafeas_v1/proto/cvss.proto\x1a&grafeas/grafeas_v1/proto/package.proto"\xfa\x06\n\x11VulnerabilityNote\x12\x12\n\ncvss_score\x18\x01 \x01(\x02\x12&\n\x08severity\x18\x02 \x01(\x0e\x32\x14.grafeas.v1.Severity\x12\x35\n\x07\x64\x65tails\x18\x03 \x03(\x0b\x32$.grafeas.v1.VulnerabilityNote.Detail\x12#\n\x07\x63vss_v3\x18\x04 \x01(\x0b\x32\x12.grafeas.v1.CVSSv3\x12\x44\n\x0fwindows_details\x18\x05 \x03(\x0b\x32+.grafeas.v1.VulnerabilityNote.WindowsDetail\x12\x36\n\x12source_update_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\x8d\x03\n\x06\x44\x65tail\x12\x15\n\rseverity_name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x14\n\x0cpackage_type\x18\x03 \x01(\t\x12\x18\n\x10\x61\x66\x66\x65\x63ted_cpe_uri\x18\x04 \x01(\t\x12\x18\n\x10\x61\x66\x66\x65\x63ted_package\x18\x05 \x01(\t\x12\x33\n\x16\x61\x66\x66\x65\x63ted_version_start\x18\x06 \x01(\x0b\x32\x13.grafeas.v1.Version\x12\x31\n\x14\x61\x66\x66\x65\x63ted_version_end\x18\x07 \x01(\x0b\x32\x13.grafeas.v1.Version\x12\x15\n\rfixed_cpe_uri\x18\x08 \x01(\t\x12\x15\n\rfixed_package\x18\t \x01(\t\x12*\n\rfixed_version\x18\n \x01(\x0b\x32\x13.grafeas.v1.Version\x12\x13\n\x0bis_obsolete\x18\x0b \x01(\x08\x12\x36\n\x12source_update_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\xbe\x01\n\rWindowsDetail\x12\x0f\n\x07\x63pe_uri\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12M\n\nfixing_kbs\x18\x04 \x03(\x0b\x32\x39.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase\x1a*\n\rKnowledgeBase\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0b\n\x03url\x18\x02 \x01(\t"\xbd\x04\n\x17VulnerabilityOccurrence\x12\x0c\n\x04type\x18\x01 \x01(\t\x12&\n\x08severity\x18\x02 \x01(\x0e\x32\x14.grafeas.v1.Severity\x12\x12\n\ncvss_score\x18\x03 \x01(\x02\x12G\n\rpackage_issue\x18\x04 \x03(\x0b\x32\x30.grafeas.v1.VulnerabilityOccurrence.PackageIssue\x12\x19\n\x11short_description\x18\x05 \x01(\t\x12\x18\n\x10long_description\x18\x06 \x01(\t\x12,\n\x0crelated_urls\x18\x07 \x03(\x0b\x32\x16.grafeas.v1.RelatedUrl\x12\x30\n\x12\x65\x66\x66\x65\x63tive_severity\x18\x08 \x01(\x0e\x32\x14.grafeas.v1.Severity\x12\x15\n\rfix_available\x18\t \x01(\x08\x1a\xe2\x01\n\x0cPackageIssue\x12\x18\n\x10\x61\x66\x66\x65\x63ted_cpe_uri\x18\x01 \x01(\t\x12\x18\n\x10\x61\x66\x66\x65\x63ted_package\x18\x02 \x01(\t\x12-\n\x10\x61\x66\x66\x65\x63ted_version\x18\x03 \x01(\x0b\x32\x13.grafeas.v1.Version\x12\x15\n\rfixed_cpe_uri\x18\x04 \x01(\t\x12\x15\n\rfixed_package\x18\x05 \x01(\t\x12*\n\rfixed_version\x18\x06 \x01(\x0b\x32\x13.grafeas.v1.Version\x12\x15\n\rfix_available\x18\x07 \x01(\x08*^\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x0b\n\x07MINIMAL\x10\x01\x12\x07\n\x03LOW\x10\x02\x12\n\n\x06MEDIUM\x10\x03\x12\x08\n\x04HIGH\x10\x04\x12\x0c\n\x08\x43RITICAL\x10\x05\x42_\n\rio.grafeas.v1P\x01ZFgoogle.golang.org/genproto/googleapis/grafeas/grafeas_v1/proto;grafeas\xa2\x02\x03GRAb\x06proto3', - dependencies=[ - google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR, - grafeas_dot_grafeas__v1_dot_proto_dot_common__pb2.DESCRIPTOR, - grafeas_dot_grafeas__v1_dot_proto_dot_cvss__pb2.DESCRIPTOR, - grafeas_dot_grafeas__v1_dot_proto_dot_package__pb2.DESCRIPTOR, - ], -) - -_SEVERITY = _descriptor.EnumDescriptor( - name="Severity", - full_name="grafeas.v1.Severity", - filename=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - values=[ - _descriptor.EnumValueDescriptor( - name="SEVERITY_UNSPECIFIED", - index=0, - number=0, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key, - ), - _descriptor.EnumValueDescriptor( - name="MINIMAL", - index=1, - number=1, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key, - ), - _descriptor.EnumValueDescriptor( - name="LOW", - index=2, - number=2, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key, - ), - _descriptor.EnumValueDescriptor( - name="MEDIUM", - index=3, - number=3, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key, - ), - _descriptor.EnumValueDescriptor( - name="HIGH", - index=4, - number=4, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key, - ), - _descriptor.EnumValueDescriptor( - name="CRITICAL", - index=5, - number=5, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key, - ), - ], - containing_type=None, - serialized_options=None, - serialized_start=1678, - serialized_end=1772, -) -_sym_db.RegisterEnumDescriptor(_SEVERITY) - -Severity = enum_type_wrapper.EnumTypeWrapper(_SEVERITY) -SEVERITY_UNSPECIFIED = 0 -MINIMAL = 1 -LOW = 2 -MEDIUM = 3 -HIGH = 4 -CRITICAL = 5 - - -_VULNERABILITYNOTE_DETAIL = _descriptor.Descriptor( - name="Detail", - full_name="grafeas.v1.VulnerabilityNote.Detail", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="severity_name", - full_name="grafeas.v1.VulnerabilityNote.Detail.severity_name", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="description", - full_name="grafeas.v1.VulnerabilityNote.Detail.description", - index=1, - number=2, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="package_type", - full_name="grafeas.v1.VulnerabilityNote.Detail.package_type", - index=2, - number=3, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="affected_cpe_uri", - full_name="grafeas.v1.VulnerabilityNote.Detail.affected_cpe_uri", - index=3, - number=4, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="affected_package", - full_name="grafeas.v1.VulnerabilityNote.Detail.affected_package", - index=4, - number=5, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="affected_version_start", - full_name="grafeas.v1.VulnerabilityNote.Detail.affected_version_start", - index=5, - number=6, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="affected_version_end", - full_name="grafeas.v1.VulnerabilityNote.Detail.affected_version_end", - index=6, - number=7, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="fixed_cpe_uri", - full_name="grafeas.v1.VulnerabilityNote.Detail.fixed_cpe_uri", - index=7, - number=8, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="fixed_package", - full_name="grafeas.v1.VulnerabilityNote.Detail.fixed_package", - index=8, - number=9, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="fixed_version", - full_name="grafeas.v1.VulnerabilityNote.Detail.fixed_version", - index=9, - number=10, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="is_obsolete", - full_name="grafeas.v1.VulnerabilityNote.Detail.is_obsolete", - index=10, - number=11, - type=8, - cpp_type=7, - label=1, - has_default_value=False, - default_value=False, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="source_update_time", - full_name="grafeas.v1.VulnerabilityNote.Detail.source_update_time", - index=11, - number=12, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=510, - serialized_end=907, -) - -_VULNERABILITYNOTE_WINDOWSDETAIL_KNOWLEDGEBASE = _descriptor.Descriptor( - name="KnowledgeBase", - full_name="grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="name", - full_name="grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.name", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="url", - full_name="grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.url", - index=1, - number=2, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=1058, - serialized_end=1100, -) - -_VULNERABILITYNOTE_WINDOWSDETAIL = _descriptor.Descriptor( - name="WindowsDetail", - full_name="grafeas.v1.VulnerabilityNote.WindowsDetail", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="cpe_uri", - full_name="grafeas.v1.VulnerabilityNote.WindowsDetail.cpe_uri", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="name", - full_name="grafeas.v1.VulnerabilityNote.WindowsDetail.name", - index=1, - number=2, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="description", - full_name="grafeas.v1.VulnerabilityNote.WindowsDetail.description", - index=2, - number=3, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="fixing_kbs", - full_name="grafeas.v1.VulnerabilityNote.WindowsDetail.fixing_kbs", - index=3, - number=4, - type=11, - cpp_type=10, - label=3, - has_default_value=False, - default_value=[], - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[_VULNERABILITYNOTE_WINDOWSDETAIL_KNOWLEDGEBASE,], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=910, - serialized_end=1100, -) - -_VULNERABILITYNOTE = _descriptor.Descriptor( - name="VulnerabilityNote", - full_name="grafeas.v1.VulnerabilityNote", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="cvss_score", - full_name="grafeas.v1.VulnerabilityNote.cvss_score", - index=0, - number=1, - type=2, - cpp_type=6, - label=1, - has_default_value=False, - default_value=float(0), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="severity", - full_name="grafeas.v1.VulnerabilityNote.severity", - index=1, - number=2, - type=14, - cpp_type=8, - label=1, - has_default_value=False, - default_value=0, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="details", - full_name="grafeas.v1.VulnerabilityNote.details", - index=2, - number=3, - type=11, - cpp_type=10, - label=3, - has_default_value=False, - default_value=[], - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="cvss_v3", - full_name="grafeas.v1.VulnerabilityNote.cvss_v3", - index=3, - number=4, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="windows_details", - full_name="grafeas.v1.VulnerabilityNote.windows_details", - index=4, - number=5, - type=11, - cpp_type=10, - label=3, - has_default_value=False, - default_value=[], - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="source_update_time", - full_name="grafeas.v1.VulnerabilityNote.source_update_time", - index=5, - number=6, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[_VULNERABILITYNOTE_DETAIL, _VULNERABILITYNOTE_WINDOWSDETAIL,], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=210, - serialized_end=1100, -) - - -_VULNERABILITYOCCURRENCE_PACKAGEISSUE = _descriptor.Descriptor( - name="PackageIssue", - full_name="grafeas.v1.VulnerabilityOccurrence.PackageIssue", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="affected_cpe_uri", - full_name="grafeas.v1.VulnerabilityOccurrence.PackageIssue.affected_cpe_uri", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="affected_package", - full_name="grafeas.v1.VulnerabilityOccurrence.PackageIssue.affected_package", - index=1, - number=2, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="affected_version", - full_name="grafeas.v1.VulnerabilityOccurrence.PackageIssue.affected_version", - index=2, - number=3, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="fixed_cpe_uri", - full_name="grafeas.v1.VulnerabilityOccurrence.PackageIssue.fixed_cpe_uri", - index=3, - number=4, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="fixed_package", - full_name="grafeas.v1.VulnerabilityOccurrence.PackageIssue.fixed_package", - index=4, - number=5, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="fixed_version", - full_name="grafeas.v1.VulnerabilityOccurrence.PackageIssue.fixed_version", - index=5, - number=6, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="fix_available", - full_name="grafeas.v1.VulnerabilityOccurrence.PackageIssue.fix_available", - index=6, - number=7, - type=8, - cpp_type=7, - label=1, - has_default_value=False, - default_value=False, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=1450, - serialized_end=1676, -) - -_VULNERABILITYOCCURRENCE = _descriptor.Descriptor( - name="VulnerabilityOccurrence", - full_name="grafeas.v1.VulnerabilityOccurrence", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="type", - full_name="grafeas.v1.VulnerabilityOccurrence.type", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="severity", - full_name="grafeas.v1.VulnerabilityOccurrence.severity", - index=1, - number=2, - type=14, - cpp_type=8, - label=1, - has_default_value=False, - default_value=0, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="cvss_score", - full_name="grafeas.v1.VulnerabilityOccurrence.cvss_score", - index=2, - number=3, - type=2, - cpp_type=6, - label=1, - has_default_value=False, - default_value=float(0), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="package_issue", - full_name="grafeas.v1.VulnerabilityOccurrence.package_issue", - index=3, - number=4, - type=11, - cpp_type=10, - label=3, - has_default_value=False, - default_value=[], - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="short_description", - full_name="grafeas.v1.VulnerabilityOccurrence.short_description", - index=4, - number=5, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="long_description", - full_name="grafeas.v1.VulnerabilityOccurrence.long_description", - index=5, - number=6, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="related_urls", - full_name="grafeas.v1.VulnerabilityOccurrence.related_urls", - index=6, - number=7, - type=11, - cpp_type=10, - label=3, - has_default_value=False, - default_value=[], - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="effective_severity", - full_name="grafeas.v1.VulnerabilityOccurrence.effective_severity", - index=7, - number=8, - type=14, - cpp_type=8, - label=1, - has_default_value=False, - default_value=0, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="fix_available", - full_name="grafeas.v1.VulnerabilityOccurrence.fix_available", - index=8, - number=9, - type=8, - cpp_type=7, - label=1, - has_default_value=False, - default_value=False, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[_VULNERABILITYOCCURRENCE_PACKAGEISSUE,], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=1103, - serialized_end=1676, -) - -_VULNERABILITYNOTE_DETAIL.fields_by_name[ - "affected_version_start" -].message_type = grafeas_dot_grafeas__v1_dot_proto_dot_package__pb2._VERSION -_VULNERABILITYNOTE_DETAIL.fields_by_name[ - "affected_version_end" -].message_type = grafeas_dot_grafeas__v1_dot_proto_dot_package__pb2._VERSION -_VULNERABILITYNOTE_DETAIL.fields_by_name[ - "fixed_version" -].message_type = grafeas_dot_grafeas__v1_dot_proto_dot_package__pb2._VERSION -_VULNERABILITYNOTE_DETAIL.fields_by_name[ - "source_update_time" -].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP -_VULNERABILITYNOTE_DETAIL.containing_type = _VULNERABILITYNOTE -_VULNERABILITYNOTE_WINDOWSDETAIL_KNOWLEDGEBASE.containing_type = ( - _VULNERABILITYNOTE_WINDOWSDETAIL -) -_VULNERABILITYNOTE_WINDOWSDETAIL.fields_by_name[ - "fixing_kbs" -].message_type = _VULNERABILITYNOTE_WINDOWSDETAIL_KNOWLEDGEBASE -_VULNERABILITYNOTE_WINDOWSDETAIL.containing_type = _VULNERABILITYNOTE -_VULNERABILITYNOTE.fields_by_name["severity"].enum_type = _SEVERITY -_VULNERABILITYNOTE.fields_by_name["details"].message_type = _VULNERABILITYNOTE_DETAIL -_VULNERABILITYNOTE.fields_by_name[ - "cvss_v3" -].message_type = grafeas_dot_grafeas__v1_dot_proto_dot_cvss__pb2._CVSSV3 -_VULNERABILITYNOTE.fields_by_name[ - "windows_details" -].message_type = _VULNERABILITYNOTE_WINDOWSDETAIL -_VULNERABILITYNOTE.fields_by_name[ - "source_update_time" -].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP -_VULNERABILITYOCCURRENCE_PACKAGEISSUE.fields_by_name[ - "affected_version" -].message_type = grafeas_dot_grafeas__v1_dot_proto_dot_package__pb2._VERSION -_VULNERABILITYOCCURRENCE_PACKAGEISSUE.fields_by_name[ - "fixed_version" -].message_type = grafeas_dot_grafeas__v1_dot_proto_dot_package__pb2._VERSION -_VULNERABILITYOCCURRENCE_PACKAGEISSUE.containing_type = _VULNERABILITYOCCURRENCE -_VULNERABILITYOCCURRENCE.fields_by_name["severity"].enum_type = _SEVERITY -_VULNERABILITYOCCURRENCE.fields_by_name[ - "package_issue" -].message_type = _VULNERABILITYOCCURRENCE_PACKAGEISSUE -_VULNERABILITYOCCURRENCE.fields_by_name[ - "related_urls" -].message_type = grafeas_dot_grafeas__v1_dot_proto_dot_common__pb2._RELATEDURL -_VULNERABILITYOCCURRENCE.fields_by_name["effective_severity"].enum_type = _SEVERITY -DESCRIPTOR.message_types_by_name["VulnerabilityNote"] = _VULNERABILITYNOTE -DESCRIPTOR.message_types_by_name["VulnerabilityOccurrence"] = _VULNERABILITYOCCURRENCE -DESCRIPTOR.enum_types_by_name["Severity"] = _SEVERITY -_sym_db.RegisterFileDescriptor(DESCRIPTOR) - -VulnerabilityNote = _reflection.GeneratedProtocolMessageType( - "VulnerabilityNote", - (_message.Message,), - { - "Detail": _reflection.GeneratedProtocolMessageType( - "Detail", - (_message.Message,), - { - "DESCRIPTOR": _VULNERABILITYNOTE_DETAIL, - "__module__": "grafeas.grafeas_v1.proto.vulnerability_pb2", - "__doc__": """A detail for a distro and package affected by this vulnerability and - its associated fix (if one is available). - - Attributes: - severity_name: - The distro assigned severity of this vulnerability. - description: - A vendor-specific description of this vulnerability. - package_type: - The type of package; whether native or non native (e.g., ruby - gems, node.js packages, etc.). - affected_cpe_uri: - Required. The `CPE URI - `__ this vulnerability - affects. - affected_package: - Required. The package this vulnerability affects. - affected_version_start: - The version number at the start of an interval in which this - vulnerability exists. A vulnerability can affect a package - between version numbers that are disjoint sets of intervals - (example: [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each - of which will be represented in its own Detail. If a specific - affected version is provided by a vulnerability database, - affected_version_start and affected_version_end will be the - same in that Detail. - affected_version_end: - The version number at the end of an interval in which this - vulnerability exists. A vulnerability can affect a package - between version numbers that are disjoint sets of intervals - (example: [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each - of which will be represented in its own Detail. If a specific - affected version is provided by a vulnerability database, - affected_version_start and affected_version_end will be the - same in that Detail. - fixed_cpe_uri: - The distro recommended `CPE URI - `__ to update to that - contains a fix for this vulnerability. It is possible for this - to be different from the affected_cpe_uri. - fixed_package: - The distro recommended package to update to that contains a - fix for this vulnerability. It is possible for this to be - different from the affected_package. - fixed_version: - The distro recommended version to update to that contains a - fix for this vulnerability. Setting this to - VersionKind.MAXIMUM means no such version is yet available. - is_obsolete: - Whether this detail is obsolete. Occurrences are expected not - to point to obsolete details. - source_update_time: - The time this information was last changed at the source. This - is an upstream timestamp from the underlying information - source - e.g. Ubuntu security tracker. - """, - # @@protoc_insertion_point(class_scope:grafeas.v1.VulnerabilityNote.Detail) - }, - ), - "WindowsDetail": _reflection.GeneratedProtocolMessageType( - "WindowsDetail", - (_message.Message,), - { - "KnowledgeBase": _reflection.GeneratedProtocolMessageType( - "KnowledgeBase", - (_message.Message,), - { - "DESCRIPTOR": _VULNERABILITYNOTE_WINDOWSDETAIL_KNOWLEDGEBASE, - "__module__": "grafeas.grafeas_v1.proto.vulnerability_pb2", - "__doc__": """ - Attributes: - name: - The KB name (generally of the form KB[0-9]+ (e.g., KB123456)). - url: - A link to the KB in the [Windows update catalog] - (https://www.catalog.update.microsoft.com/). - """, - # @@protoc_insertion_point(class_scope:grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase) - }, - ), - "DESCRIPTOR": _VULNERABILITYNOTE_WINDOWSDETAIL, - "__module__": "grafeas.grafeas_v1.proto.vulnerability_pb2", - "__doc__": """ - Attributes: - cpe_uri: - Required. The `CPE URI - `__ this vulnerability - affects. - name: - Required. The name of this vulnerability. - description: - The description of this vulnerability. - fixing_kbs: - Required. The names of the KBs which have hotfixes to mitigate - this vulnerability. Note that there may be multiple hotfixes - (and thus multiple KBs) that mitigate a given vulnerability. - Currently any listed KBs presence is considered a fix. - """, - # @@protoc_insertion_point(class_scope:grafeas.v1.VulnerabilityNote.WindowsDetail) - }, - ), - "DESCRIPTOR": _VULNERABILITYNOTE, - "__module__": "grafeas.grafeas_v1.proto.vulnerability_pb2", - "__doc__": """A security vulnerability that can be found in resources. - - Attributes: - cvss_score: - The CVSS score of this vulnerability. CVSS score is on a scale - of 0 - 10 where 0 indicates low severity and 10 indicates high - severity. - severity: - The note provider assigned severity of this vulnerability. - details: - Details of all known distros and packages affected by this - vulnerability. - cvss_v3: - The full description of the CVSSv3 for this vulnerability. - windows_details: - Windows details get their own format because the information - format and model don’t match a normal detail. Specifically - Windows updates are done as patches, thus Windows - vulnerabilities really are a missing package, rather than a - package being at an incorrect version. - source_update_time: - The time this information was last changed at the source. This - is an upstream timestamp from the underlying information - source - e.g. Ubuntu security tracker. - """, - # @@protoc_insertion_point(class_scope:grafeas.v1.VulnerabilityNote) - }, -) -_sym_db.RegisterMessage(VulnerabilityNote) -_sym_db.RegisterMessage(VulnerabilityNote.Detail) -_sym_db.RegisterMessage(VulnerabilityNote.WindowsDetail) -_sym_db.RegisterMessage(VulnerabilityNote.WindowsDetail.KnowledgeBase) - -VulnerabilityOccurrence = _reflection.GeneratedProtocolMessageType( - "VulnerabilityOccurrence", - (_message.Message,), - { - "PackageIssue": _reflection.GeneratedProtocolMessageType( - "PackageIssue", - (_message.Message,), - { - "DESCRIPTOR": _VULNERABILITYOCCURRENCE_PACKAGEISSUE, - "__module__": "grafeas.grafeas_v1.proto.vulnerability_pb2", - "__doc__": """A detail for a distro and package this vulnerability occurrence was - found in and its associated fix (if one is available). - - Attributes: - affected_cpe_uri: - Required. The `CPE URI - `__ this vulnerability - was found in. - affected_package: - Required. The package this vulnerability was found in. - affected_version: - Required. The version of the package that is installed on the - resource affected by this vulnerability. - fixed_cpe_uri: - The `CPE URI `__ this - vulnerability was fixed in. It is possible for this to be - different from the affected_cpe_uri. - fixed_package: - The package this vulnerability was fixed in. It is possible - for this to be different from the affected_package. - fixed_version: - Required. The version of the package this vulnerability was - fixed in. Setting this to VersionKind.MAXIMUM means no fix is - yet available. - fix_available: - Output only. Whether a fix is available for this package. - """, - # @@protoc_insertion_point(class_scope:grafeas.v1.VulnerabilityOccurrence.PackageIssue) - }, - ), - "DESCRIPTOR": _VULNERABILITYOCCURRENCE, - "__module__": "grafeas.grafeas_v1.proto.vulnerability_pb2", - "__doc__": """An occurrence of a severity vulnerability on a resource. - - Attributes: - type: - The type of package; whether native or non native (e.g., ruby - gems, node.js packages, etc.). - severity: - Output only. The note provider assigned severity of this - vulnerability. - cvss_score: - Output only. The CVSS score of this vulnerability. CVSS score - is on a scale of 0 - 10 where 0 indicates low severity and 10 - indicates high severity. - package_issue: - Required. The set of affected locations and their fixes (if - available) within the associated resource. - short_description: - Output only. A one sentence description of this vulnerability. - long_description: - Output only. A detailed description of this vulnerability. - related_urls: - Output only. URLs related to this vulnerability. - effective_severity: - The distro assigned severity for this vulnerability when it is - available, otherwise this is the note provider assigned - severity. - fix_available: - Output only. Whether at least one of the affected packages has - a fix available. - """, - # @@protoc_insertion_point(class_scope:grafeas.v1.VulnerabilityOccurrence) - }, -) -_sym_db.RegisterMessage(VulnerabilityOccurrence) -_sym_db.RegisterMessage(VulnerabilityOccurrence.PackageIssue) - - -DESCRIPTOR._options = None -# @@protoc_insertion_point(module_scope)