Module pachyderm_sdk.api.version

Expand source code
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# sources: api/version/version.proto
# plugin: python-betterproto
# This file has been @generated
from dataclasses import dataclass
from typing import (
    TYPE_CHECKING,
    Dict,
    Optional,
)

import betterproto
import betterproto.lib.google.protobuf as betterproto_lib_google_protobuf
import grpc


if TYPE_CHECKING:
    import grpc


@dataclass(eq=False, repr=False)
class Version(betterproto.Message):
    major: int = betterproto.uint32_field(1)
    minor: int = betterproto.uint32_field(2)
    micro: int = betterproto.uint32_field(3)
    additional: str = betterproto.string_field(4)
    git_commit: str = betterproto.string_field(5)
    git_tree_modified: str = betterproto.string_field(6)
    build_date: str = betterproto.string_field(7)
    go_version: str = betterproto.string_field(8)
    platform: str = betterproto.string_field(9)


class ApiStub:

    def __init__(self, channel: "grpc.Channel"):
        self.__rpc_get_version = channel.unary_unary(
            "/versionpb_v2.API/GetVersion",
            request_serializer=betterproto_lib_google_protobuf.Empty.SerializeToString,
            response_deserializer=Version.FromString,
        )

    def get_version(self) -> "Version":

        request = betterproto_lib_google_protobuf.Empty()

        return self.__rpc_get_version(request)

Classes

class Version (major: int = None, minor: int = None, micro: int = None, additional: str = None, git_commit: str = None, git_tree_modified: str = None, build_date: str = None, go_version: str = None, platform: str = None)

Version(major: int = None, minor: int = None, micro: int = None, additional: str = None, git_commit: str = None, git_tree_modified: str = None, build_date: str = None, go_version: str = None, platform: str = None)

Expand source code
@dataclass(eq=False, repr=False)
class Version(betterproto.Message):
    major: int = betterproto.uint32_field(1)
    minor: int = betterproto.uint32_field(2)
    micro: int = betterproto.uint32_field(3)
    additional: str = betterproto.string_field(4)
    git_commit: str = betterproto.string_field(5)
    git_tree_modified: str = betterproto.string_field(6)
    build_date: str = betterproto.string_field(7)
    go_version: str = betterproto.string_field(8)
    platform: str = betterproto.string_field(9)

Ancestors

  • betterproto.Message
  • abc.ABC

Class variables

var major : int
var minor : int
var micro : int
var additional : str
var git_commit : str
var git_tree_modified : str
var build_date : str
var go_version : str
var platform : str
class ApiStub (channel: grpc.Channel)
Expand source code
class ApiStub:

    def __init__(self, channel: "grpc.Channel"):
        self.__rpc_get_version = channel.unary_unary(
            "/versionpb_v2.API/GetVersion",
            request_serializer=betterproto_lib_google_protobuf.Empty.SerializeToString,
            response_deserializer=Version.FromString,
        )

    def get_version(self) -> "Version":

        request = betterproto_lib_google_protobuf.Empty()

        return self.__rpc_get_version(request)

Methods

def get_version(self) ‑> Version
Expand source code
def get_version(self) -> "Version":

    request = betterproto_lib_google_protobuf.Empty()

    return self.__rpc_get_version(request)