# Path: libcloudforensics/providers/gcp/internal/common.py
# RETRY_MAX = 10
# COMPUTE_RFC1035_REGEX = re.compile('^(?=.{1,63}$)[a-z]([-a-z0-9]*[a-z0-9])?$')
# REGEX_DISK_NAME = COMPUTE_RFC1035_REGEX
# COMPUTE_NAME_LIMIT = 63
# STORAGE_LINK_URL = 'https://storage.cloud.google.com'
# DEFAULT_COMPUTE_INSTANCE_SCOPE = [
#     'https://www.googleapis.com/auth/devstorage.read_only',
#     'https://www.googleapis.com/auth/logging.write',
#     'https://www.googleapis.com/auth/monitoring.write',
#     'https://www.googleapis.com/auth/service.management.readonly',
#     'https://www.googleapis.com/auth/servicecontrol',
#     'https://www.googleapis.com/auth/trace.append'
# ]
# DEFAULT_SA_EMAIL = 'default'
#   COMPUTE_ENGINE_API_VERSION = 'v1'
# def GenerateDiskName(
#     snapshot: 'compute.GoogleComputeSnapshot',
#     disk_name_prefix: Optional[str] = None) -> str:
# def GenerateSourceRange(
#     exempted_src_ips: Optional[List[str]] = None) -> List[str]:
# def GenerateUniqueInstanceName(
#     prefix: str, truncate_at: Optional[int] = None) -> str:
# def CreateService(
#     service_name: str,
#     api_version: str) -> 'googleapiclient.discovery.Resource':
#   def __init__(self, project_id: Optional[str] = None) -> None:
#   def GceApi(self) -> 'googleapiclient.discovery.Resource':
#   def BlockOperation(
#       self, response: Dict[str, Any],
#       zone: Optional[str] = None) -> Dict[str, Any]:
# def ExecuteRequest(
#     client: 'googleapiclient.discovery.Resource',
#     func: str,
#     kwargs: Dict[str, Any],
#     throttle: bool = False) -> List[Dict[str, Any]]:
# def FormatRFC3339(datetime_instance: datetime.datetime) -> str:
# class GoogleCloudComputeClient:


import logging
import time
import googleapiclient
from typing import Dict, Any
from libcloudforensics.providers.gcp.internal import common
    """

    self.project_id = project_id

  def GcbApi(self) -> 'googleapiclient.discovery.Resource':
    """Get a Google Cloud Build service object.

    Returns:
      googleapiclient.discovery.Resource: A Google Cloud Build service object.
    """

    return common.CreateService(
        'cloudbuild', self.CLOUD_BUILD_API_VERSION)

  def CreateBuild(self, build_body: Dict[str, Any]) -> Dict[str, Any]:
    """Create a cloud build.

    Args:
      build_body (Dict): A dictionary that describes how to find the source
          code and how to build it.

    Returns:
      Dict: Represents long-running operation that is the result of a network
          API call.
    """
    cloud_build_client = self.GcbApi().projects().builds() # pylint: disable=no-member
    build_info = cloud_build_client.create(
        projectId=self.project_id,
        body=build_body).execute()  # type: Dict[str, Any]
    build_metadata = build_info['metadata']['build']

# Path: libcloudforensics/providers/gcp/internal/common.py
# RETRY_MAX = 10
# COMPUTE_RFC1035_REGEX = re.compile('^(?=.{1,63}$)[a-z]([-a-z0-9]*[a-z0-9])?$')
# REGEX_DISK_NAME = COMPUTE_RFC1035_REGEX
# COMPUTE_NAME_LIMIT = 63
# STORAGE_LINK_URL = 'https://storage.cloud.google.com'
# DEFAULT_COMPUTE_INSTANCE_SCOPE = [
#     'https://www.googleapis.com/auth/devstorage.read_only',
#     'https://www.googleapis.com/auth/logging.write',
#     'https://www.googleapis.com/auth/monitoring.write',
#     'https://www.googleapis.com/auth/service.management.readonly',
#     'https://www.googleapis.com/auth/servicecontrol',
#     'https://www.googleapis.com/auth/trace.append'
# ]
# DEFAULT_SA_EMAIL = 'default'
#   COMPUTE_ENGINE_API_VERSION = 'v1'
# def GenerateDiskName(
#     snapshot: 'compute.GoogleComputeSnapshot',
#     disk_name_prefix: Optional[str] = None) -> str:
# def GenerateSourceRange(
#     exempted_src_ips: Optional[List[str]] = None) -> List[str]:
# def GenerateUniqueInstanceName(
#     prefix: str, truncate_at: Optional[int] = None) -> str:
# def CreateService(
#     service_name: str,
#     api_version: str) -> 'googleapiclient.discovery.Resource':
#   def __init__(self, project_id: Optional[str] = None) -> None:
#   def GceApi(self) -> 'googleapiclient.discovery.Resource':
#   def BlockOperation(
#       self, response: Dict[str, Any],
#       zone: Optional[str] = None) -> Dict[str, Any]:
# def ExecuteRequest(
#     client: 'googleapiclient.discovery.Resource',
#     func: str,
#     kwargs: Dict[str, Any],
#     throttle: bool = False) -> List[Dict[str, Any]]:
# def FormatRFC3339(datetime_instance: datetime.datetime) -> str:
# class GoogleCloudComputeClient:


# Path: libcloudforensics/providers/gcp/internal/build.py
import logging
import time
import googleapiclient
from typing import Dict, Any
from libcloudforensics.providers.gcp.internal import common

    """

    self.project_id = project_id

  def GcbApi(self) -> 'googleapiclient.discovery.Resource':
    """Get a Google Cloud Build service object.

    Returns:
      googleapiclient.discovery.Resource: A Google Cloud Build service object.
    """

    return common.CreateService(
        'cloudbuild', self.CLOUD_BUILD_API_VERSION)

  def CreateBuild(self, build_body: Dict[str, Any]) -> Dict[str, Any]:
    """Create a cloud build.

    Args:
      build_body (Dict): A dictionary that describes how to find the source
          code and how to build it.

    Returns:
      Dict: Represents long-running operation that is the result of a network
          API call.
    """
    cloud_build_client = self.GcbApi().projects().builds() # pylint: disable=no-member
    build_info = cloud_build_client.create(
        projectId=self.project_id,
        body=build_body).execute()  # type: Dict[str, Any]
    build_metadata = build_info['metadata']['build']

    common.logger.info(