Skip to content

Commit

Permalink
Merge pull request #530 from kang2453/master
Browse files Browse the repository at this point in the history
feat: add documentation comments for namespace service methods
  • Loading branch information
kang2453 authored Jan 2, 2025
2 parents 334795f + d576058 commit d3119a0
Show file tree
Hide file tree
Showing 5 changed files with 537 additions and 19 deletions.
57 changes: 57 additions & 0 deletions dist/python/spaceone/api/file_manager/v1/userfile_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

276 changes: 276 additions & 0 deletions dist/python/spaceone/api/file_manager/v1/userfile_pb2_grpc.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,276 @@
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc
import warnings

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.file_manager.v1 import userfile_pb2 as spaceone_dot_api_dot_file__manager_dot_v1_dot_userfile__pb2

GRPC_GENERATED_VERSION = '1.64.1'
GRPC_VERSION = grpc.__version__
EXPECTED_ERROR_RELEASE = '1.65.0'
SCHEDULED_RELEASE_DATE = 'June 25, 2024'
_version_not_supported = False

try:
from grpc._utilities import first_version_is_lower
_version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
except ImportError:
_version_not_supported = True

if _version_not_supported:
warnings.warn(
f'The grpc package installed is at version {GRPC_VERSION},'
+ f' but the generated code in spaceone/api/file_manager/v1/userfile_pb2_grpc.py depends on'
+ f' grpcio>={GRPC_GENERATED_VERSION}.'
+ f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
+ f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
+ f' This warning will become an error in {EXPECTED_ERROR_RELEASE},'
+ f' scheduled for release on {SCHEDULED_RELEASE_DATE}.',
RuntimeWarning
)


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

def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.update = channel.unary_unary(
'/spaceone.api.file_manager.v1.UserFile/update',
request_serializer=spaceone_dot_api_dot_file__manager_dot_v1_dot_userfile__pb2.UpdateUserFileRequest.SerializeToString,
response_deserializer=spaceone_dot_api_dot_file__manager_dot_v1_dot_userfile__pb2.UserFileInfo.FromString,
_registered_method=True)
self.delete = channel.unary_unary(
'/spaceone.api.file_manager.v1.UserFile/delete',
request_serializer=spaceone_dot_api_dot_file__manager_dot_v1_dot_userfile__pb2.UserFileRequest.SerializeToString,
response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
_registered_method=True)
self.get = channel.unary_unary(
'/spaceone.api.file_manager.v1.UserFile/get',
request_serializer=spaceone_dot_api_dot_file__manager_dot_v1_dot_userfile__pb2.UserFileRequest.SerializeToString,
response_deserializer=spaceone_dot_api_dot_file__manager_dot_v1_dot_userfile__pb2.UserFileInfo.FromString,
_registered_method=True)
self.list = channel.unary_unary(
'/spaceone.api.file_manager.v1.UserFile/list',
request_serializer=spaceone_dot_api_dot_file__manager_dot_v1_dot_userfile__pb2.UserFileSearchQuery.SerializeToString,
response_deserializer=spaceone_dot_api_dot_file__manager_dot_v1_dot_userfile__pb2.UserFilesInfo.FromString,
_registered_method=True)
self.stat = channel.unary_unary(
'/spaceone.api.file_manager.v1.UserFile/stat',
request_serializer=spaceone_dot_api_dot_file__manager_dot_v1_dot_userfile__pb2.UserFileStatQuery.SerializeToString,
response_deserializer=google_dot_protobuf_dot_struct__pb2.Struct.FromString,
_registered_method=True)


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

def update(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 delete(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 get(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 list(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 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_UserFileServicer_to_server(servicer, server):
rpc_method_handlers = {
'update': grpc.unary_unary_rpc_method_handler(
servicer.update,
request_deserializer=spaceone_dot_api_dot_file__manager_dot_v1_dot_userfile__pb2.UpdateUserFileRequest.FromString,
response_serializer=spaceone_dot_api_dot_file__manager_dot_v1_dot_userfile__pb2.UserFileInfo.SerializeToString,
),
'delete': grpc.unary_unary_rpc_method_handler(
servicer.delete,
request_deserializer=spaceone_dot_api_dot_file__manager_dot_v1_dot_userfile__pb2.UserFileRequest.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_file__manager_dot_v1_dot_userfile__pb2.UserFileRequest.FromString,
response_serializer=spaceone_dot_api_dot_file__manager_dot_v1_dot_userfile__pb2.UserFileInfo.SerializeToString,
),
'list': grpc.unary_unary_rpc_method_handler(
servicer.list,
request_deserializer=spaceone_dot_api_dot_file__manager_dot_v1_dot_userfile__pb2.UserFileSearchQuery.FromString,
response_serializer=spaceone_dot_api_dot_file__manager_dot_v1_dot_userfile__pb2.UserFilesInfo.SerializeToString,
),
'stat': grpc.unary_unary_rpc_method_handler(
servicer.stat,
request_deserializer=spaceone_dot_api_dot_file__manager_dot_v1_dot_userfile__pb2.UserFileStatQuery.FromString,
response_serializer=google_dot_protobuf_dot_struct__pb2.Struct.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'spaceone.api.file_manager.v1.UserFile', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))
server.add_registered_method_handlers('spaceone.api.file_manager.v1.UserFile', rpc_method_handlers)


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

@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.file_manager.v1.UserFile/update',
spaceone_dot_api_dot_file__manager_dot_v1_dot_userfile__pb2.UpdateUserFileRequest.SerializeToString,
spaceone_dot_api_dot_file__manager_dot_v1_dot_userfile__pb2.UserFileInfo.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)

@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.file_manager.v1.UserFile/delete',
spaceone_dot_api_dot_file__manager_dot_v1_dot_userfile__pb2.UserFileRequest.SerializeToString,
google_dot_protobuf_dot_empty__pb2.Empty.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)

@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.file_manager.v1.UserFile/get',
spaceone_dot_api_dot_file__manager_dot_v1_dot_userfile__pb2.UserFileRequest.SerializeToString,
spaceone_dot_api_dot_file__manager_dot_v1_dot_userfile__pb2.UserFileInfo.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)

@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.file_manager.v1.UserFile/list',
spaceone_dot_api_dot_file__manager_dot_v1_dot_userfile__pb2.UserFileSearchQuery.SerializeToString,
spaceone_dot_api_dot_file__manager_dot_v1_dot_userfile__pb2.UserFilesInfo.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)

@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.file_manager.v1.UserFile/stat',
spaceone_dot_api_dot_file__manager_dot_v1_dot_userfile__pb2.UserFileStatQuery.SerializeToString,
google_dot_protobuf_dot_struct__pb2.Struct.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
Loading

0 comments on commit d3119a0

Please sign in to comment.