def _CreateCloudBuild(build_config, client, messages):
    'Create a build in cloud build.\n\n  Args:\n    build_config: A cloud build Build message.\n    client: The cloud build api client.\n    messages: The cloud build api messages module.\n\n  Returns:\n    Tuple containing a cloud build build object and the resource reference\n    for that build.\n  '
    log.debug('submitting build: {0}'.format(repr(build_config)))
    op = client.projects_builds.Create(messages.CloudbuildProjectsBuildsCreateRequest(build=build_config, projectId=properties.VALUES.core.project.Get()))
    json = encoding.MessageToJson(op.metadata)
    build = encoding.JsonToMessage(messages.BuildOperationMetadata, json).build
    build_ref = resources.REGISTRY.Create(collection='cloudbuild.projects.builds', projectId=build.projectId, id=build.id)
    log.CreatedResource(build_ref)
    if build.logUrl:
        log.status.Print('Logs are available at [{0}].'.format(build.logUrl))
    else:
        log.status.Print('Logs are available in the Cloud Console.')
    return (build, build_ref)
Create a build in cloud build.

Args:
  build_config: A cloud build Build message.
  client: The cloud build api client.
  messages: The cloud build api messages module.

Returns:
  Tuple containing a cloud build build object and the resource reference
  for that build.
def _CreateCloudBuild(build_config, client, messages):
    'Create a build in cloud build.\n\n  Args:\n    build_config: A cloud build Build message.\n    client: The cloud build api client.\n    messages: The cloud build api messages module.\n\n  Returns:\n    Tuple containing a cloud build build object and the resource reference\n    for that build.\n  '
    log.debug('submitting build: {0}'.format(repr(build_config)))
    op = client.projects_builds.Create(messages.CloudbuildProjectsBuildsCreateRequest(build=build_config, projectId=properties.VALUES.core.project.Get()))
    json = encoding.MessageToJson(op.metadata)
    build = encoding.JsonToMessage(messages.BuildOperationMetadata, json).build
    build_ref = resources.REGISTRY.Create(collection='cloudbuild.projects.builds', projectId=build.projectId, id=build.id)
    log.CreatedResource(build_ref)
    if build.logUrl:
        log.status.Print('Logs are available at [{0}].'.format(build.logUrl))
    else:
        log.status.Print('Logs are available in the Cloud Console.')
    return (build, build_ref)