Skip to content

Commit ab87476

Browse files
1 parent a1fd796 commit ab87476

6 files changed

Lines changed: 391 additions & 0 deletions

File tree

src/NetAppFiles.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -808,6 +808,16 @@ public function __construct($clientOrConfig = [], $rootUrl = null)
808808
'type' => 'string',
809809
],
810810
],
811+
],'restore' => [
812+
'path' => 'v1/{+name}:restore',
813+
'httpMethod' => 'POST',
814+
'parameters' => [
815+
'name' => [
816+
'location' => 'path',
817+
'type' => 'string',
818+
'required' => true,
819+
],
820+
],
811821
],'revert' => [
812822
'path' => 'v1/{+name}:revert',
813823
'httpMethod' => 'POST',

src/NetAppFiles/CacheConfig.php

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
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\NetAppFiles;
19+
20+
class CacheConfig extends \Google\Model
21+
{
22+
/**
23+
* @var bool
24+
*/
25+
public $cifsChangeNotifyEnabled;
26+
27+
/**
28+
* @param bool
29+
*/
30+
public function setCifsChangeNotifyEnabled($cifsChangeNotifyEnabled)
31+
{
32+
$this->cifsChangeNotifyEnabled = $cifsChangeNotifyEnabled;
33+
}
34+
/**
35+
* @return bool
36+
*/
37+
public function getCifsChangeNotifyEnabled()
38+
{
39+
return $this->cifsChangeNotifyEnabled;
40+
}
41+
}
42+
43+
// Adding a class alias for backwards compatibility with the previous class name.
44+
class_alias(CacheConfig::class, 'Google_Service_NetAppFiles_CacheConfig');
Lines changed: 223 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,223 @@
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\NetAppFiles;
19+
20+
class CacheParameters extends \Google\Collection
21+
{
22+
protected $collection_key = 'peerIpAddresses';
23+
protected $cacheConfigType = CacheConfig::class;
24+
protected $cacheConfigDataType = '';
25+
/**
26+
* @var string
27+
*/
28+
public $cacheState;
29+
/**
30+
* @var string
31+
*/
32+
public $command;
33+
/**
34+
* @var bool
35+
*/
36+
public $enableGlobalFileLock;
37+
/**
38+
* @var string
39+
*/
40+
public $passphrase;
41+
/**
42+
* @var string
43+
*/
44+
public $peerClusterName;
45+
/**
46+
* @var string[]
47+
*/
48+
public $peerIpAddresses;
49+
/**
50+
* @var string
51+
*/
52+
public $peerSvmName;
53+
/**
54+
* @var string
55+
*/
56+
public $peerVolumeName;
57+
/**
58+
* @var string
59+
*/
60+
public $peeringCommandExpiryTime;
61+
/**
62+
* @var string
63+
*/
64+
public $stateDetails;
65+
66+
/**
67+
* @param CacheConfig
68+
*/
69+
public function setCacheConfig(CacheConfig $cacheConfig)
70+
{
71+
$this->cacheConfig = $cacheConfig;
72+
}
73+
/**
74+
* @return CacheConfig
75+
*/
76+
public function getCacheConfig()
77+
{
78+
return $this->cacheConfig;
79+
}
80+
/**
81+
* @param string
82+
*/
83+
public function setCacheState($cacheState)
84+
{
85+
$this->cacheState = $cacheState;
86+
}
87+
/**
88+
* @return string
89+
*/
90+
public function getCacheState()
91+
{
92+
return $this->cacheState;
93+
}
94+
/**
95+
* @param string
96+
*/
97+
public function setCommand($command)
98+
{
99+
$this->command = $command;
100+
}
101+
/**
102+
* @return string
103+
*/
104+
public function getCommand()
105+
{
106+
return $this->command;
107+
}
108+
/**
109+
* @param bool
110+
*/
111+
public function setEnableGlobalFileLock($enableGlobalFileLock)
112+
{
113+
$this->enableGlobalFileLock = $enableGlobalFileLock;
114+
}
115+
/**
116+
* @return bool
117+
*/
118+
public function getEnableGlobalFileLock()
119+
{
120+
return $this->enableGlobalFileLock;
121+
}
122+
/**
123+
* @param string
124+
*/
125+
public function setPassphrase($passphrase)
126+
{
127+
$this->passphrase = $passphrase;
128+
}
129+
/**
130+
* @return string
131+
*/
132+
public function getPassphrase()
133+
{
134+
return $this->passphrase;
135+
}
136+
/**
137+
* @param string
138+
*/
139+
public function setPeerClusterName($peerClusterName)
140+
{
141+
$this->peerClusterName = $peerClusterName;
142+
}
143+
/**
144+
* @return string
145+
*/
146+
public function getPeerClusterName()
147+
{
148+
return $this->peerClusterName;
149+
}
150+
/**
151+
* @param string[]
152+
*/
153+
public function setPeerIpAddresses($peerIpAddresses)
154+
{
155+
$this->peerIpAddresses = $peerIpAddresses;
156+
}
157+
/**
158+
* @return string[]
159+
*/
160+
public function getPeerIpAddresses()
161+
{
162+
return $this->peerIpAddresses;
163+
}
164+
/**
165+
* @param string
166+
*/
167+
public function setPeerSvmName($peerSvmName)
168+
{
169+
$this->peerSvmName = $peerSvmName;
170+
}
171+
/**
172+
* @return string
173+
*/
174+
public function getPeerSvmName()
175+
{
176+
return $this->peerSvmName;
177+
}
178+
/**
179+
* @param string
180+
*/
181+
public function setPeerVolumeName($peerVolumeName)
182+
{
183+
$this->peerVolumeName = $peerVolumeName;
184+
}
185+
/**
186+
* @return string
187+
*/
188+
public function getPeerVolumeName()
189+
{
190+
return $this->peerVolumeName;
191+
}
192+
/**
193+
* @param string
194+
*/
195+
public function setPeeringCommandExpiryTime($peeringCommandExpiryTime)
196+
{
197+
$this->peeringCommandExpiryTime = $peeringCommandExpiryTime;
198+
}
199+
/**
200+
* @return string
201+
*/
202+
public function getPeeringCommandExpiryTime()
203+
{
204+
return $this->peeringCommandExpiryTime;
205+
}
206+
/**
207+
* @param string
208+
*/
209+
public function setStateDetails($stateDetails)
210+
{
211+
$this->stateDetails = $stateDetails;
212+
}
213+
/**
214+
* @return string
215+
*/
216+
public function getStateDetails()
217+
{
218+
return $this->stateDetails;
219+
}
220+
}
221+
222+
// Adding a class alias for backwards compatibility with the previous class name.
223+
class_alias(CacheParameters::class, 'Google_Service_NetAppFiles_CacheParameters');

src/NetAppFiles/Resource/ProjectsLocationsVolumes.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
use Google\Service\NetAppFiles\ListVolumesResponse;
2121
use Google\Service\NetAppFiles\Operation;
22+
use Google\Service\NetAppFiles\RestoreBackupFilesRequest;
2223
use Google\Service\NetAppFiles\RevertVolumeRequest;
2324
use Google\Service\NetAppFiles\Volume;
2425

@@ -126,6 +127,22 @@ public function patch($name, Volume $postBody, $optParams = [])
126127
$params = array_merge($params, $optParams);
127128
return $this->call('patch', [$params], Operation::class);
128129
}
130+
/**
131+
* Restore files from a backup to a volume. (volumes.restore)
132+
*
133+
* @param string $name Required. The volume resource name, in the format
134+
* `projects/{project_id}/locations/{location}/volumes/{volume_id}`
135+
* @param RestoreBackupFilesRequest $postBody
136+
* @param array $optParams Optional parameters.
137+
* @return Operation
138+
* @throws \Google\Service\Exception
139+
*/
140+
public function restore($name, RestoreBackupFilesRequest $postBody, $optParams = [])
141+
{
142+
$params = ['name' => $name, 'postBody' => $postBody];
143+
$params = array_merge($params, $optParams);
144+
return $this->call('restore', [$params], Operation::class);
145+
}
129146
/**
130147
* Revert an existing volume to a specified snapshot. Warning! This operation
131148
* will permanently revert all changes made after the snapshot was created.
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
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\NetAppFiles;
19+
20+
class RestoreBackupFilesRequest extends \Google\Collection
21+
{
22+
protected $collection_key = 'fileList';
23+
/**
24+
* @var string
25+
*/
26+
public $backup;
27+
/**
28+
* @var string[]
29+
*/
30+
public $fileList;
31+
/**
32+
* @var string
33+
*/
34+
public $restoreDestinationPath;
35+
36+
/**
37+
* @param string
38+
*/
39+
public function setBackup($backup)
40+
{
41+
$this->backup = $backup;
42+
}
43+
/**
44+
* @return string
45+
*/
46+
public function getBackup()
47+
{
48+
return $this->backup;
49+
}
50+
/**
51+
* @param string[]
52+
*/
53+
public function setFileList($fileList)
54+
{
55+
$this->fileList = $fileList;
56+
}
57+
/**
58+
* @return string[]
59+
*/
60+
public function getFileList()
61+
{
62+
return $this->fileList;
63+
}
64+
/**
65+
* @param string
66+
*/
67+
public function setRestoreDestinationPath($restoreDestinationPath)
68+
{
69+
$this->restoreDestinationPath = $restoreDestinationPath;
70+
}
71+
/**
72+
* @return string
73+
*/
74+
public function getRestoreDestinationPath()
75+
{
76+
return $this->restoreDestinationPath;
77+
}
78+
}
79+
80+
// Adding a class alias for backwards compatibility with the previous class name.
81+
class_alias(RestoreBackupFilesRequest::class, 'Google_Service_NetAppFiles_RestoreBackupFilesRequest');

0 commit comments

Comments
 (0)