class_docstr: Represent a single revision of a GCS Object.
class_docstr_tok: ["Represent","a","single","revision","of","a","GCS","Object","."]
docstr: Update from a metadata dictionary.
  
  :param metadata:dict a dictionary with new metadata values.
  :rtype:NoneType
docstr_tok: ["Update","from","a","metadata","dictionary",".",":","param","metadata",":","dict","a","dictionary","with","new","metadata","values",".",":","rtype",":","NoneType"]
code: def update_from_metadata(self, metadata):
      """Update from a metadata dictionary.
  
      :param metadata:dict a dictionary with new metadata values.
      :rtype:NoneType
      """
      tmp = self.metadata.copy()
      tmp.update(metadata)
      tmp["bucket"] = tmp.get("bucket", self.name)
      tmp["name"] = tmp.get("name", self.name)
      now = time.gmtime(time.time())
      timestamp = time.strftime("%Y-%m-%dT%H:%M:%SZ", now)
      # Some values cannot be changed via updates, so we always reset them.
      tmp.update(
          {
              "kind": "storage#object",
              "bucket": self.bucket_name,
              "name": self.name,
              "id": self.object_id,
              "selfLink": self.gcs_url + self.name,
              "projectNumber": "123456789",
              "updated": timestamp,
          }
      )
      tmp["metageneration"] = str(
          int(tmp.get("metageneration", "0")) + 1
      )
      self.metadata = tmp
      self._validate_hashes()
  
imports: import base64
  import crc32c
  import error_response
  import hashlib
  import json
  import struct
  import testbench_utils
  import time
label_desc: Use image node_id 2 for calling the GcsObjectVersion obj's underlying member method code with example usage: obj.update_from_metadata(metadata) without return types