class_docstr: Google Cloud AutoML hook.
  
  All the methods in the hook where project_id is used must be called with
  keyword arguments rather than positional.
class_docstr_tok: ["Google","Cloud","AutoML","hook",".","All","the","methods","in","the","hook","where","project_id","is","used","must","be","called","with","keyword","arguments","rather","than","positional","."]
docstr: Perform an online prediction and returns the prediction result in the response.
  
  :param model_id: Name of the model_id requested to serve the prediction.
  :param payload: Required. Payload to perform a prediction on. The payload must match the problem type
      that the model_id was trained to solve. If a dict is provided, it must be of
      the same form as the protobuf message `google.cloud.automl_v1beta1.types.ExamplePayload`
  :param params: Additional domain-specific parameters, any string must be up to 25000 characters long.
  :param project_id: ID of the Google Cloud project where model is located if None then
      default project_id is used.
  :param location: The location of the project.
  :param retry: A retry object used to retry requests. If `None` is specified, requests will not be
      retried.
  :param timeout: The amount of time, in seconds, to wait for the request to complete. Note that if
      `retry` is specified, the timeout applies to each individual attempt.
  :param metadata: Additional metadata that is provided to the method.
  
  :return: `google.cloud.automl_v1beta1.types.PredictResponse` instance
docstr_tok: ["Perform","an","online","prediction","and","returns","the","prediction","result","in","the","response",".",":","param","model_id",":","Name","of","the","model_id","requested","to","serve","the","prediction",".",":","param","payload",":","Required",".","Payload","to","perform","a","prediction","on",".","The","payload","must","match","the","problem","type","that","the","model_id","was","trained","to","solve",".","If","a","dict","is","provided",",","it","must","be","of","the","same","form","as","the","protobuf","message","`","google.cloud.automl_v1beta1.types.ExamplePayload","`",":","param","params",":","Additional","domain-specific","parameters",",","any","string","must","be","up","to","25000","characters","long",".",":","param","project_id",":","ID","of","the","Google","Cloud","project","where","model","is","located","if","None","then","default","project_id","is","used",".",":","param","location",":","The","location","of","the","project",".",":","param","retry",":","A","retry","object","used","to","retry","requests",".","If","`","None","`","is","specified",",","requests","will","not","be","retried",".",":","param","timeout",":","The","amount","of","time",",","in","seconds",",","to","wait","for","the","request","to","complete",".","Note","that","if","`","retry","`","is","specified",",","the","timeout","applies","to","each","individual","attempt",".",":","param","metadata",":","Additional","metadata","that","is","provided","to","the","method",".",":","return",":","`","google.cloud.automl_v1beta1.types.PredictResponse","`","instance"]
code: def predict(
      self,
      model_id: str,
      payload: dict | ExamplePayload,
      location: str,
      project_id: str = PROVIDE_PROJECT_ID,
      params: dict[str, str] | None = None,
      retry: Retry | _MethodDefault = DEFAULT,
      timeout: float | None = None,
      metadata: Sequence[tuple[str, str]] = (),
  ) -> PredictResponse:
      """
      Perform an online prediction and returns the prediction result in the response.
  
      :param model_id: Name of the model_id requested to serve the prediction.
      :param payload: Required. Payload to perform a prediction on. The payload must match the problem type
          that the model_id was trained to solve. If a dict is provided, it must be of
          the same form as the protobuf message `google.cloud.automl_v1beta1.types.ExamplePayload`
      :param params: Additional domain-specific parameters, any string must be up to 25000 characters long.
      :param project_id: ID of the Google Cloud project where model is located if None then
          default project_id is used.
      :param location: The location of the project.
      :param retry: A retry object used to retry requests. If `None` is specified, requests will not be
          retried.
      :param timeout: The amount of time, in seconds, to wait for the request to complete. Note that if
          `retry` is specified, the timeout applies to each individual attempt.
      :param metadata: Additional metadata that is provided to the method.
  
      :return: `google.cloud.automl_v1beta1.types.PredictResponse` instance
      """
      client = self.prediction_client
      name = f"projects/{project_id}/locations/{location}/models/{model_id}"
      result = client.predict(
          request={"name": name, "payload": payload, "params": params},
          retry=retry,
          timeout=timeout,
          metadata=metadata,
      )
      return result
  
imports: from __future__ import annotations
  from functools import cached_property
  from typing import TYPE_CHECKING, Sequence
  from google.api_core.gapic_v1.method import DEFAULT, _MethodDefault
  from google.cloud.automl_v1beta1 import AutoMlClient, BatchPredictInputConfig, BatchPredictOutputConfig, Dataset, ExamplePayload, ImageObjectDetectionModelDeploymentMetadata, InputConfig, Model, PredictionServiceClient, PredictResponse
  from airflow.exceptions import AirflowException
  from airflow.providers.google.common.consts import CLIENT_INFO
  from airflow.providers.google.common.hooks.base_google import PROVIDE_PROJECT_ID, GoogleBaseHook
label_desc: Use image node_id 8 for calling the CloudAutoMLHook obj's underlying member method code with example usage: obj.predict(model_id, payload, location, project_id, params, retry, timeout, metadata) and returns: result