# 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 user_dashboard_pb2 as spaceone_dot_api_dot_cost__analysis_dot_v1_dot_user__dashboard__pb2


class UserDashboardStub(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.UserDashboard/create',
                request_serializer=spaceone_dot_api_dot_cost__analysis_dot_v1_dot_user__dashboard__pb2.CreateUserDashboardRequest.SerializeToString,
                response_deserializer=spaceone_dot_api_dot_cost__analysis_dot_v1_dot_user__dashboard__pb2.UserDashboardInfo.FromString,
                )
        self.update = channel.unary_unary(
                '/spaceone.api.cost_analysis.v1.UserDashboard/update',
                request_serializer=spaceone_dot_api_dot_cost__analysis_dot_v1_dot_user__dashboard__pb2.UpdateUserDashboardRequest.SerializeToString,
                response_deserializer=spaceone_dot_api_dot_cost__analysis_dot_v1_dot_user__dashboard__pb2.UserDashboardInfo.FromString,
                )
        self.delete = channel.unary_unary(
                '/spaceone.api.cost_analysis.v1.UserDashboard/delete',
                request_serializer=spaceone_dot_api_dot_cost__analysis_dot_v1_dot_user__dashboard__pb2.UserDashboardRequest.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )
        self.get = channel.unary_unary(
                '/spaceone.api.cost_analysis.v1.UserDashboard/get',
                request_serializer=spaceone_dot_api_dot_cost__analysis_dot_v1_dot_user__dashboard__pb2.GetUserDashboardRequest.SerializeToString,
                response_deserializer=spaceone_dot_api_dot_cost__analysis_dot_v1_dot_user__dashboard__pb2.UserDashboardInfo.FromString,
                )
        self.list = channel.unary_unary(
                '/spaceone.api.cost_analysis.v1.UserDashboard/list',
                request_serializer=spaceone_dot_api_dot_cost__analysis_dot_v1_dot_user__dashboard__pb2.UserDashboardQuery.SerializeToString,
                response_deserializer=spaceone_dot_api_dot_cost__analysis_dot_v1_dot_user__dashboard__pb2.UserDashboardsInfo.FromString,
                )
        self.stat = channel.unary_unary(
                '/spaceone.api.cost_analysis.v1.UserDashboard/stat',
                request_serializer=spaceone_dot_api_dot_cost__analysis_dot_v1_dot_user__dashboard__pb2.UserDashboardStatQuery.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_struct__pb2.Struct.FromString,
                )


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

    def create(self, request, context):
        """
        desc: Creates a new UserDashboard. Users can use the dashboard in `private`. In addition to the widgets provided by Cloudforet by default, Users can use widgets through the CustomWidget resource to create a UserDashboard that suits their needs.
        request_example: >-
        {
        "name": "Untitled Dashboard",
        "custom_layouts": [
        [
        {
        "name": "AWS Data-Transfer Cost Trend",
        "widget_id": "linegraph-lg-02",
        "options": {
        "layout": 100.0,
        "chart_desc_translation_id": "BILLING.COST_MANAGEMENT.DASHBOARD.CUSTOMIZE.ADD_WIDGET_MODAL.AWS_DATA_TRANSFER_COST_TREND_DESC",
        "chart_type": "LINE",
        "chart_img": "AWS_Data-Transfer_Cost_Trend"
        }
        }
        ],
        [
        {
        "options": {
        "chart_type": "MAP",
        "chart_img": "AWS_Data-Transfer_By_Region",
        "layout": 100.0,
        "chart_desc_translation_id": "BILLING.COST_MANAGEMENT.DASHBOARD.CUSTOMIZE.ADD_WIDGET_MODAL.AWS_DATA_TRANSFER_BY_REGION_DESC"
        },
        "name": "AWS Data-Transfer by Region",
        "widget_id": "map-lg-02"
        }
        ],
        [
        {
        "options": {
        "group_by": "project_id",
        "layout": 100.0,
        "chart_type": "STACKED_COLUMN",
        "chart_desc_translation_id": "BILLING.COST_MANAGEMENT.DASHBOARD.CUSTOMIZE.ADD_WIDGET_MODAL.AWS_CLOUDFRONT_COST_DESC",
        "chart_img": "AWS_CloudFront_Cost"
        },
        "name": "AWS CloudFront Cost by Project",
        "widget_id": "stackedcol-lg-03"
        }
        ]
        ],
        "default_filter": {},
        "period_type": "AUTO"
        }
        response_example: >-
        {
        "user_dashboard_id": "user-dash-bf3f5f5ffa03",
        "name": "Untitled Dashboard",
        "custom_layouts": [
        [
        {
        "options": {
        "chart_type": "LINE",
        "chart_desc_translation_id": "BILLING.COST_MANAGEMENT.DASHBOARD.CUSTOMIZE.ADD_WIDGET_MODAL.AWS_DATA_TRANSFER_COST_TREND_DESC",
        "layout": 100.0,
        "chart_img": "AWS_Data-Transfer_Cost_Trend"
        },
        "widget_id": "linegraph-lg-02",
        "name": "AWS Data-Transfer Cost Trend"
        }
        ],
        [
        {
        "name": "AWS Data-Transfer by Region",
        "widget_id": "map-lg-02",
        "options": {
        "chart_img": "AWS_Data-Transfer_By_Region",
        "chart_type": "MAP",
        "chart_desc_translation_id": "BILLING.COST_MANAGEMENT.DASHBOARD.CUSTOMIZE.ADD_WIDGET_MODAL.AWS_DATA_TRANSFER_BY_REGION_DESC",
        "layout": 100.0
        }
        }
        ],
        [
        {
        "widget_id": "stackedcol-lg-03",
        "name": "AWS CloudFront Cost by Project",
        "options": {
        "layout": 100.0,
        "chart_desc_translation_id": "BILLING.COST_MANAGEMENT.DASHBOARD.CUSTOMIZE.ADD_WIDGET_MODAL.AWS_CLOUDFRONT_COST_DESC",
        "chart_img": "AWS_CloudFront_Cost",
        "group_by": "project_id",
        "chart_type": "STACKED_COLUMN"
        }
        }
        ]
        ],
        "default_filter": {},
        "period_type": "AUTO",
        "tags": {},
        "user_id": "seolmin@mz.co.kr",
        "domain_id": "domain-58010aa2e451",
        "created_at": "2022-07-19T05:58:52.065Z",
        "updated_at": "2022-07-19T05:58:52.065Z"
        }
        """
        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 UserDashboard. You can make changes in widgets, including default widgets and CustomWidegets.
        request_example: >-
        {
        "user_dashboard_id": "user-dash-bf3f5f5ffa03",
        "name": "Untitled Dashboard2",
        "custom_layouts": [
        [{
        "options": {
        "chart_desc_translation_id": "BILLING.COST_MANAGEMENT.DASHBOARD.CUSTOMIZE.ADD_WIDGET_MODAL.AWS_DATA_TRANSFER_COST_TREND_DESC",
        "chart_type": "LINE", "chart_img": "AWS_Data-Transfer_Cost_Trend", "layout": 100.0},
        "name": "AWS Data-Transfer Cost Trend",
        "widget_id": "linegraph-lg-02"}],
        [{
        "name": "AWS Data-Transfer by Region",
        "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"},
        "widget_id": "map-lg-02"}],
        [{
        "name": "AWS CloudFront Cost by Project",
        "widget_id": "stackedcol-lg-03",
        "options": {
        "layout": 100.0,
        "chart_img": "AWS_CloudFront_Cost",
        "chart_desc_translation_id": "BILLING.COST_MANAGEMENT.DASHBOARD.CUSTOMIZE.ADD_WIDGET_MODAL.AWS_CLOUDFRONT_COST_DESC",
        "chart_type": "STACKED_COLUMN",
        "group_by": "project_id"}
        }]
        ]
        }
        response_example: >-
        {
        "user_dashboard_id": "user-dash-bf3f5f5ffa03",
        "name": "Untitled Dashboard2",
        "custom_layouts": [
        [
        {
        "options": {
        "chart_type": "LINE",
        "chart_desc_translation_id": "BILLING.COST_MANAGEMENT.DASHBOARD.CUSTOMIZE.ADD_WIDGET_MODAL.AWS_DATA_TRANSFER_COST_TREND_DESC",
        "layout": 100.0,
        "chart_img": "AWS_Data-Transfer_Cost_Trend"
        },
        "widget_id": "linegraph-lg-02",
        "name": "AWS Data-Transfer Cost Trend"
        }
        ],
        [
        {
        "name": "AWS Data-Transfer by Region",
        "widget_id": "map-lg-02",
        "options": {
        "chart_img": "AWS_Data-Transfer_By_Region",
        "chart_type": "MAP",
        "chart_desc_translation_id": "BILLING.COST_MANAGEMENT.DASHBOARD.CUSTOMIZE.ADD_WIDGET_MODAL.AWS_DATA_TRANSFER_BY_REGION_DESC",
        "layout": 100.0
        }
        }
        ],
        [
        {
        "widget_id": "stackedcol-lg-03",
        "name": "AWS CloudFront Cost by Project",
        "options": {
        "layout": 100.0,
        "chart_desc_translation_id": "BILLING.COST_MANAGEMENT.DASHBOARD.CUSTOMIZE.ADD_WIDGET_MODAL.AWS_CLOUDFRONT_COST_DESC",
        "chart_img": "AWS_CloudFront_Cost",
        "group_by": "project_id",
        "chart_type": "STACKED_COLUMN"
        }
        }
        ]
        ],
        "default_filter": {},
        "period_type": "AUTO",
        "tags": {},
        "user_id": "seolmin@mz.co.kr",
        "domain_id": "domain-58010aa2e451",
        "created_at": "2022-07-19T05:58:52.065Z",
        "updated_at": "2022-07-19T05:58:52.065Z"
        }
        """
        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 UserDashboard. You must specify the `user_dashboard_id` of the UserDashboard to delete.
        request_example: >-
        {
        "user_dashboard_id": "user-dash-d1bd5d8cb6d7"
        }
        """
        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 UserDashboard. Prints detailed information about the UserDashboard, including widegts used.
        request_example: >-
        {
        "user_dashboard_id": "user-dash-d1bd5d8cb6d7"
        }
        response_example: >-
        {
        "user_dashboard_id": "user-dash-d1bd5d8cb6d7",
        "name": "11 Months Public Cloud Cost Summary",
        "custom_layouts": [
        [
        {
        "widget_id": "card-lg-01",
        "options": {
        "chart_type": "CARD",
        "layout": 100.0
        },
        "name": "Budget Usage Summary"
        }
        ],
        [
        {
        "options": {
        "layout": 100.0,
        "chart_type": "TABLE"
        },
        "name": "Project-wise Budget Usage Summary@@",
        "widget_id": "table-lg-01"
        }
        ],
        [
        {
        "name": "Cost Trend By Product",
        "options": {
        "chart_type": "STACKED_COLUMN",
        "layout": 100.0,
        "group_by": "product"
        },
        "widget_id": "stackedcol-lg-02"
        }
        ]
        ],
        "default_filter": {
        "project_id": []
        },
        "period_type": "FIXED",
        "period": {
        "start": "2021-04-01",
        "end": "2022-02-28"
        },
        "tags": {},
        "user_id": "wanzargen@mz.co.kr",
        "domain_id": "domain-58010aa2e451",
        "created_at": "2022-03-03T03:36:35.396Z",
        "updated_at": "2022-03-03T03:36:35.396Z"
        }
        """
        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 UserDashboards. You can use a query to get a filtered list of UserDashboards.
        request_example: >-
        {
        "query": {}
        }
        response_example: >-
        {
        "results": [
        {
        "user_dashboard_id": "user-dash-d1bd5d8cb6d7",
        "name": "11 Months Public Cloud Cost Summary",
        "custom_layouts": [
        [
        {
        "options": {
        "layout": 100.0,
        "chart_type": "CARD"
        },
        "widget_id": "card-lg-01",
        "name": "Budget Usage Summary"
        }
        ],
        [
        {
        "name": "Project-wise Budget Usage Summary@@",
        "options": {
        "chart_type": "TABLE",
        "layout": 100.0
        },
        "widget_id": "table-lg-01"
        }
        ],
        [
        {
        "widget_id": "stackedcol-lg-02",
        "options": {
        "layout": 100.0,
        "group_by": "product",
        "chart_type": "STACKED_COLUMN"
        },
        "name": "Cost Trend By Product"
        }
        ]
        ],
        "default_filter": {
        "project_id": []
        },
        "period_type": "FIXED",
        "period": {
        "start": "2021-04-01",
        "end": "2022-02-28"
        },
        "tags": {},
        "user_id": "wanzargen@mz.co.kr",
        "domain_id": "domain-58010aa2e451",
        "created_at": "2022-03-03T03:36:35.396Z",
        "updated_at": "2022-03-03T03:36:35.396Z"
        },
        {
        "user_dashboard_id": "user-dash-965b03793d5b",
        "name": "AWS CloudFront Cost by Project",
        "custom_layouts": [
        [
        {
        "name": "AWS CloudFront Cost by Project",
        "widget_id": "stackedcol-lg-03",
        "options": {
        "chart_type": "STACKED_COLUMN",
        "layout": 100.0
        }
        }
        ],
        [
        {
        "widget_id": "stackedcol-lg-03",
        "options": {
        "layout": 100.0,
        "chart_type": "STACKED_COLUMN",
        "group_by": "service_account_id"
        },
        "name": "AWS CloudFront Cost by Service Account"
        }
        ],
        [
        {
        "options": {
        "layout": 100.0,
        "chart_type": "LINE"
        },
        "name": "AWS Data-Transfer Cost Trend",
        "widget_id": "linegraph-lg-02"
        }
        ]
        ],
        "default_filter": {},
        "period_type": "FIXED",
        "period": {
        "start": "2021-05-01",
        "end": "2022-04-30"
        },
        "tags": {},
        "user_id": "wanzargen@mz.co.kr",
        "domain_id": "domain-58010aa2e451",
        "created_at": "2022-04-07T01:13:28.494Z",
        "updated_at": "2022-04-07T01:13:28.494Z"
        }
        ],
        "total_count": 48
        }
        """
        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_UserDashboardServicer_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_user__dashboard__pb2.CreateUserDashboardRequest.FromString,
                    response_serializer=spaceone_dot_api_dot_cost__analysis_dot_v1_dot_user__dashboard__pb2.UserDashboardInfo.SerializeToString,
            ),
            'update': grpc.unary_unary_rpc_method_handler(
                    servicer.update,
                    request_deserializer=spaceone_dot_api_dot_cost__analysis_dot_v1_dot_user__dashboard__pb2.UpdateUserDashboardRequest.FromString,
                    response_serializer=spaceone_dot_api_dot_cost__analysis_dot_v1_dot_user__dashboard__pb2.UserDashboardInfo.SerializeToString,
            ),
            'delete': grpc.unary_unary_rpc_method_handler(
                    servicer.delete,
                    request_deserializer=spaceone_dot_api_dot_cost__analysis_dot_v1_dot_user__dashboard__pb2.UserDashboardRequest.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_user__dashboard__pb2.GetUserDashboardRequest.FromString,
                    response_serializer=spaceone_dot_api_dot_cost__analysis_dot_v1_dot_user__dashboard__pb2.UserDashboardInfo.SerializeToString,
            ),
            'list': grpc.unary_unary_rpc_method_handler(
                    servicer.list,
                    request_deserializer=spaceone_dot_api_dot_cost__analysis_dot_v1_dot_user__dashboard__pb2.UserDashboardQuery.FromString,
                    response_serializer=spaceone_dot_api_dot_cost__analysis_dot_v1_dot_user__dashboard__pb2.UserDashboardsInfo.SerializeToString,
            ),
            'stat': grpc.unary_unary_rpc_method_handler(
                    servicer.stat,
                    request_deserializer=spaceone_dot_api_dot_cost__analysis_dot_v1_dot_user__dashboard__pb2.UserDashboardStatQuery.FromString,
                    response_serializer=google_dot_protobuf_dot_struct__pb2.Struct.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'spaceone.api.cost_analysis.v1.UserDashboard', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class UserDashboard(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.UserDashboard/create',
            spaceone_dot_api_dot_cost__analysis_dot_v1_dot_user__dashboard__pb2.CreateUserDashboardRequest.SerializeToString,
            spaceone_dot_api_dot_cost__analysis_dot_v1_dot_user__dashboard__pb2.UserDashboardInfo.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.UserDashboard/update',
            spaceone_dot_api_dot_cost__analysis_dot_v1_dot_user__dashboard__pb2.UpdateUserDashboardRequest.SerializeToString,
            spaceone_dot_api_dot_cost__analysis_dot_v1_dot_user__dashboard__pb2.UserDashboardInfo.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.UserDashboard/delete',
            spaceone_dot_api_dot_cost__analysis_dot_v1_dot_user__dashboard__pb2.UserDashboardRequest.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.UserDashboard/get',
            spaceone_dot_api_dot_cost__analysis_dot_v1_dot_user__dashboard__pb2.GetUserDashboardRequest.SerializeToString,
            spaceone_dot_api_dot_cost__analysis_dot_v1_dot_user__dashboard__pb2.UserDashboardInfo.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.UserDashboard/list',
            spaceone_dot_api_dot_cost__analysis_dot_v1_dot_user__dashboard__pb2.UserDashboardQuery.SerializeToString,
            spaceone_dot_api_dot_cost__analysis_dot_v1_dot_user__dashboard__pb2.UserDashboardsInfo.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.UserDashboard/stat',
            spaceone_dot_api_dot_cost__analysis_dot_v1_dot_user__dashboard__pb2.UserDashboardStatQuery.SerializeToString,
            google_dot_protobuf_dot_struct__pb2.Struct.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
