Esempio n. 1
0
    def GetJobsDocuments(self, userId, **kwargs):
        """Get jobs documents

        Args:
            userId, str: User GUID (required)
            pageIndex, str: Page Index (optional)
            pageSize, str: Page Size (optional)
            actions, str: Actions (optional)
            excludedActions, str: Excluded actions (optional)
            orderBy, str: Order by (optional)
            orderAsc, bool: Order asc (optional)
            
        Returns: GetJobsDocumentsResponse
        """
        if( userId == None ):
            raise ApiException(400, "missing required parameters")
        allParams = ['userId', 'pageIndex', 'pageSize', 'actions', 'excludedActions', 'orderBy', 'orderAsc']

        params = locals()
        for (key, val) in params['kwargs'].iteritems():
            if key not in allParams:
                raise TypeError("Got an unexpected keyword argument '%s' to method GetJobsDocuments" % key)
            params[key] = val
        del params['kwargs']

        resourcePath = '/async/{userId}/jobs/documents?page={pageIndex}&count={pageSize}&actions={actions}&excluded_actions={excludedActions}&order_by={orderBy}&order_asc={orderAsc}'.replace('*', '')
        pos = resourcePath.find("?")
        if pos != -1:
            resourcePath = resourcePath[0:pos]
        resourcePath = resourcePath.replace('{format}', 'json')
        method = 'GET'

        queryParams = {}
        headerParams = {}

        if ('pageIndex' in params):
            queryParams['page'] = self.apiClient.toPathValue(params['pageIndex'])
        if ('pageSize' in params):
            queryParams['count'] = self.apiClient.toPathValue(params['pageSize'])
        if ('actions' in params):
            queryParams['actions'] = self.apiClient.toPathValue(params['actions'])
        if ('excludedActions' in params):
            queryParams['excluded_actions'] = self.apiClient.toPathValue(params['excludedActions'])
        if ('orderBy' in params):
            queryParams['order_by'] = self.apiClient.toPathValue(params['orderBy'])
        if ('orderAsc' in params):
            queryParams['order_asc'] = self.apiClient.toPathValue(params['orderAsc'])
        if ('userId' in params):
            replacement = str(self.apiClient.toPathValue(params['userId']))
            resourcePath = resourcePath.replace('{' + 'userId' + '}',
                                                replacement)
        postData = (params['body'] if 'body' in params else None)
        response = self.apiClient.callAPI(self.basePath, resourcePath, method, queryParams,
                                          postData, headerParams)

        if not response:
            return None

        responseObject = self.apiClient.deserialize(response, 'GetJobsDocumentsResponse')
        return responseObject
Esempio n. 2
0
    def Compare(self, userId, sourceFileId, targetFileId, callbackUrl,
                **kwargs):
        """Compare

        Args:
            userId, str: User GUID (required)
            sourceFileId, str: Source File GUID (required)
            targetFileId, str: Target File GUID (required)
            callbackUrl, str: Callback Url (required)
            
        Returns: CompareResponse
        """
        if (userId == None or sourceFileId == None or targetFileId == None
                or callbackUrl == None):
            raise ApiException(400, "missing required parameters")
        allParams = ['userId', 'sourceFileId', 'targetFileId', 'callbackUrl']

        params = locals()
        for (key, val) in params['kwargs'].iteritems():
            if key not in allParams:
                raise TypeError(
                    "Got an unexpected keyword argument '%s' to method Compare"
                    % key)
            params[key] = val
        del params['kwargs']

        resourcePath = '/comparison/{userId}/comparison/compare?source={sourceFileId}&target={targetFileId}&callback={callbackUrl}'.replace(
            '*', '')
        pos = resourcePath.find("?")
        if pos != -1:
            resourcePath = resourcePath[0:pos]
        resourcePath = resourcePath.replace('{format}', 'json')
        method = 'GET'

        queryParams = {}
        headerParams = {}

        if ('sourceFileId' in params):
            queryParams['source'] = self.apiClient.toPathValue(
                params['sourceFileId'])
        if ('targetFileId' in params):
            queryParams['target'] = self.apiClient.toPathValue(
                params['targetFileId'])
        if ('callbackUrl' in params):
            queryParams['callback'] = self.apiClient.toPathValue(
                params['callbackUrl'])
        if ('userId' in params):
            replacement = str(self.apiClient.toPathValue(params['userId']))
            resourcePath = resourcePath.replace('{' + 'userId' + '}',
                                                replacement)
        postData = (params['body'] if 'body' in params else None)
        response = self.apiClient.callAPI(self.basePath, resourcePath, method,
                                          queryParams, postData, headerParams)

        if not response:
            return None

        responseObject = self.apiClient.deserialize(response,
                                                    'CompareResponse')
        return responseObject
