Initial commit

This commit is contained in:
Local Administrator
2025-04-18 10:32:42 +02:00
commit b83134aca3
29643 changed files with 3045897 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudShell;
class AddPublicKeyMetadata extends \Google\Model
{
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(AddPublicKeyMetadata::class, 'Google_Service_CloudShell_AddPublicKeyMetadata');

View File

@@ -0,0 +1,44 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudShell;
class AddPublicKeyRequest extends \Google\Model
{
/**
* @var string
*/
public $key;
/**
* @param string
*/
public function setKey($key)
{
$this->key = $key;
}
/**
* @return string
*/
public function getKey()
{
return $this->key;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(AddPublicKeyRequest::class, 'Google_Service_CloudShell_AddPublicKeyRequest');

View File

@@ -0,0 +1,44 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudShell;
class AddPublicKeyResponse extends \Google\Model
{
/**
* @var string
*/
public $key;
/**
* @param string
*/
public function setKey($key)
{
$this->key = $key;
}
/**
* @return string
*/
public function getKey()
{
return $this->key;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(AddPublicKeyResponse::class, 'Google_Service_CloudShell_AddPublicKeyResponse');

View File

@@ -0,0 +1,25 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudShell;
class AuthorizeEnvironmentMetadata extends \Google\Model
{
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(AuthorizeEnvironmentMetadata::class, 'Google_Service_CloudShell_AuthorizeEnvironmentMetadata');

View File

@@ -0,0 +1,80 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudShell;
class AuthorizeEnvironmentRequest extends \Google\Model
{
/**
* @var string
*/
public $accessToken;
/**
* @var string
*/
public $expireTime;
/**
* @var string
*/
public $idToken;
/**
* @param string
*/
public function setAccessToken($accessToken)
{
$this->accessToken = $accessToken;
}
/**
* @return string
*/
public function getAccessToken()
{
return $this->accessToken;
}
/**
* @param string
*/
public function setExpireTime($expireTime)
{
$this->expireTime = $expireTime;
}
/**
* @return string
*/
public function getExpireTime()
{
return $this->expireTime;
}
/**
* @param string
*/
public function setIdToken($idToken)
{
$this->idToken = $idToken;
}
/**
* @return string
*/
public function getIdToken()
{
return $this->idToken;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(AuthorizeEnvironmentRequest::class, 'Google_Service_CloudShell_AuthorizeEnvironmentRequest');

View File

@@ -0,0 +1,25 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudShell;
class AuthorizeEnvironmentResponse extends \Google\Model
{
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(AuthorizeEnvironmentResponse::class, 'Google_Service_CloudShell_AuthorizeEnvironmentResponse');

View File

@@ -0,0 +1,25 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudShell;
class CancelOperationRequest extends \Google\Model
{
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(CancelOperationRequest::class, 'Google_Service_CloudShell_CancelOperationRequest');

View File

@@ -0,0 +1,25 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudShell;
class CloudshellEmpty extends \Google\Model
{
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(CloudshellEmpty::class, 'Google_Service_CloudShell_CloudshellEmpty');

View File

@@ -0,0 +1,25 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudShell;
class CreateEnvironmentMetadata extends \Google\Model
{
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(CreateEnvironmentMetadata::class, 'Google_Service_CloudShell_CreateEnvironmentMetadata');

View File

@@ -0,0 +1,25 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudShell;
class DeleteEnvironmentMetadata extends \Google\Model
{
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(DeleteEnvironmentMetadata::class, 'Google_Service_CloudShell_DeleteEnvironmentMetadata');

View File

@@ -0,0 +1,189 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudShell;
class Environment extends \Google\Collection
{
protected $collection_key = 'publicKeys';
/**
* @var string
*/
public $dockerImage;
/**
* @var string
*/
public $id;
/**
* @var string
*/
public $name;
/**
* @var string[]
*/
public $publicKeys;
/**
* @var string
*/
public $sshHost;
/**
* @var int
*/
public $sshPort;
/**
* @var string
*/
public $sshUsername;
/**
* @var string
*/
public $state;
/**
* @var string
*/
public $webHost;
/**
* @param string
*/
public function setDockerImage($dockerImage)
{
$this->dockerImage = $dockerImage;
}
/**
* @return string
*/
public function getDockerImage()
{
return $this->dockerImage;
}
/**
* @param string
*/
public function setId($id)
{
$this->id = $id;
}
/**
* @return string
*/
public function getId()
{
return $this->id;
}
/**
* @param string
*/
public function setName($name)
{
$this->name = $name;
}
/**
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* @param string[]
*/
public function setPublicKeys($publicKeys)
{
$this->publicKeys = $publicKeys;
}
/**
* @return string[]
*/
public function getPublicKeys()
{
return $this->publicKeys;
}
/**
* @param string
*/
public function setSshHost($sshHost)
{
$this->sshHost = $sshHost;
}
/**
* @return string
*/
public function getSshHost()
{
return $this->sshHost;
}
/**
* @param int
*/
public function setSshPort($sshPort)
{
$this->sshPort = $sshPort;
}
/**
* @return int
*/
public function getSshPort()
{
return $this->sshPort;
}
/**
* @param string
*/
public function setSshUsername($sshUsername)
{
$this->sshUsername = $sshUsername;
}
/**
* @return string
*/
public function getSshUsername()
{
return $this->sshUsername;
}
/**
* @param string
*/
public function setState($state)
{
$this->state = $state;
}
/**
* @return string
*/
public function getState()
{
return $this->state;
}
/**
* @param string
*/
public function setWebHost($webHost)
{
$this->webHost = $webHost;
}
/**
* @return string
*/
public function getWebHost()
{
return $this->webHost;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Environment::class, 'Google_Service_CloudShell_Environment');

View File

@@ -0,0 +1,61 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudShell;
class ListOperationsResponse extends \Google\Collection
{
protected $collection_key = 'operations';
/**
* @var string
*/
public $nextPageToken;
protected $operationsType = Operation::class;
protected $operationsDataType = 'array';
/**
* @param string
*/
public function setNextPageToken($nextPageToken)
{
$this->nextPageToken = $nextPageToken;
}
/**
* @return string
*/
public function getNextPageToken()
{
return $this->nextPageToken;
}
/**
* @param Operation[]
*/
public function setOperations($operations)
{
$this->operations = $operations;
}
/**
* @return Operation[]
*/
public function getOperations()
{
return $this->operations;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ListOperationsResponse::class, 'Google_Service_CloudShell_ListOperationsResponse');

View File

@@ -0,0 +1,114 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudShell;
class Operation extends \Google\Model
{
/**
* @var bool
*/
public $done;
protected $errorType = Status::class;
protected $errorDataType = '';
/**
* @var array[]
*/
public $metadata;
/**
* @var string
*/
public $name;
/**
* @var array[]
*/
public $response;
/**
* @param bool
*/
public function setDone($done)
{
$this->done = $done;
}
/**
* @return bool
*/
public function getDone()
{
return $this->done;
}
/**
* @param Status
*/
public function setError(Status $error)
{
$this->error = $error;
}
/**
* @return Status
*/
public function getError()
{
return $this->error;
}
/**
* @param array[]
*/
public function setMetadata($metadata)
{
$this->metadata = $metadata;
}
/**
* @return array[]
*/
public function getMetadata()
{
return $this->metadata;
}
/**
* @param string
*/
public function setName($name)
{
$this->name = $name;
}
/**
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* @param array[]
*/
public function setResponse($response)
{
$this->response = $response;
}
/**
* @return array[]
*/
public function getResponse()
{
return $this->response;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Operation::class, 'Google_Service_CloudShell_Operation');

View File

@@ -0,0 +1,25 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudShell;
class RemovePublicKeyMetadata extends \Google\Model
{
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(RemovePublicKeyMetadata::class, 'Google_Service_CloudShell_RemovePublicKeyMetadata');

View File

@@ -0,0 +1,44 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudShell;
class RemovePublicKeyRequest extends \Google\Model
{
/**
* @var string
*/
public $key;
/**
* @param string
*/
public function setKey($key)
{
$this->key = $key;
}
/**
* @return string
*/
public function getKey()
{
return $this->key;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(RemovePublicKeyRequest::class, 'Google_Service_CloudShell_RemovePublicKeyRequest');

View File

@@ -0,0 +1,25 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudShell;
class RemovePublicKeyResponse extends \Google\Model
{
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(RemovePublicKeyResponse::class, 'Google_Service_CloudShell_RemovePublicKeyResponse');

View File

@@ -0,0 +1,114 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudShell\Resource;
use Google\Service\CloudShell\CancelOperationRequest;
use Google\Service\CloudShell\CloudshellEmpty;
use Google\Service\CloudShell\ListOperationsResponse;
use Google\Service\CloudShell\Operation;
/**
* The "operations" collection of methods.
* Typical usage is:
* <code>
* $cloudshellService = new Google\Service\CloudShell(...);
* $operations = $cloudshellService->operations;
* </code>
*/
class Operations extends \Google\Service\Resource
{
/**
* Starts asynchronous cancellation on a long-running operation. The server
* makes a best effort to cancel the operation, but success is not guaranteed.
* If the server doesn't support this method, it returns
* `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or
* other methods to check whether the cancellation succeeded or whether the
* operation completed despite cancellation. On successful cancellation, the
* operation is not deleted; instead, it becomes an operation with an
* Operation.error value with a google.rpc.Status.code of `1`, corresponding to
* `Code.CANCELLED`. (operations.cancel)
*
* @param string $name The name of the operation resource to be cancelled.
* @param CancelOperationRequest $postBody
* @param array $optParams Optional parameters.
* @return CloudshellEmpty
* @throws \Google\Service\Exception
*/
public function cancel($name, CancelOperationRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('cancel', [$params], CloudshellEmpty::class);
}
/**
* Deletes a long-running operation. This method indicates that the client is no
* longer interested in the operation result. It does not cancel the operation.
* If the server doesn't support this method, it returns
* `google.rpc.Code.UNIMPLEMENTED`. (operations.delete)
*
* @param string $name The name of the operation resource to be deleted.
* @param array $optParams Optional parameters.
* @return CloudshellEmpty
* @throws \Google\Service\Exception
*/
public function delete($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('delete', [$params], CloudshellEmpty::class);
}
/**
* Gets the latest state of a long-running operation. Clients can use this
* method to poll the operation result at intervals as recommended by the API
* service. (operations.get)
*
* @param string $name The name of the operation resource.
* @param array $optParams Optional parameters.
* @return Operation
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], Operation::class);
}
/**
* Lists operations that match the specified filter in the request. If the
* server doesn't support this method, it returns `UNIMPLEMENTED`.
* (operations.listOperations)
*
* @param string $name The name of the operation's parent resource.
* @param array $optParams Optional parameters.
*
* @opt_param string filter The standard list filter.
* @opt_param int pageSize The standard list page size.
* @opt_param string pageToken The standard list page token.
* @return ListOperationsResponse
* @throws \Google\Service\Exception
*/
public function listOperations($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], ListOperationsResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Operations::class, 'Google_Service_CloudShell_Resource_Operations');

View File

@@ -0,0 +1,33 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudShell\Resource;
/**
* The "users" collection of methods.
* Typical usage is:
* <code>
* $cloudshellService = new Google\Service\CloudShell(...);
* $users = $cloudshellService->users;
* </code>
*/
class Users extends \Google\Service\Resource
{
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Users::class, 'Google_Service_CloudShell_Resource_Users');

View File

@@ -0,0 +1,137 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudShell\Resource;
use Google\Service\CloudShell\AddPublicKeyRequest;
use Google\Service\CloudShell\AuthorizeEnvironmentRequest;
use Google\Service\CloudShell\Environment;
use Google\Service\CloudShell\Operation;
use Google\Service\CloudShell\RemovePublicKeyRequest;
use Google\Service\CloudShell\StartEnvironmentRequest;
/**
* The "environments" collection of methods.
* Typical usage is:
* <code>
* $cloudshellService = new Google\Service\CloudShell(...);
* $environments = $cloudshellService->users_environments;
* </code>
*/
class UsersEnvironments extends \Google\Service\Resource
{
/**
* Adds a public SSH key to an environment, allowing clients with the
* corresponding private key to connect to that environment via SSH. If a key
* with the same content already exists, this will error with ALREADY_EXISTS.
* (environments.addPublicKey)
*
* @param string $environment Environment this key should be added to, e.g.
* `users/me/environments/default`.
* @param AddPublicKeyRequest $postBody
* @param array $optParams Optional parameters.
* @return Operation
* @throws \Google\Service\Exception
*/
public function addPublicKey($environment, AddPublicKeyRequest $postBody, $optParams = [])
{
$params = ['environment' => $environment, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('addPublicKey', [$params], Operation::class);
}
/**
* Sends OAuth credentials to a running environment on behalf of a user. When
* this completes, the environment will be authorized to run various Google
* Cloud command line tools without requiring the user to manually authenticate.
* (environments.authorize)
*
* @param string $name Name of the resource that should receive the credentials,
* for example `users/me/environments/default` or
* `users/someone@example.com/environments/default`.
* @param AuthorizeEnvironmentRequest $postBody
* @param array $optParams Optional parameters.
* @return Operation
* @throws \Google\Service\Exception
*/
public function authorize($name, AuthorizeEnvironmentRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('authorize', [$params], Operation::class);
}
/**
* Gets an environment. Returns NOT_FOUND if the environment does not exist.
* (environments.get)
*
* @param string $name Required. Name of the requested resource, for example
* `users/me/environments/default` or
* `users/someone@example.com/environments/default`.
* @param array $optParams Optional parameters.
* @return Environment
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], Environment::class);
}
/**
* Removes a public SSH key from an environment. Clients will no longer be able
* to connect to the environment using the corresponding private key. If a key
* with the same content is not present, this will error with NOT_FOUND.
* (environments.removePublicKey)
*
* @param string $environment Environment this key should be removed from, e.g.
* `users/me/environments/default`.
* @param RemovePublicKeyRequest $postBody
* @param array $optParams Optional parameters.
* @return Operation
* @throws \Google\Service\Exception
*/
public function removePublicKey($environment, RemovePublicKeyRequest $postBody, $optParams = [])
{
$params = ['environment' => $environment, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('removePublicKey', [$params], Operation::class);
}
/**
* Starts an existing environment, allowing clients to connect to it. The
* returned operation will contain an instance of StartEnvironmentMetadata in
* its metadata field. Users can wait for the environment to start by polling
* this operation via GetOperation. Once the environment has finished starting
* and is ready to accept connections, the operation will contain a
* StartEnvironmentResponse in its response field. (environments.start)
*
* @param string $name Name of the resource that should be started, for example
* `users/me/environments/default` or
* `users/someone@example.com/environments/default`.
* @param StartEnvironmentRequest $postBody
* @param array $optParams Optional parameters.
* @return Operation
* @throws \Google\Service\Exception
*/
public function start($name, StartEnvironmentRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('start', [$params], Operation::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(UsersEnvironments::class, 'Google_Service_CloudShell_Resource_UsersEnvironments');

View File

@@ -0,0 +1,44 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudShell;
class StartEnvironmentMetadata extends \Google\Model
{
/**
* @var string
*/
public $state;
/**
* @param string
*/
public function setState($state)
{
$this->state = $state;
}
/**
* @return string
*/
public function getState()
{
return $this->state;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(StartEnvironmentMetadata::class, 'Google_Service_CloudShell_StartEnvironmentMetadata');

View File

@@ -0,0 +1,63 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudShell;
class StartEnvironmentRequest extends \Google\Collection
{
protected $collection_key = 'publicKeys';
/**
* @var string
*/
public $accessToken;
/**
* @var string[]
*/
public $publicKeys;
/**
* @param string
*/
public function setAccessToken($accessToken)
{
$this->accessToken = $accessToken;
}
/**
* @return string
*/
public function getAccessToken()
{
return $this->accessToken;
}
/**
* @param string[]
*/
public function setPublicKeys($publicKeys)
{
$this->publicKeys = $publicKeys;
}
/**
* @return string[]
*/
public function getPublicKeys()
{
return $this->publicKeys;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(StartEnvironmentRequest::class, 'Google_Service_CloudShell_StartEnvironmentRequest');

View File

@@ -0,0 +1,42 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudShell;
class StartEnvironmentResponse extends \Google\Model
{
protected $environmentType = Environment::class;
protected $environmentDataType = '';
/**
* @param Environment
*/
public function setEnvironment(Environment $environment)
{
$this->environment = $environment;
}
/**
* @return Environment
*/
public function getEnvironment()
{
return $this->environment;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(StartEnvironmentResponse::class, 'Google_Service_CloudShell_StartEnvironmentResponse');

View File

@@ -0,0 +1,81 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudShell;
class Status extends \Google\Collection
{
protected $collection_key = 'details';
/**
* @var int
*/
public $code;
/**
* @var array[]
*/
public $details;
/**
* @var string
*/
public $message;
/**
* @param int
*/
public function setCode($code)
{
$this->code = $code;
}
/**
* @return int
*/
public function getCode()
{
return $this->code;
}
/**
* @param array[]
*/
public function setDetails($details)
{
$this->details = $details;
}
/**
* @return array[]
*/
public function getDetails()
{
return $this->details;
}
/**
* @param string
*/
public function setMessage($message)
{
$this->message = $message;
}
/**
* @return string
*/
public function getMessage()
{
return $this->message;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Status::class, 'Google_Service_CloudShell_Status');