class_docstr: Hook for Google Compute Engine APIs.
  
  All the methods in the hook where project_id is used must be called with
  keyword arguments rather than positional.
docstr: Sets machine type of an instance defined by project_id, zone and resource_id.
  
  Must be called with keyword arguments rather than positional.
  
  :param zone: Google Cloud zone where the instance exists.
  :param resource_id: Name of the Compute Engine instance resource
  :param body: Body required by the Compute Engine setMachineType API,
      as described in
      https://cloud.google.com/compute/docs/reference/rest/v1/instances/setMachineType
  :param project_id: Optional, Google Cloud project ID where the
      Compute Engine Instance exists. If set to None or missing,
      the default project_id from the Google Cloud connection is used.
  :return: None
docstr_tok: ["Sets","machine","type","of","an","instance","defined","by","project_id",",","zone","and","resource_id",".","Must","be","called","with","keyword","arguments","rather","than","positional",".",":","param","zone",":","Google","Cloud","zone","where","the","instance","exists",".",":","param","resource_id",":","Name","of","the","Compute","Engine","instance","resource",":","param","body",":","Body","required","by","the","Compute","Engine","setMachineType","API",",","as","described","in","https",":","\/\/cloud.google.com\/compute\/docs\/reference\/rest\/v1\/instances\/setMachineType",":","param","project_id",":","Optional",",","Google","Cloud","project","ID","where","the","Compute","Engine","Instance","exists",".","If","set","to","None","or","missing",",","the","default","project_id","from","the","Google","Cloud","connection","is","used",".",":","return",":","None"]
code: def set_machine_type(
      self, zone: str, resource_id: str, body: dict, project_id: str
  ) -> None:
      """
      Sets machine type of an instance defined by project_id, zone and resource_id.
  
      Must be called with keyword arguments rather than positional.
  
      :param zone: Google Cloud zone where the instance exists.
      :param resource_id: Name of the Compute Engine instance resource
      :param body: Body required by the Compute Engine setMachineType API,
          as described in
          https://cloud.google.com/compute/docs/reference/rest/v1/instances/setMachineType
      :param project_id: Optional, Google Cloud project ID where the
          Compute Engine Instance exists. If set to None or missing,
          the default project_id from the Google Cloud connection is used.
      :return: None
      """
      response = self._execute_set_machine_type(
          zone, resource_id, body, project_id
      )
      try:
          operation_name = response["name"]
      except KeyError:
          raise AirflowException(
              f"Wrong response '{response}' returned - it should contain 'name' field"
          )
      self._wait_for_operation_to_complete(
          project_id=project_id,
          operation_name=operation_name,
          zone=zone,
      )
  
imports: from __future__ import annotations
  import time
  from typing import TYPE_CHECKING, Any, Sequence
  from google.cloud.compute_v1.services.instance_group_managers import InstanceGroupManagersClient
  from google.cloud.compute_v1.services.instance_templates import InstanceTemplatesClient
  from google.cloud.compute_v1.services.instances import InstancesClient
  from googleapiclient.discovery import build
  from airflow.exceptions import AirflowException
  from airflow.providers.google.common.hooks.base_google import PROVIDE_PROJECT_ID, GoogleBaseHook
label_desc: Use image node_id 14 for calling the ComputeEngineHook obj's underlying member method code with example usage: obj.set_machine_type(zone, resource_id, body, project_id) without return types