azure-cognitiveservices-vision-contentmoderator/azure/cognitiveservices/vision/contentmoderator/operations/reviews_operations.py
def create_job(
            self, team_name, content_type, content_id, workflow_name, job_content_type, content_value, call_back_endpoint=None, custom_headers=None, raw=False, **operation_config):
        """A job Id will be returned for the content posted on this endpoint.
        Once the content is evaluated against the Workflow provided the review
        will be created or ignored based on the workflow expression.
        <h3>CallBack Schemas </h3>
        <p>
        <h4>Job Completion CallBack Sample</h4><br/>
        {<br/>
        "JobId": "<Job Id>,<br/>
        "ReviewId": "<Review Id, if the Job resulted in a Review to be
        created>",<br/>
        "WorkFlowId": "default",<br/>
        "Status": "<This will be one of Complete, InProgress, Error>",<br/>
        "ContentType": "Image",<br/>
        "ContentId": "<This is the ContentId that was specified on
        input>",<br/>
        "CallBackType": "Job",<br/>
        "Metadata": {<br/>
        "adultscore": "0.xxx",<br/>
        "a": "False",<br/>
        "racyscore": "0.xxx",<br/>
        "r": "True"<br/>
        }<br/>
        }<br/>
        </p>
        <p>
        <h4>Review Completion CallBack Sample</h4><br/>
        {
        "ReviewId": "<Review Id>",<br/>
        "ModifiedOn": "2016-10-11T22:36:32.9934851Z",<br/>
        "ModifiedBy": "<Name of the Reviewer>",<br/>
        "CallBackType": "Review",<br/>
        "ContentId": "<The ContentId that was specified input>",<br/>
        "Metadata": {<br/>
        "adultscore": "0.xxx",
        "a": "False",<br/>
        "racyscore": "0.xxx",<br/>
        "r": "True"<br/>
        },<br/>
        "ReviewerResultTags": {<br/>
        "a": "False",<br/>
        "r": "True"<br/>
        }<br/>
        }<br/>
        </p>.

        :param team_name: Your team name.
        :type team_name: str
        :param content_type: Image, Text or Video. Possible values include:
         'Image', 'Text', 'Video'
        :type content_type: str
        :param content_id: Id/Name to identify the content submitted.
        :type content_id: str
        :param workflow_name: Workflow Name that you want to invoke.
        :type workflow_name: str
        :param job_content_type: The content type. Possible values include:
         'application/json', 'image/jpeg'
        :type job_content_type: str
        :param content_value: Content to evaluate for a job.
        :type content_value: str
        :param call_back_endpoint: Callback endpoint for posting the create
         job result.
        :type call_back_endpoint: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: JobId or ClientRawResponse if raw=true
        :rtype: ~azure.cognitiveservices.vision.contentmoderator.models.JobId
         or ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`APIErrorException<azure.cognitiveservices.vision.contentmoderator.models.APIErrorException>`
        """
        content = models.Content(content_value=content_value)

        # Construct URL
        url = self.create_job.metadata['url']
        path_format_arguments = {
            'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
            'teamName': self._serialize.url("team_name", team_name, 'str')
        }
        url = self._client.format_url(url, **path_format_arguments)

        # Construct parameters
        query_parameters = {}
        query_parameters['ContentType'] = self._serialize.query("content_type", content_type, 'str')
        query_parameters['ContentId'] = self._serialize.query("content_id", content_id, 'str')
        query_parameters['WorkflowName'] = self._serialize.query("workflow_name", workflow_name, 'str')
        if call_back_endpoint is not None:
            query_parameters['CallBackEndpoint'] = self._serialize.query("call_back_endpoint", call_back_endpoint, 'str')

        # Construct headers
        header_parameters = {}
        header_parameters['Accept'] = 'application/json'
        header_parameters['Content-Type'] = 'application/json; charset=utf-8'
        if custom_headers:
            header_parameters.update(custom_headers)
        header_parameters['Content-Type'] = self._serialize.header("job_content_type", job_content_type, 'str')

        # Construct body
        body_content = self._serialize.body(content, 'Content')

        # Construct and send request
        request = self._client.post(url, query_parameters, header_parameters, body_content)
        response = self._client.send(request, stream=False, **operation_config)

        if response.status_code not in [200]:
            raise models.APIErrorException(self._deserialize, response)

        deserialized = None

        if response.status_code == 200:
            deserialized = self._deserialize('JobId', response)

        if raw:
            client_raw_response = ClientRawResponse(deserialized, response)
            return client_raw_response

        return deserialized