Esempio n. 3
0
    def AddJobDocument(self, userId, jobId, fileId, checkOwnership, **kwargs):
        """Add job document

        Args:
            userId, str: User GUID (required)
            jobId, str: Job id or guid (required)
            fileId, str: File GUID (required)
            checkOwnership, bool: Check Document Ownership (required)
            formats, str: Formats (optional)
            
        Returns: AddJobDocumentResponse
        """
        if( userId == None or jobId == None or fileId == None or checkOwnership == None ):
            raise ApiException(400, "missing required parameters")
        allParams = ['userId', 'jobId', 'fileId', 'checkOwnership', 'formats']

        params = locals()
        for (key, val) in params['kwargs'].iteritems():
            if key not in allParams:
                raise TypeError("Got an unexpected keyword argument '%s' to method AddJobDocument" % key)
            params[key] = val
        del params['kwargs']

        resourcePath = '/async/{userId}/jobs/{jobId}/files/{fileId}?check_ownership={checkOwnership}&out_formats={formats}'.replace('*', '')
        pos = resourcePath.find("?")
        if pos != -1:
            resourcePath = resourcePath[0:pos]
        resourcePath = resourcePath.replace('{format}', 'json')
        method = 'PUT'

        queryParams = {}
        headerParams = {}

        if ('checkOwnership' in params):
            queryParams['check_ownership'] = self.apiClient.toPathValue(params['checkOwnership'])
        if ('formats' in params):
            queryParams['out_formats'] = self.apiClient.toPathValue(params['formats'])
        if ('userId' in params):
            replacement = str(self.apiClient.toPathValue(params['userId']))
            resourcePath = resourcePath.replace('{' + 'userId' + '}',
                                                replacement)
        if ('jobId' in params):
            replacement = str(self.apiClient.toPathValue(params['jobId']))
            resourcePath = resourcePath.replace('{' + 'jobId' + '}',
                                                replacement)
        if ('fileId' in params):
            replacement = str(self.apiClient.toPathValue(params['fileId']))
            resourcePath = resourcePath.replace('{' + 'fileId' + '}',
                                                replacement)
        postData = (params['body'] if 'body' in params else None)
        response = self.apiClient.callAPI(self.basePath, resourcePath, method, queryParams,
                                          postData, headerParams)

        if not response:
            return None

        responseObject = self.apiClient.deserialize(response, 'AddJobDocumentResponse')
        return responseObject
    def MoveFolder(self, userId, path, **kwargs):
        """Move folder

        Args:
            userId, str: User GUID (required)
            path, str: Destination Path (required)
            mode, str: Mode (optional)
            Groupdocs_Move, str: Source path (move) (optional)
            Groupdocs_Copy, str: Source path (copy) (optional)
            
        Returns: FolderMoveResponse
        """
        if( userId == None or path == None ):
            raise ApiException(400, "missing required parameters")
        allParams = ['userId', 'path', 'mode', 'Groupdocs_Move', 'Groupdocs_Copy']

        params = locals()
        for (key, val) in params['kwargs'].iteritems():
            if key not in allParams:
                raise TypeError("Got an unexpected keyword argument '%s' to method MoveFolder" % key)
            params[key] = val
        del params['kwargs']

        resourcePath = '/storage/{userId}/folders/{*path}?override_mode={mode}'.replace('*', '')
        pos = resourcePath.find("?")
        if pos != -1:
            resourcePath = resourcePath[0:pos]
        resourcePath = resourcePath.replace('{format}', 'json')
        method = 'PUT'

        queryParams = {}
        headerParams = {}

        if ('mode' in params):
            queryParams['override_mode'] = self.apiClient.toPathValue(params['mode'])
        if ('Groupdocs_Move' in params):
            headerParams['Groupdocs-Move'] = params['Groupdocs_Move']
        if ('Groupdocs_Copy' in params):
            headerParams['Groupdocs-Copy'] = params['Groupdocs_Copy']
        if ('userId' in params):
            replacement = str(self.apiClient.toPathValue(params['userId']))
            resourcePath = resourcePath.replace('{' + 'userId' + '}',
                                                replacement)
        if ('path' in params):
            replacement = str(self.apiClient.toPathValue(params['path']))
            resourcePath = resourcePath.replace('{' + 'path' + '}',
                                                replacement)
        postData = (params['body'] if 'body' in params else None)
        response = self.apiClient.callAPI(self.basePath, resourcePath, method, queryParams,
                                          postData, headerParams)

        if not response:
            return None

        responseObject = self.apiClient.deserialize(response, 'FolderMoveResponse')
        return responseObject
Esempio n. 5
0
    def CreateUserLogin(self, callerId, userId, password, **kwargs):
        """Create user login

        Args:
            callerId, str: Caller GUID (required)
            userId, str: User name (required)
            password, str: Password (required)
            
        Returns: UserInfoResponse
        """
        if (callerId == None or userId == None or password == None):
            raise ApiException(400, "missing required parameters")
        allParams = ['callerId', 'userId', 'password']

        params = locals()
        for (key, val) in params['kwargs'].iteritems():
            if key not in allParams:
                raise TypeError(
                    "Got an unexpected keyword argument '%s' to method CreateUserLogin"
                    % key)
            params[key] = val
        del params['kwargs']

        resourcePath = '/mgmt/{callerId}/users/{userId}/logins'.replace(
            '*', '')
        pos = resourcePath.find("?")
        if pos != -1:
            resourcePath = resourcePath[0:pos]
        resourcePath = resourcePath.replace('{format}', 'json')
        method = 'POST'

        queryParams = {}
        headerParams = {}

        if ('password' in params):
            queryParams['password'] = self.apiClient.toPathValue(
                params['password'])
        if ('callerId' in params):
            replacement = str(self.apiClient.toPathValue(params['callerId']))
            resourcePath = resourcePath.replace('{' + 'callerId' + '}',
                                                replacement)
        if ('userId' in params):
            replacement = str(self.apiClient.toPathValue(params['userId']))
            resourcePath = resourcePath.replace('{' + 'userId' + '}',
                                                replacement)
        postData = (params['body'] if 'body' in params else None)
        response = self.apiClient.callAPI(self.basePath, resourcePath, method,
                                          queryParams, postData, headerParams)

        if not response:
            return None

        responseObject = self.apiClient.deserialize(response,
                                                    'UserInfoResponse')
        return responseObject
Esempio n. 6
0
    def ListAnnotationReplies(self, userId, annotationId, after, **kwargs):
        """Get list of annotation replies

        Args:
            userId, str: User GUID (required)
            annotationId, str: Annotation ID (required)
            after, long: After (required)
            
        Returns: ListRepliesResponse
        """
        if (userId == None or annotationId == None or after == None):
            raise ApiException(400, "missing required parameters")
        allParams = ['userId', 'annotationId', 'after']

        params = locals()
        for (key, val) in params['kwargs'].iteritems():
            if key not in allParams:
                raise TypeError(
                    "Got an unexpected keyword argument '%s' to method ListAnnotationReplies"
                    % key)
            params[key] = val
        del params['kwargs']

        resourcePath = '/ant/{userId}/annotations/{annotationId}/replies?after={after}'.replace(
            '*', '')
        pos = resourcePath.find("?")
        if pos != -1:
            resourcePath = resourcePath[0:pos]
        resourcePath = resourcePath.replace('{format}', 'json')
        method = 'GET'

        queryParams = {}
        headerParams = {}

        if ('after' in params):
            queryParams['after'] = self.apiClient.toPathValue(params['after'])
        if ('userId' in params):
            replacement = str(self.apiClient.toPathValue(params['userId']))
            resourcePath = resourcePath.replace('{' + 'userId' + '}',
                                                replacement)
        if ('annotationId' in params):
            replacement = str(
                self.apiClient.toPathValue(params['annotationId']))
            resourcePath = resourcePath.replace('{' + 'annotationId' + '}',
                                                replacement)
        postData = (params['body'] if 'body' in params else None)
        response = self.apiClient.callAPI(self.basePath, resourcePath, method,
                                          queryParams, postData, headerParams)

        if not response:
            return None

        responseObject = self.apiClient.deserialize(response,
                                                    'ListRepliesResponse')
        return responseObject
    def Decompress(self, userId, path, body, **kwargs):
        """UploadAndUnzip

        Args:
            userId, str: User GUID (required)
            path, str: Path (required)
            description, str: Description (optional)
            archiveType, str: Archive type (optional)
            body, stream: Stream (required)
            
        Returns: UploadResponse
        """
        if( userId == None or path == None or body == None ):
            raise ApiException(400, "missing required parameters")
        allParams = ['userId', 'path', 'description', 'archiveType', 'body']

        params = locals()
        for (key, val) in params['kwargs'].iteritems():
            if key not in allParams:
                raise TypeError("Got an unexpected keyword argument '%s' to method Decompress" % key)
            params[key] = val
        del params['kwargs']

        resourcePath = '/storage/{userId}/decompress/{*path}?description={description}&archiveType={archiveType}'.replace('*', '')
        pos = resourcePath.find("?")
        if pos != -1:
            resourcePath = resourcePath[0:pos]
        resourcePath = resourcePath.replace('{format}', 'json')
        method = 'POST'

        queryParams = {}
        headerParams = {}

        if ('description' in params):
            queryParams['description'] = self.apiClient.toPathValue(params['description'])
        if ('archiveType' in params):
            queryParams['archiveType'] = self.apiClient.toPathValue(params['archiveType'])
        if ('userId' in params):
            replacement = str(self.apiClient.toPathValue(params['userId']))
            resourcePath = resourcePath.replace('{' + 'userId' + '}',
                                                replacement)
        if ('path' in params):
            replacement = str(self.apiClient.toPathValue(params['path']))
            resourcePath = resourcePath.replace('{' + 'path' + '}',
                                                replacement)
        postData = (params['body'] if 'body' in params else None)
        response = self.apiClient.callAPI(self.basePath, resourcePath, method, queryParams,
                                          postData, headerParams)

        if not response:
            return None

        responseObject = self.apiClient.deserialize(response, 'UploadResponse')
        return responseObject
