class_docstr: Sync an Azure FileShare directory with a Google Cloud Storage destination path.
  
  Does not include subdirectories.  May be filtered by prefix.
  
  :param share_name: The Azure FileShare share where to find the objects. (templated)
  :param directory_name: (Optional) Path to Azure FileShare directory which content is to be transferred.
      Defaults to root directory (templated)
  :param prefix: Prefix string which filters objects whose name begin with
      such prefix. (templated)
  :param azure_fileshare_conn_id: The source WASB connection
  :param gcp_conn_id: (Optional) The connection ID used to connect to Google Cloud.
  :param dest_gcs: The destination Google Cloud Storage bucket and prefix
      where you want to store the files. (templated)
  :param replace: Whether you want to replace existing destination files
      or not.
  :param gzip: Option to compress file for upload
  :param google_impersonation_chain: Optional Google service account to impersonate using
      short-term credentials, or chained list of accounts required to get the access_token
      of the last account in the list, which will be impersonated in the request.
      If set as a string, the account must grant the originating account
      the Service Account Token Creator IAM role.
      If set as a sequence, the identities from the list must grant
      Service Account Token Creator IAM role to the directly preceding identity, with first
      account from the list granting this role to the originating account (templated).
  
  Note that ``share_name``, ``directory_name``, ``prefix``, ``delimiter`` and ``dest_gcs`` are
  templated, so you can use variables in them if you wish.
class_docstr_tok: ["Sync","an","Azure","FileShare","directory","with","a","Google","Cloud","Storage","destination","path",".","Does","not","include","subdirectories",".","May","be","filtered","by","prefix",".",":","param","share_name",":","The","Azure","FileShare","share","where","to","find","the","objects",".","(","templated",")",":","param","directory_name",":","(","Optional",")","Path","to","Azure","FileShare","directory","which","content","is","to","be","transferred",".","Defaults","to","root","directory","(","templated",")",":","param","prefix",":","Prefix","string","which","filters","objects","whose","name","begin","with","such","prefix",".","(","templated",")",":","param","azure_fileshare_conn_id",":","The","source","WASB","connection",":","param","gcp_conn_id",":","(","Optional",")","The","connection","ID","used","to","connect","to","Google","Cloud",".",":","param","dest_gcs",":","The","destination","Google","Cloud","Storage","bucket","and","prefix","where","you","want","to","store","the","files",".","(","templated",")",":","param","replace",":","Whether","you","want","to","replace","existing","destination","files","or","not",".",":","param","gzip",":","Option","to","compress","file","for","upload",":","param","google_impersonation_chain",":","Optional","Google","service","account","to","impersonate","using","short-term","credentials",",","or","chained","list","of","accounts","required","to","get","the","access_token","of","the","last","account","in","the","list",",","which","will","be","impersonated","in","the","request",".","If","set","as","a","string",",","the","account","must","grant","the","originating","account","the","Service","Account","Token","Creator","IAM","role",".","If","set","as","a","sequence",",","the","identities","from","the","list","must","grant","Service","Account","Token","Creator","IAM","role","to","the","directly","preceding","identity",",","with","first","account","from","the","list","granting","this","role","to","the","originating","account","(","templated",")",".","Note","that","``","share_name","``",",","``","directory_name","``",",","``","prefix","``",",","``","delimiter","``","and","``","dest_gcs","``","are","templated",",","so","you","can","use","variables","in","them","if","you","wish","."]
code: def execute(self, context: Context):
      self._check_inputs()
      azure_fileshare_hook = AzureFileShareHook(
          share_name=self.share_name,
          azure_fileshare_conn_id=self.azure_fileshare_conn_id,
          directory_path=self.directory_path,
      )
      files = azure_fileshare_hook.list_files()
  
      gcs_hook = GCSHook(
          gcp_conn_id=self.gcp_conn_id,
          impersonation_chain=self.google_impersonation_chain,
      )
  
      dest_gcs_bucket, dest_gcs_object_prefix = _parse_gcs_url(
          self.dest_gcs
      )
  
      if not self.replace:
          # if we are not replacing -> list all files in the GCS bucket
          # and only keep those files which are present in
          # S3 and not in Google Cloud Storage
          existing_files_prefixed = gcs_hook.list(
              dest_gcs_bucket, prefix=dest_gcs_object_prefix
          )
  
          existing_files = []
  
          # Remove the object prefix itself, an empty directory was found
          if dest_gcs_object_prefix in existing_files_prefixed:
              existing_files_prefixed.remove(dest_gcs_object_prefix)
  
          # Remove the object prefix from all object string paths
          for file in existing_files_prefixed:
              if file.startswith(dest_gcs_object_prefix):
                  existing_files.append(
                      file[len(dest_gcs_object_prefix) :]
                  )
              else:
                  existing_files.append(file)
  
          files = list(set(files) - set(existing_files))
  
      if files:
          self.log.info("%s files are going to be synced.", len(files))
          if self.directory_path is None:
              raise RuntimeError("The directory_name must be set!.")
          for file in files:
              azure_fileshare_hook = AzureFileShareHook(
                  share_name=self.share_name,
                  azure_fileshare_conn_id=self.azure_fileshare_conn_id,
                  directory_path=self.directory_path,
                  file_path=file,
              )
              with NamedTemporaryFile() as temp_file:
                  azure_fileshare_hook.get_file_to_stream(
                      stream=temp_file
                  )
                  temp_file.flush()
  
                  # There will always be a '/' before file because it is
                  # enforced at instantiation time
                  dest_gcs_object = dest_gcs_object_prefix + file
                  gcs_hook.upload(
                      dest_gcs_bucket,
                      dest_gcs_object,
                      temp_file.name,
                      gzip=self.gzip,
                  )
          self.log.info(
              "All done, uploaded %d files to Google Cloud Storage.",
              len(files),
          )
      else:
          self.log.info(
              "There are no new files to sync. Have a nice day!"
          )
          self.log.info(
              "In sync, no files needed to be uploaded to Google Cloud Storage"
          )
  
      return files
  
file_path: airflow/airflow/providers/google/cloud/transfers/azure_fileshare_to_gcs.py
imports: from __future__ import annotations
  import warnings
  from tempfile import NamedTemporaryFile
  from typing import TYPE_CHECKING, Sequence
  from airflow.exceptions import AirflowException, AirflowProviderDeprecationWarning
  from airflow.models import BaseOperator
  from airflow.providers.google.cloud.hooks.gcs import GCSHook, _parse_gcs_url, gcs_object_is_directory
  from airflow.providers.microsoft.azure.hooks.fileshare import AzureFileShareHook
label_desc: Use image node_id 3 for calling the AzureFileShareToGCSOperator obj's underlying member method code with example usage: obj.execute(context) and returns: files