1<?php
2/*
3 * Copyright 2014 Google Inc.
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6 * use this file except in compliance with the License. You may obtain a copy of
7 * the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14 * License for the specific language governing permissions and limitations under
15 * the License.
16 */
17
18/**
19 * The "instances" collection of methods.
20 * Typical usage is:
21 *  <code>
22 *   $apigeeService = new Google_Service_Apigee(...);
23 *   $instances = $apigeeService->instances;
24 *  </code>
25 */
26class Google_Service_Apigee_Resource_OrganizationsInstances extends Google_Service_Resource
27{
28  /**
29   * Creates an Apigee runtime instance. The instance is accessible from the
30   * authorized network configured on the organization. **Note:** Not supported
31   * for Apigee hybrid. (instances.create)
32   *
33   * @param string $parent Required. Name of the organization. Use the following
34   * structure in your request: `organizations/{org}`.
35   * @param Google_Service_Apigee_GoogleCloudApigeeV1Instance $postBody
36   * @param array $optParams Optional parameters.
37   * @return Google_Service_Apigee_GoogleLongrunningOperation
38   */
39  public function create($parent, Google_Service_Apigee_GoogleCloudApigeeV1Instance $postBody, $optParams = array())
40  {
41    $params = array('parent' => $parent, 'postBody' => $postBody);
42    $params = array_merge($params, $optParams);
43    return $this->call('create', array($params), "Google_Service_Apigee_GoogleLongrunningOperation");
44  }
45  /**
46   * Deletes an Apigee runtime instance. The instance stops serving requests and
47   * the runtime data is deleted. **Note:** Not supported for Apigee hybrid.
48   * (instances.delete)
49   *
50   * @param string $name Required. Name of the instance. Use the following
51   * structure in your request: `organizations/{org}/instances/{instance}`.
52   * @param array $optParams Optional parameters.
53   * @return Google_Service_Apigee_GoogleLongrunningOperation
54   */
55  public function delete($name, $optParams = array())
56  {
57    $params = array('name' => $name);
58    $params = array_merge($params, $optParams);
59    return $this->call('delete', array($params), "Google_Service_Apigee_GoogleLongrunningOperation");
60  }
61  /**
62   * Gets the details for an Apigee runtime instance. **Note:** Not supported for
63   * Apigee hybrid. (instances.get)
64   *
65   * @param string $name Required. Name of the instance. Use the following
66   * structure in your request: `organizations/{org}/instances/{instance}`.
67   * @param array $optParams Optional parameters.
68   * @return Google_Service_Apigee_GoogleCloudApigeeV1Instance
69   */
70  public function get($name, $optParams = array())
71  {
72    $params = array('name' => $name);
73    $params = array_merge($params, $optParams);
74    return $this->call('get', array($params), "Google_Service_Apigee_GoogleCloudApigeeV1Instance");
75  }
76  /**
77   * Lists all Apigee runtime instances for the organization. **Note:** Not
78   * supported for Apigee hybrid. (instances.listOrganizationsInstances)
79   *
80   * @param string $parent Required. Name of the organization. Use the following
81   * structure in your request: `organizations/{org}`.
82   * @param array $optParams Optional parameters.
83   *
84   * @opt_param int pageSize Maximum number of instances to return. Defaults to
85   * 25.
86   * @opt_param string pageToken Page token, returned from a previous
87   * ListInstances call, that you can use to retrieve the next page of content.
88   * @return Google_Service_Apigee_GoogleCloudApigeeV1ListInstancesResponse
89   */
90  public function listOrganizationsInstances($parent, $optParams = array())
91  {
92    $params = array('parent' => $parent);
93    $params = array_merge($params, $optParams);
94    return $this->call('list', array($params), "Google_Service_Apigee_GoogleCloudApigeeV1ListInstancesResponse");
95  }
96  /**
97   * Reports the latest status for a runtime instance. (instances.reportStatus)
98   *
99   * @param string $instance The name of the instance reporting this status. For
100   * SaaS the request will be rejected if no instance exists under this name.
101   * Format is organizations/{org}/instances/{instance}
102   * @param Google_Service_Apigee_GoogleCloudApigeeV1ReportInstanceStatusRequest $postBody
103   * @param array $optParams Optional parameters.
104   * @return Google_Service_Apigee_GoogleCloudApigeeV1ReportInstanceStatusResponse
105   */
106  public function reportStatus($instance, Google_Service_Apigee_GoogleCloudApigeeV1ReportInstanceStatusRequest $postBody, $optParams = array())
107  {
108    $params = array('instance' => $instance, 'postBody' => $postBody);
109    $params = array_merge($params, $optParams);
110    return $this->call('reportStatus', array($params), "Google_Service_Apigee_GoogleCloudApigeeV1ReportInstanceStatusResponse");
111  }
112}
113