Esempio n. 8
0
    def SetAnnotationCollaborators(self, userId, fileId, version, **kwargs):
        """Set annotation collaborators

        Args:
            userId, str: User GUID (required)
            fileId, str: File ID (required)
            version, str: Annotation version (required)
            body, List[str]: Collaborators (optional)
            
        Returns: SetCollaboratorsResponse
        """
        if (userId == None or fileId == None or version == None):
            raise ApiException(400, "missing required parameters")
        allParams = ['userId', 'fileId', 'version', 'body']

        params = locals()
        for (key, val) in params['kwargs'].iteritems():
            if key not in allParams:
                raise TypeError(
                    "Got an unexpected keyword argument '%s' to method SetAnnotationCollaborators"
                    % key)
            params[key] = val
        del params['kwargs']

        resourcePath = '/ant/{userId}/files/{fileId}/version/{version}/collaborators'.replace(
            '*', '')
        resourcePath = resourcePath.replace('{format}', 'json')
        method = 'PUT'

        queryParams = {}
        headerParams = {}

        if ('userId' in params):
            replacement = str(self.apiClient.toPathValue(params['userId']))
            resourcePath = resourcePath.replace('{' + 'userId' + '}',
                                                replacement)
        if ('fileId' in params):
            replacement = str(self.apiClient.toPathValue(params['fileId']))
            resourcePath = resourcePath.replace('{' + 'fileId' + '}',
                                                replacement)
        if ('version' in params):
            replacement = str(self.apiClient.toPathValue(params['version']))
            resourcePath = resourcePath.replace('{' + 'version' + '}',
                                                replacement)
        postData = (params['body'] if 'body' in params else None)
        response = self.apiClient.callAPI(self.basePath, resourcePath, method,
                                          queryParams, postData, headerParams)

        if not response:
            return None

        responseObject = self.apiClient.deserialize(
            response, 'SetCollaboratorsResponse')
        return responseObject
Esempio n. 9
0
    def CompressByPost(self, userId, fileId, archiveType, **kwargs):
        """Compress by post

        Args:
            userId, str: User GUID (required)
            fileId, str: File GUID (required)
            archiveType, str: Archive Type (required)
            
        Returns: CompressResponse
        """
        if (userId == None or fileId == None or archiveType == None):
            raise ApiException(400, "missing required parameters")
        allParams = ['userId', 'fileId', 'archiveType']

        params = locals()
        for (key, val) in params['kwargs'].iteritems():
            if key not in allParams:
                raise TypeError(
                    "Got an unexpected keyword argument '%s' to method CompressByPost"
                    % key)
            params[key] = val
        del params['kwargs']

        resourcePath = '/post/file.compress?user_id={userId}&file_id={fileId}&archive_type={archiveType}'.replace(
            '*', '')
        pos = resourcePath.find("?")
        if pos != -1:
            resourcePath = resourcePath[0:pos]
        resourcePath = resourcePath.replace('{format}', 'json')
        method = 'POST'

        queryParams = {}
        headerParams = {}

        if ('userId' in params):
            queryParams['user_id'] = self.apiClient.toPathValue(
                params['userId'])
        if ('fileId' in params):
            queryParams['file_id'] = self.apiClient.toPathValue(
                params['fileId'])
        if ('archiveType' in params):
            queryParams['archive_type'] = self.apiClient.toPathValue(
                params['archiveType'])
        postData = (params['body'] if 'body' in params else None)
        response = self.apiClient.callAPI(self.basePath, resourcePath, method,
                                          queryParams, postData, headerParams)

        if not response:
            return None

        responseObject = self.apiClient.deserialize(response,
                                                    'CompressResponse')
        return responseObject
Esempio n. 10
0
    def DeleteDocumentReviewer(self, userId, fileId, reviewerId, **kwargs):
        """Delete document reviewer

        Args:
            userId, str: User GUID (required)
            fileId, str: File ID (required)
            reviewerId, str: Reviewer ID (required)
            
        Returns: AddCollaboratorResponse
        """
        if (userId == None or fileId == None or reviewerId == None):
            raise ApiException(400, "missing required parameters")
        allParams = ['userId', 'fileId', 'reviewerId']

        params = locals()
        for (key, val) in params['kwargs'].iteritems():
            if key not in allParams:
                raise TypeError(
                    "Got an unexpected keyword argument '%s' to method DeleteDocumentReviewer"
                    % key)
            params[key] = val
        del params['kwargs']

        resourcePath = '/ant/{userId}/files/{fileId}/collaborators/{reviewerId}'.replace(
            '*', '')
        resourcePath = resourcePath.replace('{format}', 'json')
        method = 'DELETE'

        queryParams = {}
        headerParams = {}

        if ('userId' in params):
            replacement = str(self.apiClient.toPathValue(params['userId']))
            resourcePath = resourcePath.replace('{' + 'userId' + '}',
                                                replacement)
        if ('fileId' in params):
            replacement = str(self.apiClient.toPathValue(params['fileId']))
            resourcePath = resourcePath.replace('{' + 'fileId' + '}',
                                                replacement)
        if ('reviewerId' in params):
            replacement = str(self.apiClient.toPathValue(params['reviewerId']))
            resourcePath = resourcePath.replace('{' + 'reviewerId' + '}',
                                                replacement)
        postData = (params['body'] if 'body' in params else None)
        response = self.apiClient.callAPI(self.basePath, resourcePath, method,
                                          queryParams, postData, headerParams)

        if not response:
            return None

        responseObject = self.apiClient.deserialize(response,
                                                    'AddCollaboratorResponse')
        return responseObject
