Skip to content

Commit

Permalink
update/arista,fmp: Migrate stubs to mypy-protobuf v3.6.0
Browse files Browse the repository at this point in the history
Change-Id: Ifd0912da680077c4e5e8e8666718854f6b7ffd02
  • Loading branch information
oumichae1 committed Dec 20, 2024
1 parent 205bb00 commit af789ea
Show file tree
Hide file tree
Showing 44 changed files with 14,389 additions and 10,335 deletions.
2,057 changes: 1,145 additions & 912 deletions arista/alert/v1/alert_pb2.pyi

Large diffs are not rendered by default.

732 changes: 439 additions & 293 deletions arista/alert/v1/services/gen_pb2.pyi

Large diffs are not rendered by default.

104 changes: 53 additions & 51 deletions arista/bugexposure/v1/bugexposure_pb2.pyi
Original file line number Diff line number Diff line change
@@ -1,29 +1,37 @@
"""
@generated by mypy-protobuf. Do not edit manually!
isort:skip_file
Copyright (c) 2023 Arista Networks, Inc. All rights reserved.
Use of this source code is governed by the Apache License 2.0
that can be found in the COPYING file.
"""

import builtins
import fmp.wrappers_pb2
import google.protobuf.descriptor
import google.protobuf.internal.enum_type_wrapper
import google.protobuf.message
import google.protobuf.wrappers_pb2
import sys
import typing
import typing_extensions

if sys.version_info >= (3, 10):
import typing as typing_extensions
else:
import typing_extensions

DESCRIPTOR: google.protobuf.descriptor.FileDescriptor

class _Acknowledgement:
ValueType = typing.NewType('ValueType', builtins.int)
ValueType = typing.NewType("ValueType", builtins.int)
V: typing_extensions.TypeAlias = ValueType

class _AcknowledgementEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_Acknowledgement.ValueType], builtins.type):
DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
ACKNOWLEDGEMENT_UNSPECIFIED: _Acknowledgement.ValueType # 0
"""Unacknowledged and acknowledged bugs will be computed"""

ACKNOWLEDGEMENT_UNACKNOWLEDGED: _Acknowledgement.ValueType # 1
"""Only unacknowledged bugs will be computed"""

ACKNOWLEDGEMENT_ACKNOWLEDGED: _Acknowledgement.ValueType # 2
"""Only acknowledged bugs will be computed"""

