# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc

from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2
from spaceone.api.cost_analysis.v1 import public_dashboard_pb2 as spaceone_dot_api_dot_cost__analysis_dot_v1_dot_public__dashboard__pb2


class PublicDashboardStub(object):
    """Missing associated documentation comment in .proto file."""

    def __init__(self, channel):
        """Constructor.

        Args:
            channel: A grpc.Channel.
        """
        self.create = channel.unary_unary(
                '/spaceone.api.cost_analysis.v1.PublicDashboard/create',
                request_serializer=spaceone_dot_api_dot_cost__analysis_dot_v1_dot_public__dashboard__pb2.CreatePublicDashboardRequest.SerializeToString,
                response_deserializer=spaceone_dot_api_dot_cost__analysis_dot_v1_dot_public__dashboard__pb2.PublicDashboardInfo.FromString,
                )
        self.update = channel.unary_unary(
                '/spaceone.api.cost_analysis.v1.PublicDashboard/update',
                request_serializer=spaceone_dot_api_dot_cost__analysis_dot_v1_dot_public__dashboard__pb2.UpdatePublicDashboardRequest.SerializeToString,
                response_deserializer=spaceone_dot_api_dot_cost__analysis_dot_v1_dot_public__dashboard__pb2.PublicDashboardInfo.FromString,
                )
        self.delete = channel.unary_unary(
                '/spaceone.api.cost_analysis.v1.PublicDashboard/delete',
                request_serializer=spaceone_dot_api_dot_cost__analysis_dot_v1_dot_public__dashboard__pb2.PublicDashboardRequest.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )
        self.get = channel.unary_unary(
                '/spaceone.api.cost_analysis.v1.PublicDashboard/get',
                request_serializer=spaceone_dot_api_dot_cost__analysis_dot_v1_dot_public__dashboard__pb2.GetPublicDashboardRequest.SerializeToString,
                response_deserializer=spaceone_dot_api_dot_cost__analysis_dot_v1_dot_public__dashboard__pb2.PublicDashboardInfo.FromString,
                )
        self.list = channel.unary_unary(
                '/spaceone.api.cost_analysis.v1.PublicDashboard/list',
                request_serializer=spaceone_dot_api_dot_cost__analysis_dot_v1_dot_public__dashboard__pb2.PublicDashboardQuery.SerializeToString,
                response_deserializer=spaceone_dot_api_dot_cost__analysis_dot_v1_dot_public__dashboard__pb2.PublicDashboardsInfo.FromString,
                )
        self.stat = channel.unary_unary(
                '/spaceone.api.cost_analysis.v1.PublicDashboard/stat',
                request_serializer=spaceone_dot_api_dot_cost__analysis_dot_v1_dot_public__dashboard__pb2.PublicDashboardStatQuery.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_struct__pb2.Struct.FromString,
                )