Esempio n. 11
0
    def CreatePackage(self, userId, packageName, **kwargs):
        """Create Package

        Args:
            userId, str: User GUID (required)
            packageName, str: Package Name (required)
            storeRelativePath, bool: Store files using relative paths (optional)
            body, List[str]: Paths (optional)
            
        Returns: CreatePackageResponse
        """
        if( userId == None or packageName == None ):
            raise ApiException(400, "missing required parameters")
        allParams = ['userId', 'packageName', 'storeRelativePath', 'body']

        params = locals()
        for (key, val) in params['kwargs'].iteritems():
            if key not in allParams:
                raise TypeError("Got an unexpected keyword argument '%s' to method CreatePackage" % key)
            params[key] = val
        del params['kwargs']

        resourcePath = '/storage/{userId}/packages/{packageName}?storeRelativePath={storeRelativePath}'.replace('*', '')
        pos = resourcePath.find("?")
        if pos != -1:
            resourcePath = resourcePath[0:pos]
        resourcePath = resourcePath.replace('{format}', 'json')
        method = 'POST'

        queryParams = {}
        headerParams = {}

        if ('storeRelativePath' in params):
            queryParams['storeRelativePath'] = self.apiClient.toPathValue(params['storeRelativePath'])
        if ('userId' in params):
            replacement = str(self.apiClient.toPathValue(params['userId']))
            resourcePath = resourcePath.replace('{' + 'userId' + '}',
                                                replacement)
        if ('packageName' in params):
            replacement = str(self.apiClient.toPathValue(params['packageName']))
            resourcePath = resourcePath.replace('{' + 'packageName' + '}',
                                                replacement)
        postData = (params['body'] if 'body' in params else None)
        response = self.apiClient.callAPI(self.basePath, resourcePath, method, queryParams,
                                          postData, headerParams)

        if not response:
            return None

        responseObject = self.apiClient.deserialize(response, 'CreatePackageResponse')
        return responseObject
Esempio n. 12
0
    def GetJobResources(self, userId, statusIds, **kwargs):
        """Get job resources

        Args:
            userId, str: User GUID (required)
            statusIds, str: Comma separated job status identifiers (required)
            actions, str: Actions (optional)
            excludedActions, str: Excluded actions (optional)
            
        Returns: GetJobResourcesResponse
        """
        if( userId == None or statusIds == None ):
            raise ApiException(400, "missing required parameters")
        allParams = ['userId', 'statusIds', 'actions', 'excludedActions']

        params = locals()
        for (key, val) in params['kwargs'].iteritems():
            if key not in allParams:
                raise TypeError("Got an unexpected keyword argument '%s' to method GetJobResources" % key)
            params[key] = val
        del params['kwargs']

        resourcePath = '/async/{userId}/jobs/resources?statusIds={statusIds}&actions={actions}&excluded_actions={excludedActions}'.replace('*', '')
        pos = resourcePath.find("?")
        if pos != -1:
            resourcePath = resourcePath[0:pos]
        resourcePath = resourcePath.replace('{format}', 'json')
        method = 'GET'

        queryParams = {}
        headerParams = {}

        if ('statusIds' in params):
            queryParams['statusIds'] = self.apiClient.toPathValue(params['statusIds'])
        if ('actions' in params):
            queryParams['actions'] = self.apiClient.toPathValue(params['actions'])
        if ('excludedActions' in params):
            queryParams['excluded_actions'] = self.apiClient.toPathValue(params['excludedActions'])
        if ('userId' in params):
            replacement = str(self.apiClient.toPathValue(params['userId']))
            resourcePath = resourcePath.replace('{' + 'userId' + '}',
                                                replacement)
        postData = (params['body'] if 'body' in params else None)
        response = self.apiClient.callAPI(self.basePath, resourcePath, method, queryParams,
                                          postData, headerParams)

        if not response:
            return None

        responseObject = self.apiClient.deserialize(response, 'GetJobResourcesResponse')
        return responseObject
Esempio n. 13
0
    def UpdateChanges(self, userId, resultFileId, body, **kwargs):
        """Update changes

        Args:
            userId, str: User GUID (required)
            resultFileId, str: Comparison result file GUID (required)
            body, List[ChangeInfo]: Comparison changes to update (accept or reject) (required)
            
        Returns: ChangesResponse
        """
        if (userId == None or resultFileId == None or body == None):
            raise ApiException(400, "missing required parameters")
        allParams = ['userId', 'resultFileId', 'body']

        params = locals()
        for (key, val) in params['kwargs'].iteritems():
            if key not in allParams:
                raise TypeError(
                    "Got an unexpected keyword argument '%s' to method UpdateChanges"
                    % key)
            params[key] = val
        del params['kwargs']

        resourcePath = '/comparison/{userId}/comparison/changes?resultFileId={resultFileId}'.replace(
            '*', '')
        pos = resourcePath.find("?")
        if pos != -1:
            resourcePath = resourcePath[0:pos]
        resourcePath = resourcePath.replace('{format}', 'json')
        method = 'PUT'

        queryParams = {}
        headerParams = {}

        if ('resultFileId' in params):
            queryParams['resultFileId'] = self.apiClient.toPathValue(
                params['resultFileId'])
        if ('userId' in params):
            replacement = str(self.apiClient.toPathValue(params['userId']))
            resourcePath = resourcePath.replace('{' + 'userId' + '}',
                                                replacement)
        postData = (params['body'] if 'body' in params else None)
        response = self.apiClient.callAPI(self.basePath, resourcePath, method,
                                          queryParams, postData, headerParams)

        if not response:
            return None

        responseObject = self.apiClient.deserialize(response,
                                                    'ChangesResponse')
        return responseObject
Esempio n. 14
0
    def UploadGoogle(self, userId, path, **kwargs):
        """Upload Google

        Args:
            userId, str: User GUID (required)
            path, str: File path (required)
            fileId, str: File unique identifier (optional)
            
        Returns: UploadResponse
        """
        if( userId == None or path == None ):
            raise ApiException(400, "missing required parameters")
        allParams = ['userId', 'path', 'fileId']

        params = locals()
        for (key, val) in params['kwargs'].iteritems():
            if key not in allParams:
                raise TypeError("Got an unexpected keyword argument '%s' to method UploadGoogle" % key)
            params[key] = val
        del params['kwargs']

        resourcePath = '/storage/{userId}/google/files/{*path}?file_id={fileId}'.replace('*', '')
        pos = resourcePath.find("?")
        if pos != -1:
            resourcePath = resourcePath[0:pos]
        resourcePath = resourcePath.replace('{format}', 'json')
        method = 'POST'

        queryParams = {}
        headerParams = {}

        if ('fileId' in params):
            queryParams['file_id'] = self.apiClient.toPathValue(params['fileId'])
        if ('userId' in params):
            replacement = str(self.apiClient.toPathValue(params['userId']))
            resourcePath = resourcePath.replace('{' + 'userId' + '}',
                                                replacement)
        if ('path' in params):
            replacement = str(self.apiClient.toPathValue(params['path']))
            resourcePath = resourcePath.replace('{' + 'path' + '}',
                                                replacement)
        postData = (params['body'] if 'body' in params else None)
        response = self.apiClient.callAPI(self.basePath, resourcePath, method, queryParams,
                                          postData, headerParams)

        if not response:
            return None

        responseObject = self.apiClient.deserialize(response, 'UploadResponse')
        return responseObject
