Skip to content

Commit

Permalink
Regenerate sqladmin client (#5549)
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshi-code-bot authored Sep 9, 2024
1 parent 8707ec4 commit 61b9426
Show file tree
Hide file tree
Showing 5 changed files with 311 additions and 1 deletion.
47 changes: 46 additions & 1 deletion src/SQLAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,37 @@ public function __construct($clientOrConfig = [], $rootUrl = null)
'instances',
[
'methods' => [
'acquireSsrsLease' => [
'ListServerCertificates' => [
'path' => 'v1/projects/{project}/instances/{instance}/listServerCertificates',
'httpMethod' => 'GET',
'parameters' => [
'project' => [
'location' => 'path',
'type' => 'string',
'required' => true,
],
'instance' => [
'location' => 'path',
'type' => 'string',
'required' => true,
],
],
],'RotateServerCertificate' => [
'path' => 'v1/projects/{project}/instances/{instance}/rotateServerCertificate',
'httpMethod' => 'POST',
'parameters' => [
'project' => [
'location' => 'path',
'type' => 'string',
'required' => true,
],
'instance' => [
'location' => 'path',
'type' => 'string',
'required' => true,
],
],
],'acquireSsrsLease' => [
'path' => 'v1/projects/{project}/instances/{instance}/acquireSsrsLease',
'httpMethod' => 'POST',
'parameters' => [
Expand Down Expand Up @@ -377,6 +407,21 @@ public function __construct($clientOrConfig = [], $rootUrl = null)
'required' => true,
],
],
],'addServerCertificate' => [
'path' => 'v1/projects/{project}/instances/{instance}/addServerCertificate',
'httpMethod' => 'POST',
'parameters' => [
'project' => [
'location' => 'path',
'type' => 'string',
'required' => true,
],
'instance' => [
'location' => 'path',
'type' => 'string',
'required' => true,
],
],
],'clone' => [
'path' => 'v1/projects/{project}/instances/{instance}/clone',
'httpMethod' => 'POST',
Expand Down
95 changes: 95 additions & 0 deletions src/SQLAdmin/InstancesListServerCertificatesResponse.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
<?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\SQLAdmin;

class InstancesListServerCertificatesResponse extends \Google\Collection
{
protected $collection_key = 'serverCerts';
/**
* @var string
*/
public $activeVersion;
protected $caCertsType = SslCert::class;
protected $caCertsDataType = 'array';
/**
* @var string
*/
public $kind;
protected $serverCertsType = SslCert::class;
protected $serverCertsDataType = 'array';

/**
* @param string
*/
public function setActiveVersion($activeVersion)
{
$this->activeVersion = $activeVersion;
}
/**
* @return string
*/
public function getActiveVersion()
{
return $this->activeVersion;
}
/**
* @param SslCert[]
*/
public function setCaCerts($caCerts)
{
$this->caCerts = $caCerts;
}
/**
* @return SslCert[]
*/
public function getCaCerts()
{
return $this->caCerts;
}
/**
* @param string
*/
public function setKind($kind)
{
$this->kind = $kind;
}
/**
* @return string
*/
public function getKind()
{
return $this->kind;
}
/**
* @param SslCert[]
*/
public function setServerCerts($serverCerts)
{
$this->serverCerts = $serverCerts;
}
/**
* @return SslCert[]
*/
public function getServerCerts()
{
return $this->serverCerts;
}
}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(InstancesListServerCertificatesResponse::class, 'Google_Service_SQLAdmin_InstancesListServerCertificatesResponse');
42 changes: 42 additions & 0 deletions src/SQLAdmin/InstancesRotateServerCertificateRequest.php
Original file line number Diff line number Diff line change
@@ -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\SQLAdmin;

class InstancesRotateServerCertificateRequest extends \Google\Model
{
protected $rotateServerCertificateContextType = RotateServerCertificateContext::class;
protected $rotateServerCertificateContextDataType = '';

/**
* @param RotateServerCertificateContext
*/
public function setRotateServerCertificateContext(RotateServerCertificateContext $rotateServerCertificateContext)
{
$this->rotateServerCertificateContext = $rotateServerCertificateContext;
}
/**
* @return RotateServerCertificateContext
*/
public function getRotateServerCertificateContext()
{
return $this->rotateServerCertificateContext;
}
}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(InstancesRotateServerCertificateRequest::class, 'Google_Service_SQLAdmin_InstancesRotateServerCertificateRequest');
66 changes: 66 additions & 0 deletions src/SQLAdmin/Resource/Instances.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@
use Google\Service\SQLAdmin\InstancesImportRequest;
use Google\Service\SQLAdmin\InstancesListResponse;
use Google\Service\SQLAdmin\InstancesListServerCasResponse;
use Google\Service\SQLAdmin\InstancesListServerCertificatesResponse;
use Google\Service\SQLAdmin\InstancesReencryptRequest;
use Google\Service\SQLAdmin\InstancesRestoreBackupRequest;
use Google\Service\SQLAdmin\InstancesRotateServerCaRequest;
use Google\Service\SQLAdmin\InstancesRotateServerCertificateRequest;
use Google\Service\SQLAdmin\InstancesTruncateLogRequest;
use Google\Service\SQLAdmin\Operation;
use Google\Service\SQLAdmin\SqlInstancesAcquireSsrsLeaseResponse;
Expand All @@ -45,6 +47,48 @@
*/
class Instances extends \Google\Service\Resource
{
/**
* Lists all versions of server certificates and certificate authorities (CAs)
* for the specified instance. There can be up to three sets of certs listed:
* the certificate that is currently in use, a future that has been added but
* not yet used to sign a certificate, and a certificate that has been rotated
* out. (instances.ListServerCertificates)
*
* @param string $project Required. Project ID of the project that contains the
* instance.
* @param string $instance Required. Cloud SQL instance ID. This does not
* include the project ID.
* @param array $optParams Optional parameters.
* @return InstancesListServerCertificatesResponse
* @throws \Google\Service\Exception
*/
public function ListServerCertificates($project, $instance, $optParams = [])
{
$params = ['project' => $project, 'instance' => $instance];
$params = array_merge($params, $optParams);
return $this->call('ListServerCertificates', [$params], InstancesListServerCertificatesResponse::class);
}
/**
* Rotates the server certificate version to one previously added with the
* addServerCertificate method. For instances not using Certificate Authority
* Service (CAS) server CA, please use RotateServerCa instead.
* (instances.RotateServerCertificate)
*
* @param string $project Required. Project ID of the project that contains the
* instance.
* @param string $instance Required. Cloud SQL instance ID. This does not
* include the project ID.
* @param InstancesRotateServerCertificateRequest $postBody
* @param array $optParams Optional parameters.
* @return Operation
* @throws \Google\Service\Exception
*/
public function RotateServerCertificate($project, $instance, InstancesRotateServerCertificateRequest $postBody, $optParams = [])
{
$params = ['project' => $project, 'instance' => $instance, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('RotateServerCertificate', [$params], Operation::class);
}
/**
* Acquire a lease for the setup of SQL Server Reporting Services (SSRS).
* (instances.acquireSsrsLease)
Expand Down Expand Up @@ -88,6 +132,28 @@ public function addServerCa($project, $instance, $optParams = [])
$params = array_merge($params, $optParams);
return $this->call('addServerCa', [$params], Operation::class);
}
/**
* Add a new trusted server certificate version for the specified instance using
* Certificate Authority Service (CAS) server CA. Required to prepare for a
* certificate rotation. If a server certificate version was previously added
* but never used in a certificate rotation, this operation replaces that
* version. There cannot be more than one certificate version waiting to be
* rotated in. For instances not using CAS server CA, please use AddServerCa
* instead. (instances.addServerCertificate)
*
* @param string $project Project ID of the project that contains the instance.
* @param string $instance Cloud SQL instance ID. This does not include the
* project ID.
* @param array $optParams Optional parameters.
* @return Operation
* @throws \Google\Service\Exception
*/
public function addServerCertificate($project, $instance, $optParams = [])
{
$params = ['project' => $project, 'instance' => $instance];
$params = array_merge($params, $optParams);
return $this->call('addServerCertificate', [$params], Operation::class);
}
/**
* Creates a Cloud SQL instance as a clone of the source instance. Using this
* operation might cause your instance to restart. (instances.cloneInstances)
Expand Down
62 changes: 62 additions & 0 deletions src/SQLAdmin/RotateServerCertificateContext.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
<?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\SQLAdmin;

class RotateServerCertificateContext extends \Google\Model
{
/**
* @var string
*/
public $kind;
/**
* @var string
*/
public $nextVersion;

/**
* @param string
*/
public function setKind($kind)
{
$this->kind = $kind;
}
/**
* @return string
*/
public function getKind()
{
return $this->kind;
}
/**
* @param string
*/
public function setNextVersion($nextVersion)
{
$this->nextVersion = $nextVersion;
}
/**
* @return string
*/
public function getNextVersion()
{
return $this->nextVersion;
}
}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(RotateServerCertificateContext::class, 'Google_Service_SQLAdmin_RotateServerCertificateContext');

0 comments on commit 61b9426

Please sign in to comment.