def create_product(
        self, location, product, project_id=None, product_id=None, retry=None, timeout=None, metadata=None
    ):
        """
        For the documentation see:
        :class:`~airflow.contrib.operators.gcp_vision_operator.CloudVisionProductCreateOperator`
        """
        client = self.get_conn()
        parent = ProductSearchClient.location_path(project_id, location)
        self.log.info('Creating a new Product under the parent: %s', parent)
        response = client.create_product(
            parent=parent,
            product=product,
            product_id=product_id,
            retry=retry,
            timeout=timeout,
            metadata=metadata,
        )
        self.log.info('Product created: %s', response.name if response else '')
        self.log.debug('Product created:\n%s', response)

        if not product_id:
            # Product id was generated by the API
            product_id = self._get_autogenerated_id(response)
            self.log.info('Extracted autogenerated Product ID from the response: %s', product_id)

        return product_id
def create_product(
        self, location, product, project_id=None, product_id=None, retry=None, timeout=None, metadata=None
    ):
        
        client = self.get_conn()
        parent = ProductSearchClient.location_path(project_id, location)
        self.log.info('Creating a new Product under the parent: %s', parent)
        response = client.create_product(
            parent=parent,
            product=product,
            product_id=product_id,
            retry=retry,
            timeout=timeout,
            metadata=metadata,
        )
        self.log.info('Product created: %s', response.name if response else '')
        self.log.debug('Product created:\n%s', response)

        if not product_id:
            
            product_id = self._get_autogenerated_id(response)
            self.log.info('Extracted autogenerated Product ID from the response: %s', product_id)

        return product_id
def create_product ( self , location , product , project_id = None , product_id = None , retry = None , timeout = None , metadata = None ) : client = self . get_conn ( ) parent = ProductSearchClient . location_path ( project_id , location ) self . log . info ( 'Creating a new Product under the parent: %s' , parent ) response = client . create_product ( parent = parent , product = product , product_id = product_id , retry = retry , timeout = timeout , metadata = metadata , ) self . log . info ( 'Product created: %s' , response . name if response else '' ) self . log . debug ( 'Product created:\n%s' , response ) if not product_id : # Product id was generated by the API product_id = self . _get_autogenerated_id ( response ) self . log . info ( 'Extracted autogenerated Product ID from the response: %s' , product_id ) return product_id
For the documentation see:
        :class:`~airflow.contrib.operators.gcp_vision_operator.CloudVisionProductCreateOperator`
For the documentation see : : class : ~airflow . contrib . operators . gcp_vision_operator . CloudVisionProductCreateOperator