Esempio n. 15
0
    def GetJobDocuments(self, userId, jobId, **kwargs):
        """Get job documents

        Args:
            userId, str: User GUID (required)
            jobId, str: Job id or guid (required)
            format, str: Format (optional)
            
        Returns: GetJobDocumentsResponse
        """
        if( userId == None or jobId == None ):
            raise ApiException(400, "missing required parameters")
        allParams = ['userId', 'jobId', 'format']

        params = locals()
        for (key, val) in params['kwargs'].iteritems():
            if key not in allParams:
                raise TypeError("Got an unexpected keyword argument '%s' to method GetJobDocuments" % key)
            params[key] = val
        del params['kwargs']

        resourcePath = '/async/{userId}/jobs/{jobId}/documents?format={format}'.replace('*', '')
        pos = resourcePath.find("?")
        if pos != -1:
            resourcePath = resourcePath[0:pos]
        resourcePath = resourcePath.replace('{format}', 'json')
        method = 'GET'

        queryParams = {}
        headerParams = {}

        if ('format' in params):
            queryParams['format'] = self.apiClient.toPathValue(params['format'])
        if ('userId' in params):
            replacement = str(self.apiClient.toPathValue(params['userId']))
            resourcePath = resourcePath.replace('{' + 'userId' + '}',
                                                replacement)
        if ('jobId' in params):
            replacement = str(self.apiClient.toPathValue(params['jobId']))
            resourcePath = resourcePath.replace('{' + 'jobId' + '}',
                                                replacement)
        postData = (params['body'] if 'body' in params else None)
        response = self.apiClient.callAPI(self.basePath, resourcePath, method, queryParams,
                                          postData, headerParams)

        if not response:
            return None

        responseObject = self.apiClient.deserialize(response, 'GetJobDocumentsResponse')
        return responseObject
Esempio n. 16
0
    def MoveAnnotationMarker(self, userId, annotationId, body, **kwargs):
        """Move Annotation Marker

        Args:
            userId, str: User GUID (required)
            annotationId, str: Annotation ID (required)
            body, Point: position (required)
            
        Returns: MoveAnnotationResponse
        """
        if (userId == None or annotationId == None or body == None):
            raise ApiException(400, "missing required parameters")
        allParams = ['userId', 'annotationId', 'body']

        params = locals()
        for (key, val) in params['kwargs'].iteritems():
            if key not in allParams:
                raise TypeError(
                    "Got an unexpected keyword argument '%s' to method MoveAnnotationMarker"
                    % key)
            params[key] = val
        del params['kwargs']

        resourcePath = '/ant/{userId}/annotations/{annotationId}/markerPosition'.replace(
            '*', '')
        resourcePath = resourcePath.replace('{format}', 'json')
        method = 'PUT'

        queryParams = {}
        headerParams = {}

        if ('userId' in params):
            replacement = str(self.apiClient.toPathValue(params['userId']))
            resourcePath = resourcePath.replace('{' + 'userId' + '}',
                                                replacement)
        if ('annotationId' in params):
            replacement = str(
                self.apiClient.toPathValue(params['annotationId']))
            resourcePath = resourcePath.replace('{' + 'annotationId' + '}',
                                                replacement)
        postData = (params['body'] if 'body' in params else None)
        response = self.apiClient.callAPI(self.basePath, resourcePath, method,
                                          queryParams, postData, headerParams)

        if not response:
            return None

        responseObject = self.apiClient.deserialize(response,
                                                    'MoveAnnotationResponse')
        return responseObject
Esempio n. 17
0
    def SetSessionCallbackUrl(self, userId, fileId, body, **kwargs):
        """Set Session Web Hook Callback Url

        Args:
            userId, str: User GUID (required)
            fileId, str: File GUID (required)
            body, str: Callback Url (required)
            
        Returns: SetSessionCallbackUrlResponse
        """
        if (userId == None or fileId == None or body == None):
            raise ApiException(400, "missing required parameters")
        allParams = ['userId', 'fileId', 'body']

        params = locals()
        for (key, val) in params['kwargs'].iteritems():
            if key not in allParams:
                raise TypeError(
                    "Got an unexpected keyword argument '%s' to method SetSessionCallbackUrl"
                    % key)
            params[key] = val
        del params['kwargs']

        resourcePath = '/ant/{userId}/files/{fileId}/sessionCallbackUrl'.replace(
            '*', '')
        resourcePath = resourcePath.replace('{format}', 'json')
        method = 'PUT'

        queryParams = {}
        headerParams = {}

        if ('userId' in params):
            replacement = str(self.apiClient.toPathValue(params['userId']))
            resourcePath = resourcePath.replace('{' + 'userId' + '}',
                                                replacement)
        if ('fileId' in params):
            replacement = str(self.apiClient.toPathValue(params['fileId']))
            resourcePath = resourcePath.replace('{' + 'fileId' + '}',
                                                replacement)
        postData = (params['body'] if 'body' in params else None)
        response = self.apiClient.callAPI(self.basePath, resourcePath, method,
                                          queryParams, postData, headerParams)

        if not response:
            return None

        responseObject = self.apiClient.deserialize(
            response, 'SetSessionCallbackUrlResponse')
        return responseObject
Esempio n. 18
0
    def ChangeAlienUserPassword(self, callerId, userId, body, **kwargs):
        """Change alien user password

        Args:
            callerId, str: Caller GUID (required)
            userId, str: User GUID (required)
            body, UserPasswordInfo: Password (required)
            
        Returns: ChangePasswordResponse
        """
        if (callerId == None or userId == None or body == None):
            raise ApiException(400, "missing required parameters")
        allParams = ['callerId', 'userId', 'body']

        params = locals()
        for (key, val) in params['kwargs'].iteritems():
            if key not in allParams:
                raise TypeError(
                    "Got an unexpected keyword argument '%s' to method ChangeAlienUserPassword"
                    % key)
            params[key] = val
        del params['kwargs']

        resourcePath = '/mgmt/{callerId}/users/{userId}/password'.replace(
            '*', '')
        resourcePath = resourcePath.replace('{format}', 'json')
        method = 'PUT'

        queryParams = {}
        headerParams = {}

        if ('callerId' in params):
            replacement = str(self.apiClient.toPathValue(params['callerId']))
            resourcePath = resourcePath.replace('{' + 'callerId' + '}',
                                                replacement)
        if ('userId' in params):
            replacement = str(self.apiClient.toPathValue(params['userId']))
            resourcePath = resourcePath.replace('{' + 'userId' + '}',
                                                replacement)
        postData = (params['body'] if 'body' in params else None)
        response = self.apiClient.callAPI(self.basePath, resourcePath, method,
                                          queryParams, postData, headerParams)

        if not response:
            return None

        responseObject = self.apiClient.deserialize(response,
                                                    'ChangePasswordResponse')
        return responseObject
