<filename>python/onos/pci/__init__.py<gh_stars>0
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# sources: onos/pci/pci.proto
# plugin: python-betterproto
from dataclasses import dataclass
from typing import Dict

import betterproto
import grpclib


@dataclass(eq=False, repr=False)
class GetRequest(betterproto.Message):
    id: str = betterproto.string_field(1)

    def __post_init__(self) -> None:
        super().__post_init__()


@dataclass(eq=False, repr=False)
class GetResponse(betterproto.Message):
    object: "Object" = betterproto.message_field(1)

    def __post_init__(self) -> None:
        super().__post_init__()


@dataclass(eq=False, repr=False)
class Object(betterproto.Message):
    id: str = betterproto.string_field(1)
    revision: int = betterproto.uint64_field(2)
    attributes: Dict[str, str] = betterproto.map_field(
        3, betterproto.TYPE_STRING, betterproto.TYPE_STRING
    )

    def __post_init__(self) -> None:
        super().__post_init__()


class PciStub(betterproto.ServiceStub):
    async def get_num_conflicts(self, *, id: str = "") -> "GetResponse":

        request = GetRequest()
        request.id = id

        return await self._unary_unary(
            "/onos.pci.Pci/GetNumConflicts", request, GetResponse
        )

    async def get_num_conflicts_all(self, *, id: str = "") -> "GetResponse":

        request = GetRequest()
        request.id = id

        return await self._unary_unary(
            "/onos.pci.Pci/GetNumConflictsAll", request, GetResponse
        )

    async def get_neighbors(self, *, id: str = "") -> "GetResponse":

        request = GetRequest()
        request.id = id

        return await self._unary_unary(
            "/onos.pci.Pci/GetNeighbors", request, GetResponse
        )

    async def get_neighbors_all(self, *, id: str = "") -> "GetResponse":

        request = GetRequest()
        request.id = id

        return await self._unary_unary(
            "/onos.pci.Pci/GetNeighborsAll", request, GetResponse
        )

    async def get_metric(self, *, id: str = "") -> "GetResponse":

        request = GetRequest()
        request.id = id

        return await self._unary_unary("/onos.pci.Pci/GetMetric", request, GetResponse)

    async def get_metric_all(self, *, id: str = "") -> "GetResponse":

        request = GetRequest()
        request.id = id

        return await self._unary_unary(
            "/onos.pci.Pci/GetMetricAll", request, GetResponse
        )

    async def get_pci(self, *, id: str = "") -> "GetResponse":

        request = GetRequest()
        request.id = id

        return await self._unary_unary("/onos.pci.Pci/GetPci", request, GetResponse)

    async def get_pci_all(self, *, id: str = "") -> "GetResponse":

        request = GetRequest()
        request.id = id

        return await self._unary_unary("/onos.pci.Pci/GetPciAll", request, GetResponse)

<filename>python/onos/pci/__init__.py<gh_stars>0
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# sources: onos/pci/pci.proto
# plugin: python-betterproto
from dataclasses import dataclass
from typing import Dict

import betterproto
import grpclib


@dataclass(eq=False, repr=False)
class GetRequest(betterproto.Message):
    id: str = betterproto.string_field(1)

    def __post_init__(self) -> None:
        super().__post_init__()


@dataclass(eq=False, repr=False)
class GetResponse(betterproto.Message):
    object: "Object" = betterproto.message_field(1)

    def __post_init__(self) -> None:
        super().__post_init__()


@dataclass(eq=False, repr=False)
class Object(betterproto.Message):
    id: str = betterproto.string_field(1)
    revision: int = betterproto.uint64_field(2)
    attributes: Dict[str, str] = betterproto.map_field(
        3, betterproto.TYPE_STRING, betterproto.TYPE_STRING
    )

    def __post_init__(self) -> None:
        super().__post_init__()


class PciStub(betterproto.ServiceStub):
    async def get_num_conflicts(self, *, id: str = "") -> "GetResponse":

        request = GetRequest()
        request.id = id

        return await self._unary_unary(
            "/onos.pci.Pci/GetNumConflicts", request, GetResponse
        )

    async def get_num_conflicts_all(self, *, id: str = "") -> "GetResponse":

        request = GetRequest()
        request.id = id

        return await self._unary_unary(
            "/onos.pci.Pci/GetNumConflictsAll", request, GetResponse
        )

    async def get_neighbors(self, *, id: str = "") -> "GetResponse":

        request = GetRequest()
        request.id = id

        return await self._unary_unary(
            "/onos.pci.Pci/GetNeighbors", request, GetResponse
        )

    async def get_neighbors_all(self, *, id: str = "") -> "GetResponse":

        request = GetRequest()
        request.id = id

        return await self._unary_unary(
            "/onos.pci.Pci/GetNeighborsAll", request, GetResponse
        )

    async def get_metric(self, *, id: str = "") -> "GetResponse":

        request = GetRequest()
        request.id = id

        return await self._unary_unary("/onos.pci.Pci/GetMetric", request, GetResponse)

    async def get_metric_all(self, *, id: str = "") -> "GetResponse":

        request = GetRequest()
        request.id = id

        return await self._unary_unary(
            "/onos.pci.Pci/GetMetricAll", request, GetResponse
        )

    async def get_pci(self, *, id: str = "") -> "GetResponse":

        request = GetRequest()
        request.id = id

        return await self._unary_unary("/onos.pci.Pci/GetPci", request, GetResponse)

    async def get_pci_all(self, *, id: str = "") -> "GetResponse":

        request = GetRequest()
        request.id = id

        return await self._unary_unary("/onos.pci.Pci/GetPciAll", request, GetResponse)

# Generated by the protocol buffer compiler.  DO NOT EDIT! # sources: onos/pci/pci.proto # plugin: python-betterproto