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\BlockchainNodeEngine\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\BlockchainNodeEngine\BlockchainNode;
|
---|
21 | use Google\Service\BlockchainNodeEngine\ListBlockchainNodesResponse;
|
---|
22 | use Google\Service\BlockchainNodeEngine\Operation;
|
---|
23 |
|
---|
24 | /**
|
---|
25 | * The "blockchainNodes" collection of methods.
|
---|
26 | * Typical usage is:
|
---|
27 | * <code>
|
---|
28 | * $blockchainnodeengineService = new Google\Service\BlockchainNodeEngine(...);
|
---|
29 | * $blockchainNodes = $blockchainnodeengineService->projects_locations_blockchainNodes;
|
---|
30 | * </code>
|
---|
31 | */
|
---|
32 | class ProjectsLocationsBlockchainNodes extends \Google\Service\Resource
|
---|
33 | {
|
---|
34 | /**
|
---|
35 | * Creates a new blockchain node in a given project and location.
|
---|
36 | * (blockchainNodes.create)
|
---|
37 | *
|
---|
38 | * @param string $parent Required. Value for parent.
|
---|
39 | * @param BlockchainNode $postBody
|
---|
40 | * @param array $optParams Optional parameters.
|
---|
41 | *
|
---|
42 | * @opt_param string blockchainNodeId Required. ID of the requesting object.
|
---|
43 | * @opt_param string requestId Optional. An optional request ID to identify
|
---|
44 | * requests. Specify a unique request ID so that if you must retry your request,
|
---|
45 | * the server will know to ignore the request if it has already been completed.
|
---|
46 | * The server will guarantee that for at least 60 minutes since the first
|
---|
47 | * request. For example, consider a situation where you make an initial request
|
---|
48 | * and the request times out. If you make the request again with the same
|
---|
49 | * request ID, the server can check if original operation with the same request
|
---|
50 | * ID was received, and if so, will ignore the second request. This prevents
|
---|
51 | * clients from accidentally creating duplicate commitments. The request ID must
|
---|
52 | * be a valid UUID with the exception that zero UUID is not supported
|
---|
53 | * (00000000-0000-0000-0000-000000000000).
|
---|
54 | * @return Operation
|
---|
55 | * @throws \Google\Service\Exception
|
---|
56 | */
|
---|
57 | public function create($parent, BlockchainNode $postBody, $optParams = [])
|
---|
58 | {
|
---|
59 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
60 | $params = array_merge($params, $optParams);
|
---|
61 | return $this->call('create', [$params], Operation::class);
|
---|
62 | }
|
---|
63 | /**
|
---|
64 | * Deletes a single blockchain node. (blockchainNodes.delete)
|
---|
65 | *
|
---|
66 | * @param string $name Required. The fully qualified name of the blockchain node
|
---|
67 | * to delete. e.g. `projects/my-project/locations/us-
|
---|
68 | * central1/blockchainNodes/my-node`.
|
---|
69 | * @param array $optParams Optional parameters.
|
---|
70 | *
|
---|
71 | * @opt_param string requestId Optional. An optional request ID to identify
|
---|
72 | * requests. Specify a unique request ID so that if you must retry your request,
|
---|
73 | * the server will know to ignore the request if it has already been completed.
|
---|
74 | * The server will guarantee that for at least 60 minutes after the first
|
---|
75 | * request. For example, consider a situation where you make an initial request
|
---|
76 | * and the request times out. If you make the request again with the same
|
---|
77 | * request ID, the server can check if original operation with the same request
|
---|
78 | * ID was received, and if so, will ignore the second request. This prevents
|
---|
79 | * clients from accidentally creating duplicate commitments. The request ID must
|
---|
80 | * be a valid UUID with the exception that zero UUID is not supported
|
---|
81 | * (00000000-0000-0000-0000-000000000000).
|
---|
82 | * @return Operation
|
---|
83 | * @throws \Google\Service\Exception
|
---|
84 | */
|
---|
85 | public function delete($name, $optParams = [])
|
---|
86 | {
|
---|
87 | $params = ['name' => $name];
|
---|
88 | $params = array_merge($params, $optParams);
|
---|
89 | return $this->call('delete', [$params], Operation::class);
|
---|
90 | }
|
---|
91 | /**
|
---|
92 | * Gets details of a single blockchain node. (blockchainNodes.get)
|
---|
93 | *
|
---|
94 | * @param string $name Required. The fully qualified name of the blockchain node
|
---|
95 | * to fetch. e.g. `projects/my-project/locations/us-central1/blockchainNodes/my-
|
---|
96 | * node`.
|
---|
97 | * @param array $optParams Optional parameters.
|
---|
98 | * @return BlockchainNode
|
---|
99 | * @throws \Google\Service\Exception
|
---|
100 | */
|
---|
101 | public function get($name, $optParams = [])
|
---|
102 | {
|
---|
103 | $params = ['name' => $name];
|
---|
104 | $params = array_merge($params, $optParams);
|
---|
105 | return $this->call('get', [$params], BlockchainNode::class);
|
---|
106 | }
|
---|
107 | /**
|
---|
108 | * Lists blockchain nodes in a given project and location.
|
---|
109 | * (blockchainNodes.listProjectsLocationsBlockchainNodes)
|
---|
110 | *
|
---|
111 | * @param string $parent Required. Parent value for `ListNodesRequest`.
|
---|
112 | * @param array $optParams Optional parameters.
|
---|
113 | *
|
---|
114 | * @opt_param string filter Filtering results.
|
---|
115 | * @opt_param string orderBy Hint for how to order the results.
|
---|
116 | * @opt_param int pageSize Requested page size. Server may return fewer items
|
---|
117 | * than requested. If unspecified, server will pick an appropriate default.
|
---|
118 | * @opt_param string pageToken A token identifying a page of results the server
|
---|
119 | * should return.
|
---|
120 | * @return ListBlockchainNodesResponse
|
---|
121 | * @throws \Google\Service\Exception
|
---|
122 | */
|
---|
123 | public function listProjectsLocationsBlockchainNodes($parent, $optParams = [])
|
---|
124 | {
|
---|
125 | $params = ['parent' => $parent];
|
---|
126 | $params = array_merge($params, $optParams);
|
---|
127 | return $this->call('list', [$params], ListBlockchainNodesResponse::class);
|
---|
128 | }
|
---|
129 | /**
|
---|
130 | * Updates the parameters of a single blockchain node. (blockchainNodes.patch)
|
---|
131 | *
|
---|
132 | * @param string $name Output only. The fully qualified name of the blockchain
|
---|
133 | * node. e.g. `projects/my-project/locations/us-central1/blockchainNodes/my-
|
---|
134 | * node`.
|
---|
135 | * @param BlockchainNode $postBody
|
---|
136 | * @param array $optParams Optional parameters.
|
---|
137 | *
|
---|
138 | * @opt_param string requestId Optional. An optional request ID to identify
|
---|
139 | * requests. Specify a unique request ID so that if you must retry your request,
|
---|
140 | * the server will know to ignore the request if it has already been completed.
|
---|
141 | * The server will guarantee that for at least 60 minutes since the first
|
---|
142 | * request. For example, consider a situation where you make an initial request
|
---|
143 | * and the request times out. If you make the request again with the same
|
---|
144 | * request ID, the server can check if original operation with the same request
|
---|
145 | * ID was received, and if so, will ignore the second request. This prevents
|
---|
146 | * clients from accidentally creating duplicate commitments. The request ID must
|
---|
147 | * be a valid UUID with the exception that zero UUID is not supported
|
---|
148 | * (00000000-0000-0000-0000-000000000000).
|
---|
149 | * @opt_param string updateMask Required. Field mask is used to specify the
|
---|
150 | * fields to be overwritten in the Blockchain node resource by the update. The
|
---|
151 | * fields specified in the `update_mask` are relative to the resource, not the
|
---|
152 | * full request. A field will be overwritten if it is in the mask. If the user
|
---|
153 | * does not provide a mask then all fields will be overwritten.
|
---|
154 | * @return Operation
|
---|
155 | * @throws \Google\Service\Exception
|
---|
156 | */
|
---|
157 | public function patch($name, BlockchainNode $postBody, $optParams = [])
|
---|
158 | {
|
---|
159 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
160 | $params = array_merge($params, $optParams);
|
---|
161 | return $this->call('patch', [$params], Operation::class);
|
---|
162 | }
|
---|
163 | }
|
---|
164 |
|
---|
165 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
166 | class_alias(ProjectsLocationsBlockchainNodes::class, 'Google_Service_BlockchainNodeEngine_Resource_ProjectsLocationsBlockchainNodes');
|
---|