Expand All @@ -33,37 +41,30 @@ class Acknowledgement(_Acknowledgement, metaclass=_AcknowledgementEnumTypeWrappe
the acknowledgement state for the
computed bugs
"""
pass

ACKNOWLEDGEMENT_UNSPECIFIED: Acknowledgement.ValueType # 0
"""Unacknowledged and acknowledged bugs will be computed"""

ACKNOWLEDGEMENT_UNACKNOWLEDGED: Acknowledgement.ValueType # 1
"""Only unacknowledged bugs will be computed"""

ACKNOWLEDGEMENT_ACKNOWLEDGED: Acknowledgement.ValueType # 2
"""Only acknowledged bugs will be computed"""

global___Acknowledgement = Acknowledgement


class _HighestExposure:
ValueType = typing.NewType('ValueType', builtins.int)
ValueType = typing.NewType("ValueType", builtins.int)
V: typing_extensions.TypeAlias = ValueType

class _HighestExposureEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_HighestExposure.ValueType], builtins.type):
DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
HIGHEST_EXPOSURE_UNSPECIFIED: _HighestExposure.ValueType # 0
"""If not given this will be the default value
and it will compute devices with
any highest exposure
"""

HIGHEST_EXPOSURE_NONE: _HighestExposure.ValueType # 1
"""Not exposed to bugs"""

HIGHEST_EXPOSURE_LOW: _HighestExposure.ValueType # 2
"""Highest exposure is to a low priority bug"""

HIGHEST_EXPOSURE_HIGH: _HighestExposure.ValueType # 3
"""Highest exposure is to a high priority bug"""

Expand All @@ -72,113 +73,114 @@ class HighestExposure(_HighestExposure, metaclass=_HighestExposureEnumTypeWrappe
that defines the options for
highest exposure
"""
pass

HIGHEST_EXPOSURE_UNSPECIFIED: HighestExposure.ValueType # 0
"""If not given this will be the default value
and it will compute devices with
any highest exposure
"""

HIGHEST_EXPOSURE_NONE: HighestExposure.ValueType # 1
"""Not exposed to bugs"""

HIGHEST_EXPOSURE_LOW: HighestExposure.ValueType # 2
"""Highest exposure is to a low priority bug"""

HIGHEST_EXPOSURE_HIGH: HighestExposure.ValueType # 3
"""Highest exposure is to a high priority bug"""

global___HighestExposure = HighestExposure


@typing.final
class BugExposureKey(google.protobuf.message.Message):
"""BugExposureKey is the key type for
BugExposure model
"""

DESCRIPTOR: google.protobuf.descriptor.Descriptor

DEVICE_ID_FIELD_NUMBER: builtins.int
ACKNOWLEDGEMENT_FIELD_NUMBER: builtins.int
@property
def device_id(self) -> google.protobuf.wrappers_pb2.StringValue:
"""device_id is the device ID"""
pass
acknowledgement: global___Acknowledgement.ValueType
"""acknowledgement is one of the options for
Acknowledgement enum
"""
@property
def device_id(self) -> google.protobuf.wrappers_pb2.StringValue:
"""device_id is the device ID"""

def __init__(self,
def __init__(
self,
*,
device_id: typing.Optional[google.protobuf.wrappers_pb2.StringValue] = ...,
device_id: google.protobuf.wrappers_pb2.StringValue | None = ...,
acknowledgement: global___Acknowledgement.ValueType = ...,
) -> None: ...
def HasField(self, field_name: typing_extensions.Literal["device_id",b"device_id"]) -> builtins.bool: ...
def ClearField(self, field_name: typing_extensions.Literal["acknowledgement",b"acknowledgement","device_id",b"device_id"]) -> None: ...
) -> None: ...
def HasField(self, field_name: typing.Literal["device_id", b"device_id"]) -> builtins.bool: ...
def ClearField(self, field_name: typing.Literal["acknowledgement", b"acknowledgement", "device_id", b"device_id"]) -> None: ...

global___BugExposureKey = BugExposureKey

@typing.final
class BugExposure(google.protobuf.message.Message):
"""BugExposure is the state model that represents
the exposure a device has to bugs
"""

DESCRIPTOR: google.protobuf.descriptor.Descriptor

KEY_FIELD_NUMBER: builtins.int
BUG_IDS_FIELD_NUMBER: builtins.int
CVE_IDS_FIELD_NUMBER: builtins.int
BUG_COUNT_FIELD_NUMBER: builtins.int
CVE_COUNT_FIELD_NUMBER: builtins.int
HIGHEST_BUG_EXPOSURE_FIELD_NUMBER: builtins.int
HIGHEST_CVE_EXPOSURE_FIELD_NUMBER: builtins.int
highest_bug_exposure: global___HighestExposure.ValueType
"""highest_bug_exposure is the highest exposure
with type Bug
"""
highest_cve_exposure: global___HighestExposure.ValueType
"""highest_cve_exposure is the highest exposure
with type CVE
"""
@property
def key(self) -> global___BugExposureKey:
"""BugExposureKey is the key of
BugExposure
"""
pass

@property
def bug_ids(self) -> fmp.wrappers_pb2.RepeatedInt32:
"""bug_ids is a list of bug alerts affecting the device
with type Bug
"""
pass

@property
def cve_ids(self) -> fmp.wrappers_pb2.RepeatedInt32:
"""cve_ids is a list of bug alerts affecting the device
with type CVE
"""
pass

@property
def bug_count(self) -> google.protobuf.wrappers_pb2.Int32Value:
"""bug_count is the number of bug alerts
with type Bug
"""
pass

@property
def cve_count(self) -> google.protobuf.wrappers_pb2.Int32Value:
"""cve_count is the number of bug alerts
with type CVE
"""
pass
highest_bug_exposure: global___HighestExposure.ValueType
"""highest_bug_exposure is the highest exposure
with type Bug
"""

highest_cve_exposure: global___HighestExposure.ValueType
"""highest_cve_exposure is the highest exposure
with type CVE
"""

def __init__(self,
def __init__(
self,
*,
key: typing.Optional[global___BugExposureKey] = ...,
bug_ids: typing.Optional[fmp.wrappers_pb2.RepeatedInt32] = ...,
cve_ids: typing.Optional[fmp.wrappers_pb2.RepeatedInt32] = ...,
bug_count: typing.Optional[google.protobuf.wrappers_pb2.Int32Value] = ...,
cve_count: typing.Optional[google.protobuf.wrappers_pb2.Int32Value] = ...,
key: global___BugExposureKey | None = ...,
bug_ids: fmp.wrappers_pb2.RepeatedInt32 | None = ...,
cve_ids: fmp.wrappers_pb2.RepeatedInt32 | None = ...,
bug_count: google.protobuf.wrappers_pb2.Int32Value | None = ...,
cve_count: google.protobuf.wrappers_pb2.Int32Value | None = ...,
highest_bug_exposure: global___HighestExposure.ValueType = ...,
highest_cve_exposure: global___HighestExposure.ValueType = ...,
) -> None: ...
def HasField(self, field_name: typing_extensions.Literal["bug_count",b"bug_count","bug_ids",b"bug_ids","cve_count",b"cve_count","cve_ids",b"cve_ids","key",b"key"]) -> builtins.bool: ...
def ClearField(self, field_name: typing_extensions.Literal["bug_count",b"bug_count","bug_ids",b"bug_ids","cve_count",b"cve_count","cve_ids",b"cve_ids","highest_bug_exposure",b"highest_bug_exposure","highest_cve_exposure",b"highest_cve_exposure","key",b"key"]) -> None: ...
) -> None: ...
def HasField(self, field_name: typing.Literal["bug_count", b"bug_count", "bug_ids", b"bug_ids", "cve_count", b"cve_count", "cve_ids", b"cve_ids", "key", b"key"]) -> builtins.bool: ...
def ClearField(self, field_name: typing.Literal["bug_count", b"bug_count", "bug_ids", b"bug_ids", "cve_count", b"cve_count", "cve_ids", b"cve_ids", "highest_bug_exposure", b"highest_bug_exposure", "highest_cve_exposure", b"highest_cve_exposure", "key", b"key"]) -> None: ...

global___BugExposure = BugExposure
Loading

0 comments on commit af789ea

Please sign in to comment.