Esempio n. 19
0
    def GetUserProfileByClaimedToken(self, callerId, token, **kwargs):
        """Get user profile by claimed token

        Args:
            callerId, str: Caller GUID (required)
            token, str: Token (required)
            
        Returns: UserInfoResponse
        """
        if (callerId == None or token == None):
            raise ApiException(400, "missing required parameters")
        allParams = ['callerId', 'token']

        params = locals()
        for (key, val) in params['kwargs'].iteritems():
            if key not in allParams:
                raise TypeError(
                    "Got an unexpected keyword argument '%s' to method GetUserProfileByClaimedToken"
                    % key)
            params[key] = val
        del params['kwargs']

        resourcePath = '/mgmt/{callerId}/claimed-tokens?token={token}'.replace(
            '*', '')
        pos = resourcePath.find("?")
        if pos != -1:
            resourcePath = resourcePath[0:pos]
        resourcePath = resourcePath.replace('{format}', 'json')
        method = 'GET'

        queryParams = {}
        headerParams = {}

        if ('token' in params):
            queryParams['token'] = self.apiClient.toPathValue(params['token'])
        if ('callerId' in params):
            replacement = str(self.apiClient.toPathValue(params['callerId']))
            resourcePath = resourcePath.replace('{' + 'callerId' + '}',
                                                replacement)
        postData = (params['body'] if 'body' in params else None)
        response = self.apiClient.callAPI(self.basePath, resourcePath, method,
                                          queryParams, postData, headerParams)

        if not response:
            return None

        responseObject = self.apiClient.deserialize(response,
                                                    'UserInfoResponse')
        return responseObject
Esempio n. 20
0
    def UpdateAccountUser(self, adminId, userName, body, **kwargs):
        """Create or update account user.

        Args:
            adminId, str: Administrator GUID (required)
            userName, str: User name (required)
            body, UserInfo: User details (required)
            
        Returns: UpdateAccountUserResponse
        """
        if (adminId == None or userName == None or body == None):
            raise ApiException(400, "missing required parameters")
        allParams = ['adminId', 'userName', 'body']

        params = locals()
        for (key, val) in params['kwargs'].iteritems():
            if key not in allParams:
                raise TypeError(
                    "Got an unexpected keyword argument '%s' to method UpdateAccountUser"
                    % key)
            params[key] = val
        del params['kwargs']

        resourcePath = '/mgmt/{adminId}/account/users/{userName}'.replace(
            '*', '')
        resourcePath = resourcePath.replace('{format}', 'json')
        method = 'PUT'

        queryParams = {}
        headerParams = {}

        if ('adminId' in params):
            replacement = str(self.apiClient.toPathValue(params['adminId']))
            resourcePath = resourcePath.replace('{' + 'adminId' + '}',
                                                replacement)
        if ('userName' in params):
            replacement = str(self.apiClient.toPathValue(params['userName']))
            resourcePath = resourcePath.replace('{' + 'userName' + '}',
                                                replacement)
        postData = (params['body'] if 'body' in params else None)
        response = self.apiClient.callAPI(self.basePath, resourcePath, method,
                                          queryParams, postData, headerParams)

        if not response:
            return None

        responseObject = self.apiClient.deserialize(
            response, 'UpdateAccountUserResponse')
        return responseObject
Esempio n. 21
0
    def Compress(self, userId, fileId, archiveType, **kwargs):
        """Compress

        Args:
            userId, str: User GUID (required)
            fileId, str: File ID (required)
            archiveType, str: Archive type (optional)
            
        Returns: CompressResponse
        """
        if( userId == None or fileId == None or archiveType == None ):
            raise ApiException(400, "missing required parameters")
        allParams = ['userId', 'fileId', 'archiveType']

        params = locals()
        for (key, val) in params['kwargs'].iteritems():
            if key not in allParams:
                raise TypeError("Got an unexpected keyword argument '%s' to method Compress" % key)
            params[key] = val
        del params['kwargs']

        resourcePath = '/storage/{userId}/files/{fileId}/archive/{archiveType}'.replace('*', '')
        resourcePath = resourcePath.replace('{format}', 'json')
        method = 'POST'

        queryParams = {}
        headerParams = {}

        if ('userId' in params):
            replacement = str(self.apiClient.toPathValue(params['userId']))
            resourcePath = resourcePath.replace('{' + 'userId' + '}',
                                                replacement)
        if ('fileId' in params):
            replacement = str(self.apiClient.toPathValue(params['fileId']))
            resourcePath = resourcePath.replace('{' + 'fileId' + '}',
                                                replacement)
        if ('archiveType' in params):
            replacement = str(self.apiClient.toPathValue(params['archiveType']))
            resourcePath = resourcePath.replace('{' + 'archiveType' + '}',
                                                replacement)
        postData = (params['body'] if 'body' in params else None)
        response = self.apiClient.callAPI(self.basePath, resourcePath, method, queryParams,
                                          postData, headerParams)

        if not response:
            return None

        responseObject = self.apiClient.deserialize(response, 'CompressResponse')
        return responseObject
Esempio n. 22
0
    def SimulateAssessForPricingPlan(self, userId, discountCode, planId, **kwargs):
        """Simulate Assess For Pricing Plan

        Args:
            userId, str: User GUID (required)
            discountCode, str: Discount Code (optional)
            planId, str: Subscription Plan Id (optional)
            
        Returns: GetInvoicesResponse
        """
        if( userId == None or discountCode == None or planId == None ):
            raise ApiException(400, "missing required parameters")
        allParams = ['userId', 'discountCode', 'planId']

        params = locals()
        for (key, val) in params['kwargs'].iteritems():
            if key not in allParams:
                raise TypeError("Got an unexpected keyword argument '%s' to method SimulateAssessForPricingPlan" % key)
            params[key] = val
        del params['kwargs']

        resourcePath = '/system/{userId}/plans/{planId}/discounts/{discountCode}'.replace('*', '')
        resourcePath = resourcePath.replace('{format}', 'json')
        method = 'GET'

        queryParams = {}
        headerParams = {}

        if ('userId' in params):
            replacement = str(self.apiClient.toPathValue(params['userId']))
            resourcePath = resourcePath.replace('{' + 'userId' + '}',
                                                replacement)
        if ('discountCode' in params):
            replacement = str(self.apiClient.toPathValue(params['discountCode']))
            resourcePath = resourcePath.replace('{' + 'discountCode' + '}',
                                                replacement)
        if ('planId' in params):
            replacement = str(self.apiClient.toPathValue(params['planId']))
            resourcePath = resourcePath.replace('{' + 'planId' + '}',
                                                replacement)
        postData = (params['body'] if 'body' in params else None)
        response = self.apiClient.callAPI(self.basePath, resourcePath, method, queryParams,
                                          postData, headerParams)

        if not response:
            return None

        responseObject = self.apiClient.deserialize(response, 'GetInvoicesResponse')
        return responseObject
