Google_NetworksServiceResource
The "networks" collection of methods.
Defined (1)
The class is defined in the following location(s).
- /src/contrib/Google_ComputeService.php
- class Google_NetworksServiceResource extends Google_ServiceResource {
- /**
- * Deletes the specified network resource. (networks.delete)
- *
- * @param string $project Name of the project scoping this request.
- * @param string $network Name of the network resource to delete.
- * @param array $optParams Optional parameters.
- * @return Google_Operation
- */
- public function delete($project, $network, $optParams = array()) {
- $params = array('project' => $project, 'network' => $network);
- $params = array_merge($params, $optParams);
- $data = $this->__call('delete', array($params));
- if ($this->useObjects()) {
- return new Google_Operation($data);
- } else {
- return $data;
- }
- }
- /**
- * Returns the specified network resource. (networks.get)
- *
- * @param string $project Name of the project scoping this request.
- * @param string $network Name of the network resource to return.
- * @param array $optParams Optional parameters.
- * @return Google_Network
- */
- public function get($project, $network, $optParams = array()) {
- $params = array('project' => $project, 'network' => $network);
- $params = array_merge($params, $optParams);
- $data = $this->__call('get', array($params));
- if ($this->useObjects()) {
- return new Google_Network($data);
- } else {
- return $data;
- }
- }
- /**
- * Creates a network resource in the specified project using the data included in the request.
- * (networks.insert)
- *
- * @param string $project Name of the project scoping this request.
- * @param Google_Network $postBody
- * @param array $optParams Optional parameters.
- * @return Google_Operation
- */
- public function insert($project, Google_Network $postBody, $optParams = array()) {
- $params = array('project' => $project, 'postBody' => $postBody);
- $params = array_merge($params, $optParams);
- $data = $this->__call('insert', array($params));
- if ($this->useObjects()) {
- return new Google_Operation($data);
- } else {
- return $data;
- }
- }
- /**
- * Retrieves the list of network resources available to the specified project. (networks.list)
- *
- * @param string $project Name of the project scoping this request.
- * @param array $optParams Optional parameters.
- *
- * @opt_param string filter Optional. Filter expression for filtering listed resources.
- * @opt_param string maxResults Optional. Maximum count of results to be returned. Maximum and default value is 100.
- * @opt_param string pageToken Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.
- * @return Google_NetworkList
- */
- public function listNetworks($project, $optParams = array()) {
- $params = array('project' => $project);
- $params = array_merge($params, $optParams);
- $data = $this->__call('list', array($params));
- if ($this->useObjects()) {
- return new Google_NetworkList($data);
- } else {
- return $data;
- }
- }
- }