class_docstr: Use the Google Cloud connection to interact with Google Cloud Storage.
class_docstr_tok: ["Use","the","Google","Cloud","connection","to","interact","with","Google","Cloud","Storage","."]
docstr: Creates a new ACL entry on the specified object.
  
  See: https://cloud.google.com/storage/docs/json_api/v1/objectAccessControls/insert
  
  :param bucket_name: Name of a bucket_name.
  :param object_name: Name of the object. For information about how to URL encode
      object names to be path safe, see:
      https://cloud.google.com/storage/docs/json_api/#encoding
  :param entity: The entity holding the permission, in one of the following forms:
      user-userId, user-email, group-groupId, group-email, domain-domain,
      project-team-projectId, allUsers, allAuthenticatedUsers
      See: https://cloud.google.com/storage/docs/access-control/lists#scopes
  :param role: The access permission for the entity.
      Acceptable values are: "OWNER", "READER".
  :param generation: Optional. If present, selects a specific revision of this object.
  :param user_project: (Optional) The project to be billed for this request.
      Required for Requester Pays buckets.
docstr_tok: ["Creates","a","new","ACL","entry","on","the","specified","object",".","See",":","https",":","\/\/cloud.google.com\/storage\/docs\/json_api\/v1\/objectAccessControls\/insert",":","param","bucket_name",":","Name","of","a","bucket_name",".",":","param","object_name",":","Name","of","the","object",".","For","information","about","how","to","URL","encode","object","names","to","be","path","safe",",","see",":","https",":","\/\/cloud.google.com\/storage\/docs\/json_api\/","#","encoding",":","param","entity",":","The","entity","holding","the","permission",",","in","one","of","the","following","forms",":","user-userId",",","user-email",",","group-groupId",",","group-email",",","domain-domain",",","project-team-projectId",",","allUsers",",","allAuthenticatedUsers","See",":","https",":","\/\/cloud.google.com\/storage\/docs\/access-control\/lists","#","scopes",":","param","role",":","The","access","permission","for","the","entity",".","Acceptable","values","are",":","``","OWNER","''",",","``","READER","''",".",":","param","generation",":","Optional",".","If","present",",","selects","a","specific","revision","of","this","object",".",":","param","user_project",":","(","Optional",")","The","project","to","be","billed","for","this","request",".","Required","for","Requester","Pays","buckets","."]
code: def insert_object_acl(
      self,
      bucket_name: str,
      object_name: str,
      entity: str,
      role: str,
      generation: int | None = None,
      user_project: str | None = None,
  ) -> None:
      """
      Creates a new ACL entry on the specified object.
  
      See: https://cloud.google.com/storage/docs/json_api/v1/objectAccessControls/insert
  
      :param bucket_name: Name of a bucket_name.
      :param object_name: Name of the object. For information about how to URL encode
          object names to be path safe, see:
          https://cloud.google.com/storage/docs/json_api/#encoding
      :param entity: The entity holding the permission, in one of the following forms:
          user-userId, user-email, group-groupId, group-email, domain-domain,
          project-team-projectId, allUsers, allAuthenticatedUsers
          See: https://cloud.google.com/storage/docs/access-control/lists#scopes
      :param role: The access permission for the entity.
          Acceptable values are: "OWNER", "READER".
      :param generation: Optional. If present, selects a specific revision of this object.
      :param user_project: (Optional) The project to be billed for this request.
          Required for Requester Pays buckets.
      """
      self.log.info(
          "Creating a new ACL entry for object: %s in bucket: %s",
          object_name,
          bucket_name,
      )
      client = self.get_conn()
      bucket = client.bucket(bucket_name=bucket_name)
      blob = bucket.blob(blob_name=object_name, generation=generation)
      # Reload fetches the current ACL from Cloud Storage.
      blob.acl.reload()
      blob.acl.entity_from_dict(
          entity_dict={"entity": entity, "role": role}
      )
      if user_project:
          blob.acl.user_project = user_project
      blob.acl.save()
  
      self.log.info(
          "A new ACL entry created for object: %s in bucket: %s",
          object_name,
          bucket_name,
      )
  
imports: from __future__ import annotations
  import functools
  import gzip
  import json
  import os
  import shutil
  import time
  import warnings
  from contextlib import contextmanager
  from functools import partial
  from io import BytesIO
  from tempfile import NamedTemporaryFile
  from typing import IO, TYPE_CHECKING, Any, Callable, Generator, Sequence, TypeVar, cast, overload
  from urllib.parse import urlsplit
  from gcloud.aio.storage import Storage
  from google.api_core.exceptions import GoogleAPICallError, NotFound
  from google.cloud import storage
  from google.cloud.exceptions import GoogleCloudError
  from google.cloud.storage.retry import DEFAULT_RETRY
  from requests import Session
  from airflow.exceptions import AirflowException, AirflowProviderDeprecationWarning
  from airflow.providers.google.cloud.utils.helpers import normalize_directory_path
  from airflow.providers.google.common.consts import CLIENT_INFO
  from airflow.providers.google.common.hooks.base_google import GoogleBaseAsyncHook, GoogleBaseHook
  from airflow.typing_compat import ParamSpec
  from airflow.utils import timezone
  from airflow.version import version
label_desc: Use image node_id 29 for calling the GCSHook obj's underlying member method code with example usage: obj.insert_object_acl(bucket_name, object_name, entity, role, generation, user_project) without return types