diff --git a/bindings/go/api/importfinding.pb.go b/bindings/go/api/importfinding.pb.go index 40104c2976c..561a2fc4956 100644 --- a/bindings/go/api/importfinding.pb.go +++ b/bindings/go/api/importfinding.pb.go @@ -14,8 +14,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.10 -// protoc v5.29.5 +// protoc-gen-go v1.36.11 +// protoc v3.21.12 // source: importfinding.proto package api diff --git a/bindings/go/api/osv_service_v1.pb.go b/bindings/go/api/osv_service_v1.pb.go index adc4c01fad8..ec55a4e7912 100644 --- a/bindings/go/api/osv_service_v1.pb.go +++ b/bindings/go/api/osv_service_v1.pb.go @@ -14,8 +14,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.10 -// protoc v5.29.5 +// protoc-gen-go v1.36.11 +// protoc v3.21.12 // source: osv_service_v1.proto package api diff --git a/bindings/go/api/osv_service_v1_grpc.pb.go b/bindings/go/api/osv_service_v1_grpc.pb.go index 13617afd5d7..c635aa5b007 100644 --- a/bindings/go/api/osv_service_v1_grpc.pb.go +++ b/bindings/go/api/osv_service_v1_grpc.pb.go @@ -14,8 +14,8 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.5.1 -// - protoc v5.29.5 +// - protoc-gen-go-grpc v1.6.1 +// - protoc v3.21.12 // source: osv_service_v1.proto package api @@ -150,19 +150,19 @@ type OSVServer interface { type UnimplementedOSVServer struct{} func (UnimplementedOSVServer) GetVulnById(context.Context, *GetVulnByIdParameters) (*osvschema.Vulnerability, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetVulnById not implemented") + return nil, status.Error(codes.Unimplemented, "method GetVulnById not implemented") } func (UnimplementedOSVServer) QueryAffected(context.Context, *QueryAffectedParameters) (*VulnerabilityList, error) { - return nil, status.Errorf(codes.Unimplemented, "method QueryAffected not implemented") + return nil, status.Error(codes.Unimplemented, "method QueryAffected not implemented") } func (UnimplementedOSVServer) QueryAffectedBatch(context.Context, *QueryAffectedBatchParameters) (*BatchVulnerabilityList, error) { - return nil, status.Errorf(codes.Unimplemented, "method QueryAffectedBatch not implemented") + return nil, status.Error(codes.Unimplemented, "method QueryAffectedBatch not implemented") } func (UnimplementedOSVServer) DetermineVersion(context.Context, *DetermineVersionParameters) (*VersionMatchList, error) { - return nil, status.Errorf(codes.Unimplemented, "method DetermineVersion not implemented") + return nil, status.Error(codes.Unimplemented, "method DetermineVersion not implemented") } func (UnimplementedOSVServer) ImportFindings(context.Context, *ImportFindingsParameters) (*ImportFindingList, error) { - return nil, status.Errorf(codes.Unimplemented, "method ImportFindings not implemented") + return nil, status.Error(codes.Unimplemented, "method ImportFindings not implemented") } func (UnimplementedOSVServer) mustEmbedUnimplementedOSVServer() {} func (UnimplementedOSVServer) testEmbeddedByValue() {} @@ -175,7 +175,7 @@ type UnsafeOSVServer interface { } func RegisterOSVServer(s grpc.ServiceRegistrar, srv OSVServer) { - // If the following call pancis, it indicates UnimplementedOSVServer was + // If the following call panics, it indicates UnimplementedOSVServer was // embedded by pointer and is nil. This will cause panics if an // unimplemented method is ever invoked, so we test this at initialization // time to prevent it from happening at runtime later due to I/O. diff --git a/gcp/api/importfinding_pb2.pyi b/gcp/api/importfinding_pb2.pyi index 74fff613480..d3dbb9d5502 100644 --- a/gcp/api/importfinding_pb2.pyi +++ b/gcp/api/importfinding_pb2.pyi @@ -16,29 +16,29 @@ See the License for the specific language governing permissions and limitations under the License. """ -import builtins -import collections.abc -import google.protobuf.descriptor -import google.protobuf.internal.containers -import google.protobuf.internal.enum_type_wrapper -import google.protobuf.message -import google.protobuf.timestamp_pb2 +from collections import abc as _abc +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf import timestamp_pb2 as _timestamp_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper +import builtins as _builtins import sys -import typing +import typing as _typing if sys.version_info >= (3, 10): - import typing as typing_extensions + from typing import TypeAlias as _TypeAlias else: - import typing_extensions + from typing_extensions import TypeAlias as _TypeAlias -DESCRIPTOR: google.protobuf.descriptor.FileDescriptor +DESCRIPTOR: _descriptor.FileDescriptor class _ImportFindingType: - ValueType = typing.NewType("ValueType", builtins.int) - V: typing_extensions.TypeAlias = ValueType + ValueType = _typing.NewType("ValueType", _builtins.int) + V: _TypeAlias = ValueType # noqa: Y015 -class _ImportFindingTypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_ImportFindingType.ValueType], builtins.type): - DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor +class _ImportFindingTypeEnumTypeWrapper(_enum_type_wrapper._EnumTypeWrapper[_ImportFindingType.ValueType], _builtins.type): + DESCRIPTOR: _descriptor.EnumDescriptor IMPORT_FINDING_TYPE_NONE: _ImportFindingType.ValueType # 0 IMPORT_FINDING_TYPE_DELETED: _ImportFindingType.ValueType # 1 IMPORT_FINDING_TYPE_INVALID_JSON: _ImportFindingType.ValueType # 2 @@ -68,40 +68,42 @@ IMPORT_FINDING_TYPE_INVALID_ALIASES: ImportFindingType.ValueType # 9 IMPORT_FINDING_TYPE_INVALID_UPSTREAM: ImportFindingType.ValueType # 10 IMPORT_FINDING_TYPE_INVALID_RELATED: ImportFindingType.ValueType # 11 IMPORT_FINDING_TYPE_BAD_ALIASED_CVE: ImportFindingType.ValueType # 12 -global___ImportFindingType = ImportFindingType +Global___ImportFindingType: _TypeAlias = ImportFindingType # noqa: Y015 -@typing.final -class ImportFinding(google.protobuf.message.Message): +@_typing.final +class ImportFinding(_message.Message): """An importfinding entry. The protobuf representation is *NOT* stable and only used for implementing the JSON based API. """ - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - BUG_ID_FIELD_NUMBER: builtins.int - SOURCE_FIELD_NUMBER: builtins.int - FINDINGS_FIELD_NUMBER: builtins.int - FIRST_SEEN_FIELD_NUMBER: builtins.int - LAST_ATTEMPT_FIELD_NUMBER: builtins.int - bug_id: builtins.str - source: builtins.str - @property - def findings(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[global___ImportFindingType.ValueType]: ... - @property - def first_seen(self) -> google.protobuf.timestamp_pb2.Timestamp: ... - @property - def last_attempt(self) -> google.protobuf.timestamp_pb2.Timestamp: ... + BUG_ID_FIELD_NUMBER: _builtins.int + SOURCE_FIELD_NUMBER: _builtins.int + FINDINGS_FIELD_NUMBER: _builtins.int + FIRST_SEEN_FIELD_NUMBER: _builtins.int + LAST_ATTEMPT_FIELD_NUMBER: _builtins.int + bug_id: _builtins.str + source: _builtins.str + @_builtins.property + def findings(self) -> _containers.RepeatedScalarFieldContainer[Global___ImportFindingType.ValueType]: ... + @_builtins.property + def first_seen(self) -> _timestamp_pb2.Timestamp: ... + @_builtins.property + def last_attempt(self) -> _timestamp_pb2.Timestamp: ... def __init__( self, *, - bug_id: builtins.str = ..., - source: builtins.str = ..., - findings: collections.abc.Iterable[global___ImportFindingType.ValueType] | None = ..., - first_seen: google.protobuf.timestamp_pb2.Timestamp | None = ..., - last_attempt: google.protobuf.timestamp_pb2.Timestamp | None = ..., + bug_id: _builtins.str = ..., + source: _builtins.str = ..., + findings: _abc.Iterable[Global___ImportFindingType.ValueType] | None = ..., + first_seen: _timestamp_pb2.Timestamp | None = ..., + last_attempt: _timestamp_pb2.Timestamp | None = ..., ) -> None: ... - def HasField(self, field_name: typing.Literal["first_seen", b"first_seen", "last_attempt", b"last_attempt"]) -> builtins.bool: ... - def ClearField(self, field_name: typing.Literal["bug_id", b"bug_id", "findings", b"findings", "first_seen", b"first_seen", "last_attempt", b"last_attempt", "source", b"source"]) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["first_seen", b"first_seen", "last_attempt", b"last_attempt"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["bug_id", b"bug_id", "findings", b"findings", "first_seen", b"first_seen", "last_attempt", b"last_attempt", "source", b"source"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -global___ImportFinding = ImportFinding +Global___ImportFinding: _TypeAlias = ImportFinding # noqa: Y015 diff --git a/gcp/api/osv_service_v1_pb2.pyi b/gcp/api/osv_service_v1_pb2.pyi index 11e90011c4b..e10d7ea35c0 100644 --- a/gcp/api/osv_service_v1_pb2.pyi +++ b/gcp/api/osv_service_v1_pb2.pyi @@ -16,82 +16,84 @@ See the License for the specific language governing permissions and limitations under the License. """ -import builtins -import collections.abc -import google.protobuf.descriptor -import google.protobuf.internal.containers -import google.protobuf.internal.enum_type_wrapper -import google.protobuf.message -import importfinding_pb2 +from collections import abc as _abc +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf.internal import containers as _containers +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper +import builtins as _builtins +import importfinding_pb2 as _importfinding_pb2 import sys -import typing -import vulnerability_pb2 +import typing as _typing +import vulnerability_pb2 as _vulnerability_pb2 if sys.version_info >= (3, 10): - import typing as typing_extensions + from typing import TypeAlias as _TypeAlias else: - import typing_extensions + from typing_extensions import TypeAlias as _TypeAlias -DESCRIPTOR: google.protobuf.descriptor.FileDescriptor +DESCRIPTOR: _descriptor.FileDescriptor -@typing.final -class VulnerabilityList(google.protobuf.message.Message): +@_typing.final +class VulnerabilityList(_message.Message): """A list of Vulnerability entries.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - VULNS_FIELD_NUMBER: builtins.int - NEXT_PAGE_TOKEN_FIELD_NUMBER: builtins.int - next_page_token: builtins.str - @property - def vulns(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[vulnerability_pb2.Vulnerability]: ... + VULNS_FIELD_NUMBER: _builtins.int + NEXT_PAGE_TOKEN_FIELD_NUMBER: _builtins.int + next_page_token: _builtins.str + @_builtins.property + def vulns(self) -> _containers.RepeatedCompositeFieldContainer[_vulnerability_pb2.Vulnerability]: ... def __init__( self, *, - vulns: collections.abc.Iterable[vulnerability_pb2.Vulnerability] | None = ..., - next_page_token: builtins.str = ..., + vulns: _abc.Iterable[_vulnerability_pb2.Vulnerability] | None = ..., + next_page_token: _builtins.str = ..., ) -> None: ... - def ClearField(self, field_name: typing.Literal["next_page_token", b"next_page_token", "vulns", b"vulns"]) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["next_page_token", b"next_page_token", "vulns", b"vulns"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -global___VulnerabilityList = VulnerabilityList +Global___VulnerabilityList: _TypeAlias = VulnerabilityList # noqa: Y015 -@typing.final -class BatchVulnerabilityList(google.protobuf.message.Message): +@_typing.final +class BatchVulnerabilityList(_message.Message): """Batched lists of Vulnerability entries.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - RESULTS_FIELD_NUMBER: builtins.int - @property - def results(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___VulnerabilityList]: ... + RESULTS_FIELD_NUMBER: _builtins.int + @_builtins.property + def results(self) -> _containers.RepeatedCompositeFieldContainer[Global___VulnerabilityList]: ... def __init__( self, *, - results: collections.abc.Iterable[global___VulnerabilityList] | None = ..., + results: _abc.Iterable[Global___VulnerabilityList] | None = ..., ) -> None: ... - def ClearField(self, field_name: typing.Literal["results", b"results"]) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["results", b"results"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -global___BatchVulnerabilityList = BatchVulnerabilityList +Global___BatchVulnerabilityList: _TypeAlias = BatchVulnerabilityList # noqa: Y015 -@typing.final -class Query(google.protobuf.message.Message): +@_typing.final +class Query(_message.Message): """Query format.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - COMMIT_FIELD_NUMBER: builtins.int - VERSION_FIELD_NUMBER: builtins.int - PACKAGE_FIELD_NUMBER: builtins.int - PAGE_TOKEN_FIELD_NUMBER: builtins.int - commit: builtins.str + COMMIT_FIELD_NUMBER: _builtins.int + VERSION_FIELD_NUMBER: _builtins.int + PACKAGE_FIELD_NUMBER: _builtins.int + PAGE_TOKEN_FIELD_NUMBER: _builtins.int + commit: _builtins.str """The commit hash to query for. If specified, `version` should not be set.""" - version: builtins.str + version: _builtins.str """The version string to query for. A fuzzy match is done against upstream versions. If specified, `commit` should not be set. """ - page_token: builtins.str - @property - def package(self) -> vulnerability_pb2.Package: + page_token: _builtins.str + @_builtins.property + def package(self) -> _vulnerability_pb2.Package: """The package to query against. When a `commit` hash is given, this is optional. """ @@ -99,276 +101,295 @@ class Query(google.protobuf.message.Message): def __init__( self, *, - commit: builtins.str = ..., - version: builtins.str = ..., - package: vulnerability_pb2.Package | None = ..., - page_token: builtins.str = ..., + commit: _builtins.str = ..., + version: _builtins.str = ..., + package: _vulnerability_pb2.Package | None = ..., + page_token: _builtins.str = ..., ) -> None: ... - def HasField(self, field_name: typing.Literal["commit", b"commit", "package", b"package", "param", b"param", "version", b"version"]) -> builtins.bool: ... - def ClearField(self, field_name: typing.Literal["commit", b"commit", "package", b"package", "page_token", b"page_token", "param", b"param", "version", b"version"]) -> None: ... - def WhichOneof(self, oneof_group: typing.Literal["param", b"param"]) -> typing.Literal["commit", "version"] | None: ... - -global___Query = Query - -@typing.final -class BatchQuery(google.protobuf.message.Message): + _HasFieldArgType: _TypeAlias = _typing.Literal["commit", b"commit", "package", b"package", "param", b"param", "version", b"version"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["commit", b"commit", "package", b"package", "page_token", b"page_token", "param", b"param", "version", b"version"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + _WhichOneofReturnType_param: _TypeAlias = _typing.Literal["commit", "version"] # noqa: Y015 + _WhichOneofArgType_param: _TypeAlias = _typing.Literal["param", b"param"] # noqa: Y015 + def WhichOneof(self, oneof_group: _WhichOneofArgType_param) -> _WhichOneofReturnType_param | None: ... + +Global___Query: _TypeAlias = Query # noqa: Y015 + +@_typing.final +class BatchQuery(_message.Message): """Batch query format.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - QUERIES_FIELD_NUMBER: builtins.int - @property - def queries(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Query]: + QUERIES_FIELD_NUMBER: _builtins.int + @_builtins.property + def queries(self) -> _containers.RepeatedCompositeFieldContainer[Global___Query]: """The queries that form this batch query.""" def __init__( self, *, - queries: collections.abc.Iterable[global___Query] | None = ..., + queries: _abc.Iterable[Global___Query] | None = ..., ) -> None: ... - def ClearField(self, field_name: typing.Literal["queries", b"queries"]) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["queries", b"queries"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -global___BatchQuery = BatchQuery +Global___BatchQuery: _TypeAlias = BatchQuery # noqa: Y015 -@typing.final -class GetVulnByIdParameters(google.protobuf.message.Message): +@_typing.final +class GetVulnByIdParameters(_message.Message): """Parameters for GetBugById.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - ID_FIELD_NUMBER: builtins.int - id: builtins.str + ID_FIELD_NUMBER: _builtins.int + id: _builtins.str def __init__( self, *, - id: builtins.str = ..., + id: _builtins.str = ..., ) -> None: ... - def ClearField(self, field_name: typing.Literal["id", b"id"]) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["id", b"id"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -global___GetVulnByIdParameters = GetVulnByIdParameters +Global___GetVulnByIdParameters: _TypeAlias = GetVulnByIdParameters # noqa: Y015 -@typing.final -class QueryAffectedParameters(google.protobuf.message.Message): +@_typing.final +class QueryAffectedParameters(_message.Message): """Parameters for QueryAffected.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - QUERY_FIELD_NUMBER: builtins.int - @property - def query(self) -> global___Query: ... + QUERY_FIELD_NUMBER: _builtins.int + @_builtins.property + def query(self) -> Global___Query: ... def __init__( self, *, - query: global___Query | None = ..., + query: Global___Query | None = ..., ) -> None: ... - def HasField(self, field_name: typing.Literal["query", b"query"]) -> builtins.bool: ... - def ClearField(self, field_name: typing.Literal["query", b"query"]) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["query", b"query"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["query", b"query"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -global___QueryAffectedParameters = QueryAffectedParameters +Global___QueryAffectedParameters: _TypeAlias = QueryAffectedParameters # noqa: Y015 -@typing.final -class QueryAffectedBatchParameters(google.protobuf.message.Message): +@_typing.final +class QueryAffectedBatchParameters(_message.Message): """Parameters for QueryAffectedBatch.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - QUERY_FIELD_NUMBER: builtins.int - @property - def query(self) -> global___BatchQuery: ... + QUERY_FIELD_NUMBER: _builtins.int + @_builtins.property + def query(self) -> Global___BatchQuery: ... def __init__( self, *, - query: global___BatchQuery | None = ..., + query: Global___BatchQuery | None = ..., ) -> None: ... - def HasField(self, field_name: typing.Literal["query", b"query"]) -> builtins.bool: ... - def ClearField(self, field_name: typing.Literal["query", b"query"]) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["query", b"query"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["query", b"query"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -global___QueryAffectedBatchParameters = QueryAffectedBatchParameters +Global___QueryAffectedBatchParameters: _TypeAlias = QueryAffectedBatchParameters # noqa: Y015 -@typing.final -class DetermineVersionParameters(google.protobuf.message.Message): +@_typing.final +class DetermineVersionParameters(_message.Message): """Parameters for DetermineVersion.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - QUERY_FIELD_NUMBER: builtins.int - @property - def query(self) -> global___VersionQuery: ... + QUERY_FIELD_NUMBER: _builtins.int + @_builtins.property + def query(self) -> Global___VersionQuery: ... def __init__( self, *, - query: global___VersionQuery | None = ..., + query: Global___VersionQuery | None = ..., ) -> None: ... - def HasField(self, field_name: typing.Literal["query", b"query"]) -> builtins.bool: ... - def ClearField(self, field_name: typing.Literal["query", b"query"]) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["query", b"query"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["query", b"query"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -global___DetermineVersionParameters = DetermineVersionParameters +Global___DetermineVersionParameters: _TypeAlias = DetermineVersionParameters # noqa: Y015 -@typing.final -class ImportFindingsParameters(google.protobuf.message.Message): +@_typing.final +class ImportFindingsParameters(_message.Message): """Parameters for ImportFindings.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - SOURCE_FIELD_NUMBER: builtins.int - source: builtins.str + SOURCE_FIELD_NUMBER: _builtins.int + source: _builtins.str def __init__( self, *, - source: builtins.str = ..., + source: _builtins.str = ..., ) -> None: ... - def ClearField(self, field_name: typing.Literal["source", b"source"]) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["source", b"source"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -global___ImportFindingsParameters = ImportFindingsParameters +Global___ImportFindingsParameters: _TypeAlias = ImportFindingsParameters # noqa: Y015 -@typing.final -class VersionQuery(google.protobuf.message.Message): +@_typing.final +class VersionQuery(_message.Message): """The version query.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - NAME_FIELD_NUMBER: builtins.int - FILE_HASHES_FIELD_NUMBER: builtins.int - name: builtins.str + NAME_FIELD_NUMBER: _builtins.int + FILE_HASHES_FIELD_NUMBER: _builtins.int + name: _builtins.str """The name of the dependency. Can be empty.""" - @property - def file_hashes(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___FileHash]: ... + @_builtins.property + def file_hashes(self) -> _containers.RepeatedCompositeFieldContainer[Global___FileHash]: ... def __init__( self, *, - name: builtins.str = ..., - file_hashes: collections.abc.Iterable[global___FileHash] | None = ..., + name: _builtins.str = ..., + file_hashes: _abc.Iterable[Global___FileHash] | None = ..., ) -> None: ... - def ClearField(self, field_name: typing.Literal["file_hashes", b"file_hashes", "name", b"name"]) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["file_hashes", b"file_hashes", "name", b"name"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -global___VersionQuery = VersionQuery +Global___VersionQuery: _TypeAlias = VersionQuery # noqa: Y015 -@typing.final -class FileHash(google.protobuf.message.Message): +@_typing.final +class FileHash(_message.Message): """Information about the files in the repository to identify the version. """ - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor class _HashType: - ValueType = typing.NewType("ValueType", builtins.int) - V: typing_extensions.TypeAlias = ValueType + ValueType = _typing.NewType("ValueType", _builtins.int) + V: _TypeAlias = ValueType # noqa: Y015 - class _HashTypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[FileHash._HashType.ValueType], builtins.type): - DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + class _HashTypeEnumTypeWrapper(_enum_type_wrapper._EnumTypeWrapper[FileHash._HashType.ValueType], _builtins.type): + DESCRIPTOR: _descriptor.EnumDescriptor MD5: FileHash._HashType.ValueType # 0 class HashType(_HashType, metaclass=_HashTypeEnumTypeWrapper): ... MD5: FileHash.HashType.ValueType # 0 - FILE_PATH_FIELD_NUMBER: builtins.int - HASH_TYPE_FIELD_NUMBER: builtins.int - HASH_FIELD_NUMBER: builtins.int - file_path: builtins.str + FILE_PATH_FIELD_NUMBER: _builtins.int + HASH_TYPE_FIELD_NUMBER: _builtins.int + HASH_FIELD_NUMBER: _builtins.int + file_path: _builtins.str """The file path inside the repository, relative to the repository root.""" - hash_type: global___FileHash.HashType.ValueType - hash: builtins.bytes + hash_type: Global___FileHash.HashType.ValueType + hash: _builtins.bytes def __init__( self, *, - file_path: builtins.str = ..., - hash_type: global___FileHash.HashType.ValueType = ..., - hash: builtins.bytes = ..., + file_path: _builtins.str = ..., + hash_type: Global___FileHash.HashType.ValueType = ..., + hash: _builtins.bytes = ..., ) -> None: ... - def ClearField(self, field_name: typing.Literal["file_path", b"file_path", "hash", b"hash", "hash_type", b"hash_type"]) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["file_path", b"file_path", "hash", b"hash", "hash_type", b"hash_type"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -global___FileHash = FileHash +Global___FileHash: _TypeAlias = FileHash # noqa: Y015 -@typing.final -class VersionMatchList(google.protobuf.message.Message): +@_typing.final +class VersionMatchList(_message.Message): """Result of DetmineVersion.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - MATCHES_FIELD_NUMBER: builtins.int - @property - def matches(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___VersionMatch]: ... + MATCHES_FIELD_NUMBER: _builtins.int + @_builtins.property + def matches(self) -> _containers.RepeatedCompositeFieldContainer[Global___VersionMatch]: ... def __init__( self, *, - matches: collections.abc.Iterable[global___VersionMatch] | None = ..., + matches: _abc.Iterable[Global___VersionMatch] | None = ..., ) -> None: ... - def ClearField(self, field_name: typing.Literal["matches", b"matches"]) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["matches", b"matches"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -global___VersionMatchList = VersionMatchList +Global___VersionMatchList: _TypeAlias = VersionMatchList # noqa: Y015 -@typing.final -class ImportFindingList(google.protobuf.message.Message): +@_typing.final +class ImportFindingList(_message.Message): """Result of ImportFindings.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - INVALID_RECORDS_FIELD_NUMBER: builtins.int - @property - def invalid_records(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[importfinding_pb2.ImportFinding]: ... + INVALID_RECORDS_FIELD_NUMBER: _builtins.int + @_builtins.property + def invalid_records(self) -> _containers.RepeatedCompositeFieldContainer[_importfinding_pb2.ImportFinding]: ... def __init__( self, *, - invalid_records: collections.abc.Iterable[importfinding_pb2.ImportFinding] | None = ..., + invalid_records: _abc.Iterable[_importfinding_pb2.ImportFinding] | None = ..., ) -> None: ... - def ClearField(self, field_name: typing.Literal["invalid_records", b"invalid_records"]) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["invalid_records", b"invalid_records"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -global___ImportFindingList = ImportFindingList +Global___ImportFindingList: _TypeAlias = ImportFindingList # noqa: Y015 -@typing.final -class VersionMatch(google.protobuf.message.Message): +@_typing.final +class VersionMatch(_message.Message): """Match information for the provided VersionQuery.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - SCORE_FIELD_NUMBER: builtins.int - REPO_INFO_FIELD_NUMBER: builtins.int - OSV_IDENTIFIER_FIELD_NUMBER: builtins.int - CPE23_FIELD_NUMBER: builtins.int - MINIMUM_FILE_MATCHES_FIELD_NUMBER: builtins.int - ESTIMATED_DIFF_FILES_FIELD_NUMBER: builtins.int - score: builtins.float + SCORE_FIELD_NUMBER: _builtins.int + REPO_INFO_FIELD_NUMBER: _builtins.int + OSV_IDENTIFIER_FIELD_NUMBER: _builtins.int + CPE23_FIELD_NUMBER: _builtins.int + MINIMUM_FILE_MATCHES_FIELD_NUMBER: _builtins.int + ESTIMATED_DIFF_FILES_FIELD_NUMBER: _builtins.int + score: _builtins.float """Score in the interval (0.0, 1.0] with 1.0 being a perfect match.""" - cpe23: builtins.str + cpe23: _builtins.str """CPE 2.3.""" - minimum_file_matches: builtins.int + minimum_file_matches: _builtins.int """Definite number of files that have matched.""" - estimated_diff_files: builtins.int + estimated_diff_files: _builtins.int """Estimated number of files that are different.""" - @property - def repo_info(self) -> global___VersionRepositoryInformation: + @_builtins.property + def repo_info(self) -> Global___VersionRepositoryInformation: """Information about the upstream repository.""" - @property - def osv_identifier(self) -> vulnerability_pb2.Package: + @_builtins.property + def osv_identifier(self) -> _vulnerability_pb2.Package: """The OSV identifier.""" def __init__( self, *, - score: builtins.float = ..., - repo_info: global___VersionRepositoryInformation | None = ..., - osv_identifier: vulnerability_pb2.Package | None = ..., - cpe23: builtins.str = ..., - minimum_file_matches: builtins.int = ..., - estimated_diff_files: builtins.int = ..., + score: _builtins.float = ..., + repo_info: Global___VersionRepositoryInformation | None = ..., + osv_identifier: _vulnerability_pb2.Package | None = ..., + cpe23: _builtins.str = ..., + minimum_file_matches: _builtins.int = ..., + estimated_diff_files: _builtins.int = ..., ) -> None: ... - def HasField(self, field_name: typing.Literal["osv_identifier", b"osv_identifier", "repo_info", b"repo_info"]) -> builtins.bool: ... - def ClearField(self, field_name: typing.Literal["cpe23", b"cpe23", "estimated_diff_files", b"estimated_diff_files", "minimum_file_matches", b"minimum_file_matches", "osv_identifier", b"osv_identifier", "repo_info", b"repo_info", "score", b"score"]) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["osv_identifier", b"osv_identifier", "repo_info", b"repo_info"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["cpe23", b"cpe23", "estimated_diff_files", b"estimated_diff_files", "minimum_file_matches", b"minimum_file_matches", "osv_identifier", b"osv_identifier", "repo_info", b"repo_info", "score", b"score"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -global___VersionMatch = VersionMatch +Global___VersionMatch: _TypeAlias = VersionMatch # noqa: Y015 -@typing.final -class VersionRepositoryInformation(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor +@_typing.final +class VersionRepositoryInformation(_message.Message): + DESCRIPTOR: _descriptor.Descriptor class _RepoType: - ValueType = typing.NewType("ValueType", builtins.int) - V: typing_extensions.TypeAlias = ValueType + ValueType = _typing.NewType("ValueType", _builtins.int) + V: _TypeAlias = ValueType # noqa: Y015 - class _RepoTypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[VersionRepositoryInformation._RepoType.ValueType], builtins.type): - DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + class _RepoTypeEnumTypeWrapper(_enum_type_wrapper._EnumTypeWrapper[VersionRepositoryInformation._RepoType.ValueType], _builtins.type): + DESCRIPTOR: _descriptor.EnumDescriptor UNSPECIFIED: VersionRepositoryInformation._RepoType.ValueType # 0 GIT: VersionRepositoryInformation._RepoType.ValueType # 1 @@ -376,29 +397,30 @@ class VersionRepositoryInformation(google.protobuf.message.Message): UNSPECIFIED: VersionRepositoryInformation.RepoType.ValueType # 0 GIT: VersionRepositoryInformation.RepoType.ValueType # 1 - TYPE_FIELD_NUMBER: builtins.int - ADDRESS_FIELD_NUMBER: builtins.int - TAG_FIELD_NUMBER: builtins.int - VERSION_FIELD_NUMBER: builtins.int - COMMIT_FIELD_NUMBER: builtins.int - type: global___VersionRepositoryInformation.RepoType.ValueType - address: builtins.str + TYPE_FIELD_NUMBER: _builtins.int + ADDRESS_FIELD_NUMBER: _builtins.int + TAG_FIELD_NUMBER: _builtins.int + VERSION_FIELD_NUMBER: _builtins.int + COMMIT_FIELD_NUMBER: _builtins.int + type: Global___VersionRepositoryInformation.RepoType.ValueType + address: _builtins.str """Source address of the repository.""" - tag: builtins.str + tag: _builtins.str """Commit tag""" - version: builtins.str + version: _builtins.str """Parsed version from commit tag""" - commit: builtins.str + commit: _builtins.str """Commit hash hex.""" def __init__( self, *, - type: global___VersionRepositoryInformation.RepoType.ValueType = ..., - address: builtins.str = ..., - tag: builtins.str = ..., - version: builtins.str = ..., - commit: builtins.str = ..., + type: Global___VersionRepositoryInformation.RepoType.ValueType = ..., + address: _builtins.str = ..., + tag: _builtins.str = ..., + version: _builtins.str = ..., + commit: _builtins.str = ..., ) -> None: ... - def ClearField(self, field_name: typing.Literal["address", b"address", "commit", b"commit", "tag", b"tag", "type", b"type", "version", b"version"]) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["address", b"address", "commit", b"commit", "tag", b"tag", "type", b"type", "version", b"version"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -global___VersionRepositoryInformation = VersionRepositoryInformation +Global___VersionRepositoryInformation: _TypeAlias = VersionRepositoryInformation # noqa: Y015 diff --git a/gcp/api/vulnerability_pb2.pyi b/gcp/api/vulnerability_pb2.pyi index 09c36ec513d..4ceda94ab55 100644 --- a/gcp/api/vulnerability_pb2.pyi +++ b/gcp/api/vulnerability_pb2.pyi @@ -16,26 +16,32 @@ See the License for the specific language governing permissions and limitations under the License. """ -import builtins -import collections.abc -import google.protobuf.descriptor -import google.protobuf.internal.containers -import google.protobuf.internal.enum_type_wrapper -import google.protobuf.message -import google.protobuf.struct_pb2 -import google.protobuf.timestamp_pb2 +from collections import abc as _abc +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf import struct_pb2 as _struct_pb2 +from google.protobuf import timestamp_pb2 as _timestamp_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper +import builtins as _builtins import sys -import typing +import typing as _typing if sys.version_info >= (3, 10): - import typing as typing_extensions + from typing import TypeAlias as _TypeAlias else: - import typing_extensions + from typing_extensions import TypeAlias as _TypeAlias -DESCRIPTOR: google.protobuf.descriptor.FileDescriptor +if sys.version_info >= (3, 13): + from warnings import deprecated as _deprecated +else: + from typing_extensions import deprecated as _deprecated + +DESCRIPTOR: _descriptor.FileDescriptor -@typing.final -class Commit(google.protobuf.message.Message): +@_deprecated("""This message has been marked as deprecated using proto message options.""") +@_typing.final +class Commit(_message.Message): """Commit reference (DEPRECATED). In some rare cases, this may refer to a small range of commits rather than an @@ -49,14 +55,14 @@ class Commit(google.protobuf.message.Message): commits in the range is assumed to cause the vulnerability. """ - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor class _RepoType: - ValueType = typing.NewType("ValueType", builtins.int) - V: typing_extensions.TypeAlias = ValueType + ValueType = _typing.NewType("ValueType", _builtins.int) + V: _TypeAlias = ValueType # noqa: Y015 - class _RepoTypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[Commit._RepoType.ValueType], builtins.type): - DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + class _RepoTypeEnumTypeWrapper(_enum_type_wrapper._EnumTypeWrapper[Commit._RepoType.ValueType], _builtins.type): + DESCRIPTOR: _descriptor.EnumDescriptor UNSPECIFIED: Commit._RepoType.ValueType # 0 GIT: Commit._RepoType.ValueType # 1 @@ -66,16 +72,16 @@ class Commit(google.protobuf.message.Message): UNSPECIFIED: Commit.RepoType.ValueType # 0 GIT: Commit.RepoType.ValueType # 1 - REPO_TYPE_FIELD_NUMBER: builtins.int - REPO_URL_FIELD_NUMBER: builtins.int - COMMIT_FIELD_NUMBER: builtins.int - repo_type: global___Commit.RepoType.ValueType + REPO_TYPE_FIELD_NUMBER: _builtins.int + REPO_URL_FIELD_NUMBER: _builtins.int + COMMIT_FIELD_NUMBER: _builtins.int + repo_type: Global___Commit.RepoType.ValueType """Required. The type of the repo.""" - repo_url: builtins.str + repo_url: _builtins.str """Required. The publicly accessible URL of the repo that can be directly passed to clone commands. """ - commit: builtins.str + commit: _builtins.str """Required. The commit identifier (e.g. git SHA). In some cases where the exact commit fails to be determined by automation, this may be a small range in the form "A:B" which means the commit range from A (exclusive) to @@ -84,90 +90,93 @@ class Commit(google.protobuf.message.Message): def __init__( self, *, - repo_type: global___Commit.RepoType.ValueType = ..., - repo_url: builtins.str = ..., - commit: builtins.str = ..., + repo_type: Global___Commit.RepoType.ValueType = ..., + repo_url: _builtins.str = ..., + commit: _builtins.str = ..., ) -> None: ... - def ClearField(self, field_name: typing.Literal["commit", b"commit", "repo_type", b"repo_type", "repo_url", b"repo_url"]) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["commit", b"commit", "repo_type", b"repo_type", "repo_url", b"repo_url"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -global___Commit = Commit +Global___Commit: _TypeAlias = Commit # noqa: Y015 -@typing.final -class Package(google.protobuf.message.Message): +@_typing.final +class Package(_message.Message): """Package information and version.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - NAME_FIELD_NUMBER: builtins.int - ECOSYSTEM_FIELD_NUMBER: builtins.int - PURL_FIELD_NUMBER: builtins.int - name: builtins.str + NAME_FIELD_NUMBER: _builtins.int + ECOSYSTEM_FIELD_NUMBER: _builtins.int + PURL_FIELD_NUMBER: _builtins.int + name: _builtins.str """Required. Name of the package. Should match the name used in the package ecosystem (e.g. the npm package name). For C/C++ projects integrated in OSS-Fuzz, this is the name used for the integration. """ - ecosystem: builtins.str + ecosystem: _builtins.str """Required. The ecosystem for this package. For the complete list of valid ecosystem names, see . """ - purl: builtins.str + purl: _builtins.str """Optional. The package URL for this package.""" def __init__( self, *, - name: builtins.str = ..., - ecosystem: builtins.str = ..., - purl: builtins.str = ..., + name: _builtins.str = ..., + ecosystem: _builtins.str = ..., + purl: _builtins.str = ..., ) -> None: ... - def ClearField(self, field_name: typing.Literal["ecosystem", b"ecosystem", "name", b"name", "purl", b"purl"]) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["ecosystem", b"ecosystem", "name", b"name", "purl", b"purl"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -global___Package = Package +Global___Package: _TypeAlias = Package # noqa: Y015 -@typing.final -class Event(google.protobuf.message.Message): +@_typing.final +class Event(_message.Message): """Version events.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - INTRODUCED_FIELD_NUMBER: builtins.int - FIXED_FIELD_NUMBER: builtins.int - LIMIT_FIELD_NUMBER: builtins.int - LAST_AFFECTED_FIELD_NUMBER: builtins.int - introduced: builtins.str + INTRODUCED_FIELD_NUMBER: _builtins.int + FIXED_FIELD_NUMBER: _builtins.int + LIMIT_FIELD_NUMBER: _builtins.int + LAST_AFFECTED_FIELD_NUMBER: _builtins.int + introduced: _builtins.str """The earliest version/commit where this vulnerability was introduced in. """ - fixed: builtins.str + fixed: _builtins.str """The version/commit that this vulnerability was fixed in.""" - limit: builtins.str + limit: _builtins.str """The limit to apply to the range.""" - last_affected: builtins.str + last_affected: _builtins.str """The last affected version.""" def __init__( self, *, - introduced: builtins.str = ..., - fixed: builtins.str = ..., - limit: builtins.str = ..., - last_affected: builtins.str = ..., + introduced: _builtins.str = ..., + fixed: _builtins.str = ..., + limit: _builtins.str = ..., + last_affected: _builtins.str = ..., ) -> None: ... - def ClearField(self, field_name: typing.Literal["fixed", b"fixed", "introduced", b"introduced", "last_affected", b"last_affected", "limit", b"limit"]) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["fixed", b"fixed", "introduced", b"introduced", "last_affected", b"last_affected", "limit", b"limit"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -global___Event = Event +Global___Event: _TypeAlias = Event # noqa: Y015 -@typing.final -class Range(google.protobuf.message.Message): +@_typing.final +class Range(_message.Message): """Affected ranges.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor class _Type: - ValueType = typing.NewType("ValueType", builtins.int) - V: typing_extensions.TypeAlias = ValueType + ValueType = _typing.NewType("ValueType", _builtins.int) + V: _TypeAlias = ValueType # noqa: Y015 - class _TypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[Range._Type.ValueType], builtins.type): - DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + class _TypeEnumTypeWrapper(_enum_type_wrapper._EnumTypeWrapper[Range._Type.ValueType], _builtins.type): + DESCRIPTOR: _descriptor.EnumDescriptor UNSPECIFIED: Range._Type.ValueType # 0 GIT: Range._Type.ValueType # 1 SEMVER: Range._Type.ValueType # 2 @@ -181,22 +190,22 @@ class Range(google.protobuf.message.Message): SEMVER: Range.Type.ValueType # 2 ECOSYSTEM: Range.Type.ValueType # 3 - TYPE_FIELD_NUMBER: builtins.int - REPO_FIELD_NUMBER: builtins.int - EVENTS_FIELD_NUMBER: builtins.int - DATABASE_SPECIFIC_FIELD_NUMBER: builtins.int - type: global___Range.Type.ValueType + TYPE_FIELD_NUMBER: _builtins.int + REPO_FIELD_NUMBER: _builtins.int + EVENTS_FIELD_NUMBER: _builtins.int + DATABASE_SPECIFIC_FIELD_NUMBER: _builtins.int + type: Global___Range.Type.ValueType """Required. The type of version information.""" - repo: builtins.str + repo: _builtins.str """Required if type is GIT. The publicly accessible URL of the repo that can be directly passed to clone commands. """ - @property - def events(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Event]: + @_builtins.property + def events(self) -> _containers.RepeatedCompositeFieldContainer[Global___Event]: """Required. Version event information.""" - @property - def database_specific(self) -> google.protobuf.struct_pb2.Struct: + @_builtins.property + def database_specific(self) -> _struct_pb2.Struct: """Optional. JSON object holding additional information about the vulnerability as defined by the database for which the record applies. """ @@ -204,81 +213,85 @@ class Range(google.protobuf.message.Message): def __init__( self, *, - type: global___Range.Type.ValueType = ..., - repo: builtins.str = ..., - events: collections.abc.Iterable[global___Event] | None = ..., - database_specific: google.protobuf.struct_pb2.Struct | None = ..., + type: Global___Range.Type.ValueType = ..., + repo: _builtins.str = ..., + events: _abc.Iterable[Global___Event] | None = ..., + database_specific: _struct_pb2.Struct | None = ..., ) -> None: ... - def HasField(self, field_name: typing.Literal["database_specific", b"database_specific"]) -> builtins.bool: ... - def ClearField(self, field_name: typing.Literal["database_specific", b"database_specific", "events", b"events", "repo", b"repo", "type", b"type"]) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["database_specific", b"database_specific"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["database_specific", b"database_specific", "events", b"events", "repo", b"repo", "type", b"type"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -global___Range = Range +Global___Range: _TypeAlias = Range # noqa: Y015 -@typing.final -class Affected(google.protobuf.message.Message): +@_typing.final +class Affected(_message.Message): """Affected versions and commits.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - PACKAGE_FIELD_NUMBER: builtins.int - RANGES_FIELD_NUMBER: builtins.int - VERSIONS_FIELD_NUMBER: builtins.int - ECOSYSTEM_SPECIFIC_FIELD_NUMBER: builtins.int - DATABASE_SPECIFIC_FIELD_NUMBER: builtins.int - SEVERITY_FIELD_NUMBER: builtins.int - @property - def package(self) -> global___Package: + PACKAGE_FIELD_NUMBER: _builtins.int + RANGES_FIELD_NUMBER: _builtins.int + VERSIONS_FIELD_NUMBER: _builtins.int + ECOSYSTEM_SPECIFIC_FIELD_NUMBER: _builtins.int + DATABASE_SPECIFIC_FIELD_NUMBER: _builtins.int + SEVERITY_FIELD_NUMBER: _builtins.int + @_builtins.property + def package(self) -> Global___Package: """Optional. Package information.""" - @property - def ranges(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Range]: + @_builtins.property + def ranges(self) -> _containers.RepeatedCompositeFieldContainer[Global___Range]: """Required. Range information.""" - @property - def versions(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: + @_builtins.property + def versions(self) -> _containers.RepeatedScalarFieldContainer[_builtins.str]: """Optional. List of affected versions.""" - @property - def ecosystem_specific(self) -> google.protobuf.struct_pb2.Struct: + @_builtins.property + def ecosystem_specific(self) -> _struct_pb2.Struct: """Optional. JSON object holding additional information about the vulnerability as defined by the ecosystem for which the record applies. """ - @property - def database_specific(self) -> google.protobuf.struct_pb2.Struct: + @_builtins.property + def database_specific(self) -> _struct_pb2.Struct: """Optional. JSON object holding additional information about the vulnerability as defined by the database for which the record applies. """ - @property - def severity(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Severity]: + @_builtins.property + def severity(self) -> _containers.RepeatedCompositeFieldContainer[Global___Severity]: """Optional. Severity of the vulnerability for this package.""" def __init__( self, *, - package: global___Package | None = ..., - ranges: collections.abc.Iterable[global___Range] | None = ..., - versions: collections.abc.Iterable[builtins.str] | None = ..., - ecosystem_specific: google.protobuf.struct_pb2.Struct | None = ..., - database_specific: google.protobuf.struct_pb2.Struct | None = ..., - severity: collections.abc.Iterable[global___Severity] | None = ..., + package: Global___Package | None = ..., + ranges: _abc.Iterable[Global___Range] | None = ..., + versions: _abc.Iterable[_builtins.str] | None = ..., + ecosystem_specific: _struct_pb2.Struct | None = ..., + database_specific: _struct_pb2.Struct | None = ..., + severity: _abc.Iterable[Global___Severity] | None = ..., ) -> None: ... - def HasField(self, field_name: typing.Literal["database_specific", b"database_specific", "ecosystem_specific", b"ecosystem_specific", "package", b"package"]) -> builtins.bool: ... - def ClearField(self, field_name: typing.Literal["database_specific", b"database_specific", "ecosystem_specific", b"ecosystem_specific", "package", b"package", "ranges", b"ranges", "severity", b"severity", "versions", b"versions"]) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["database_specific", b"database_specific", "ecosystem_specific", b"ecosystem_specific", "package", b"package"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["database_specific", b"database_specific", "ecosystem_specific", b"ecosystem_specific", "package", b"package", "ranges", b"ranges", "severity", b"severity", "versions", b"versions"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -global___Affected = Affected +Global___Affected: _TypeAlias = Affected # noqa: Y015 -@typing.final -class Severity(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor +@_typing.final +class Severity(_message.Message): + DESCRIPTOR: _descriptor.Descriptor class _Type: - ValueType = typing.NewType("ValueType", builtins.int) - V: typing_extensions.TypeAlias = ValueType + ValueType = _typing.NewType("ValueType", _builtins.int) + V: _TypeAlias = ValueType # noqa: Y015 - class _TypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[Severity._Type.ValueType], builtins.type): - DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + class _TypeEnumTypeWrapper(_enum_type_wrapper._EnumTypeWrapper[Severity._Type.ValueType], _builtins.type): + DESCRIPTOR: _descriptor.EnumDescriptor UNSPECIFIED: Severity._Type.ValueType # 0 CVSS_V3: Severity._Type.ValueType # 1 CVSS_V2: Severity._Type.ValueType # 2 @@ -294,32 +307,33 @@ class Severity(google.protobuf.message.Message): CVSS_V4: Severity.Type.ValueType # 3 Ubuntu: Severity.Type.ValueType # 4 - TYPE_FIELD_NUMBER: builtins.int - SCORE_FIELD_NUMBER: builtins.int - type: global___Severity.Type.ValueType + TYPE_FIELD_NUMBER: _builtins.int + SCORE_FIELD_NUMBER: _builtins.int + type: Global___Severity.Type.ValueType """The type of this severity entry.""" - score: builtins.str + score: _builtins.str """The quantitative score.""" def __init__( self, *, - type: global___Severity.Type.ValueType = ..., - score: builtins.str = ..., + type: Global___Severity.Type.ValueType = ..., + score: _builtins.str = ..., ) -> None: ... - def ClearField(self, field_name: typing.Literal["score", b"score", "type", b"type"]) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["score", b"score", "type", b"type"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -global___Severity = Severity +Global___Severity: _TypeAlias = Severity # noqa: Y015 -@typing.final -class Credit(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor +@_typing.final +class Credit(_message.Message): + DESCRIPTOR: _descriptor.Descriptor class _Type: - ValueType = typing.NewType("ValueType", builtins.int) - V: typing_extensions.TypeAlias = ValueType + ValueType = _typing.NewType("ValueType", _builtins.int) + V: _TypeAlias = ValueType # noqa: Y015 - class _TypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[Credit._Type.ValueType], builtins.type): - DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + class _TypeEnumTypeWrapper(_enum_type_wrapper._EnumTypeWrapper[Credit._Type.ValueType], _builtins.type): + DESCRIPTOR: _descriptor.EnumDescriptor UNSPECIFIED: Credit._Type.ValueType # 0 OTHER: Credit._Type.ValueType # 1 FINDER: Credit._Type.ValueType # 2 @@ -345,40 +359,41 @@ class Credit(google.protobuf.message.Message): TOOL: Credit.Type.ValueType # 9 SPONSOR: Credit.Type.ValueType # 10 - NAME_FIELD_NUMBER: builtins.int - CONTACT_FIELD_NUMBER: builtins.int - TYPE_FIELD_NUMBER: builtins.int - name: builtins.str + NAME_FIELD_NUMBER: _builtins.int + CONTACT_FIELD_NUMBER: _builtins.int + TYPE_FIELD_NUMBER: _builtins.int + name: _builtins.str """The name to give credit to.""" - type: global___Credit.Type.ValueType + type: Global___Credit.Type.ValueType """Optional. The type or role of the individual or entity being credited.""" - @property - def contact(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: + @_builtins.property + def contact(self) -> _containers.RepeatedScalarFieldContainer[_builtins.str]: """Contact methods (URLs).""" def __init__( self, *, - name: builtins.str = ..., - contact: collections.abc.Iterable[builtins.str] | None = ..., - type: global___Credit.Type.ValueType = ..., + name: _builtins.str = ..., + contact: _abc.Iterable[_builtins.str] | None = ..., + type: Global___Credit.Type.ValueType = ..., ) -> None: ... - def ClearField(self, field_name: typing.Literal["contact", b"contact", "name", b"name", "type", b"type"]) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["contact", b"contact", "name", b"name", "type", b"type"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -global___Credit = Credit +Global___Credit: _TypeAlias = Credit # noqa: Y015 -@typing.final -class Reference(google.protobuf.message.Message): +@_typing.final +class Reference(_message.Message): """Reference URL.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor class _Type: - ValueType = typing.NewType("ValueType", builtins.int) - V: typing_extensions.TypeAlias = ValueType + ValueType = _typing.NewType("ValueType", _builtins.int) + V: _TypeAlias = ValueType # noqa: Y015 - class _TypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[Reference._Type.ValueType], builtins.type): - DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + class _TypeEnumTypeWrapper(_enum_type_wrapper._EnumTypeWrapper[Reference._Type.ValueType], _builtins.type): + DESCRIPTOR: _descriptor.EnumDescriptor NONE: Reference._Type.ValueType # 0 """Next ID = 12.""" ADVISORY: Reference._Type.ValueType # 2 @@ -408,132 +423,135 @@ class Reference(google.protobuf.message.Message): REPORT: Reference.Type.ValueType # 3 WEB: Reference.Type.ValueType # 1 - TYPE_FIELD_NUMBER: builtins.int - URL_FIELD_NUMBER: builtins.int - type: global___Reference.Type.ValueType + TYPE_FIELD_NUMBER: _builtins.int + URL_FIELD_NUMBER: _builtins.int + type: Global___Reference.Type.ValueType """Required. The type of the reference.""" - url: builtins.str + url: _builtins.str """Required. The URL.""" def __init__( self, *, - type: global___Reference.Type.ValueType = ..., - url: builtins.str = ..., + type: Global___Reference.Type.ValueType = ..., + url: _builtins.str = ..., ) -> None: ... - def ClearField(self, field_name: typing.Literal["type", b"type", "url", b"url"]) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["type", b"type", "url", b"url"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -global___Reference = Reference +Global___Reference: _TypeAlias = Reference # noqa: Y015 -@typing.final -class Vulnerability(google.protobuf.message.Message): +@_typing.final +class Vulnerability(_message.Message): """A vulnerability entry. The protobuf representation is *NOT* stable and only used for implementing the JSON based API. """ - DESCRIPTOR: google.protobuf.descriptor.Descriptor - - SCHEMA_VERSION_FIELD_NUMBER: builtins.int - ID_FIELD_NUMBER: builtins.int - PUBLISHED_FIELD_NUMBER: builtins.int - MODIFIED_FIELD_NUMBER: builtins.int - WITHDRAWN_FIELD_NUMBER: builtins.int - ALIASES_FIELD_NUMBER: builtins.int - RELATED_FIELD_NUMBER: builtins.int - UPSTREAM_FIELD_NUMBER: builtins.int - SUMMARY_FIELD_NUMBER: builtins.int - DETAILS_FIELD_NUMBER: builtins.int - AFFECTED_FIELD_NUMBER: builtins.int - REFERENCES_FIELD_NUMBER: builtins.int - DATABASE_SPECIFIC_FIELD_NUMBER: builtins.int - SEVERITY_FIELD_NUMBER: builtins.int - CREDITS_FIELD_NUMBER: builtins.int - schema_version: builtins.str + DESCRIPTOR: _descriptor.Descriptor + + SCHEMA_VERSION_FIELD_NUMBER: _builtins.int + ID_FIELD_NUMBER: _builtins.int + PUBLISHED_FIELD_NUMBER: _builtins.int + MODIFIED_FIELD_NUMBER: _builtins.int + WITHDRAWN_FIELD_NUMBER: _builtins.int + ALIASES_FIELD_NUMBER: _builtins.int + RELATED_FIELD_NUMBER: _builtins.int + UPSTREAM_FIELD_NUMBER: _builtins.int + SUMMARY_FIELD_NUMBER: _builtins.int + DETAILS_FIELD_NUMBER: _builtins.int + AFFECTED_FIELD_NUMBER: _builtins.int + REFERENCES_FIELD_NUMBER: _builtins.int + DATABASE_SPECIFIC_FIELD_NUMBER: _builtins.int + SEVERITY_FIELD_NUMBER: _builtins.int + CREDITS_FIELD_NUMBER: _builtins.int + schema_version: _builtins.str """The OSV schema version.""" - id: builtins.str + id: _builtins.str """The `id` field is a unique identifier for the vulnerability entry. It is a string of the format `-`, where `DB` names the database and `ENTRYID` is in the format used by the database. For example: “OSV-2020-111”, “CVE-2021-3114”, or “GHSA-vp9c-fpxx-744v”. """ - summary: builtins.str + summary: _builtins.str """Required. One line human readable summary for the vulnerability. It is recommended to keep this under 120 characters. """ - details: builtins.str + details: _builtins.str """Required. Any additional human readable details for the vulnerability.""" - @property - def published(self) -> google.protobuf.timestamp_pb2.Timestamp: + @_builtins.property + def published(self) -> _timestamp_pb2.Timestamp: """The RFC3339 timestamp indicating when this entry was published.""" - @property - def modified(self) -> google.protobuf.timestamp_pb2.Timestamp: + @_builtins.property + def modified(self) -> _timestamp_pb2.Timestamp: """The RFC3339 timestamp indicating when this entry was last modified.""" - @property - def withdrawn(self) -> google.protobuf.timestamp_pb2.Timestamp: + @_builtins.property + def withdrawn(self) -> _timestamp_pb2.Timestamp: """Optional. The RFC3339 timestamp indicating when this entry is considered to be withdrawn. """ - @property - def aliases(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: + @_builtins.property + def aliases(self) -> _containers.RepeatedScalarFieldContainer[_builtins.str]: """Optional. IDs for the same vulnerability in other databases.""" - @property - def related(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: + @_builtins.property + def related(self) -> _containers.RepeatedScalarFieldContainer[_builtins.str]: """Optional. List of IDs of closely related vulnerabilities, such as the same problem in alternate ecosystems. """ - @property - def upstream(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: + @_builtins.property + def upstream(self) -> _containers.RepeatedScalarFieldContainer[_builtins.str]: """Optional. List of IDs of upstream vulnerabilities of a vulnerability.""" - @property - def affected(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Affected]: + @_builtins.property + def affected(self) -> _containers.RepeatedCompositeFieldContainer[Global___Affected]: """Required. Affected commit ranges and versions.""" - @property - def references(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Reference]: + @_builtins.property + def references(self) -> _containers.RepeatedCompositeFieldContainer[Global___Reference]: """Optional. URLs to more information/advisories (including the scheme e.g. "https://"). """ - @property - def database_specific(self) -> google.protobuf.struct_pb2.Struct: + @_builtins.property + def database_specific(self) -> _struct_pb2.Struct: """Optional. JSON object holding additional information about the vulnerability as defined by the database for which the record applies. """ - @property - def severity(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Severity]: + @_builtins.property + def severity(self) -> _containers.RepeatedCompositeFieldContainer[Global___Severity]: """Optional. Severity of the vulnerability.""" - @property - def credits(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Credit]: + @_builtins.property + def credits(self) -> _containers.RepeatedCompositeFieldContainer[Global___Credit]: """Optional. Credits for the vulnerability.""" def __init__( self, *, - schema_version: builtins.str = ..., - id: builtins.str = ..., - published: google.protobuf.timestamp_pb2.Timestamp | None = ..., - modified: google.protobuf.timestamp_pb2.Timestamp | None = ..., - withdrawn: google.protobuf.timestamp_pb2.Timestamp | None = ..., - aliases: collections.abc.Iterable[builtins.str] | None = ..., - related: collections.abc.Iterable[builtins.str] | None = ..., - upstream: collections.abc.Iterable[builtins.str] | None = ..., - summary: builtins.str = ..., - details: builtins.str = ..., - affected: collections.abc.Iterable[global___Affected] | None = ..., - references: collections.abc.Iterable[global___Reference] | None = ..., - database_specific: google.protobuf.struct_pb2.Struct | None = ..., - severity: collections.abc.Iterable[global___Severity] | None = ..., - credits: collections.abc.Iterable[global___Credit] | None = ..., + schema_version: _builtins.str = ..., + id: _builtins.str = ..., + published: _timestamp_pb2.Timestamp | None = ..., + modified: _timestamp_pb2.Timestamp | None = ..., + withdrawn: _timestamp_pb2.Timestamp | None = ..., + aliases: _abc.Iterable[_builtins.str] | None = ..., + related: _abc.Iterable[_builtins.str] | None = ..., + upstream: _abc.Iterable[_builtins.str] | None = ..., + summary: _builtins.str = ..., + details: _builtins.str = ..., + affected: _abc.Iterable[Global___Affected] | None = ..., + references: _abc.Iterable[Global___Reference] | None = ..., + database_specific: _struct_pb2.Struct | None = ..., + severity: _abc.Iterable[Global___Severity] | None = ..., + credits: _abc.Iterable[Global___Credit] | None = ..., ) -> None: ... - def HasField(self, field_name: typing.Literal["database_specific", b"database_specific", "modified", b"modified", "published", b"published", "withdrawn", b"withdrawn"]) -> builtins.bool: ... - def ClearField(self, field_name: typing.Literal["affected", b"affected", "aliases", b"aliases", "credits", b"credits", "database_specific", b"database_specific", "details", b"details", "id", b"id", "modified", b"modified", "published", b"published", "references", b"references", "related", b"related", "schema_version", b"schema_version", "severity", b"severity", "summary", b"summary", "upstream", b"upstream", "withdrawn", b"withdrawn"]) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["database_specific", b"database_specific", "modified", b"modified", "published", b"published", "withdrawn", b"withdrawn"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["affected", b"affected", "aliases", b"aliases", "credits", b"credits", "database_specific", b"database_specific", "details", b"details", "id", b"id", "modified", b"modified", "published", b"published", "references", b"references", "related", b"related", "schema_version", b"schema_version", "severity", b"severity", "summary", b"summary", "upstream", b"upstream", "withdrawn", b"withdrawn"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -global___Vulnerability = Vulnerability +Global___Vulnerability: _TypeAlias = Vulnerability # noqa: Y015 diff --git a/osv/importfinding_pb2.pyi b/osv/importfinding_pb2.pyi index 74fff613480..d3dbb9d5502 100644 --- a/osv/importfinding_pb2.pyi +++ b/osv/importfinding_pb2.pyi @@ -16,29 +16,29 @@ See the License for the specific language governing permissions and limitations under the License. """ -import builtins -import collections.abc -import google.protobuf.descriptor -import google.protobuf.internal.containers -import google.protobuf.internal.enum_type_wrapper -import google.protobuf.message -import google.protobuf.timestamp_pb2 +from collections import abc as _abc +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf import timestamp_pb2 as _timestamp_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper +import builtins as _builtins import sys -import typing +import typing as _typing if sys.version_info >= (3, 10): - import typing as typing_extensions + from typing import TypeAlias as _TypeAlias else: - import typing_extensions + from typing_extensions import TypeAlias as _TypeAlias -DESCRIPTOR: google.protobuf.descriptor.FileDescriptor +DESCRIPTOR: _descriptor.FileDescriptor class _ImportFindingType: - ValueType = typing.NewType("ValueType", builtins.int) - V: typing_extensions.TypeAlias = ValueType + ValueType = _typing.NewType("ValueType", _builtins.int) + V: _TypeAlias = ValueType # noqa: Y015 -class _ImportFindingTypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_ImportFindingType.ValueType], builtins.type): - DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor +class _ImportFindingTypeEnumTypeWrapper(_enum_type_wrapper._EnumTypeWrapper[_ImportFindingType.ValueType], _builtins.type): + DESCRIPTOR: _descriptor.EnumDescriptor IMPORT_FINDING_TYPE_NONE: _ImportFindingType.ValueType # 0 IMPORT_FINDING_TYPE_DELETED: _ImportFindingType.ValueType # 1 IMPORT_FINDING_TYPE_INVALID_JSON: _ImportFindingType.ValueType # 2 @@ -68,40 +68,42 @@ IMPORT_FINDING_TYPE_INVALID_ALIASES: ImportFindingType.ValueType # 9 IMPORT_FINDING_TYPE_INVALID_UPSTREAM: ImportFindingType.ValueType # 10 IMPORT_FINDING_TYPE_INVALID_RELATED: ImportFindingType.ValueType # 11 IMPORT_FINDING_TYPE_BAD_ALIASED_CVE: ImportFindingType.ValueType # 12 -global___ImportFindingType = ImportFindingType +Global___ImportFindingType: _TypeAlias = ImportFindingType # noqa: Y015 -@typing.final -class ImportFinding(google.protobuf.message.Message): +@_typing.final +class ImportFinding(_message.Message): """An importfinding entry. The protobuf representation is *NOT* stable and only used for implementing the JSON based API. """ - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - BUG_ID_FIELD_NUMBER: builtins.int - SOURCE_FIELD_NUMBER: builtins.int - FINDINGS_FIELD_NUMBER: builtins.int - FIRST_SEEN_FIELD_NUMBER: builtins.int - LAST_ATTEMPT_FIELD_NUMBER: builtins.int - bug_id: builtins.str - source: builtins.str - @property - def findings(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[global___ImportFindingType.ValueType]: ... - @property - def first_seen(self) -> google.protobuf.timestamp_pb2.Timestamp: ... - @property - def last_attempt(self) -> google.protobuf.timestamp_pb2.Timestamp: ... + BUG_ID_FIELD_NUMBER: _builtins.int + SOURCE_FIELD_NUMBER: _builtins.int + FINDINGS_FIELD_NUMBER: _builtins.int + FIRST_SEEN_FIELD_NUMBER: _builtins.int + LAST_ATTEMPT_FIELD_NUMBER: _builtins.int + bug_id: _builtins.str + source: _builtins.str + @_builtins.property + def findings(self) -> _containers.RepeatedScalarFieldContainer[Global___ImportFindingType.ValueType]: ... + @_builtins.property + def first_seen(self) -> _timestamp_pb2.Timestamp: ... + @_builtins.property + def last_attempt(self) -> _timestamp_pb2.Timestamp: ... def __init__( self, *, - bug_id: builtins.str = ..., - source: builtins.str = ..., - findings: collections.abc.Iterable[global___ImportFindingType.ValueType] | None = ..., - first_seen: google.protobuf.timestamp_pb2.Timestamp | None = ..., - last_attempt: google.protobuf.timestamp_pb2.Timestamp | None = ..., + bug_id: _builtins.str = ..., + source: _builtins.str = ..., + findings: _abc.Iterable[Global___ImportFindingType.ValueType] | None = ..., + first_seen: _timestamp_pb2.Timestamp | None = ..., + last_attempt: _timestamp_pb2.Timestamp | None = ..., ) -> None: ... - def HasField(self, field_name: typing.Literal["first_seen", b"first_seen", "last_attempt", b"last_attempt"]) -> builtins.bool: ... - def ClearField(self, field_name: typing.Literal["bug_id", b"bug_id", "findings", b"findings", "first_seen", b"first_seen", "last_attempt", b"last_attempt", "source", b"source"]) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["first_seen", b"first_seen", "last_attempt", b"last_attempt"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["bug_id", b"bug_id", "findings", b"findings", "first_seen", b"first_seen", "last_attempt", b"last_attempt", "source", b"source"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -global___ImportFinding = ImportFinding +Global___ImportFinding: _TypeAlias = ImportFinding # noqa: Y015 diff --git a/osv/vulnerability_pb2.pyi b/osv/vulnerability_pb2.pyi index 09c36ec513d..4ceda94ab55 100644 --- a/osv/vulnerability_pb2.pyi +++ b/osv/vulnerability_pb2.pyi @@ -16,26 +16,32 @@ See the License for the specific language governing permissions and limitations under the License. """ -import builtins -import collections.abc -import google.protobuf.descriptor -import google.protobuf.internal.containers -import google.protobuf.internal.enum_type_wrapper -import google.protobuf.message -import google.protobuf.struct_pb2 -import google.protobuf.timestamp_pb2 +from collections import abc as _abc +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf import struct_pb2 as _struct_pb2 +from google.protobuf import timestamp_pb2 as _timestamp_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper +import builtins as _builtins import sys -import typing +import typing as _typing if sys.version_info >= (3, 10): - import typing as typing_extensions + from typing import TypeAlias as _TypeAlias else: - import typing_extensions + from typing_extensions import TypeAlias as _TypeAlias -DESCRIPTOR: google.protobuf.descriptor.FileDescriptor +if sys.version_info >= (3, 13): + from warnings import deprecated as _deprecated +else: + from typing_extensions import deprecated as _deprecated + +DESCRIPTOR: _descriptor.FileDescriptor -@typing.final -class Commit(google.protobuf.message.Message): +@_deprecated("""This message has been marked as deprecated using proto message options.""") +@_typing.final +class Commit(_message.Message): """Commit reference (DEPRECATED). In some rare cases, this may refer to a small range of commits rather than an @@ -49,14 +55,14 @@ class Commit(google.protobuf.message.Message): commits in the range is assumed to cause the vulnerability. """ - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor class _RepoType: - ValueType = typing.NewType("ValueType", builtins.int) - V: typing_extensions.TypeAlias = ValueType + ValueType = _typing.NewType("ValueType", _builtins.int) + V: _TypeAlias = ValueType # noqa: Y015 - class _RepoTypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[Commit._RepoType.ValueType], builtins.type): - DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + class _RepoTypeEnumTypeWrapper(_enum_type_wrapper._EnumTypeWrapper[Commit._RepoType.ValueType], _builtins.type): + DESCRIPTOR: _descriptor.EnumDescriptor UNSPECIFIED: Commit._RepoType.ValueType # 0 GIT: Commit._RepoType.ValueType # 1 @@ -66,16 +72,16 @@ class Commit(google.protobuf.message.Message): UNSPECIFIED: Commit.RepoType.ValueType # 0 GIT: Commit.RepoType.ValueType # 1 - REPO_TYPE_FIELD_NUMBER: builtins.int - REPO_URL_FIELD_NUMBER: builtins.int - COMMIT_FIELD_NUMBER: builtins.int - repo_type: global___Commit.RepoType.ValueType + REPO_TYPE_FIELD_NUMBER: _builtins.int + REPO_URL_FIELD_NUMBER: _builtins.int + COMMIT_FIELD_NUMBER: _builtins.int + repo_type: Global___Commit.RepoType.ValueType """Required. The type of the repo.""" - repo_url: builtins.str + repo_url: _builtins.str """Required. The publicly accessible URL of the repo that can be directly passed to clone commands. """ - commit: builtins.str + commit: _builtins.str """Required. The commit identifier (e.g. git SHA). In some cases where the exact commit fails to be determined by automation, this may be a small range in the form "A:B" which means the commit range from A (exclusive) to @@ -84,90 +90,93 @@ class Commit(google.protobuf.message.Message): def __init__( self, *, - repo_type: global___Commit.RepoType.ValueType = ..., - repo_url: builtins.str = ..., - commit: builtins.str = ..., + repo_type: Global___Commit.RepoType.ValueType = ..., + repo_url: _builtins.str = ..., + commit: _builtins.str = ..., ) -> None: ... - def ClearField(self, field_name: typing.Literal["commit", b"commit", "repo_type", b"repo_type", "repo_url", b"repo_url"]) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["commit", b"commit", "repo_type", b"repo_type", "repo_url", b"repo_url"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -global___Commit = Commit +Global___Commit: _TypeAlias = Commit # noqa: Y015 -@typing.final -class Package(google.protobuf.message.Message): +@_typing.final +class Package(_message.Message): """Package information and version.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - NAME_FIELD_NUMBER: builtins.int - ECOSYSTEM_FIELD_NUMBER: builtins.int - PURL_FIELD_NUMBER: builtins.int - name: builtins.str + NAME_FIELD_NUMBER: _builtins.int + ECOSYSTEM_FIELD_NUMBER: _builtins.int + PURL_FIELD_NUMBER: _builtins.int + name: _builtins.str """Required. Name of the package. Should match the name used in the package ecosystem (e.g. the npm package name). For C/C++ projects integrated in OSS-Fuzz, this is the name used for the integration. """ - ecosystem: builtins.str + ecosystem: _builtins.str """Required. The ecosystem for this package. For the complete list of valid ecosystem names, see . """ - purl: builtins.str + purl: _builtins.str """Optional. The package URL for this package.""" def __init__( self, *, - name: builtins.str = ..., - ecosystem: builtins.str = ..., - purl: builtins.str = ..., + name: _builtins.str = ..., + ecosystem: _builtins.str = ..., + purl: _builtins.str = ..., ) -> None: ... - def ClearField(self, field_name: typing.Literal["ecosystem", b"ecosystem", "name", b"name", "purl", b"purl"]) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["ecosystem", b"ecosystem", "name", b"name", "purl", b"purl"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -global___Package = Package +Global___Package: _TypeAlias = Package # noqa: Y015 -@typing.final -class Event(google.protobuf.message.Message): +@_typing.final +class Event(_message.Message): """Version events.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - INTRODUCED_FIELD_NUMBER: builtins.int - FIXED_FIELD_NUMBER: builtins.int - LIMIT_FIELD_NUMBER: builtins.int - LAST_AFFECTED_FIELD_NUMBER: builtins.int - introduced: builtins.str + INTRODUCED_FIELD_NUMBER: _builtins.int + FIXED_FIELD_NUMBER: _builtins.int + LIMIT_FIELD_NUMBER: _builtins.int + LAST_AFFECTED_FIELD_NUMBER: _builtins.int + introduced: _builtins.str """The earliest version/commit where this vulnerability was introduced in. """ - fixed: builtins.str + fixed: _builtins.str """The version/commit that this vulnerability was fixed in.""" - limit: builtins.str + limit: _builtins.str """The limit to apply to the range.""" - last_affected: builtins.str + last_affected: _builtins.str """The last affected version.""" def __init__( self, *, - introduced: builtins.str = ..., - fixed: builtins.str = ..., - limit: builtins.str = ..., - last_affected: builtins.str = ..., + introduced: _builtins.str = ..., + fixed: _builtins.str = ..., + limit: _builtins.str = ..., + last_affected: _builtins.str = ..., ) -> None: ... - def ClearField(self, field_name: typing.Literal["fixed", b"fixed", "introduced", b"introduced", "last_affected", b"last_affected", "limit", b"limit"]) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["fixed", b"fixed", "introduced", b"introduced", "last_affected", b"last_affected", "limit", b"limit"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -global___Event = Event +Global___Event: _TypeAlias = Event # noqa: Y015 -@typing.final -class Range(google.protobuf.message.Message): +@_typing.final +class Range(_message.Message): """Affected ranges.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor class _Type: - ValueType = typing.NewType("ValueType", builtins.int) - V: typing_extensions.TypeAlias = ValueType + ValueType = _typing.NewType("ValueType", _builtins.int) + V: _TypeAlias = ValueType # noqa: Y015 - class _TypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[Range._Type.ValueType], builtins.type): - DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + class _TypeEnumTypeWrapper(_enum_type_wrapper._EnumTypeWrapper[Range._Type.ValueType], _builtins.type): + DESCRIPTOR: _descriptor.EnumDescriptor UNSPECIFIED: Range._Type.ValueType # 0 GIT: Range._Type.ValueType # 1 SEMVER: Range._Type.ValueType # 2 @@ -181,22 +190,22 @@ class Range(google.protobuf.message.Message): SEMVER: Range.Type.ValueType # 2 ECOSYSTEM: Range.Type.ValueType # 3 - TYPE_FIELD_NUMBER: builtins.int - REPO_FIELD_NUMBER: builtins.int - EVENTS_FIELD_NUMBER: builtins.int - DATABASE_SPECIFIC_FIELD_NUMBER: builtins.int - type: global___Range.Type.ValueType + TYPE_FIELD_NUMBER: _builtins.int + REPO_FIELD_NUMBER: _builtins.int + EVENTS_FIELD_NUMBER: _builtins.int + DATABASE_SPECIFIC_FIELD_NUMBER: _builtins.int + type: Global___Range.Type.ValueType """Required. The type of version information.""" - repo: builtins.str + repo: _builtins.str """Required if type is GIT. The publicly accessible URL of the repo that can be directly passed to clone commands. """ - @property - def events(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Event]: + @_builtins.property + def events(self) -> _containers.RepeatedCompositeFieldContainer[Global___Event]: """Required. Version event information.""" - @property - def database_specific(self) -> google.protobuf.struct_pb2.Struct: + @_builtins.property + def database_specific(self) -> _struct_pb2.Struct: """Optional. JSON object holding additional information about the vulnerability as defined by the database for which the record applies. """ @@ -204,81 +213,85 @@ class Range(google.protobuf.message.Message): def __init__( self, *, - type: global___Range.Type.ValueType = ..., - repo: builtins.str = ..., - events: collections.abc.Iterable[global___Event] | None = ..., - database_specific: google.protobuf.struct_pb2.Struct | None = ..., + type: Global___Range.Type.ValueType = ..., + repo: _builtins.str = ..., + events: _abc.Iterable[Global___Event] | None = ..., + database_specific: _struct_pb2.Struct | None = ..., ) -> None: ... - def HasField(self, field_name: typing.Literal["database_specific", b"database_specific"]) -> builtins.bool: ... - def ClearField(self, field_name: typing.Literal["database_specific", b"database_specific", "events", b"events", "repo", b"repo", "type", b"type"]) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["database_specific", b"database_specific"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["database_specific", b"database_specific", "events", b"events", "repo", b"repo", "type", b"type"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -global___Range = Range +Global___Range: _TypeAlias = Range # noqa: Y015 -@typing.final -class Affected(google.protobuf.message.Message): +@_typing.final +class Affected(_message.Message): """Affected versions and commits.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - PACKAGE_FIELD_NUMBER: builtins.int - RANGES_FIELD_NUMBER: builtins.int - VERSIONS_FIELD_NUMBER: builtins.int - ECOSYSTEM_SPECIFIC_FIELD_NUMBER: builtins.int - DATABASE_SPECIFIC_FIELD_NUMBER: builtins.int - SEVERITY_FIELD_NUMBER: builtins.int - @property - def package(self) -> global___Package: + PACKAGE_FIELD_NUMBER: _builtins.int + RANGES_FIELD_NUMBER: _builtins.int + VERSIONS_FIELD_NUMBER: _builtins.int + ECOSYSTEM_SPECIFIC_FIELD_NUMBER: _builtins.int + DATABASE_SPECIFIC_FIELD_NUMBER: _builtins.int + SEVERITY_FIELD_NUMBER: _builtins.int + @_builtins.property + def package(self) -> Global___Package: """Optional. Package information.""" - @property - def ranges(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Range]: + @_builtins.property + def ranges(self) -> _containers.RepeatedCompositeFieldContainer[Global___Range]: """Required. Range information.""" - @property - def versions(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: + @_builtins.property + def versions(self) -> _containers.RepeatedScalarFieldContainer[_builtins.str]: """Optional. List of affected versions.""" - @property - def ecosystem_specific(self) -> google.protobuf.struct_pb2.Struct: + @_builtins.property + def ecosystem_specific(self) -> _struct_pb2.Struct: """Optional. JSON object holding additional information about the vulnerability as defined by the ecosystem for which the record applies. """ - @property - def database_specific(self) -> google.protobuf.struct_pb2.Struct: + @_builtins.property + def database_specific(self) -> _struct_pb2.Struct: """Optional. JSON object holding additional information about the vulnerability as defined by the database for which the record applies. """ - @property - def severity(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Severity]: + @_builtins.property + def severity(self) -> _containers.RepeatedCompositeFieldContainer[Global___Severity]: """Optional. Severity of the vulnerability for this package.""" def __init__( self, *, - package: global___Package | None = ..., - ranges: collections.abc.Iterable[global___Range] | None = ..., - versions: collections.abc.Iterable[builtins.str] | None = ..., - ecosystem_specific: google.protobuf.struct_pb2.Struct | None = ..., - database_specific: google.protobuf.struct_pb2.Struct | None = ..., - severity: collections.abc.Iterable[global___Severity] | None = ..., + package: Global___Package | None = ..., + ranges: _abc.Iterable[Global___Range] | None = ..., + versions: _abc.Iterable[_builtins.str] | None = ..., + ecosystem_specific: _struct_pb2.Struct | None = ..., + database_specific: _struct_pb2.Struct | None = ..., + severity: _abc.Iterable[Global___Severity] | None = ..., ) -> None: ... - def HasField(self, field_name: typing.Literal["database_specific", b"database_specific", "ecosystem_specific", b"ecosystem_specific", "package", b"package"]) -> builtins.bool: ... - def ClearField(self, field_name: typing.Literal["database_specific", b"database_specific", "ecosystem_specific", b"ecosystem_specific", "package", b"package", "ranges", b"ranges", "severity", b"severity", "versions", b"versions"]) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["database_specific", b"database_specific", "ecosystem_specific", b"ecosystem_specific", "package", b"package"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["database_specific", b"database_specific", "ecosystem_specific", b"ecosystem_specific", "package", b"package", "ranges", b"ranges", "severity", b"severity", "versions", b"versions"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -global___Affected = Affected +Global___Affected: _TypeAlias = Affected # noqa: Y015 -@typing.final -class Severity(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor +@_typing.final +class Severity(_message.Message): + DESCRIPTOR: _descriptor.Descriptor class _Type: - ValueType = typing.NewType("ValueType", builtins.int) - V: typing_extensions.TypeAlias = ValueType + ValueType = _typing.NewType("ValueType", _builtins.int) + V: _TypeAlias = ValueType # noqa: Y015 - class _TypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[Severity._Type.ValueType], builtins.type): - DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + class _TypeEnumTypeWrapper(_enum_type_wrapper._EnumTypeWrapper[Severity._Type.ValueType], _builtins.type): + DESCRIPTOR: _descriptor.EnumDescriptor UNSPECIFIED: Severity._Type.ValueType # 0 CVSS_V3: Severity._Type.ValueType # 1 CVSS_V2: Severity._Type.ValueType # 2 @@ -294,32 +307,33 @@ class Severity(google.protobuf.message.Message): CVSS_V4: Severity.Type.ValueType # 3 Ubuntu: Severity.Type.ValueType # 4 - TYPE_FIELD_NUMBER: builtins.int - SCORE_FIELD_NUMBER: builtins.int - type: global___Severity.Type.ValueType + TYPE_FIELD_NUMBER: _builtins.int + SCORE_FIELD_NUMBER: _builtins.int + type: Global___Severity.Type.ValueType """The type of this severity entry.""" - score: builtins.str + score: _builtins.str """The quantitative score.""" def __init__( self, *, - type: global___Severity.Type.ValueType = ..., - score: builtins.str = ..., + type: Global___Severity.Type.ValueType = ..., + score: _builtins.str = ..., ) -> None: ... - def ClearField(self, field_name: typing.Literal["score", b"score", "type", b"type"]) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["score", b"score", "type", b"type"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -global___Severity = Severity +Global___Severity: _TypeAlias = Severity # noqa: Y015 -@typing.final -class Credit(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor +@_typing.final +class Credit(_message.Message): + DESCRIPTOR: _descriptor.Descriptor class _Type: - ValueType = typing.NewType("ValueType", builtins.int) - V: typing_extensions.TypeAlias = ValueType + ValueType = _typing.NewType("ValueType", _builtins.int) + V: _TypeAlias = ValueType # noqa: Y015 - class _TypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[Credit._Type.ValueType], builtins.type): - DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + class _TypeEnumTypeWrapper(_enum_type_wrapper._EnumTypeWrapper[Credit._Type.ValueType], _builtins.type): + DESCRIPTOR: _descriptor.EnumDescriptor UNSPECIFIED: Credit._Type.ValueType # 0 OTHER: Credit._Type.ValueType # 1 FINDER: Credit._Type.ValueType # 2 @@ -345,40 +359,41 @@ class Credit(google.protobuf.message.Message): TOOL: Credit.Type.ValueType # 9 SPONSOR: Credit.Type.ValueType # 10 - NAME_FIELD_NUMBER: builtins.int - CONTACT_FIELD_NUMBER: builtins.int - TYPE_FIELD_NUMBER: builtins.int - name: builtins.str + NAME_FIELD_NUMBER: _builtins.int + CONTACT_FIELD_NUMBER: _builtins.int + TYPE_FIELD_NUMBER: _builtins.int + name: _builtins.str """The name to give credit to.""" - type: global___Credit.Type.ValueType + type: Global___Credit.Type.ValueType """Optional. The type or role of the individual or entity being credited.""" - @property - def contact(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: + @_builtins.property + def contact(self) -> _containers.RepeatedScalarFieldContainer[_builtins.str]: """Contact methods (URLs).""" def __init__( self, *, - name: builtins.str = ..., - contact: collections.abc.Iterable[builtins.str] | None = ..., - type: global___Credit.Type.ValueType = ..., + name: _builtins.str = ..., + contact: _abc.Iterable[_builtins.str] | None = ..., + type: Global___Credit.Type.ValueType = ..., ) -> None: ... - def ClearField(self, field_name: typing.Literal["contact", b"contact", "name", b"name", "type", b"type"]) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["contact", b"contact", "name", b"name", "type", b"type"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -global___Credit = Credit +Global___Credit: _TypeAlias = Credit # noqa: Y015 -@typing.final -class Reference(google.protobuf.message.Message): +@_typing.final +class Reference(_message.Message): """Reference URL.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor class _Type: - ValueType = typing.NewType("ValueType", builtins.int) - V: typing_extensions.TypeAlias = ValueType + ValueType = _typing.NewType("ValueType", _builtins.int) + V: _TypeAlias = ValueType # noqa: Y015 - class _TypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[Reference._Type.ValueType], builtins.type): - DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + class _TypeEnumTypeWrapper(_enum_type_wrapper._EnumTypeWrapper[Reference._Type.ValueType], _builtins.type): + DESCRIPTOR: _descriptor.EnumDescriptor NONE: Reference._Type.ValueType # 0 """Next ID = 12.""" ADVISORY: Reference._Type.ValueType # 2 @@ -408,132 +423,135 @@ class Reference(google.protobuf.message.Message): REPORT: Reference.Type.ValueType # 3 WEB: Reference.Type.ValueType # 1 - TYPE_FIELD_NUMBER: builtins.int - URL_FIELD_NUMBER: builtins.int - type: global___Reference.Type.ValueType + TYPE_FIELD_NUMBER: _builtins.int + URL_FIELD_NUMBER: _builtins.int + type: Global___Reference.Type.ValueType """Required. The type of the reference.""" - url: builtins.str + url: _builtins.str """Required. The URL.""" def __init__( self, *, - type: global___Reference.Type.ValueType = ..., - url: builtins.str = ..., + type: Global___Reference.Type.ValueType = ..., + url: _builtins.str = ..., ) -> None: ... - def ClearField(self, field_name: typing.Literal["type", b"type", "url", b"url"]) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["type", b"type", "url", b"url"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -global___Reference = Reference +Global___Reference: _TypeAlias = Reference # noqa: Y015 -@typing.final -class Vulnerability(google.protobuf.message.Message): +@_typing.final +class Vulnerability(_message.Message): """A vulnerability entry. The protobuf representation is *NOT* stable and only used for implementing the JSON based API. """ - DESCRIPTOR: google.protobuf.descriptor.Descriptor - - SCHEMA_VERSION_FIELD_NUMBER: builtins.int - ID_FIELD_NUMBER: builtins.int - PUBLISHED_FIELD_NUMBER: builtins.int - MODIFIED_FIELD_NUMBER: builtins.int - WITHDRAWN_FIELD_NUMBER: builtins.int - ALIASES_FIELD_NUMBER: builtins.int - RELATED_FIELD_NUMBER: builtins.int - UPSTREAM_FIELD_NUMBER: builtins.int - SUMMARY_FIELD_NUMBER: builtins.int - DETAILS_FIELD_NUMBER: builtins.int - AFFECTED_FIELD_NUMBER: builtins.int - REFERENCES_FIELD_NUMBER: builtins.int - DATABASE_SPECIFIC_FIELD_NUMBER: builtins.int - SEVERITY_FIELD_NUMBER: builtins.int - CREDITS_FIELD_NUMBER: builtins.int - schema_version: builtins.str + DESCRIPTOR: _descriptor.Descriptor + + SCHEMA_VERSION_FIELD_NUMBER: _builtins.int + ID_FIELD_NUMBER: _builtins.int + PUBLISHED_FIELD_NUMBER: _builtins.int + MODIFIED_FIELD_NUMBER: _builtins.int + WITHDRAWN_FIELD_NUMBER: _builtins.int + ALIASES_FIELD_NUMBER: _builtins.int + RELATED_FIELD_NUMBER: _builtins.int + UPSTREAM_FIELD_NUMBER: _builtins.int + SUMMARY_FIELD_NUMBER: _builtins.int + DETAILS_FIELD_NUMBER: _builtins.int + AFFECTED_FIELD_NUMBER: _builtins.int + REFERENCES_FIELD_NUMBER: _builtins.int + DATABASE_SPECIFIC_FIELD_NUMBER: _builtins.int + SEVERITY_FIELD_NUMBER: _builtins.int + CREDITS_FIELD_NUMBER: _builtins.int + schema_version: _builtins.str """The OSV schema version.""" - id: builtins.str + id: _builtins.str """The `id` field is a unique identifier for the vulnerability entry. It is a string of the format `-`, where `DB` names the database and `ENTRYID` is in the format used by the database. For example: “OSV-2020-111”, “CVE-2021-3114”, or “GHSA-vp9c-fpxx-744v”. """ - summary: builtins.str + summary: _builtins.str """Required. One line human readable summary for the vulnerability. It is recommended to keep this under 120 characters. """ - details: builtins.str + details: _builtins.str """Required. Any additional human readable details for the vulnerability.""" - @property - def published(self) -> google.protobuf.timestamp_pb2.Timestamp: + @_builtins.property + def published(self) -> _timestamp_pb2.Timestamp: """The RFC3339 timestamp indicating when this entry was published.""" - @property - def modified(self) -> google.protobuf.timestamp_pb2.Timestamp: + @_builtins.property + def modified(self) -> _timestamp_pb2.Timestamp: """The RFC3339 timestamp indicating when this entry was last modified.""" - @property - def withdrawn(self) -> google.protobuf.timestamp_pb2.Timestamp: + @_builtins.property + def withdrawn(self) -> _timestamp_pb2.Timestamp: """Optional. The RFC3339 timestamp indicating when this entry is considered to be withdrawn. """ - @property - def aliases(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: + @_builtins.property + def aliases(self) -> _containers.RepeatedScalarFieldContainer[_builtins.str]: """Optional. IDs for the same vulnerability in other databases.""" - @property - def related(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: + @_builtins.property + def related(self) -> _containers.RepeatedScalarFieldContainer[_builtins.str]: """Optional. List of IDs of closely related vulnerabilities, such as the same problem in alternate ecosystems. """ - @property - def upstream(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: + @_builtins.property + def upstream(self) -> _containers.RepeatedScalarFieldContainer[_builtins.str]: """Optional. List of IDs of upstream vulnerabilities of a vulnerability.""" - @property - def affected(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Affected]: + @_builtins.property + def affected(self) -> _containers.RepeatedCompositeFieldContainer[Global___Affected]: """Required. Affected commit ranges and versions.""" - @property - def references(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Reference]: + @_builtins.property + def references(self) -> _containers.RepeatedCompositeFieldContainer[Global___Reference]: """Optional. URLs to more information/advisories (including the scheme e.g. "https://"). """ - @property - def database_specific(self) -> google.protobuf.struct_pb2.Struct: + @_builtins.property + def database_specific(self) -> _struct_pb2.Struct: """Optional. JSON object holding additional information about the vulnerability as defined by the database for which the record applies. """ - @property - def severity(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Severity]: + @_builtins.property + def severity(self) -> _containers.RepeatedCompositeFieldContainer[Global___Severity]: """Optional. Severity of the vulnerability.""" - @property - def credits(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Credit]: + @_builtins.property + def credits(self) -> _containers.RepeatedCompositeFieldContainer[Global___Credit]: """Optional. Credits for the vulnerability.""" def __init__( self, *, - schema_version: builtins.str = ..., - id: builtins.str = ..., - published: google.protobuf.timestamp_pb2.Timestamp | None = ..., - modified: google.protobuf.timestamp_pb2.Timestamp | None = ..., - withdrawn: google.protobuf.timestamp_pb2.Timestamp | None = ..., - aliases: collections.abc.Iterable[builtins.str] | None = ..., - related: collections.abc.Iterable[builtins.str] | None = ..., - upstream: collections.abc.Iterable[builtins.str] | None = ..., - summary: builtins.str = ..., - details: builtins.str = ..., - affected: collections.abc.Iterable[global___Affected] | None = ..., - references: collections.abc.Iterable[global___Reference] | None = ..., - database_specific: google.protobuf.struct_pb2.Struct | None = ..., - severity: collections.abc.Iterable[global___Severity] | None = ..., - credits: collections.abc.Iterable[global___Credit] | None = ..., + schema_version: _builtins.str = ..., + id: _builtins.str = ..., + published: _timestamp_pb2.Timestamp | None = ..., + modified: _timestamp_pb2.Timestamp | None = ..., + withdrawn: _timestamp_pb2.Timestamp | None = ..., + aliases: _abc.Iterable[_builtins.str] | None = ..., + related: _abc.Iterable[_builtins.str] | None = ..., + upstream: _abc.Iterable[_builtins.str] | None = ..., + summary: _builtins.str = ..., + details: _builtins.str = ..., + affected: _abc.Iterable[Global___Affected] | None = ..., + references: _abc.Iterable[Global___Reference] | None = ..., + database_specific: _struct_pb2.Struct | None = ..., + severity: _abc.Iterable[Global___Severity] | None = ..., + credits: _abc.Iterable[Global___Credit] | None = ..., ) -> None: ... - def HasField(self, field_name: typing.Literal["database_specific", b"database_specific", "modified", b"modified", "published", b"published", "withdrawn", b"withdrawn"]) -> builtins.bool: ... - def ClearField(self, field_name: typing.Literal["affected", b"affected", "aliases", b"aliases", "credits", b"credits", "database_specific", b"database_specific", "details", b"details", "id", b"id", "modified", b"modified", "published", b"published", "references", b"references", "related", b"related", "schema_version", b"schema_version", "severity", b"severity", "summary", b"summary", "upstream", b"upstream", "withdrawn", b"withdrawn"]) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["database_specific", b"database_specific", "modified", b"modified", "published", b"published", "withdrawn", b"withdrawn"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["affected", b"affected", "aliases", b"aliases", "credits", b"credits", "database_specific", b"database_specific", "details", b"details", "id", b"id", "modified", b"modified", "published", b"published", "references", b"references", "related", b"related", "schema_version", b"schema_version", "severity", b"severity", "summary", b"summary", "upstream", b"upstream", "withdrawn", b"withdrawn"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... -global___Vulnerability = Vulnerability +Global___Vulnerability: _TypeAlias = Vulnerability # noqa: Y015