Esempio n. 23
0
    def GetDocumentDetails(self, userId, guid, **kwargs):
        """Get document details

        Args:
            userId, str: User GUID (required)
            guid, str: Document GUID (required)
            
        Returns: DocumentDetailsResponse
        """
        if (userId == None or guid == None):
            raise ApiException(400, "missing required parameters")
        allParams = ['userId', 'guid']

        params = locals()
        for (key, val) in params['kwargs'].iteritems():
            if key not in allParams:
                raise TypeError(
                    "Got an unexpected keyword argument '%s' to method GetDocumentDetails"
                    % key)
            params[key] = val
        del params['kwargs']

        resourcePath = '/comparison/{userId}/comparison/document?guid={guid}'.replace(
            '*', '')
        pos = resourcePath.find("?")
        if pos != -1:
            resourcePath = resourcePath[0:pos]
        resourcePath = resourcePath.replace('{format}', 'json')
        method = 'GET'

        queryParams = {}
        headerParams = {}

        if ('guid' in params):
            queryParams['guid'] = self.apiClient.toPathValue(params['guid'])
        if ('userId' in params):
            replacement = str(self.apiClient.toPathValue(params['userId']))
            resourcePath = resourcePath.replace('{' + 'userId' + '}',
                                                replacement)
        postData = (params['body'] if 'body' in params else None)
        response = self.apiClient.callAPI(self.basePath, resourcePath, method,
                                          queryParams, postData, headerParams)

        if not response:
            return None

        responseObject = self.apiClient.deserialize(response,
                                                    'DocumentDetailsResponse')
        return responseObject
Esempio n. 24
0
    def DeleteJobDocument(self, userId, jobGuid, documentId, **kwargs):
        """Delete document from job

        Args:
            userId, str: User GUID (required)
            jobGuid, str: Job Guid (required)
            documentId, str: Document GUID (required)
            
        Returns: DeleteResponse
        """
        if( userId == None or jobGuid == None or documentId == None ):
            raise ApiException(400, "missing required parameters")
        allParams = ['userId', 'jobGuid', 'documentId']

        params = locals()
        for (key, val) in params['kwargs'].iteritems():
            if key not in allParams:
                raise TypeError("Got an unexpected keyword argument '%s' to method DeleteJobDocument" % key)
            params[key] = val
        del params['kwargs']

        resourcePath = '/async/{userId}/jobs/{jobGuid}/documents/{documentId}'.replace('*', '')
        resourcePath = resourcePath.replace('{format}', 'json')
        method = 'DELETE'

        queryParams = {}
        headerParams = {}

        if ('userId' in params):
            replacement = str(self.apiClient.toPathValue(params['userId']))
            resourcePath = resourcePath.replace('{' + 'userId' + '}',
                                                replacement)
        if ('jobGuid' in params):
            replacement = str(self.apiClient.toPathValue(params['jobGuid']))
            resourcePath = resourcePath.replace('{' + 'jobGuid' + '}',
                                                replacement)
        if ('documentId' in params):
            replacement = str(self.apiClient.toPathValue(params['documentId']))
            resourcePath = resourcePath.replace('{' + 'documentId' + '}',
                                                replacement)
        postData = (params['body'] if 'body' in params else None)
        response = self.apiClient.callAPI(self.basePath, resourcePath, method, queryParams,
                                          postData, headerParams)

        if not response:
            return None

        responseObject = self.apiClient.deserialize(response, 'DeleteResponse')
        return responseObject
Esempio n. 25
0
    def GetInvoices(self, callerId, **kwargs):
        """Get invoices

        Args:
            callerId, str: User GUID (required)
            pageNumber, str: Show records for page number (optional)
            pageSize, int: Show records count (optional)
            
        Returns: GetInvoicesResponse
        """
        if( callerId == None ):
            raise ApiException(400, "missing required parameters")
        allParams = ['callerId', 'pageNumber', 'pageSize']

        params = locals()
        for (key, val) in params['kwargs'].iteritems():
            if key not in allParams:
                raise TypeError("Got an unexpected keyword argument '%s' to method GetInvoices" % key)
            params[key] = val
        del params['kwargs']

        resourcePath = '/system/{callerId}/invoices?pageNumber={pageNumber}&pageSize={pageSize}'.replace('*', '')
        pos = resourcePath.find("?")
        if pos != -1:
            resourcePath = resourcePath[0:pos]
        resourcePath = resourcePath.replace('{format}', 'json')
        method = 'GET'

        queryParams = {}
        headerParams = {}

        if ('pageNumber' in params):
            queryParams['pageNumber'] = self.apiClient.toPathValue(params['pageNumber'])
        if ('pageSize' in params):
            queryParams['pageSize'] = self.apiClient.toPathValue(params['pageSize'])
        if ('callerId' in params):
            replacement = str(self.apiClient.toPathValue(params['callerId']))
            resourcePath = resourcePath.replace('{' + 'callerId' + '}',
                                                replacement)
        postData = (params['body'] if 'body' in params else None)
        response = self.apiClient.callAPI(self.basePath, resourcePath, method, queryParams,
                                          postData, headerParams)

        if not response:
            return None

        responseObject = self.apiClient.deserialize(response, 'GetInvoicesResponse')
        return responseObject
Esempio n. 26
0
    def DownloadResult(self, userId, resultFileId, **kwargs):
        """Download comparison result file

        Args:
            userId, str: User GUID (required)
            resultFileId, str: Comparison result file GUID (required)
            format, str: Comparison result file format (optional)
            
        Returns: stream
        """
        if (userId == None or resultFileId == None):
            raise ApiException(400, "missing required parameters")
        allParams = ['userId', 'resultFileId', 'format']

        params = locals()
        for (key, val) in params['kwargs'].iteritems():
            if key not in allParams:
                raise TypeError(
                    "Got an unexpected keyword argument '%s' to method DownloadResult"
                    % key)
            params[key] = val
        del params['kwargs']

        resourcePath = '/comparison/{userId}/comparison/download?resultFileId={resultFileId}&format={format}'.replace(
            '*', '')
        pos = resourcePath.find("?")
        if pos != -1:
            resourcePath = resourcePath[0:pos]
        resourcePath = resourcePath.replace('{format}', 'json')
        method = 'GET'

        queryParams = {}
        headerParams = {}

        if ('resultFileId' in params):
            queryParams['resultFileId'] = self.apiClient.toPathValue(
                params['resultFileId'])
        if ('format' in params):
            queryParams['format'] = self.apiClient.toPathValue(
                params['format'])
        if ('userId' in params):
            replacement = str(self.apiClient.toPathValue(params['userId']))
            resourcePath = resourcePath.replace('{' + 'userId' + '}',
                                                replacement)
        postData = (params['body'] if 'body' in params else None)
        return self.apiClient.callAPI(self.basePath, resourcePath, method,
                                      queryParams, postData, headerParams,
                                      FileStream)