class PublicDashboardServicer(object):
    """Missing associated documentation comment in .proto file."""

    def create(self, request, context):
        """
        desc: Creates a new PublicDashboard. This method is used for creating the default dashboard . `Admin` type Users can use the method to add a new dashboard with customized widgets.
        request_example: >-
        {
        "name": "Untitled Dashboard",
        "custom_layouts": [
        [
        {
        "name": "AWS Data-Transfer Cost Trend",
        "widget_id": "linegraph-lg-02",
        "options": {
        "chart_type": "LINE",
        "layout": 100.0,
        "chart_img": "AWS_Data-Transfer_Cost_Trend",
        "chart_desc_translation_id": "BILLING.COST_MANAGEMENT.DASHBOARD.CUSTOMIZE.ADD_WIDGET_MODAL.AWS_DATA_TRANSFER_COST_TREND_DESC"
        }
        }
        ],
        [
        {
        "name": "AWS Data-Transfer by Region",
        "widget_id": "map-lg-02",
        "options": {
        "chart_type": "MAP", "layout": 100.0,
        "chart_desc_translation_id": "BILLING.COST_MANAGEMENT.DASHBOARD.CUSTOMIZE.ADD_WIDGET_MODAL.AWS_DATA_TRANSFER_BY_REGION_DESC",
        "chart_img": "AWS_Data-Transfer_By_Region"
        }
        }
        ],
        [
        {
        "name": "AWS CloudFront Cost by Project",
        "widget_id": "stackedcol-lg-03",
        "options": {
        "group_by": "project_id",
        "chart_img": "AWS_CloudFront_Cost",
        "layout": 100.0,
        "chart_desc_translation_id": "BILLING.COST_MANAGEMENT.DASHBOARD.CUSTOMIZE.ADD_WIDGET_MODAL.AWS_CLOUDFRONT_COST_DESC",
        "chart_type": "STACKED_COLUMN"
        }
        }
        ]
        ],
        "default_filter": {},
        "period_type": "AUTO"
        }
        response_example: >-
        {
        "public_dashboard_id": "pub-dash-80092b5ef658",
        "name": "Untitled Dashboard",
        "custom_layouts": [
        [
        {
        "options": {
        "layout": 100.0,
        "chart_type": "LINE",
        "chart_img": "AWS_Data-Transfer_Cost_Trend",
        "chart_desc_translation_id": "BILLING.COST_MANAGEMENT.DASHBOARD.CUSTOMIZE.ADD_WIDGET_MODAL.AWS_DATA_TRANSFER_COST_TREND_DESC"
        },
        "widget_id": "linegraph-lg-02",
        "name": "AWS Data-Transfer Cost Trend"
        }
        ],
        [
        {
        "widget_id": "map-lg-02",
        "name": "AWS Data-Transfer by Region",
        "options": {
        "layout": 100.0,
        "chart_desc_translation_id": "BILLING.COST_MANAGEMENT.DASHBOARD.CUSTOMIZE.ADD_WIDGET_MODAL.AWS_DATA_TRANSFER_BY_REGION_DESC",
        "chart_img": "AWS_Data-Transfer_By_Region",
        "chart_type": "MAP"
        }
        }
        ],
        [
        {
        "options": {
        "chart_type": "STACKED_COLUMN",
        "chart_img": "AWS_CloudFront_Cost",
        "layout": 100.0,
        "group_by": "project_id",
        "chart_desc_translation_id": "BILLING.COST_MANAGEMENT.DASHBOARD.CUSTOMIZE.ADD_WIDGET_MODAL.AWS_CLOUDFRONT_COST_DESC"
        },
        "name": "AWS CloudFront Cost by Project",
        "widget_id": "stackedcol-lg-03"
        }
        ]
        ],
        "default_filter": {},
        "period_type": "AUTO",
        "tags": {},
        "domain_id": "domain-58010aa2e451",
        "created_at": "2022-07-19T05:42:01.412Z",
        "updated_at": "2022-07-19T05:42:01.412Z"
        }
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def update(self, request, context):
        """
        desc: Updates a specific PublicDashboard. Changes the widgets of the PublicDashboard with default widgets and customized widgets. Only `Admin` type Users can use the method.
        request_example: >-
        {
        "public_dashboard_id": "pub-dash-80092b5ef658",
        "name": "Untitled Dashboard2",
        "custom_layouts": [
        [
        {
        "widget_id": "linegraph-lg-02",
        "name": "AWS Data-Transfer Cost Trend",
        "options": {
        "chart_type": "LINE",
        "chart_desc_translation_id": "BILLING.COST_MANAGEMENT.DASHBOARD.CUSTOMIZE.ADD_WIDGET_MODAL.AWS_DATA_TRANSFER_COST_TREND_DESC",
        "chart_img": "AWS_Data-Transfer_Cost_Trend",
        "layout": 100.0
        }
        }
        ],
        [
        {
        "name": "AWS Data-Transfer by Region",
        "widget_id": "map-lg-02",
        "options": {
        "chart_type": "MAP",
        "chart_desc_translation_id": "BILLING.COST_MANAGEMENT.DASHBOARD.CUSTOMIZE.ADD_WIDGET_MODAL.AWS_DATA_TRANSFER_BY_REGION_DESC",
        "layout": 100.0,
        "chart_img": "AWS_Data-Transfer_By_Region"
        }
        }
        ],
        [
        {
        "name": "AWS CloudFront Cost by Project",
        "widget_id": "stackedcol-lg-03",
        "options": {
        "layout": 100.0,
        "chart_desc_translation_id": "BILLING.COST_MANAGEMENT.DASHBOARD.CUSTOMIZE.ADD_WIDGET_MODAL.AWS_CLOUDFRONT_COST_DESC",
        "group_by": "project_id",
        "chart_type": "STACKED_COLUMN",
        "chart_img": "AWS_CloudFront_Cost"
        }
        }
        ]
        ]
        }
        response_example: >-
        {
        "public_dashboard_id": "pub-dash-80092b5ef658",
        "name": "Untitled Dashboard2",
        "custom_layouts": [
        [
        {
        "options": {
        "chart_desc_translation_id": "BILLING.COST_MANAGEMENT.DASHBOARD.CUSTOMIZE.ADD_WIDGET_MODAL.AWS_DATA_TRANSFER_COST_TREND_DESC",
        "layout": 100.0,
        "chart_type": "LINE",
        "chart_img": "AWS_Data-Transfer_Cost_Trend"
        },
        "name": "AWS Data-Transfer Cost Trend",
        "widget_id": "linegraph-lg-02"
        }
        ],
        [
        {
        "options": {
        "chart_type": "MAP",
        "layout": 100.0,
        "chart_desc_translation_id": "BILLING.COST_MANAGEMENT.DASHBOARD.CUSTOMIZE.ADD_WIDGET_MODAL.AWS_DATA_TRANSFER_BY_REGION_DESC",
        "chart_img": "AWS_Data-Transfer_By_Region"
        },
        "widget_id": "map-lg-02",
        "name": "AWS Data-Transfer by Region"
        }
        ],
        [
        {
        "name": "AWS CloudFront Cost by Project",
        "widget_id": "stackedcol-lg-03",
        "options": {
        "chart_img": "AWS_CloudFront_Cost",
        "chart_type": "STACKED_COLUMN",
        "chart_desc_translation_id": "BILLING.COST_MANAGEMENT.DASHBOARD.CUSTOMIZE.ADD_WIDGET_MODAL.AWS_CLOUDFRONT_COST_DESC",
        "layout": 100.0,
        "group_by": "project_id"
        }
        }
        ]
        ],
        "default_filter": {},
        "period_type": "AUTO",
        "tags": {},
        "domain_id": "domain-58010aa2e451",
        "created_at": "2022-07-19T05:42:01.412Z",
        "updated_at": "2022-07-19T05:42:01.412Z"
        }
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def delete(self, request, context):
        """
        desc: Deletes a specific PublicDashboard. You must specify the `public_dashboard_id` of the PublicDashboard to delete.
        request_example: >-
        {
        "public_dashboard_id": "pub-dash-579b38f00dcf"
        }
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def get(self, request, context):
        """
        desc: Gets a specific PublicDashboard. Prints detailed information about the PublicDashboard, including `custom_layouts` and `period_type`.
        request_example: >-
        {
        "public_dashboard_id": "pub-dash-579b38f00dcf"
        }
        response_example: >-
        {
        "public_dashboard_id": "pub-dash-579b38f00dcf",
        "name": "CDN & Traffic Cost",
        "custom_layouts": [
        [
        {
        "name": "AWS Data-Transfer Cost Trend",
        "widget_id": "linegraph-lg-02",
        "options": {
        "chart_type": "LINE",
        "layout": 100.0
        }
        }
        ],
        [
        {
        "options": {
        "layout": 100.0,
        "group_by": "project_id",
        "chart_type": "STACKED_COLUMN"
        },
        "name": "AWS CloudFront Cost by Project",
        "widget_id": "stackedcol-lg-03"
        }
        ],
        [
        {
        "widget_id": "map-lg-02",
        "name": "AWS Data-Transfer by Region",
        "options": {
        "layout": 100.0,
        "chart_type": "MAP"
        }
        }
        ]
        ],
        "default_filter": {
        "project_group_id": [],
        "service_account_id": [],
        "project_id": [],
        "provider": [
        "google_cloud",
        "azure",
        "aws_china",
        "aws"
        ]
        },
        "period_type": "AUTO",
        "tags": {},
        "domain_id": "domain-58010aa2e451",
        "created_at": "2022-04-07T02:31:28.197Z",
        "updated_at": "2022-04-07T02:31:28.197Z"
        }
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def list(self, request, context):
        """
        desc: Gets a list of all PublicDashboards. You can use a query to get a filtered list of PublicDashboards.
        request_example: >-
        {
        "query": {}
        }
        response_example: >-
        {
        "results": [
        {
        "public_dashboard_id": "pub-dash-579b38f00dcf",
        "name": "CDN & Traffic Cost",
        "custom_layouts": [
        [
        {
        "widget_id": "linegraph-lg-02",
        "name": "AWS Data-Transfer Cost Trend",
        "options": {
        "chart_type": "LINE",
        "layout": 100.0
        }
        }
        ],
        [
        {
        "name": "AWS CloudFront Cost by Project",
        "options": {
        "group_by": "project_id",
        "chart_type": "STACKED_COLUMN",
        "layout": 100.0
        },
        "widget_id": "stackedcol-lg-03"
        }
        ],
        [
        {
        "options": {
        "layout": 100.0,
        "chart_type": "MAP"
        },
        "widget_id": "map-lg-02",
        "name": "AWS Data-Transfer by Region"
        }
        ]
        ],
        "default_filter": {
        "project_id": [],
        "service_account_id": [],
        "project_group_id": [],
        "provider": [
        "google_cloud",
        "azure",
        "aws_china",
        "aws"
        ]
        },
        "period_type": "AUTO",
        "tags": {},
        "domain_id": "domain-58010aa2e451",
        "created_at": "2022-04-07T02:31:28.197Z",
        "updated_at": "2022-04-07T02:31:28.197Z"
        },
        {
        "public_dashboard_id": "pub-dash-fc83ed9bc825",
        "name": "Monthly Cost Summary",
        "custom_layouts": [
        [
        {
        "options": {
        "layout": 33.0,
        "chart_type": "CARD"
        },
        "widget_id": "card-sm-01",
        "name": "Month-to-Date Spend"
        },
        {
        "name": "Last Month Total Spend",
        "widget_id": "card-sm-02",
        "options": {
        "layout": 33.0,
        "chart_type": "CARD"
        }
        },
        {
        "widget_id": "card-sm-03",
        "name": "Budget Usage",
        "options": {
        "chart_type": "CARD",
        "layout": 33.0
        }
        }
        ],
        [
        {
        "name": "Cost By Project",
        "widget_id": "treemap-lg-01",
        "options": {
        "group_by": "project_id",
        "layout": 100.0,
        "chart_type": "TREEMAP"
        }
        }
        ],
        [
        {
        "name": "Cost Trend By Project",
        "widget_id": "linegraph-lg-01",
        "options": {
        "layout": 100.0,
        "group_by": "provider",
        "chart_type": "LINE"
        }
        }
        ],
        [
        {
        "options": {
        "layout": 100.0,
        "chart_type": "STACKED_COLUMN",
        "group_by": "product"
        },
        "widget_id": "stackedcol-lg-01",
        "name": "Cost Trend By Product"
        }
        ],
        [
        {
        "name": "Cost By Provider",
        "options": {
        "layout": 50.0,
        "group_by": "provider",
        "chart_type": "STACKED_COLUMN"
        },
        "widget_id": "donut-md-01"
        },
        {
        "widget_id": "waffle-md-01",
        "name": "Budget Status",
        "options": {
        "layout": 50.0,
        "chart_type": "WAFFLE"
        }
        }
        ],
        [
        {
        "options": {
        "chart_type": "MAP",
        "layout": 100.0
        },
        "widget_id": "map-lg-01",
        "name": "Cost By Region"
        }
        ]
        ],
        "default_filter": {
        "provider": []
        },
        "period_type": "AUTO",
        "tags": {},
        "domain_id": "domain-58010aa2e451",
        "created_at": "2022-03-29T05:22:41.283Z",
        "updated_at": "2022-03-29T05:22:41.283Z"
        }
        ],
        "total_count": 3
        }
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def stat(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_PublicDashboardServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'create': grpc.unary_unary_rpc_method_handler(
                    servicer.create,
                    request_deserializer=spaceone_dot_api_dot_cost__analysis_dot_v1_dot_public__dashboard__pb2.CreatePublicDashboardRequest.FromString,
                    response_serializer=spaceone_dot_api_dot_cost__analysis_dot_v1_dot_public__dashboard__pb2.PublicDashboardInfo.SerializeToString,
            ),
            'update': grpc.unary_unary_rpc_method_handler(
                    servicer.update,
                    request_deserializer=spaceone_dot_api_dot_cost__analysis_dot_v1_dot_public__dashboard__pb2.UpdatePublicDashboardRequest.FromString,
                    response_serializer=spaceone_dot_api_dot_cost__analysis_dot_v1_dot_public__dashboard__pb2.PublicDashboardInfo.SerializeToString,
            ),
            'delete': grpc.unary_unary_rpc_method_handler(
                    servicer.delete,
                    request_deserializer=spaceone_dot_api_dot_cost__analysis_dot_v1_dot_public__dashboard__pb2.PublicDashboardRequest.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'get': grpc.unary_unary_rpc_method_handler(
                    servicer.get,
                    request_deserializer=spaceone_dot_api_dot_cost__analysis_dot_v1_dot_public__dashboard__pb2.GetPublicDashboardRequest.FromString,
                    response_serializer=spaceone_dot_api_dot_cost__analysis_dot_v1_dot_public__dashboard__pb2.PublicDashboardInfo.SerializeToString,
            ),
            'list': grpc.unary_unary_rpc_method_handler(
                    servicer.list,
                    request_deserializer=spaceone_dot_api_dot_cost__analysis_dot_v1_dot_public__dashboard__pb2.PublicDashboardQuery.FromString,
                    response_serializer=spaceone_dot_api_dot_cost__analysis_dot_v1_dot_public__dashboard__pb2.PublicDashboardsInfo.SerializeToString,
            ),
            'stat': grpc.unary_unary_rpc_method_handler(
                    servicer.stat,
                    request_deserializer=spaceone_dot_api_dot_cost__analysis_dot_v1_dot_public__dashboard__pb2.PublicDashboardStatQuery.FromString,
                    response_serializer=google_dot_protobuf_dot_struct__pb2.Struct.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'spaceone.api.cost_analysis.v1.PublicDashboard', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class PublicDashboard(object):
    """Missing associated documentation comment in .proto file."""

    @staticmethod
    def create(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/spaceone.api.cost_analysis.v1.PublicDashboard/create',
            spaceone_dot_api_dot_cost__analysis_dot_v1_dot_public__dashboard__pb2.CreatePublicDashboardRequest.SerializeToString,
            spaceone_dot_api_dot_cost__analysis_dot_v1_dot_public__dashboard__pb2.PublicDashboardInfo.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def update(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/spaceone.api.cost_analysis.v1.PublicDashboard/update',
            spaceone_dot_api_dot_cost__analysis_dot_v1_dot_public__dashboard__pb2.UpdatePublicDashboardRequest.SerializeToString,
            spaceone_dot_api_dot_cost__analysis_dot_v1_dot_public__dashboard__pb2.PublicDashboardInfo.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def delete(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/spaceone.api.cost_analysis.v1.PublicDashboard/delete',
            spaceone_dot_api_dot_cost__analysis_dot_v1_dot_public__dashboard__pb2.PublicDashboardRequest.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def get(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/spaceone.api.cost_analysis.v1.PublicDashboard/get',
            spaceone_dot_api_dot_cost__analysis_dot_v1_dot_public__dashboard__pb2.GetPublicDashboardRequest.SerializeToString,
            spaceone_dot_api_dot_cost__analysis_dot_v1_dot_public__dashboard__pb2.PublicDashboardInfo.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def list(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/spaceone.api.cost_analysis.v1.PublicDashboard/list',
            spaceone_dot_api_dot_cost__analysis_dot_v1_dot_public__dashboard__pb2.PublicDashboardQuery.SerializeToString,
            spaceone_dot_api_dot_cost__analysis_dot_v1_dot_public__dashboard__pb2.PublicDashboardsInfo.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def stat(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/spaceone.api.cost_analysis.v1.PublicDashboard/stat',
            spaceone_dot_api_dot_cost__analysis_dot_v1_dot_public__dashboard__pb2.PublicDashboardStatQuery.SerializeToString,
            google_dot_protobuf_dot_struct__pb2.Struct.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