def create_job(
            self, team_name, content_type, content_id, workflow_name, job_content_type, content_value, call_back_endpoint=None, custom_headers=None, raw=False, **operation_config):
        """A job Id will be returned for the content posted on this endpoint.
        Once the content is evaluated against the Workflow provided the review
        will be created or ignored based on the workflow expression.
        <h3>CallBack Schemas </h3>
        <p>
        <h4>Job Completion CallBack Sample</h4><br/>
        {<br/>
        "JobId": "<Job Id>,<br/>
        "ReviewId": "<Review Id, if the Job resulted in a Review to be
        created>",<br/>
        "WorkFlowId": "default",<br/>
        "Status": "<This will be one of Complete, InProgress, Error>",<br/>
        "ContentType": "Image",<br/>
        "ContentId": "<This is the ContentId that was specified on
        input>",<br/>
        "CallBackType": "Job",<br/>
        "Metadata": {<br/>
        "adultscore": "0.xxx",<br/>
        "a": "False",<br/>
        "racyscore": "0.xxx",<br/>
        "r": "True"<br/>
        }<br/>
        }<br/>
        </p>
        <p>
        <h4>Review Completion CallBack Sample</h4><br/>
        {
        "ReviewId": "<Review Id>",<br/>
        "ModifiedOn": "2016-10-11T22:36:32.9934851Z",<br/>
        "ModifiedBy": "<Name of the Reviewer>",<br/>
        "CallBackType": "Review",<br/>
        "ContentId": "<The ContentId that was specified input>",<br/>
        "Metadata": {<br/>
        "adultscore": "0.xxx",
        "a": "False",<br/>
        "racyscore": "0.xxx",<br/>
        "r": "True"<br/>
        },<br/>
        "ReviewerResultTags": {<br/>
        "a": "False",<br/>
        "r": "True"<br/>
        }<br/>
        }<br/>
        </p>.

        :param team_name: Your team name.
        :type team_name: str
        :param content_type: Image, Text or Video. Possible values include:
         'Image', 'Text', 'Video'
        :type content_type: str
        :param content_id: Id/Name to identify the content submitted.
        :type content_id: str
        :param workflow_name: Workflow Name that you want to invoke.
        :type workflow_name: str
        :param job_content_type: The content type. Possible values include:
         'application/json', 'image/jpeg'
        :type job_content_type: str
        :param content_value: Content to evaluate for a job.
        :type content_value: str
        :param call_back_endpoint: Callback endpoint for posting the create
         job result.
        :type call_back_endpoint: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: JobId or ClientRawResponse if raw=true
        :rtype: ~azure.cognitiveservices.vision.contentmoderator.models.JobId
         or ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`APIErrorException<azure.cognitiveservices.vision.contentmoderator.models.APIErrorException>`
        """
        content = models.Content(content_value=content_value)

        # Construct URL
        url = self.create_job.metadata['url']
        path_format_arguments = {
            'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
            'teamName': self._serialize.url("team_name", team_name, 'str')
        }
        url = self._client.format_url(url, **path_format_arguments)

        # Construct parameters
        query_parameters = {}
        query_parameters['ContentType'] = self._serialize.query("content_type", content_type, 'str')
        query_parameters['ContentId'] = self._serialize.query("content_id", content_id, 'str')
        query_parameters['WorkflowName'] = self._serialize.query("workflow_name", workflow_name, 'str')
        if call_back_endpoint is not None:
            query_parameters['CallBackEndpoint'] = self._serialize.query("call_back_endpoint", call_back_endpoint, 'str')

        # Construct headers
        header_parameters = {}
        header_parameters['Accept'] = 'application/json'
        header_parameters['Content-Type'] = 'application/json; charset=utf-8'
        if custom_headers:
            header_parameters.update(custom_headers)
        header_parameters['Content-Type'] = self._serialize.header("job_content_type", job_content_type, 'str')

        # Construct body
        body_content = self._serialize.body(content, 'Content')

        # Construct and send request
        request = self._client.post(url, query_parameters, header_parameters, body_content)
        response = self._client.send(request, stream=False, **operation_config)

        if response.status_code not in [200]:
            raise models.APIErrorException(self._deserialize, response)

        deserialized = None

        if response.status_code == 200:
            deserialized = self._deserialize('JobId', response)

        if raw:
            client_raw_response = ClientRawResponse(deserialized, response)
            return client_raw_response

        return deserialized
