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 | namespace Google\Service\Apigee\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\Apigee\GoogleCloudApigeeV1Datastore;
|
---|
21 | use Google\Service\Apigee\GoogleCloudApigeeV1ListDatastoresResponse;
|
---|
22 | use Google\Service\Apigee\GoogleCloudApigeeV1TestDatastoreResponse;
|
---|
23 | use Google\Service\Apigee\GoogleProtobufEmpty;
|
---|
24 |
|
---|
25 | /**
|
---|
26 | * The "datastores" collection of methods.
|
---|
27 | * Typical usage is:
|
---|
28 | * <code>
|
---|
29 | * $apigeeService = new Google\Service\Apigee(...);
|
---|
30 | * $datastores = $apigeeService->organizations_analytics_datastores;
|
---|
31 | * </code>
|
---|
32 | */
|
---|
33 | class OrganizationsAnalyticsDatastores extends \Google\Service\Resource
|
---|
34 | {
|
---|
35 | /**
|
---|
36 | * Create a Datastore for an org (datastores.create)
|
---|
37 | *
|
---|
38 | * @param string $parent Required. The parent organization name. Must be of the
|
---|
39 | * form `organizations/{org}`.
|
---|
40 | * @param GoogleCloudApigeeV1Datastore $postBody
|
---|
41 | * @param array $optParams Optional parameters.
|
---|
42 | * @return GoogleCloudApigeeV1Datastore
|
---|
43 | * @throws \Google\Service\Exception
|
---|
44 | */
|
---|
45 | public function create($parent, GoogleCloudApigeeV1Datastore $postBody, $optParams = [])
|
---|
46 | {
|
---|
47 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
48 | $params = array_merge($params, $optParams);
|
---|
49 | return $this->call('create', [$params], GoogleCloudApigeeV1Datastore::class);
|
---|
50 | }
|
---|
51 | /**
|
---|
52 | * Delete a Datastore from an org. (datastores.delete)
|
---|
53 | *
|
---|
54 | * @param string $name Required. Resource name of the Datastore to be deleted.
|
---|
55 | * Must be of the form `organizations/{org}/analytics/datastores/{datastoreId}`
|
---|
56 | * @param array $optParams Optional parameters.
|
---|
57 | * @return GoogleProtobufEmpty
|
---|
58 | * @throws \Google\Service\Exception
|
---|
59 | */
|
---|
60 | public function delete($name, $optParams = [])
|
---|
61 | {
|
---|
62 | $params = ['name' => $name];
|
---|
63 | $params = array_merge($params, $optParams);
|
---|
64 | return $this->call('delete', [$params], GoogleProtobufEmpty::class);
|
---|
65 | }
|
---|
66 | /**
|
---|
67 | * Get a Datastore (datastores.get)
|
---|
68 | *
|
---|
69 | * @param string $name Required. Resource name of the Datastore to be get. Must
|
---|
70 | * be of the form `organizations/{org}/analytics/datastores/{datastoreId}`
|
---|
71 | * @param array $optParams Optional parameters.
|
---|
72 | * @return GoogleCloudApigeeV1Datastore
|
---|
73 | * @throws \Google\Service\Exception
|
---|
74 | */
|
---|
75 | public function get($name, $optParams = [])
|
---|
76 | {
|
---|
77 | $params = ['name' => $name];
|
---|
78 | $params = array_merge($params, $optParams);
|
---|
79 | return $this->call('get', [$params], GoogleCloudApigeeV1Datastore::class);
|
---|
80 | }
|
---|
81 | /**
|
---|
82 | * List Datastores (datastores.listOrganizationsAnalyticsDatastores)
|
---|
83 | *
|
---|
84 | * @param string $parent Required. The parent organization name. Must be of the
|
---|
85 | * form `organizations/{org}`.
|
---|
86 | * @param array $optParams Optional parameters.
|
---|
87 | *
|
---|
88 | * @opt_param string targetType Optional. TargetType is used to fetch all
|
---|
89 | * Datastores that match the type
|
---|
90 | * @return GoogleCloudApigeeV1ListDatastoresResponse
|
---|
91 | * @throws \Google\Service\Exception
|
---|
92 | */
|
---|
93 | public function listOrganizationsAnalyticsDatastores($parent, $optParams = [])
|
---|
94 | {
|
---|
95 | $params = ['parent' => $parent];
|
---|
96 | $params = array_merge($params, $optParams);
|
---|
97 | return $this->call('list', [$params], GoogleCloudApigeeV1ListDatastoresResponse::class);
|
---|
98 | }
|
---|
99 | /**
|
---|
100 | * Test if Datastore configuration is correct. This includes checking if
|
---|
101 | * credentials provided by customer have required permissions in target
|
---|
102 | * destination storage (datastores.test)
|
---|
103 | *
|
---|
104 | * @param string $parent Required. The parent organization name Must be of the
|
---|
105 | * form `organizations/{org}`
|
---|
106 | * @param GoogleCloudApigeeV1Datastore $postBody
|
---|
107 | * @param array $optParams Optional parameters.
|
---|
108 | * @return GoogleCloudApigeeV1TestDatastoreResponse
|
---|
109 | * @throws \Google\Service\Exception
|
---|
110 | */
|
---|
111 | public function test($parent, GoogleCloudApigeeV1Datastore $postBody, $optParams = [])
|
---|
112 | {
|
---|
113 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
114 | $params = array_merge($params, $optParams);
|
---|
115 | return $this->call('test', [$params], GoogleCloudApigeeV1TestDatastoreResponse::class);
|
---|
116 | }
|
---|
117 | /**
|
---|
118 | * Update a Datastore (datastores.update)
|
---|
119 | *
|
---|
120 | * @param string $name Required. The resource name of datastore to be updated.
|
---|
121 | * Must be of the form `organizations/{org}/analytics/datastores/{datastoreId}`
|
---|
122 | * @param GoogleCloudApigeeV1Datastore $postBody
|
---|
123 | * @param array $optParams Optional parameters.
|
---|
124 | * @return GoogleCloudApigeeV1Datastore
|
---|
125 | * @throws \Google\Service\Exception
|
---|
126 | */
|
---|
127 | public function update($name, GoogleCloudApigeeV1Datastore $postBody, $optParams = [])
|
---|
128 | {
|
---|
129 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
130 | $params = array_merge($params, $optParams);
|
---|
131 | return $this->call('update', [$params], GoogleCloudApigeeV1Datastore::class);
|
---|
132 | }
|
---|
133 | }
|
---|
134 |
|
---|
135 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
136 | class_alias(OrganizationsAnalyticsDatastores::class, 'Google_Service_Apigee_Resource_OrganizationsAnalyticsDatastores');
|
---|