@GoogleCloudBaseHook.catch_http_exception<EOL><INDENT>@GoogleCloudBaseHook.fallback_to_default_project_id<EOL>def create_reference_image(<EOL>self,<EOL>location,<EOL>product_id,<EOL>reference_image,<EOL>reference_image_id=None,<EOL>project_id=None,<EOL>retry=None,<EOL>timeout=None,<EOL>metadata=None,<EOL>):<DEDENT>
client = self.get_conn()<EOL>self.log.info('<STR_LIT>')<EOL>parent = ProductSearchClient.product_path(project=project_id, location=location, product=product_id)<EOL>response = client.create_reference_image(<EOL>parent=parent,<EOL>reference_image=reference_image,<EOL>reference_image_id=reference_image_id,<EOL>retry=retry,<EOL>timeout=timeout,<EOL>metadata=metadata,<EOL>)<EOL>self.log.info('<STR_LIT>', response.name if response else '<STR_LIT>')<EOL>self.log.debug('<STR_LIT>', response)<EOL>if not reference_image_id:<EOL><INDENT>reference_image_id = self._get_autogenerated_id(response)<EOL>self.log.info(<EOL>'<STR_LIT>', reference_image_id<EOL>)<EOL><DEDENT>return reference_image_id<EOL>
For the documentation see:
:py:class:`~airflow.contrib.operators.gcp_vision_operator.CloudVisionReferenceImageCreateOperator`