def create_job ( self , team_name , content_type , content_id , workflow_name , job_content_type , content_value , call_back_endpoint = None , custom_headers = None , raw = False , * * operation_config ) : content = models . Content ( content_value = content_value ) # Construct URL url = self . create_job . metadata [ 'url' ] path_format_arguments = { 'Endpoint' : self . _serialize . url ( "self.config.endpoint" , self . config . endpoint , 'str' , skip_quote = True ) , 'teamName' : self . _serialize . url ( "team_name" , team_name , 'str' ) } url = self . _client . format_url ( url , * * path_format_arguments ) # Construct parameters query_parameters = { } query_parameters [ 'ContentType' ] = self . _serialize . query ( "content_type" , content_type , 'str' ) query_parameters [ 'ContentId' ] = self . _serialize . query ( "content_id" , content_id , 'str' ) query_parameters [ 'WorkflowName' ] = self . _serialize . query ( "workflow_name" , workflow_name , 'str' ) if call_back_endpoint is not None : query_parameters [ 'CallBackEndpoint' ] = self . _serialize . query ( "call_back_endpoint" , call_back_endpoint , 'str' ) # Construct headers header_parameters = { } header_parameters [ 'Accept' ] = 'application/json' header_parameters [ 'Content-Type' ] = 'application/json; charset=utf-8' if custom_headers : header_parameters . update ( custom_headers ) header_parameters [ 'Content-Type' ] = self . _serialize . header ( "job_content_type" , job_content_type , 'str' ) # Construct body body_content = self . _serialize . body ( content , 'Content' ) # Construct and send request request = self . _client . post ( url , query_parameters , header_parameters , body_content ) response = self . _client . send ( request , stream = False , * * operation_config ) if response . status_code not in [ 200 ] : raise models . APIErrorException ( self . _deserialize , response ) deserialized = None if response . status_code == 200 : deserialized = self . _deserialize ( 'JobId' , response ) if raw : client_raw_response = ClientRawResponse ( deserialized , response ) return client_raw_response return deserialized
A job Id will be returned for the content posted on this endpoint.
        Once the content is evaluated against the Workflow provided the review
        will be created or ignored based on the workflow expression.
        <h3>CallBack Schemas </h3>
        <p>
        <h4>Job Completion CallBack Sample</h4><br/>
        {<br/>
        "JobId": "<Job Id>,<br/>
        "ReviewId": "<Review Id, if the Job resulted in a Review to be
        created>",<br/>
        "WorkFlowId": "default",<br/>
        "Status": "<This will be one of Complete, InProgress, Error>",<br/>
        "ContentType": "Image",<br/>
        "ContentId": "<This is the ContentId that was specified on
        input>",<br/>
        "CallBackType": "Job",<br/>
        "Metadata": {<br/>
        "adultscore": "0.xxx",<br/>
        "a": "False",<br/>
        "racyscore": "0.xxx",<br/>
        "r": "True"<br/>
        }<br/>
        }<br/>
        </p>
        <p>
        <h4>Review Completion CallBack Sample</h4><br/>
        {
        "ReviewId": "<Review Id>",<br/>
        "ModifiedOn": "2016-10-11T22:36:32.9934851Z",<br/>
        "ModifiedBy": "<Name of the Reviewer>",<br/>
        "CallBackType": "Review",<br/>
        "ContentId": "<The ContentId that was specified input>",<br/>
        "Metadata": {<br/>
        "adultscore": "0.xxx",
        "a": "False",<br/>
        "racyscore": "0.xxx",<br/>
        "r": "True"<br/>
        },<br/>
        "ReviewerResultTags": {<br/>
        "a": "False",<br/>
        "r": "True"<br/>
        }<br/>
        }<br/>
        </p>.

        :param team_name: Your team name.
        :type team_name: str
        :param content_type: Image, Text or Video. Possible values include:
         'Image', 'Text', 'Video'
        :type content_type: str
        :param content_id: Id/Name to identify the content submitted.
        :type content_id: str
        :param workflow_name: Workflow Name that you want to invoke.
        :type workflow_name: str
        :param job_content_type: The content type. Possible values include:
         'application/json', 'image/jpeg'
        :type job_content_type: str
        :param content_value: Content to evaluate for a job.
        :type content_value: str
        :param call_back_endpoint: Callback endpoint for posting the create
         job result.
        :type call_back_endpoint: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: JobId or ClientRawResponse if raw=true
        :rtype: ~azure.cognitiveservices.vision.contentmoderator.models.JobId
         or ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`APIErrorException<azure.cognitiveservices.vision.contentmoderator.models.APIErrorException>`
A job Id will be returned for the content posted on this endpoint . Once the content is evaluated against the Workflow provided the review will be created or ignored based on the workflow expression . <h3 > CallBack Schemas < / h3 > <p > <h4 > Job Completion CallBack Sample< / h4 > <br / > { <br / > JobId : <Job Id > <br / > ReviewId : <Review Id if the Job resulted in a Review to be created > <br / > WorkFlowId : default <br / > Status : <This will be one of Complete InProgress Error > <br / > ContentType : Image <br / > ContentId : <This is the ContentId that was specified on input > <br / > CallBackType : Job <br / > Metadata : { <br / > adultscore : 0 . xxx <br / > a : False <br / > racyscore : 0 . xxx <br / > r : True <br / > } <br / > } <br / > < / p > <p > <h4 > Review Completion CallBack Sample< / h4 > <br / > { ReviewId : <Review Id > <br / > ModifiedOn : 2016 - 10 - 11T22 : 36 : 32 . 9934851Z <br / > ModifiedBy : <Name of the Reviewer > <br / > CallBackType : Review <br / > ContentId : <The ContentId that was specified input > <br / > Metadata : { <br / > adultscore : 0 . xxx a : False <br / > racyscore : 0 . xxx <br / > r : True <br / > } <br / > ReviewerResultTags : { <br / > a : False <br / > r : True <br / > } <br / > } <br / > < / p > .