class_docstr: Container builder that uses Google cloud build.
class_docstr_tok: ["Container","builder","that","uses","Google","cloud","build","."]
docstr: Creates request body for cloud build JSON API call.
  
  `create` body should be a `Build` object
  https://cloud.google.com/cloud-build/docs/api/reference/rest/v1/projects.builds#Build
  
  Args:
      image_uri: GCR Docker image URI.
      storage_object_name: Name of the tarfile object in GCS.
      timeout_sec: timeout for the CloudBuild in seconds.
  
  Returns:
      Build request dictionary.
docstr_tok: ["Creates","request","body","for","cloud","build","JSON","API","call",".","`","create","`","body","should","be","a","`","Build","`","object","https",":","\/\/cloud.google.com\/cloud-build\/docs\/api\/reference\/rest\/v1\/projects.builds","#","Build","Args",":","image_uri",":","GCR","Docker","image","URI",".","storage_object_name",":","Name","of","the","tarfile","object","in","GCS",".","timeout_sec",":","timeout","for","the","CloudBuild","in","seconds",".","Returns",":","Build","request","dictionary","."]
code: def _create_cloud_build_request_dict(
      self, image_uri, storage_object_name, timeout_sec
  ):
      """Creates request body for cloud build JSON API call.
  
      `create` body should be a `Build` object
      https://cloud.google.com/cloud-build/docs/api/reference/rest/v1/projects.builds#Build
  
      Args:
          image_uri: GCR Docker image URI.
          storage_object_name: Name of the tarfile object in GCS.
          timeout_sec: timeout for the CloudBuild in seconds.
  
      Returns:
          Build request dictionary.
      """
      request_dict = {}
      request_dict["projectId"] = self.project_id
      request_dict["images"] = [[image_uri]]
      request_dict["steps"] = []
      request_dict["timeout"] = "{}s".format(timeout_sec)
      build_args = ["build", "-t", image_uri, "."]
  
      if self.docker_config:
          cache_from = (
              self.docker_config.cache_from or self.docker_config.image
          )
  
      if cache_from:
          # Use the given Docker image as cache.
          request_dict["steps"].append(
              {
                  "name": "gcr.io/cloud-builders/docker",
                  "entrypoint": "bash",
                  "args": [
                      "-c",
                      "docker pull {} || exit 0".format(cache_from),
                  ],
              }
          )
          build_args[3:3] = ["--cache-from", cache_from]
  
      request_dict["steps"].append(
          {
              "name": "gcr.io/cloud-builders/docker",
              "args": build_args,
          }
      )
      request_dict["source"] = {
          "storageSource": {
              "bucket": self.docker_config.image_build_bucket,
              "object": storage_object_name,
          }
      }
      request_dict["options"] = {"machineType": "N1_HIGHCPU_8"}
      return request_dict
  
imports: import logging
  import os
  import sys
  import tarfile
  import tempfile
  import time
  import uuid
  import warnings
  from .None import gcp
  from .None import machine_config
  import docker
  from google.cloud import storage
  from google.cloud.exceptions import NotFound
  from googleapiclient import discovery
  from googleapiclient import errors
  import requests
  from ..utils import google_api_client
  from ..utils import tf_utils
label_desc: Use image node_id 3 for calling the CloudContainerBuilder obj's underlying member method code with example usage: obj._create_cloud_build_request_dict(image_uri, storage_object_name, timeout_sec) and returns: request_dict