mik-laj commented on a change in pull request #9698: URL: https://github.com/apache/airflow/pull/9698#discussion_r454923536
########## File path: docs/howto/operator/google/cloud/vision.rst ########## @@ -680,9 +680,71 @@ Templating More information """""""""""""""" -See `Google Cloud Vision ReferenceImage create documentation +See `Google Cloud Vision ReferenceImage delete documentation <https://googleapis.github.io/google-cloud-python/latest/vision/gapic/v1/api.html#google.cloud.vision_v1.ProductSearchClient.create_reference_image>`_. +.. _howto/operator:CloudVisionDeleteReferenceImageOperator: + +CloudVisionDeleteReferenceImageOperator +--------------------------------------- + +Deletes a :code:`ReferenceImage` resource. + +For parameter definition, take a look at +:class:`~airflow.providers.google.cloud.operators.vision.CloudVisionDeleteReferenceImageOperator` + +Using the operator +"""""""""""""""""" + +We are using the :class:`~google.cloud.vision_v1.types.ReferenceImage` and :class:`~google.api_core.retry.Retry` objects from Google libraries: + +.. exampleinclude:: /../airflow/airflow/providers/google/cloud/example_dags/example_vision.py + :language: python + :start-after: [START howto_operator_vision_reference_image_import] + :end-before: [END howto_operator_vision_reference_image_import] + +.. exampleinclude:: /../airflow/airflow/providers/google/cloud/example_dags/example_vision.py + :language: python + :start-after: [START howto_operator_vision_retry_import] + :end-before: [END howto_operator_vision_retry_import] + +.. exampleinclude:: /../airflow/airflow/providers/google/cloud/example_dags/example_vision.py + :language: python + :start-after: [START howto_operator_vision_reference_image] + :end-before: [END howto_operator_vision_reference_image] + +The ``product_set_id`` argument can be omitted (it will be generated by the API): + +.. exampleinclude:: /../airflow/airflow/providers/google/cloud/example_dags/example_vision.py + :language: python + :dedent: 4 + :start-after: [START howto_operator_vision_reference_image_delete] + :end-before: [END howto_operator_vision_reference_image_delete] + +Or it can be specified explicitly: + +.. exampleinclude:: /../airflow/airflow/providers/google/cloud/example_dags/example_vision.py Review comment: ```suggestion .. exampleinclude:: /../airflow/providers/google/cloud/example_dags/example_vision.py ``` ########## File path: docs/howto/operator/google/cloud/vision.rst ########## @@ -680,9 +680,71 @@ Templating More information """""""""""""""" -See `Google Cloud Vision ReferenceImage create documentation +See `Google Cloud Vision ReferenceImage delete documentation <https://googleapis.github.io/google-cloud-python/latest/vision/gapic/v1/api.html#google.cloud.vision_v1.ProductSearchClient.create_reference_image>`_. +.. _howto/operator:CloudVisionDeleteReferenceImageOperator: + +CloudVisionDeleteReferenceImageOperator +--------------------------------------- + +Deletes a :code:`ReferenceImage` resource. + +For parameter definition, take a look at +:class:`~airflow.providers.google.cloud.operators.vision.CloudVisionDeleteReferenceImageOperator` + +Using the operator +"""""""""""""""""" + +We are using the :class:`~google.cloud.vision_v1.types.ReferenceImage` and :class:`~google.api_core.retry.Retry` objects from Google libraries: + +.. exampleinclude:: /../airflow/airflow/providers/google/cloud/example_dags/example_vision.py + :language: python + :start-after: [START howto_operator_vision_reference_image_import] + :end-before: [END howto_operator_vision_reference_image_import] + +.. exampleinclude:: /../airflow/airflow/providers/google/cloud/example_dags/example_vision.py + :language: python + :start-after: [START howto_operator_vision_retry_import] + :end-before: [END howto_operator_vision_retry_import] + +.. exampleinclude:: /../airflow/airflow/providers/google/cloud/example_dags/example_vision.py + :language: python + :start-after: [START howto_operator_vision_reference_image] + :end-before: [END howto_operator_vision_reference_image] + +The ``product_set_id`` argument can be omitted (it will be generated by the API): + +.. exampleinclude:: /../airflow/airflow/providers/google/cloud/example_dags/example_vision.py + :language: python + :dedent: 4 + :start-after: [START howto_operator_vision_reference_image_delete] + :end-before: [END howto_operator_vision_reference_image_delete] + +Or it can be specified explicitly: + +.. exampleinclude:: /../airflow/airflow/providers/google/cloud/example_dags/example_vision.py + :language: python + :dedent: 4 + :start-after: [START howto_operator_vision_reference_image_delete_2] + :end-before: [END howto_operator_vision_reference_image_delete_2] + + +Templating +"""""""""" + +.. literalinclude:: ../../../../airflow/providers/google/cloud/operators/vision.py Review comment: ```suggestion .. literalinclude:: /../airflow/providers/google/cloud/operators/vision.py ``` ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