Esempio n. 27
0
    def Download(self, guid, fileName, **kwargs):
        """Download

        Args:
            guid, str: GUID (required)
            fileName, str: File name (required)
            render, bool: Render (optional)
            
        Returns: stream
        """
        if (guid == None or fileName == None):
            raise ApiException(400, "missing required parameters")
        allParams = ['guid', 'fileName', 'render']

        params = locals()
        for (key, val) in params['kwargs'].iteritems():
            if key not in allParams:
                raise TypeError(
                    "Got an unexpected keyword argument '%s' to method Download"
                    % key)
            params[key] = val
        del params['kwargs']

        resourcePath = '/shared/files/{guid}?filename={fileName}&render={render}'.replace(
            '*', '')
        pos = resourcePath.find("?")
        if pos != -1:
            resourcePath = resourcePath[0:pos]
        resourcePath = resourcePath.replace('{format}', 'json')
        method = 'GET'

        queryParams = {}
        headerParams = {}

        if ('fileName' in params):
            queryParams['filename'] = self.apiClient.toPathValue(
                params['fileName'])
        if ('render' in params):
            queryParams['render'] = self.apiClient.toPathValue(
                params['render'])
        if ('guid' in params):
            replacement = str(self.apiClient.toPathValue(params['guid']))
            resourcePath = resourcePath.replace('{' + 'guid' + '}',
                                                replacement)
        postData = (params['body'] if 'body' in params else None)
        return self.apiClient.callAPI(self.basePath, resourcePath, method,
                                      queryParams, postData, headerParams,
                                      FileStream)
Esempio n. 28
0
    def UpdateStorageProvider(self, userId, provider, body, **kwargs):
        """Updates user's storage provider configuration.

        Args:
            userId, str: User GUID (required)
            provider, str: Storage provider name (required)
            body, StorageProviderInfo: Storage provider configuration details (required)
            
        Returns: UpdateStorageProviderResponse
        """
        if (userId == None or provider == None or body == None):
            raise ApiException(400, "missing required parameters")
        allParams = ['userId', 'provider', 'body']

        params = locals()
        for (key, val) in params['kwargs'].iteritems():
            if key not in allParams:
                raise TypeError(
                    "Got an unexpected keyword argument '%s' to method UpdateStorageProvider"
                    % key)
            params[key] = val
        del params['kwargs']

        resourcePath = '/mgmt/{userId}/storages/{provider}'.replace('*', '')
        resourcePath = resourcePath.replace('{format}', 'json')
        method = 'PUT'

        queryParams = {}
        headerParams = {}

        if ('userId' in params):
            replacement = str(self.apiClient.toPathValue(params['userId']))
            resourcePath = resourcePath.replace('{' + 'userId' + '}',
                                                replacement)
        if ('provider' in params):
            replacement = str(self.apiClient.toPathValue(params['provider']))
            resourcePath = resourcePath.replace('{' + 'provider' + '}',
                                                replacement)
        postData = (params['body'] if 'body' in params else None)
        response = self.apiClient.callAPI(self.basePath, resourcePath, method,
                                          queryParams, postData, headerParams)

        if not response:
            return None

        responseObject = self.apiClient.deserialize(
            response, 'UpdateStorageProviderResponse')
        return responseObject
Esempio n. 29
0
    def EditAnnotationReply(self, userId, replyGuid, body, **kwargs):
        """Edit annotation reply

        Args:
            userId, str: User GUID (required)
            replyGuid, str: Reply GUID (required)
            body, str: Message (required)
            
        Returns: EditReplyResponse
        """
        if (userId == None or replyGuid == None or body == None):
            raise ApiException(400, "missing required parameters")
        allParams = ['userId', 'replyGuid', 'body']

        params = locals()
        for (key, val) in params['kwargs'].iteritems():
            if key not in allParams:
                raise TypeError(
                    "Got an unexpected keyword argument '%s' to method EditAnnotationReply"
                    % key)
            params[key] = val
        del params['kwargs']

        resourcePath = '/ant/{userId}/replies/{replyGuid}'.replace('*', '')
        resourcePath = resourcePath.replace('{format}', 'json')
        method = 'PUT'

        queryParams = {}
        headerParams = {}

        if ('userId' in params):
            replacement = str(self.apiClient.toPathValue(params['userId']))
            resourcePath = resourcePath.replace('{' + 'userId' + '}',
                                                replacement)
        if ('replyGuid' in params):
            replacement = str(self.apiClient.toPathValue(params['replyGuid']))
            resourcePath = resourcePath.replace('{' + 'replyGuid' + '}',
                                                replacement)
        postData = (params['body'] if 'body' in params else None)
        response = self.apiClient.callAPI(self.basePath, resourcePath, method,
                                          queryParams, postData, headerParams)

        if not response:
            return None

        responseObject = self.apiClient.deserialize(response,
                                                    'EditReplyResponse')
        return responseObject
Esempio n. 30
0
    def GenerateKeyForUser(self, userId, area, **kwargs):
        """Generates new active user embed key.

        Args:
            userId, str: User GUID (required)
            area, str: Application area where the key is (required)
            
        Returns: GetUserEmbedKeyResponse
        """
        if (userId == None or area == None):
            raise ApiException(400, "missing required parameters")
        allParams = ['userId', 'area']

        params = locals()
        for (key, val) in params['kwargs'].iteritems():
            if key not in allParams:
                raise TypeError(
                    "Got an unexpected keyword argument '%s' to method GenerateKeyForUser"
                    % key)
            params[key] = val
        del params['kwargs']

        resourcePath = '/mgmt/{userId}/embedkey/new/{area}'.replace('*', '')
        resourcePath = resourcePath.replace('{format}', 'json')
        method = 'GET'

        queryParams = {}
        headerParams = {}

        if ('userId' in params):
            replacement = str(self.apiClient.toPathValue(params['userId']))
            resourcePath = resourcePath.replace('{' + 'userId' + '}',
                                                replacement)
        if ('area' in params):
            replacement = str(self.apiClient.toPathValue(params['area']))
            resourcePath = resourcePath.replace('{' + 'area' + '}',
                                                replacement)
        postData = (params['body'] if 'body' in params else None)
        response = self.apiClient.callAPI(self.basePath, resourcePath, method,
                                          queryParams, postData, headerParams)

        if not response:
            return None

        responseObject = self.apiClient.deserialize(response,
                                                    'GetUserEmbedKeyResponse')
        return responseObject