Gets the shared VPC host project that this project links to. May be empty if
no link exists. (projects.getXpnHost)

@param string $project Project ID for this request.
@param array $optParams Optional parameters.
@return Google_Service_Compute_Project
498535
public function getXpnHost($project, $optParams = array())
  {
    $params = array('project' => $project);
    $params = array_merge($params, $optParams);
    return $this->call('getXpnHost', array($params), "Google_Service_Compute_Project");
  }
581764
function project($projections)
    {
        $select = $this->from();
        if (1 === func_num_args() and is_array($projections)) {
            return $select->project($projections);
        } else {
            return $select->project(func_get_args());
        }
    }
366126
public function query($projectId, QueryRequest $postBody, $optParams = array()) {
      $params = array('projectId' => $projectId, 'postBody' => $postBody);
      $params = array_merge($params, $optParams);
      $data = $this->__call('query', array($params));
      if ($this->useObjects()) {
        return new QueryResponse($data);
      } else {
        return $data;
      }
    }
1042002
private function getProjectPathRemote(InputInterface $input, $host)
    {
        $path = $input->getArgument('project_path_remote');

        if (!empty($path)) {
            return $path;
        }

        return implode('.', [$this->getCurrentDir(), $host]);
    }
566213
public function get($project, $route, $optParams = array()) {
      $params = array('project' => $project, 'route' => $route);
      $params = array_merge($params, $optParams);
      $data = $this->__call('get', array($params));
      if ($this->useObjects()) {
        return new Google_Route($data);
      } else {
        return $data;
      }
    }
1124916
public function electionQuery($optParams = array()) {
      $params = array();
      $params = array_merge($params, $optParams);
      $data = $this->__call('electionQuery', array($params));
      if ($this->useObjects()) {
        return new Google_ElectionsQueryResponse($data);
      } else {
        return $data;
      }
    }
553301
public function show(string $project, array $params = [])
    {
        $path = $this->buildProjectsPath($project);

        return $this->get($path, $params);
    }
513701
public function getDirectoryScanner(Project $p = null)
    {
        if ($p === null) {
            $p = $this->getProject();
        }

        if ($this->isReference()) {
            $o = $this->getRef($p);

            return $o->getDirectoryScanner($p);
        }

        if ($this->dir === null) {
            throw new BuildException(sprintf("No directory specified for <%s>.", strtolower(get_class($this))));
        }
        if (!$this->dir->exists() && $this->errorOnMissingDir) {
            throw new BuildException("Directory " . $this->dir->getAbsolutePath() . " not found.");
        }
        if (!$this->dir->isLink() || !$this->expandSymbolicLinks) {
            if (!$this->dir->isDirectory()) {
                throw new BuildException($this->dir->getAbsolutePath() . " is not a directory.");
            }
        }
        $ds = new DirectoryScanner();
        $ds->setExpandSymbolicLinks($this->expandSymbolicLinks);
        $ds->setErrorOnMissingDir($this->errorOnMissingDir);
        $this->setupDirectoryScanner($ds, $p);
        $ds->scan();

        return $ds;
    }
818703
public function getByUrl($optParams = array()) {
      $params = array();
      $params = array_merge($params, $optParams);
      $data = $this->__call('getByUrl', array($params));
      if ($this->useObjects()) {
        return new Blog($data);
      } else {
        return $data;
      }
    }
161524
public function ListTrustedApps($optParams = array())
  {
    $params = array();
    $params = array_merge($params, $optParams);
    return $this->call('ListTrustedApps', array($params), "Google_Service_Directory_TrustedApps");
  }
337352
public function url($project = null, $ref = null, $doc = null)
    {
        $uri = $this->config('base_route');

        if ( ! is_null($project) )
        {
            if ( ! $project instanceof Project )
            {
                $project = $this->getProject($project);
            }
            $uri .= '/' . $project->getName();


            if ( ! is_null($ref) )
            {
                $uri .= '/' . $ref;
            }
            else
            {
                $uri .= '/' . $project->getDefaultRef();
            }


            if ( ! is_null($doc) )
            {
                $uri .= '/' . $doc;
            }
        }

        return url($uri);
    }
223696
public function search(Google_Service_QPXExpress_TripsSearchRequest $postBody, $optParams = array())
  {
    $params = array('postBody' => $postBody);
    $params = array_merge($params, $optParams);
    return $this->call('search', array($params), "Google_Service_QPXExpress_TripsSearchResponse");
  }
153557
public function create($params, $optParams = [])
    {
        if (!$params instanceof SuperBackup) {
            throw new InvalidParamException(SuperBackup::class.' is required!');
        }
        if(!isset($optParams['cloud'])){
            $optParams['cloud'] = [];
        }
        $optParams['cloud']['id'] = $params->cloud->id;

        return $this->sendRequest([], [
            'restAction' => 'create',
            'uri' => '/c/<cloud.id>',
            'postParams' => $params->toArray(),
            'getParams' => $optParams,
        ], function ($response) {
            return isset($response->data) ? new SuperBackup($response->data) : $response;
        });
    }
1273954
public function view($params, $optParams = [])
    {
        if ($params instanceof Firewall) {
            $params = $params->id;
        }

        return $this->sendRequest([], [
            'restAction' => 'view',
            'restId' => $params,
            'getParams' => $optParams,
        ], function ($response) {
            return isset($response->data) ? new Firewall($response->data) : $response;
        });
    }
98443
public function getRecaptchaParam($optParams = array())
  {
    $params = array();
    $params = array_merge($params, $optParams);
    return $this->call('getRecaptchaParam', array($params), "Google_Service_IdentityToolkit_GetRecaptchaParamResponse");
  }
169552
def get_project(conn, vm_):
    '''
    
    '''
    try:
        projects = conn.ex_list_projects()
    except AttributeError:
        # with versions <0.15 of libcloud this is causing an AttributeError.
        log.warning('Cannot get projects, you may need to update libcloud to 0.15 or later')
        return False
    projid = config.get_cloud_config_value('projectid', vm_, __opts__)

    if not projid:
        return False

    for project in projects:
        if six.text_type(projid) in (six.text_type(project.id), six.text_type(project.name)):
            return project

    log.warning("Couldn't find project %s in projects", projid)
    return False
634863
def system_find_projects(input_params={}, always_retry=True, **kwargs):
    
    return DXHTTPRequest('/system/findProjects', input_params, always_retry=always_retry, **kwargs)