diff --git a/grafeas/grafeas_v1/services/grafeas/client.py b/grafeas/grafeas_v1/services/grafeas/client.py index e5aa132..3af66fb 100644 --- a/grafeas/grafeas_v1/services/grafeas/client.py +++ b/grafeas/grafeas_v1/services/grafeas/client.py @@ -1867,7 +1867,7 @@ def sample_list_note_occurrences(): # Done; return the response. return response - def __enter__(self): + def __enter__(self) -> "GrafeasClient": return self def __exit__(self, type, value, traceback): diff --git a/grafeas/grafeas_v1/types/common.py b/grafeas/grafeas_v1/types/common.py index 1f9cc2d..e82ef1a 100644 --- a/grafeas/grafeas_v1/types/common.py +++ b/grafeas/grafeas_v1/types/common.py @@ -34,7 +34,38 @@ class NoteKind(proto.Enum): - r"""Kind represents the kinds of notes supported.""" + r"""Kind represents the kinds of notes supported. + + Values: + NOTE_KIND_UNSPECIFIED (0): + Default value. This value is unused. + VULNERABILITY (1): + The note and occurrence represent a package + vulnerability. + BUILD (2): + The note and occurrence assert build + provenance. + IMAGE (3): + This represents an image basis relationship. + PACKAGE (4): + This represents a package installed via a + package manager. + DEPLOYMENT (5): + The note and occurrence track deployment + events. + DISCOVERY (6): + The note and occurrence track the initial + discovery status of a resource. + ATTESTATION (7): + This represents a logical "role" that can + attest to artifacts. + UPGRADE (8): + This represents an available package upgrade. + COMPLIANCE (9): + This represents a Compliance Note + DSSE_ATTESTATION (10): + This represents a DSSE attestation Note + """ NOTE_KIND_UNSPECIFIED = 0 VULNERABILITY = 1 BUILD = 2 diff --git a/grafeas/grafeas_v1/types/cvss.py b/grafeas/grafeas_v1/types/cvss.py index 0502da4..72c42f6 100644 --- a/grafeas/grafeas_v1/types/cvss.py +++ b/grafeas/grafeas_v1/types/cvss.py @@ -29,7 +29,16 @@ class CVSSVersion(proto.Enum): - r"""CVSS Version.""" + r"""CVSS Version. + + Values: + CVSS_VERSION_UNSPECIFIED (0): + + CVSS_VERSION_2 (1): + + CVSS_VERSION_3 (2): + + """ CVSS_VERSION_UNSPECIFIED = 0 CVSS_VERSION_2 = 1 CVSS_VERSION_3 = 2 @@ -70,7 +79,20 @@ class CVSSv3(proto.Message): """ class AttackVector(proto.Enum): - r"""""" + r""" + + Values: + ATTACK_VECTOR_UNSPECIFIED (0): + + ATTACK_VECTOR_NETWORK (1): + + ATTACK_VECTOR_ADJACENT (2): + + ATTACK_VECTOR_LOCAL (3): + + ATTACK_VECTOR_PHYSICAL (4): + + """ ATTACK_VECTOR_UNSPECIFIED = 0 ATTACK_VECTOR_NETWORK = 1 ATTACK_VECTOR_ADJACENT = 2 @@ -78,32 +100,81 @@ class AttackVector(proto.Enum): ATTACK_VECTOR_PHYSICAL = 4 class AttackComplexity(proto.Enum): - r"""""" + r""" + + Values: + ATTACK_COMPLEXITY_UNSPECIFIED (0): + + ATTACK_COMPLEXITY_LOW (1): + + ATTACK_COMPLEXITY_HIGH (2): + + """ ATTACK_COMPLEXITY_UNSPECIFIED = 0 ATTACK_COMPLEXITY_LOW = 1 ATTACK_COMPLEXITY_HIGH = 2 class PrivilegesRequired(proto.Enum): - r"""""" + r""" + + Values: + PRIVILEGES_REQUIRED_UNSPECIFIED (0): + + PRIVILEGES_REQUIRED_NONE (1): + + PRIVILEGES_REQUIRED_LOW (2): + + PRIVILEGES_REQUIRED_HIGH (3): + + """ PRIVILEGES_REQUIRED_UNSPECIFIED = 0 PRIVILEGES_REQUIRED_NONE = 1 PRIVILEGES_REQUIRED_LOW = 2 PRIVILEGES_REQUIRED_HIGH = 3 class UserInteraction(proto.Enum): - r"""""" + r""" + + Values: + USER_INTERACTION_UNSPECIFIED (0): + + USER_INTERACTION_NONE (1): + + USER_INTERACTION_REQUIRED (2): + + """ USER_INTERACTION_UNSPECIFIED = 0 USER_INTERACTION_NONE = 1 USER_INTERACTION_REQUIRED = 2 class Scope(proto.Enum): - r"""""" + r""" + + Values: + SCOPE_UNSPECIFIED (0): + + SCOPE_UNCHANGED (1): + + SCOPE_CHANGED (2): + + """ SCOPE_UNSPECIFIED = 0 SCOPE_UNCHANGED = 1 SCOPE_CHANGED = 2 class Impact(proto.Enum): - r"""""" + r""" + + Values: + IMPACT_UNSPECIFIED (0): + + IMPACT_HIGH (1): + + IMPACT_LOW (2): + + IMPACT_NONE (3): + + """ IMPACT_UNSPECIFIED = 0 IMPACT_HIGH = 1 IMPACT_LOW = 2 @@ -203,7 +274,20 @@ class CVSS(proto.Message): """ class AttackVector(proto.Enum): - r"""""" + r""" + + Values: + ATTACK_VECTOR_UNSPECIFIED (0): + + ATTACK_VECTOR_NETWORK (1): + + ATTACK_VECTOR_ADJACENT (2): + + ATTACK_VECTOR_LOCAL (3): + + ATTACK_VECTOR_PHYSICAL (4): + + """ ATTACK_VECTOR_UNSPECIFIED = 0 ATTACK_VECTOR_NETWORK = 1 ATTACK_VECTOR_ADJACENT = 2 @@ -211,39 +295,99 @@ class AttackVector(proto.Enum): ATTACK_VECTOR_PHYSICAL = 4 class AttackComplexity(proto.Enum): - r"""""" + r""" + + Values: + ATTACK_COMPLEXITY_UNSPECIFIED (0): + + ATTACK_COMPLEXITY_LOW (1): + + ATTACK_COMPLEXITY_HIGH (2): + + """ ATTACK_COMPLEXITY_UNSPECIFIED = 0 ATTACK_COMPLEXITY_LOW = 1 ATTACK_COMPLEXITY_HIGH = 2 class Authentication(proto.Enum): - r"""""" + r""" + + Values: + AUTHENTICATION_UNSPECIFIED (0): + + AUTHENTICATION_MULTIPLE (1): + + AUTHENTICATION_SINGLE (2): + + AUTHENTICATION_NONE (3): + + """ AUTHENTICATION_UNSPECIFIED = 0 AUTHENTICATION_MULTIPLE = 1 AUTHENTICATION_SINGLE = 2 AUTHENTICATION_NONE = 3 class PrivilegesRequired(proto.Enum): - r"""""" + r""" + + Values: + PRIVILEGES_REQUIRED_UNSPECIFIED (0): + + PRIVILEGES_REQUIRED_NONE (1): + + PRIVILEGES_REQUIRED_LOW (2): + + PRIVILEGES_REQUIRED_HIGH (3): + + """ PRIVILEGES_REQUIRED_UNSPECIFIED = 0 PRIVILEGES_REQUIRED_NONE = 1 PRIVILEGES_REQUIRED_LOW = 2 PRIVILEGES_REQUIRED_HIGH = 3 class UserInteraction(proto.Enum): - r"""""" + r""" + + Values: + USER_INTERACTION_UNSPECIFIED (0): + + USER_INTERACTION_NONE (1): + + USER_INTERACTION_REQUIRED (2): + + """ USER_INTERACTION_UNSPECIFIED = 0 USER_INTERACTION_NONE = 1 USER_INTERACTION_REQUIRED = 2 class Scope(proto.Enum): - r"""""" + r""" + + Values: + SCOPE_UNSPECIFIED (0): + + SCOPE_UNCHANGED (1): + + SCOPE_CHANGED (2): + + """ SCOPE_UNSPECIFIED = 0 SCOPE_UNCHANGED = 1 SCOPE_CHANGED = 2 class Impact(proto.Enum): - r"""""" + r""" + + Values: + IMPACT_UNSPECIFIED (0): + + IMPACT_HIGH (1): + + IMPACT_LOW (2): + + IMPACT_NONE (3): + + """ IMPACT_UNSPECIFIED = 0 IMPACT_HIGH = 1 IMPACT_LOW = 2 diff --git a/grafeas/grafeas_v1/types/deployment.py b/grafeas/grafeas_v1/types/deployment.py index c493fe2..9f21792 100644 --- a/grafeas/grafeas_v1/types/deployment.py +++ b/grafeas/grafeas_v1/types/deployment.py @@ -71,7 +71,18 @@ class DeploymentOccurrence(proto.Message): """ class Platform(proto.Enum): - r"""Types of platforms.""" + r"""Types of platforms. + + Values: + PLATFORM_UNSPECIFIED (0): + Unknown. + GKE (1): + Google Container Engine. + FLEX (2): + Google App Engine: Flexible Environment. + CUSTOM (3): + Custom user-defined platform. + """ PLATFORM_UNSPECIFIED = 0 GKE = 1 FLEX = 2 diff --git a/grafeas/grafeas_v1/types/discovery.py b/grafeas/grafeas_v1/types/discovery.py index 16113f1..ff2642f 100644 --- a/grafeas/grafeas_v1/types/discovery.py +++ b/grafeas/grafeas_v1/types/discovery.py @@ -80,7 +80,17 @@ class DiscoveryOccurrence(proto.Message): """ class ContinuousAnalysis(proto.Enum): - r"""Whether the resource is continuously analyzed.""" + r"""Whether the resource is continuously analyzed. + + Values: + CONTINUOUS_ANALYSIS_UNSPECIFIED (0): + Unknown. + ACTIVE (1): + The resource is continuously analyzed. + INACTIVE (2): + The resource is ignored for continuous + analysis. + """ CONTINUOUS_ANALYSIS_UNSPECIFIED = 0 ACTIVE = 1 INACTIVE = 2 @@ -88,6 +98,24 @@ class ContinuousAnalysis(proto.Enum): class AnalysisStatus(proto.Enum): r"""Analysis status for a resource. Currently for initial analysis only (not updated in continuous analysis). + + Values: + ANALYSIS_STATUS_UNSPECIFIED (0): + Unknown. + PENDING (1): + Resource is known but no action has been + taken yet. + SCANNING (2): + Resource is being analyzed. + FINISHED_SUCCESS (3): + Analysis has finished successfully. + COMPLETE (3): + Analysis has completed. + FINISHED_FAILED (4): + Analysis has finished unsuccessfully, the + analysis itself is in a bad state. + FINISHED_UNSUPPORTED (5): + The resource is known not to be supported. """ _pb_options = {"allow_alias": True} ANALYSIS_STATUS_UNSPECIFIED = 0 diff --git a/grafeas/grafeas_v1/types/package.py b/grafeas/grafeas_v1/types/package.py index c7698ee..0ccced0 100644 --- a/grafeas/grafeas_v1/types/package.py +++ b/grafeas/grafeas_v1/types/package.py @@ -36,6 +36,14 @@ class Architecture(proto.Enum): r"""Instruction set architectures supported by various package managers. + + Values: + ARCHITECTURE_UNSPECIFIED (0): + Unknown architecture. + X86 (1): + X86 architecture. + X64 (2): + X64 architecture. """ ARCHITECTURE_UNSPECIFIED = 0 X86 = 1 @@ -321,6 +329,18 @@ class Version(proto.Message): class VersionKind(proto.Enum): r"""Whether this is an ordinary package version or a sentinel MIN/MAX version. + + Values: + VERSION_KIND_UNSPECIFIED (0): + Unknown. + NORMAL (1): + A standard package version. + MINIMUM (2): + A special version representing negative + infinity. + MAXIMUM (3): + A special version representing positive + infinity. """ VERSION_KIND_UNSPECIFIED = 0 NORMAL = 1 diff --git a/grafeas/grafeas_v1/types/provenance.py b/grafeas/grafeas_v1/types/provenance.py index ecdf576..c5f0b5d 100644 --- a/grafeas/grafeas_v1/types/provenance.py +++ b/grafeas/grafeas_v1/types/provenance.py @@ -392,7 +392,20 @@ class AliasContext(proto.Message): """ class Kind(proto.Enum): - r"""The type of an alias.""" + r"""The type of an alias. + + Values: + KIND_UNSPECIFIED (0): + Unknown. + FIXED (1): + Git tag. + MOVABLE (2): + Git branch. + OTHER (4): + Used to specify non-standard aliases. For + example, if a Git repo has a ref named + "refs/foo/bar". + """ KIND_UNSPECIFIED = 0 FIXED = 1 MOVABLE = 2 diff --git a/grafeas/grafeas_v1/types/severity.py b/grafeas/grafeas_v1/types/severity.py index 8234c5c..f03317a 100644 --- a/grafeas/grafeas_v1/types/severity.py +++ b/grafeas/grafeas_v1/types/severity.py @@ -27,7 +27,22 @@ class Severity(proto.Enum): - r"""Note provider assigned severity/impact ranking.""" + r"""Note provider assigned severity/impact ranking. + + Values: + SEVERITY_UNSPECIFIED (0): + Unknown. + MINIMAL (1): + Minimal severity. + LOW (2): + Low severity. + MEDIUM (3): + Medium severity. + HIGH (4): + High severity. + CRITICAL (5): + Critical severity. + """ SEVERITY_UNSPECIFIED = 0 MINIMAL = 1 LOW = 2 diff --git a/samples/generated_samples/snippet_metadata_grafeas.v1.json b/samples/generated_samples/snippet_metadata_grafeas.v1.json index 900e7b4..dc3e1cc 100644 --- a/samples/generated_samples/snippet_metadata_grafeas.v1.json +++ b/samples/generated_samples/snippet_metadata_grafeas.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "grafeas", - "version": "1.8.0" + "version": "0.1.0" }, "snippets": [ {