gestione documentale avanzata 1 parte

This commit is contained in:
2026-05-28 09:34:28 +02:00
parent 3471befb1a
commit f2b0833b90
34482 changed files with 4312269 additions and 546 deletions
@@ -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\DatabaseMigrationService\Resource;
/**
* The "projects" collection of methods.
* Typical usage is:
* <code>
* $datamigrationService = new Google\Service\DatabaseMigrationService(...);
* $projects = $datamigrationService->projects;
* </code>
*/
class Projects extends \Google\Service\Resource
{
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Projects::class, 'Google_Service_DatabaseMigrationService_Resource_Projects');
@@ -0,0 +1,107 @@
<?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\DatabaseMigrationService\Resource;
use Google\Service\DatabaseMigrationService\FetchStaticIpsResponse;
use Google\Service\DatabaseMigrationService\ListLocationsResponse;
use Google\Service\DatabaseMigrationService\Location;
/**
* The "locations" collection of methods.
* Typical usage is:
* <code>
* $datamigrationService = new Google\Service\DatabaseMigrationService(...);
* $locations = $datamigrationService->projects_locations;
* </code>
*/
class ProjectsLocations extends \Google\Service\Resource
{
/**
* Fetches a set of static IP addresses that need to be allowlisted by the
* customer when using the static-IP connectivity method.
* (locations.fetchStaticIps)
*
* @param string $name Required. The resource name for the location for which
* static IPs should be returned. Must be in the format `projects/locations`.
* @param array $optParams Optional parameters.
*
* @opt_param int pageSize Optional. Maximum number of IPs to return.
* @opt_param string pageToken Optional. A page token, received from a previous
* `FetchStaticIps` call.
* @return FetchStaticIpsResponse
* @throws \Google\Service\Exception
*/
public function fetchStaticIps($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('fetchStaticIps', [$params], FetchStaticIpsResponse::class);
}
/**
* Gets information about a location. (locations.get)
*
* @param string $name Resource name for the location.
* @param array $optParams Optional parameters.
* @return Location
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], Location::class);
}
/**
* Lists information about the supported locations for this service. This method
* lists locations based on the resource scope provided in the
* ListLocationsRequest.name field: * **Global locations**: If `name` is empty,
* the method lists the public locations available to all projects. * **Project-
* specific locations**: If `name` follows the format `projects/{project}`, the
* method lists locations visible to that specific project. This includes
* public, private, or other project-specific locations enabled for the project.
* For gRPC and client library implementations, the resource name is passed as
* the `name` field. For direct service calls, the resource name is incorporated
* into the request path based on the specific service implementation and
* version. (locations.listProjectsLocations)
*
* @param string $name The resource that owns the locations collection, if
* applicable.
* @param array $optParams Optional parameters.
*
* @opt_param string extraLocationTypes Optional. Do not use this field unless
* explicitly documented otherwise. This is primarily for internal usage.
* @opt_param string filter A filter to narrow down results to a preferred
* subset. The filtering language accepts strings like `"displayName=tokyo"`,
* and is documented in more detail in [AIP-160](https://google.aip.dev/160).
* @opt_param int pageSize The maximum number of results to return. If not set,
* the service selects a default.
* @opt_param string pageToken A page token received from the `next_page_token`
* field in the response. Send that page token to receive the subsequent page.
* @return ListLocationsResponse
* @throws \Google\Service\Exception
*/
public function listProjectsLocations($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], ListLocationsResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsLocations::class, 'Google_Service_DatabaseMigrationService_Resource_ProjectsLocations');
@@ -0,0 +1,254 @@
<?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\DatabaseMigrationService\Resource;
use Google\Service\DatabaseMigrationService\ConnectionProfile;
use Google\Service\DatabaseMigrationService\ListConnectionProfilesResponse;
use Google\Service\DatabaseMigrationService\Operation;
use Google\Service\DatabaseMigrationService\Policy;
use Google\Service\DatabaseMigrationService\SetIamPolicyRequest;
use Google\Service\DatabaseMigrationService\TestIamPermissionsRequest;
use Google\Service\DatabaseMigrationService\TestIamPermissionsResponse;
/**
* The "connectionProfiles" collection of methods.
* Typical usage is:
* <code>
* $datamigrationService = new Google\Service\DatabaseMigrationService(...);
* $connectionProfiles = $datamigrationService->projects_locations_connectionProfiles;
* </code>
*/
class ProjectsLocationsConnectionProfiles extends \Google\Service\Resource
{
/**
* Creates a new connection profile in a given project and location.
* (connectionProfiles.create)
*
* @param string $parent Required. The parent which owns this collection of
* connection profiles.
* @param ConnectionProfile $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string connectionProfileId Required. The connection profile
* identifier.
* @opt_param string requestId Optional. A unique ID used to identify the
* request. If the server receives two requests with the same ID, then the
* second request is ignored. It is recommended to always set this value to a
* UUID. The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores
* (_), and hyphens (-). The maximum length is 40 characters.
* @opt_param bool skipValidation Optional. Create the connection profile
* without validating it. The default is false. Only supported for Oracle
* connection profiles.
* @opt_param bool validateOnly Optional. Only validate the connection profile,
* but don't create any resources. The default is false. Only supported for
* Oracle connection profiles.
* @return Operation
* @throws \Google\Service\Exception
*/
public function create($parent, ConnectionProfile $postBody, $optParams = [])
{
$params = ['parent' => $parent, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], Operation::class);
}
/**
* Deletes a single Database Migration Service connection profile. A connection
* profile can only be deleted if it is not in use by any active migration jobs.
* (connectionProfiles.delete)
*
* @param string $name Required. Name of the connection profile resource to
* delete.
* @param array $optParams Optional parameters.
*
* @opt_param bool force In case of force delete, the CloudSQL replica database
* is also deleted (only for CloudSQL connection profile).
* @opt_param string requestId A unique ID used to identify the request. If the
* server receives two requests with the same ID, then the second request is
* ignored. It is recommended to always set this value to a UUID. The ID must
* contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens
* (-). The maximum length is 40 characters.
* @return Operation
* @throws \Google\Service\Exception
*/
public function delete($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('delete', [$params], Operation::class);
}
/**
* Gets details of a single connection profile. (connectionProfiles.get)
*
* @param string $name Required. Name of the connection profile resource to get.
* @param array $optParams Optional parameters.
* @return ConnectionProfile
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], ConnectionProfile::class);
}
/**
* Gets the access control policy for a resource. Returns an empty policy if the
* resource exists and does not have a policy set.
* (connectionProfiles.getIamPolicy)
*
* @param string $resource REQUIRED: The resource for which the policy is being
* requested. See [Resource
* names](https://cloud.google.com/apis/design/resource_names) for the
* appropriate value for this field.
* @param array $optParams Optional parameters.
*
* @opt_param int options.requestedPolicyVersion Optional. The maximum policy
* version that will be used to format the policy. Valid values are 0, 1, and 3.
* Requests specifying an invalid value will be rejected. Requests for policies
* with any conditional role bindings must specify version 3. Policies with no
* conditional role bindings may specify any valid value or leave the field
* unset. The policy in the response might use the policy version that you
* specified, or it might use a lower policy version. For example, if you
* specify version 3, but the policy has no conditional role bindings, the
* response uses version 1. To learn which resources support conditions in their
* IAM policies, see the [IAM
* documentation](https://cloud.google.com/iam/help/conditions/resource-
* policies).
* @return Policy
* @throws \Google\Service\Exception
*/
public function getIamPolicy($resource, $optParams = [])
{
$params = ['resource' => $resource];
$params = array_merge($params, $optParams);
return $this->call('getIamPolicy', [$params], Policy::class);
}
/**
* Retrieves a list of all connection profiles in a given project and location.
* (connectionProfiles.listProjectsLocationsConnectionProfiles)
*
* @param string $parent Required. The parent which owns this collection of
* connection profiles.
* @param array $optParams Optional parameters.
*
* @opt_param string filter Optional. A filter expression that filters
* connection profiles listed in the response. The expression must specify the
* field name, a comparison operator, and the value that you want to use for
* filtering. The value must be a string, a number, or a boolean. The comparison
* operator must be either =, !=, >, or <. For example, list connection profiles
* created this year by specifying **createTime %gt;
* 2020-01-01T00:00:00.000000000Z**. You can also filter nested fields. For
* example, you could specify **mySql.username = %lt;my_username%gt;** to list
* all connection profiles configured to connect with a specific username.
* @opt_param string orderBy Optional. A comma-separated list of fields to order
* results according to.
* @opt_param int pageSize The maximum number of connection profiles to return.
* The service may return fewer than this value. If unspecified, at most 50
* connection profiles will be returned. The maximum value is 1000; values above
* 1000 are coerced to 1000.
* @opt_param string pageToken Optional. A page token, received from a previous
* `ListConnectionProfiles` call. Provide this to retrieve the subsequent page.
* When paginating, all other parameters provided to `ListConnectionProfiles`
* must match the call that provided the page token.
* @return ListConnectionProfilesResponse
* @throws \Google\Service\Exception
*/
public function listProjectsLocationsConnectionProfiles($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], ListConnectionProfilesResponse::class);
}
/**
* Update the configuration of a single connection profile.
* (connectionProfiles.patch)
*
* @param string $name The name of this connection profile resource in the form
* of projects/{project}/locations/{location}/connectionProfiles/{connectionProf
* ile}.
* @param ConnectionProfile $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string requestId Optional. A unique ID used to identify the
* request. If the server receives two requests with the same ID, then the
* second request is ignored. It is recommended to always set this value to a
* UUID. The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores
* (_), and hyphens (-). The maximum length is 40 characters.
* @opt_param bool skipValidation Optional. Update the connection profile
* without validating it. The default is false. Only supported for Oracle
* connection profiles.
* @opt_param string updateMask Required. Field mask is used to specify the
* fields to be overwritten by the update in the conversion workspace resource.
* @opt_param bool validateOnly Optional. Only validate the connection profile,
* but don't update any resources. The default is false. Only supported for
* Oracle connection profiles.
* @return Operation
* @throws \Google\Service\Exception
*/
public function patch($name, ConnectionProfile $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('patch', [$params], Operation::class);
}
/**
* Sets the access control policy on the specified resource. Replaces any
* existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and
* `PERMISSION_DENIED` errors. (connectionProfiles.setIamPolicy)
*
* @param string $resource REQUIRED: The resource for which the policy is being
* specified. See [Resource
* names](https://cloud.google.com/apis/design/resource_names) for the
* appropriate value for this field.
* @param SetIamPolicyRequest $postBody
* @param array $optParams Optional parameters.
* @return Policy
* @throws \Google\Service\Exception
*/
public function setIamPolicy($resource, SetIamPolicyRequest $postBody, $optParams = [])
{
$params = ['resource' => $resource, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('setIamPolicy', [$params], Policy::class);
}
/**
* Returns permissions that a caller has on the specified resource. If the
* resource does not exist, this will return an empty set of permissions, not a
* `NOT_FOUND` error. Note: This operation is designed to be used for building
* permission-aware UIs and command-line tools, not for authorization checking.
* This operation may "fail open" without warning.
* (connectionProfiles.testIamPermissions)
*
* @param string $resource REQUIRED: The resource for which the policy detail is
* being requested. See [Resource
* names](https://cloud.google.com/apis/design/resource_names) for the
* appropriate value for this field.
* @param TestIamPermissionsRequest $postBody
* @param array $optParams Optional parameters.
* @return TestIamPermissionsResponse
* @throws \Google\Service\Exception
*/
public function testIamPermissions($resource, TestIamPermissionsRequest $postBody, $optParams = [])
{
$params = ['resource' => $resource, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('testIamPermissions', [$params], TestIamPermissionsResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsLocationsConnectionProfiles::class, 'Google_Service_DatabaseMigrationService_Resource_ProjectsLocationsConnectionProfiles');
@@ -0,0 +1,422 @@
<?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\DatabaseMigrationService\Resource;
use Google\Service\DatabaseMigrationService\ApplyConversionWorkspaceRequest;
use Google\Service\DatabaseMigrationService\CommitConversionWorkspaceRequest;
use Google\Service\DatabaseMigrationService\ConversionWorkspace;
use Google\Service\DatabaseMigrationService\ConvertConversionWorkspaceRequest;
use Google\Service\DatabaseMigrationService\DescribeConversionWorkspaceRevisionsResponse;
use Google\Service\DatabaseMigrationService\DescribeDatabaseEntitiesResponse;
use Google\Service\DatabaseMigrationService\ListConversionWorkspacesResponse;
use Google\Service\DatabaseMigrationService\Operation;
use Google\Service\DatabaseMigrationService\Policy;
use Google\Service\DatabaseMigrationService\RollbackConversionWorkspaceRequest;
use Google\Service\DatabaseMigrationService\SearchBackgroundJobsResponse;
use Google\Service\DatabaseMigrationService\SeedConversionWorkspaceRequest;
use Google\Service\DatabaseMigrationService\SetIamPolicyRequest;
use Google\Service\DatabaseMigrationService\TestIamPermissionsRequest;
use Google\Service\DatabaseMigrationService\TestIamPermissionsResponse;
/**
* The "conversionWorkspaces" collection of methods.
* Typical usage is:
* <code>
* $datamigrationService = new Google\Service\DatabaseMigrationService(...);
* $conversionWorkspaces = $datamigrationService->projects_locations_conversionWorkspaces;
* </code>
*/
class ProjectsLocationsConversionWorkspaces extends \Google\Service\Resource
{
/**
* Applies draft tree onto a specific destination database.
* (conversionWorkspaces.apply)
*
* @param string $name Required. The name of the conversion workspace resource
* for which to apply the draft tree. Must be in the form of: projects/{project}
* /locations/{location}/conversionWorkspaces/{conversion_workspace}.
* @param ApplyConversionWorkspaceRequest $postBody
* @param array $optParams Optional parameters.
* @return Operation
* @throws \Google\Service\Exception
*/
public function apply($name, ApplyConversionWorkspaceRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('apply', [$params], Operation::class);
}
/**
* Marks all the data in the conversion workspace as committed.
* (conversionWorkspaces.commit)
*
* @param string $name Required. Name of the conversion workspace resource to
* commit.
* @param CommitConversionWorkspaceRequest $postBody
* @param array $optParams Optional parameters.
* @return Operation
* @throws \Google\Service\Exception
*/
public function commit($name, CommitConversionWorkspaceRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('commit', [$params], Operation::class);
}
/**
* Creates a draft tree schema for the destination database.
* (conversionWorkspaces.convert)
*
* @param string $name Name of the conversion workspace resource to convert in
* the form of: projects/{project}/locations/{location}/conversionWorkspaces/{co
* nversion_workspace}.
* @param ConvertConversionWorkspaceRequest $postBody
* @param array $optParams Optional parameters.
* @return Operation
* @throws \Google\Service\Exception
*/
public function convert($name, ConvertConversionWorkspaceRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('convert', [$params], Operation::class);
}
/**
* Creates a new conversion workspace in a given project and location.
* (conversionWorkspaces.create)
*
* @param string $parent Required. The parent which owns this collection of
* conversion workspaces.
* @param ConversionWorkspace $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string conversionWorkspaceId Required. The ID of the conversion
* workspace to create.
* @opt_param string requestId Optional. A unique ID used to identify the
* request. If the server receives two requests with the same ID, then the
* second request is ignored. It is recommended to always set this value to a
* UUID. The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores
* (_), and hyphens (-). The maximum length is 40 characters.
* @return Operation
* @throws \Google\Service\Exception
*/
public function create($parent, ConversionWorkspace $postBody, $optParams = [])
{
$params = ['parent' => $parent, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], Operation::class);
}
/**
* Deletes a single conversion workspace. (conversionWorkspaces.delete)
*
* @param string $name Required. Name of the conversion workspace resource to
* delete.
* @param array $optParams Optional parameters.
*
* @opt_param bool force Optional. Force delete the conversion workspace, even
* if there's a running migration that is using the workspace.
* @opt_param string requestId Optional. A unique ID used to identify the
* request. If the server receives two requests with the same ID, then the
* second request is ignored. It is recommended to always set this value to a
* UUID. The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores
* (_), and hyphens (-). The maximum length is 40 characters.
* @return Operation
* @throws \Google\Service\Exception
*/
public function delete($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('delete', [$params], Operation::class);
}
/**
* Retrieves a list of committed revisions of a specific conversion workspace.
* (conversionWorkspaces.describeConversionWorkspaceRevisions)
*
* @param string $conversionWorkspace Required. Name of the conversion workspace
* resource whose revisions are listed. Must be in the form of: projects/{projec
* t}/locations/{location}/conversionWorkspaces/{conversion_workspace}.
* @param array $optParams Optional parameters.
*
* @opt_param string commitId Optional. Optional filter to request a specific
* commit ID.
* @return DescribeConversionWorkspaceRevisionsResponse
* @throws \Google\Service\Exception
*/
public function describeConversionWorkspaceRevisions($conversionWorkspace, $optParams = [])
{
$params = ['conversionWorkspace' => $conversionWorkspace];
$params = array_merge($params, $optParams);
return $this->call('describeConversionWorkspaceRevisions', [$params], DescribeConversionWorkspaceRevisionsResponse::class);
}
/**
* Describes the database entities tree for a specific conversion workspace and
* a specific tree type. Database entities are not resources like conversion
* workspaces or mapping rules, and they can't be created, updated or deleted.
* Instead, they are simple data objects describing the structure of the client
* database. (conversionWorkspaces.describeDatabaseEntities)
*
* @param string $conversionWorkspace Required. Name of the conversion workspace
* resource whose database entities are described. Must be in the form of: proje
* cts/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace
* }.
* @param array $optParams Optional parameters.
*
* @opt_param string commitId Optional. Request a specific commit ID. If not
* specified, the entities from the latest commit are returned.
* @opt_param string filter Optional. Filter the returned entities based on
* AIP-160 standard.
* @opt_param int pageSize Optional. The maximum number of entities to return.
* The service may return fewer entities than the value specifies.
* @opt_param string pageToken Optional. The nextPageToken value received in the
* previous call to conversionWorkspace.describeDatabaseEntities, used in the
* subsequent request to retrieve the next page of results. On first call this
* should be left blank. When paginating, all other parameters provided to
* conversionWorkspace.describeDatabaseEntities must match the call that
* provided the page token.
* @opt_param string tree Required. The tree to fetch.
* @opt_param bool uncommitted Optional. Whether to retrieve the latest
* committed version of the entities or the latest version. This field is
* ignored if a specific commit_id is specified.
* @opt_param string view Optional. Results view based on AIP-157
* @return DescribeDatabaseEntitiesResponse
* @throws \Google\Service\Exception
*/
public function describeDatabaseEntities($conversionWorkspace, $optParams = [])
{
$params = ['conversionWorkspace' => $conversionWorkspace];
$params = array_merge($params, $optParams);
return $this->call('describeDatabaseEntities', [$params], DescribeDatabaseEntitiesResponse::class);
}
/**
* Gets details of a single conversion workspace. (conversionWorkspaces.get)
*
* @param string $name Required. Name of the conversion workspace resource to
* get.
* @param array $optParams Optional parameters.
* @return ConversionWorkspace
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], ConversionWorkspace::class);
}
/**
* Gets the access control policy for a resource. Returns an empty policy if the
* resource exists and does not have a policy set.
* (conversionWorkspaces.getIamPolicy)
*
* @param string $resource REQUIRED: The resource for which the policy is being
* requested. See [Resource
* names](https://cloud.google.com/apis/design/resource_names) for the
* appropriate value for this field.
* @param array $optParams Optional parameters.
*
* @opt_param int options.requestedPolicyVersion Optional. The maximum policy
* version that will be used to format the policy. Valid values are 0, 1, and 3.
* Requests specifying an invalid value will be rejected. Requests for policies
* with any conditional role bindings must specify version 3. Policies with no
* conditional role bindings may specify any valid value or leave the field
* unset. The policy in the response might use the policy version that you
* specified, or it might use a lower policy version. For example, if you
* specify version 3, but the policy has no conditional role bindings, the
* response uses version 1. To learn which resources support conditions in their
* IAM policies, see the [IAM
* documentation](https://cloud.google.com/iam/help/conditions/resource-
* policies).
* @return Policy
* @throws \Google\Service\Exception
*/
public function getIamPolicy($resource, $optParams = [])
{
$params = ['resource' => $resource];
$params = array_merge($params, $optParams);
return $this->call('getIamPolicy', [$params], Policy::class);
}
/**
* Lists conversion workspaces in a given project and location.
* (conversionWorkspaces.listProjectsLocationsConversionWorkspaces)
*
* @param string $parent Required. The parent which owns this collection of
* conversion workspaces.
* @param array $optParams Optional parameters.
*
* @opt_param string filter Optional. A filter expression that filters
* conversion workspaces listed in the response. The expression must specify the
* field name, a comparison operator, and the value that you want to use for
* filtering. The value must be a string, a number, or a boolean. The comparison
* operator must be either =, !=, >, or <. For example, list conversion
* workspaces created this year by specifying **createTime %gt;
* 2020-01-01T00:00:00.000000000Z.** You can also filter nested fields. For
* example, you could specify **source.version = "12.c.1"** to select all
* conversion workspaces with source database version equal to 12.c.1.
* @opt_param int pageSize Optional. The maximum number of conversion workspaces
* to return. The service may return fewer than this value. If unspecified, at
* most 50 sets are returned.
* @opt_param string pageToken Optional. The nextPageToken value received in the
* previous call to conversionWorkspaces.list, used in the subsequent request to
* retrieve the next page of results. On first call this should be left blank.
* When paginating, all other parameters provided to conversionWorkspaces.list
* must match the call that provided the page token.
* @return ListConversionWorkspacesResponse
* @throws \Google\Service\Exception
*/
public function listProjectsLocationsConversionWorkspaces($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], ListConversionWorkspacesResponse::class);
}
/**
* Updates the parameters of a single conversion workspace.
* (conversionWorkspaces.patch)
*
* @param string $name Full name of the workspace resource, in the form of: proj
* ects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspac
* e}.
* @param ConversionWorkspace $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string requestId Optional. A unique ID used to identify the
* request. If the server receives two requests with the same ID, then the
* second request is ignored. It is recommended to always set this value to a
* UUID. The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores
* (_), and hyphens (-). The maximum length is 40 characters.
* @opt_param string updateMask Required. Field mask is used to specify the
* fields to be overwritten by the update in the conversion workspace resource.
* @return Operation
* @throws \Google\Service\Exception
*/
public function patch($name, ConversionWorkspace $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('patch', [$params], Operation::class);
}
/**
* Rolls back a conversion workspace to the last committed snapshot.
* (conversionWorkspaces.rollback)
*
* @param string $name Required. Name of the conversion workspace resource to
* roll back to.
* @param RollbackConversionWorkspaceRequest $postBody
* @param array $optParams Optional parameters.
* @return Operation
* @throws \Google\Service\Exception
*/
public function rollback($name, RollbackConversionWorkspaceRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('rollback', [$params], Operation::class);
}
/**
* Searches/lists the background jobs for a specific conversion workspace. The
* background jobs are not resources like conversion workspaces or mapping
* rules, and they can't be created, updated or deleted. Instead, they are a way
* to expose the data plane jobs log.
* (conversionWorkspaces.searchBackgroundJobs)
*
* @param string $conversionWorkspace Required. Name of the conversion workspace
* resource whose jobs are listed, in the form of: projects/{project}/locations/
* {location}/conversionWorkspaces/{conversion_workspace}.
* @param array $optParams Optional parameters.
*
* @opt_param string completedUntilTime Optional. If provided, only returns jobs
* that completed until (not including) the given timestamp.
* @opt_param int maxSize Optional. The maximum number of jobs to return. The
* service may return fewer than this value. If unspecified, at most 100 jobs
* are returned. The maximum value is 100; values above 100 are coerced to 100.
* @opt_param bool returnMostRecentPerJobType Optional. Whether or not to return
* just the most recent job per job type,
* @return SearchBackgroundJobsResponse
* @throws \Google\Service\Exception
*/
public function searchBackgroundJobs($conversionWorkspace, $optParams = [])
{
$params = ['conversionWorkspace' => $conversionWorkspace];
$params = array_merge($params, $optParams);
return $this->call('searchBackgroundJobs', [$params], SearchBackgroundJobsResponse::class);
}
/**
* Imports a snapshot of the source database into the conversion workspace.
* (conversionWorkspaces.seed)
*
* @param string $name Name of the conversion workspace resource to seed with
* new database structure, in the form of: projects/{project}/locations/{locatio
* n}/conversionWorkspaces/{conversion_workspace}.
* @param SeedConversionWorkspaceRequest $postBody
* @param array $optParams Optional parameters.
* @return Operation
* @throws \Google\Service\Exception
*/
public function seed($name, SeedConversionWorkspaceRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('seed', [$params], Operation::class);
}
/**
* Sets the access control policy on the specified resource. Replaces any
* existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and
* `PERMISSION_DENIED` errors. (conversionWorkspaces.setIamPolicy)
*
* @param string $resource REQUIRED: The resource for which the policy is being
* specified. See [Resource
* names](https://cloud.google.com/apis/design/resource_names) for the
* appropriate value for this field.
* @param SetIamPolicyRequest $postBody
* @param array $optParams Optional parameters.
* @return Policy
* @throws \Google\Service\Exception
*/
public function setIamPolicy($resource, SetIamPolicyRequest $postBody, $optParams = [])
{
$params = ['resource' => $resource, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('setIamPolicy', [$params], Policy::class);
}
/**
* Returns permissions that a caller has on the specified resource. If the
* resource does not exist, this will return an empty set of permissions, not a
* `NOT_FOUND` error. Note: This operation is designed to be used for building
* permission-aware UIs and command-line tools, not for authorization checking.
* This operation may "fail open" without warning.
* (conversionWorkspaces.testIamPermissions)
*
* @param string $resource REQUIRED: The resource for which the policy detail is
* being requested. See [Resource
* names](https://cloud.google.com/apis/design/resource_names) for the
* appropriate value for this field.
* @param TestIamPermissionsRequest $postBody
* @param array $optParams Optional parameters.
* @return TestIamPermissionsResponse
* @throws \Google\Service\Exception
*/
public function testIamPermissions($resource, TestIamPermissionsRequest $postBody, $optParams = [])
{
$params = ['resource' => $resource, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('testIamPermissions', [$params], TestIamPermissionsResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsLocationsConversionWorkspaces::class, 'Google_Service_DatabaseMigrationService_Resource_ProjectsLocationsConversionWorkspaces');
@@ -0,0 +1,143 @@
<?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\DatabaseMigrationService\Resource;
use Google\Service\DatabaseMigrationService\DatamigrationEmpty;
use Google\Service\DatabaseMigrationService\ImportMappingRulesRequest;
use Google\Service\DatabaseMigrationService\ListMappingRulesResponse;
use Google\Service\DatabaseMigrationService\MappingRule;
use Google\Service\DatabaseMigrationService\Operation;
/**
* The "mappingRules" collection of methods.
* Typical usage is:
* <code>
* $datamigrationService = new Google\Service\DatabaseMigrationService(...);
* $mappingRules = $datamigrationService->projects_locations_conversionWorkspaces_mappingRules;
* </code>
*/
class ProjectsLocationsConversionWorkspacesMappingRules extends \Google\Service\Resource
{
/**
* Creates a new mapping rule for a given conversion workspace.
* (mappingRules.create)
*
* @param string $parent Required. The parent which owns this collection of
* mapping rules.
* @param MappingRule $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string mappingRuleId Required. The ID of the rule to create.
* @opt_param string requestId Optional. A unique ID used to identify the
* request. If the server receives two requests with the same ID, then the
* second request is ignored. It is recommended to always set this value to a
* UUID. The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores
* (_), and hyphens (-). The maximum length is 40 characters.
* @return MappingRule
* @throws \Google\Service\Exception
*/
public function create($parent, MappingRule $postBody, $optParams = [])
{
$params = ['parent' => $parent, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], MappingRule::class);
}
/**
* Deletes a single mapping rule. (mappingRules.delete)
*
* @param string $name Required. Name of the mapping rule resource to delete.
* @param array $optParams Optional parameters.
*
* @opt_param string requestId Optional. A unique ID used to identify the
* request. If the server receives two requests with the same ID, then the
* second request is ignored. It is recommended to always set this value to a
* UUID. The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores
* (_), and hyphens (-). The maximum length is 40 characters.
* @return DatamigrationEmpty
* @throws \Google\Service\Exception
*/
public function delete($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('delete', [$params], DatamigrationEmpty::class);
}
/**
* Gets the details of a mapping rule. (mappingRules.get)
*
* @param string $name Required. Name of the mapping rule resource to get.
* Example: conversionWorkspaces/123/mappingRules/rule123 In order to retrieve a
* previous revision of the mapping rule, also provide the revision ID. Example:
* conversionWorkspace/123/mappingRules/rule123@c7cfa2a8c7cfa2a8c7cfa2a8c7cfa2a8
* @param array $optParams Optional parameters.
* @return MappingRule
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], MappingRule::class);
}
/**
* Imports the mapping rules for a given conversion workspace. Supports various
* formats of external rules files. (mappingRules.import)
*
* @param string $parent Required. Name of the conversion workspace resource to
* import the rules to in the form of: projects/{project}/locations/{location}/c
* onversionWorkspaces/{conversion_workspace}.
* @param ImportMappingRulesRequest $postBody
* @param array $optParams Optional parameters.
* @return Operation
* @throws \Google\Service\Exception
*/
public function import($parent, ImportMappingRulesRequest $postBody, $optParams = [])
{
$params = ['parent' => $parent, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('import', [$params], Operation::class);
}
/**
* Lists the mapping rules for a specific conversion workspace.
* (mappingRules.listProjectsLocationsConversionWorkspacesMappingRules)
*
* @param string $parent Required. Name of the conversion workspace resource
* whose mapping rules are listed in the form of: projects/{project}/locations/{
* location}/conversionWorkspaces/{conversion_workspace}.
* @param array $optParams Optional parameters.
*
* @opt_param int pageSize Optional. The maximum number of rules to return. The
* service may return fewer than this value.
* @opt_param string pageToken Optional. The nextPageToken value received in the
* previous call to mappingRules.list, used in the subsequent request to
* retrieve the next page of results. On first call this should be left blank.
* When paginating, all other parameters provided to mappingRules.list must
* match the call that provided the page token.
* @return ListMappingRulesResponse
* @throws \Google\Service\Exception
*/
public function listProjectsLocationsConversionWorkspacesMappingRules($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], ListMappingRulesResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsLocationsConversionWorkspacesMappingRules::class, 'Google_Service_DatabaseMigrationService_Resource_ProjectsLocationsConversionWorkspacesMappingRules');
@@ -0,0 +1,416 @@
<?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\DatabaseMigrationService\Resource;
use Google\Service\DatabaseMigrationService\DemoteDestinationRequest;
use Google\Service\DatabaseMigrationService\GenerateSshScriptRequest;
use Google\Service\DatabaseMigrationService\GenerateTcpProxyScriptRequest;
use Google\Service\DatabaseMigrationService\ListMigrationJobsResponse;
use Google\Service\DatabaseMigrationService\MigrationJob;
use Google\Service\DatabaseMigrationService\Operation;
use Google\Service\DatabaseMigrationService\Policy;
use Google\Service\DatabaseMigrationService\PromoteMigrationJobRequest;
use Google\Service\DatabaseMigrationService\RestartMigrationJobRequest;
use Google\Service\DatabaseMigrationService\ResumeMigrationJobRequest;
use Google\Service\DatabaseMigrationService\SetIamPolicyRequest;
use Google\Service\DatabaseMigrationService\SshScript;
use Google\Service\DatabaseMigrationService\StartMigrationJobRequest;
use Google\Service\DatabaseMigrationService\StopMigrationJobRequest;
use Google\Service\DatabaseMigrationService\TcpProxyScript;
use Google\Service\DatabaseMigrationService\TestIamPermissionsRequest;
use Google\Service\DatabaseMigrationService\TestIamPermissionsResponse;
use Google\Service\DatabaseMigrationService\VerifyMigrationJobRequest;
/**
* The "migrationJobs" collection of methods.
* Typical usage is:
* <code>
* $datamigrationService = new Google\Service\DatabaseMigrationService(...);
* $migrationJobs = $datamigrationService->projects_locations_migrationJobs;
* </code>
*/
class ProjectsLocationsMigrationJobs extends \Google\Service\Resource
{
/**
* Creates a new migration job in a given project and location.
* (migrationJobs.create)
*
* @param string $parent Required. The parent which owns this collection of
* migration jobs.
* @param MigrationJob $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string migrationJobId Required. The ID of the instance to create.
* @opt_param string requestId Optional. A unique ID used to identify the
* request. If the server receives two requests with the same ID, then the
* second request is ignored. It is recommended to always set this value to a
* UUID. The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores
* (_), and hyphens (-). The maximum length is 40 characters.
* @return Operation
* @throws \Google\Service\Exception
*/
public function create($parent, MigrationJob $postBody, $optParams = [])
{
$params = ['parent' => $parent, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], Operation::class);
}
/**
* Deletes a single migration job. (migrationJobs.delete)
*
* @param string $name Required. Name of the migration job resource to delete.
* @param array $optParams Optional parameters.
*
* @opt_param bool force Optional. The destination CloudSQL connection profile
* is always deleted with the migration job. In case of force delete, the
* destination CloudSQL replica database is also deleted.
* @opt_param string requestId Optional. A unique ID used to identify the
* request. If the server receives two requests with the same ID, then the
* second request is ignored. It is recommended to always set this value to a
* UUID. The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores
* (_), and hyphens (-). The maximum length is 40 characters.
* @return Operation
* @throws \Google\Service\Exception
*/
public function delete($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('delete', [$params], Operation::class);
}
/**
* Demotes the destination database to become a read replica of the source. This
* is applicable for the following migrations: 1. MySQL to Cloud SQL for MySQL
* 2. PostgreSQL to Cloud SQL for PostgreSQL 3. PostgreSQL to AlloyDB for
* PostgreSQL. (migrationJobs.demoteDestination)
*
* @param string $name Required. Name of the migration job resource to demote
* its destination.
* @param DemoteDestinationRequest $postBody
* @param array $optParams Optional parameters.
* @return Operation
* @throws \Google\Service\Exception
*/
public function demoteDestination($name, DemoteDestinationRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('demoteDestination', [$params], Operation::class);
}
/**
* Retrieves objects from the source database that can be selected for data
* migration. This is applicable for the following migrations: 1. PostgreSQL to
* Cloud SQL for PostgreSQL 2. PostgreSQL to AlloyDB for PostgreSQL.
* (migrationJobs.fetchSourceObjects)
*
* @param string $name Required. The resource name for the migration job for
* which source objects should be returned.
* @param array $optParams Optional parameters.
* @return Operation
* @throws \Google\Service\Exception
*/
public function fetchSourceObjects($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('fetchSourceObjects', [$params], Operation::class);
}
/**
* Generate a SSH configuration script to configure the reverse SSH
* connectivity. (migrationJobs.generateSshScript)
*
* @param string $migrationJob Name of the migration job resource to generate
* the SSH script.
* @param GenerateSshScriptRequest $postBody
* @param array $optParams Optional parameters.
* @return SshScript
* @throws \Google\Service\Exception
*/
public function generateSshScript($migrationJob, GenerateSshScriptRequest $postBody, $optParams = [])
{
$params = ['migrationJob' => $migrationJob, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('generateSshScript', [$params], SshScript::class);
}
/**
* Generate a TCP Proxy configuration script to configure a cloud-hosted VM
* running a TCP Proxy. (migrationJobs.generateTcpProxyScript)
*
* @param string $migrationJob Name of the migration job resource to generate
* the TCP Proxy script.
* @param GenerateTcpProxyScriptRequest $postBody
* @param array $optParams Optional parameters.
* @return TcpProxyScript
* @throws \Google\Service\Exception
*/
public function generateTcpProxyScript($migrationJob, GenerateTcpProxyScriptRequest $postBody, $optParams = [])
{
$params = ['migrationJob' => $migrationJob, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('generateTcpProxyScript', [$params], TcpProxyScript::class);
}
/**
* Gets details of a single migration job. (migrationJobs.get)
*
* @param string $name Required. Name of the migration job resource to get.
* @param array $optParams Optional parameters.
* @return MigrationJob
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], MigrationJob::class);
}
/**
* Gets the access control policy for a resource. Returns an empty policy if the
* resource exists and does not have a policy set. (migrationJobs.getIamPolicy)
*
* @param string $resource REQUIRED: The resource for which the policy is being
* requested. See [Resource
* names](https://cloud.google.com/apis/design/resource_names) for the
* appropriate value for this field.
* @param array $optParams Optional parameters.
*
* @opt_param int options.requestedPolicyVersion Optional. The maximum policy
* version that will be used to format the policy. Valid values are 0, 1, and 3.
* Requests specifying an invalid value will be rejected. Requests for policies
* with any conditional role bindings must specify version 3. Policies with no
* conditional role bindings may specify any valid value or leave the field
* unset. The policy in the response might use the policy version that you
* specified, or it might use a lower policy version. For example, if you
* specify version 3, but the policy has no conditional role bindings, the
* response uses version 1. To learn which resources support conditions in their
* IAM policies, see the [IAM
* documentation](https://cloud.google.com/iam/help/conditions/resource-
* policies).
* @return Policy
* @throws \Google\Service\Exception
*/
public function getIamPolicy($resource, $optParams = [])
{
$params = ['resource' => $resource];
$params = array_merge($params, $optParams);
return $this->call('getIamPolicy', [$params], Policy::class);
}
/**
* Lists migration jobs in a given project and location.
* (migrationJobs.listProjectsLocationsMigrationJobs)
*
* @param string $parent Required. The parent which owns this collection of
* migrationJobs.
* @param array $optParams Optional parameters.
*
* @opt_param string filter Optional. A filter expression that filters migration
* jobs listed in the response. The expression must specify the field name, a
* comparison operator, and the value that you want to use for filtering. The
* value must be a string, a number, or a boolean. The comparison operator must
* be either =, !=, >, or <. For example, list migration jobs created this year
* by specifying **createTime %gt; 2020-01-01T00:00:00.000000000Z.** You can
* also filter nested fields. For example, you could specify
* **reverseSshConnectivity.vmIp = "1.2.3.4"** to select all migration jobs
* connecting through the specific SSH tunnel bastion.
* @opt_param string orderBy Optional. Sort the results based on the migration
* job name. Valid values are: "name", "name asc", and "name desc".
* @opt_param int pageSize Optional. The maximum number of migration jobs to
* return. The service may return fewer than this value. If unspecified, at most
* 50 migration jobs will be returned. The maximum value is 1000; values above
* 1000 are coerced to 1000.
* @opt_param string pageToken Optional. The nextPageToken value received in the
* previous call to migrationJobs.list, used in the subsequent request to
* retrieve the next page of results. On first call this should be left blank.
* When paginating, all other parameters provided to migrationJobs.list must
* match the call that provided the page token.
* @return ListMigrationJobsResponse
* @throws \Google\Service\Exception
*/
public function listProjectsLocationsMigrationJobs($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], ListMigrationJobsResponse::class);
}
/**
* Updates the parameters of a single migration job. (migrationJobs.patch)
*
* @param string $name The name (URI) of this migration job resource, in the
* form of:
* projects/{project}/locations/{location}/migrationJobs/{migrationJob}.
* @param MigrationJob $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string requestId Optional. A unique ID used to identify the
* request. If the server receives two requests with the same ID, then the
* second request is ignored. It is recommended to always set this value to a
* UUID. The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores
* (_), and hyphens (-). The maximum length is 40 characters.
* @opt_param string updateMask Required. Field mask is used to specify the
* fields to be overwritten by the update in the conversion workspace resource.
* @return Operation
* @throws \Google\Service\Exception
*/
public function patch($name, MigrationJob $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('patch', [$params], Operation::class);
}
/**
* Promote a migration job, stopping replication to the destination and
* promoting the destination to be a standalone database.
* (migrationJobs.promote)
*
* @param string $name Name of the migration job resource to promote.
* @param PromoteMigrationJobRequest $postBody
* @param array $optParams Optional parameters.
* @return Operation
* @throws \Google\Service\Exception
*/
public function promote($name, PromoteMigrationJobRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('promote', [$params], Operation::class);
}
/**
* Restart a stopped or failed migration job, resetting the destination instance
* to its original state and starting the migration process from scratch.
* (migrationJobs.restart)
*
* @param string $name Name of the migration job resource to restart.
* @param RestartMigrationJobRequest $postBody
* @param array $optParams Optional parameters.
* @return Operation
* @throws \Google\Service\Exception
*/
public function restart($name, RestartMigrationJobRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('restart', [$params], Operation::class);
}
/**
* Resume a migration job that is currently stopped and is resumable (was
* stopped during CDC phase). (migrationJobs.resume)
*
* @param string $name Name of the migration job resource to resume.
* @param ResumeMigrationJobRequest $postBody
* @param array $optParams Optional parameters.
* @return Operation
* @throws \Google\Service\Exception
*/
public function resume($name, ResumeMigrationJobRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('resume', [$params], Operation::class);
}
/**
* Sets the access control policy on the specified resource. Replaces any
* existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and
* `PERMISSION_DENIED` errors. (migrationJobs.setIamPolicy)
*
* @param string $resource REQUIRED: The resource for which the policy is being
* specified. See [Resource
* names](https://cloud.google.com/apis/design/resource_names) for the
* appropriate value for this field.
* @param SetIamPolicyRequest $postBody
* @param array $optParams Optional parameters.
* @return Policy
* @throws \Google\Service\Exception
*/
public function setIamPolicy($resource, SetIamPolicyRequest $postBody, $optParams = [])
{
$params = ['resource' => $resource, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('setIamPolicy', [$params], Policy::class);
}
/**
* Start an already created migration job. (migrationJobs.start)
*
* @param string $name Name of the migration job resource to start.
* @param StartMigrationJobRequest $postBody
* @param array $optParams Optional parameters.
* @return Operation
* @throws \Google\Service\Exception
*/
public function start($name, StartMigrationJobRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('start', [$params], Operation::class);
}
/**
* Stops a running migration job. (migrationJobs.stop)
*
* @param string $name Name of the migration job resource to stop.
* @param StopMigrationJobRequest $postBody
* @param array $optParams Optional parameters.
* @return Operation
* @throws \Google\Service\Exception
*/
public function stop($name, StopMigrationJobRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('stop', [$params], Operation::class);
}
/**
* Returns permissions that a caller has on the specified resource. If the
* resource does not exist, this will return an empty set of permissions, not a
* `NOT_FOUND` error. Note: This operation is designed to be used for building
* permission-aware UIs and command-line tools, not for authorization checking.
* This operation may "fail open" without warning.
* (migrationJobs.testIamPermissions)
*
* @param string $resource REQUIRED: The resource for which the policy detail is
* being requested. See [Resource
* names](https://cloud.google.com/apis/design/resource_names) for the
* appropriate value for this field.
* @param TestIamPermissionsRequest $postBody
* @param array $optParams Optional parameters.
* @return TestIamPermissionsResponse
* @throws \Google\Service\Exception
*/
public function testIamPermissions($resource, TestIamPermissionsRequest $postBody, $optParams = [])
{
$params = ['resource' => $resource, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('testIamPermissions', [$params], TestIamPermissionsResponse::class);
}
/**
* Verify a migration job, making sure the destination can reach the source and
* that all configuration and prerequisites are met. (migrationJobs.verify)
*
* @param string $name Name of the migration job resource to verify.
* @param VerifyMigrationJobRequest $postBody
* @param array $optParams Optional parameters.
* @return Operation
* @throws \Google\Service\Exception
*/
public function verify($name, VerifyMigrationJobRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('verify', [$params], Operation::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsLocationsMigrationJobs::class, 'Google_Service_DatabaseMigrationService_Resource_ProjectsLocationsMigrationJobs');
@@ -0,0 +1,171 @@
<?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\DatabaseMigrationService\Resource;
use Google\Service\DatabaseMigrationService\ListMigrationJobObjectsResponse;
use Google\Service\DatabaseMigrationService\LookupMigrationJobObjectRequest;
use Google\Service\DatabaseMigrationService\MigrationJobObject;
use Google\Service\DatabaseMigrationService\Policy;
use Google\Service\DatabaseMigrationService\SetIamPolicyRequest;
use Google\Service\DatabaseMigrationService\TestIamPermissionsRequest;
use Google\Service\DatabaseMigrationService\TestIamPermissionsResponse;
/**
* The "objects" collection of methods.
* Typical usage is:
* <code>
* $datamigrationService = new Google\Service\DatabaseMigrationService(...);
* $objects = $datamigrationService->projects_locations_migrationJobs_objects;
* </code>
*/
class ProjectsLocationsMigrationJobsObjects extends \Google\Service\Resource
{
/**
* Use this method to get details about a migration job object. (objects.get)
*
* @param string $name Required. The name of the migration job object resource
* to get.
* @param array $optParams Optional parameters.
* @return MigrationJobObject
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], MigrationJobObject::class);
}
/**
* Gets the access control policy for a resource. Returns an empty policy if the
* resource exists and does not have a policy set. (objects.getIamPolicy)
*
* @param string $resource REQUIRED: The resource for which the policy is being
* requested. See [Resource
* names](https://cloud.google.com/apis/design/resource_names) for the
* appropriate value for this field.
* @param array $optParams Optional parameters.
*
* @opt_param int options.requestedPolicyVersion Optional. The maximum policy
* version that will be used to format the policy. Valid values are 0, 1, and 3.
* Requests specifying an invalid value will be rejected. Requests for policies
* with any conditional role bindings must specify version 3. Policies with no
* conditional role bindings may specify any valid value or leave the field
* unset. The policy in the response might use the policy version that you
* specified, or it might use a lower policy version. For example, if you
* specify version 3, but the policy has no conditional role bindings, the
* response uses version 1. To learn which resources support conditions in their
* IAM policies, see the [IAM
* documentation](https://cloud.google.com/iam/help/conditions/resource-
* policies).
* @return Policy
* @throws \Google\Service\Exception
*/
public function getIamPolicy($resource, $optParams = [])
{
$params = ['resource' => $resource];
$params = array_merge($params, $optParams);
return $this->call('getIamPolicy', [$params], Policy::class);
}
/**
* Use this method to list the objects of a specific migration job.
* (objects.listProjectsLocationsMigrationJobsObjects)
*
* @param string $parent Required. The parent migration job that owns the
* collection of objects.
* @param array $optParams Optional parameters.
*
* @opt_param int pageSize Optional. Maximum number of objects to return.
* Default is 50. The maximum value is 1000; values above 1000 will be coerced
* to 1000.
* @opt_param string pageToken Optional. Page token received from a previous
* `ListMigrationJObObjectsRequest` call. Provide this to retrieve the
* subsequent page. When paginating, all other parameters provided to
* `ListMigrationJobObjectsRequest` must match the call that provided the page
* token.
* @return ListMigrationJobObjectsResponse
* @throws \Google\Service\Exception
*/
public function listProjectsLocationsMigrationJobsObjects($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], ListMigrationJobObjectsResponse::class);
}
/**
* Use this method to look up a migration job object by its source object
* identifier. (objects.lookup)
*
* @param string $parent Required. The parent migration job that owns the
* collection of objects.
* @param LookupMigrationJobObjectRequest $postBody
* @param array $optParams Optional parameters.
* @return MigrationJobObject
* @throws \Google\Service\Exception
*/
public function lookup($parent, LookupMigrationJobObjectRequest $postBody, $optParams = [])
{
$params = ['parent' => $parent, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('lookup', [$params], MigrationJobObject::class);
}
/**
* Sets the access control policy on the specified resource. Replaces any
* existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and
* `PERMISSION_DENIED` errors. (objects.setIamPolicy)
*
* @param string $resource REQUIRED: The resource for which the policy is being
* specified. See [Resource
* names](https://cloud.google.com/apis/design/resource_names) for the
* appropriate value for this field.
* @param SetIamPolicyRequest $postBody
* @param array $optParams Optional parameters.
* @return Policy
* @throws \Google\Service\Exception
*/
public function setIamPolicy($resource, SetIamPolicyRequest $postBody, $optParams = [])
{
$params = ['resource' => $resource, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('setIamPolicy', [$params], Policy::class);
}
/**
* Returns permissions that a caller has on the specified resource. If the
* resource does not exist, this will return an empty set of permissions, not a
* `NOT_FOUND` error. Note: This operation is designed to be used for building
* permission-aware UIs and command-line tools, not for authorization checking.
* This operation may "fail open" without warning. (objects.testIamPermissions)
*
* @param string $resource REQUIRED: The resource for which the policy detail is
* being requested. See [Resource
* names](https://cloud.google.com/apis/design/resource_names) for the
* appropriate value for this field.
* @param TestIamPermissionsRequest $postBody
* @param array $optParams Optional parameters.
* @return TestIamPermissionsResponse
* @throws \Google\Service\Exception
*/
public function testIamPermissions($resource, TestIamPermissionsRequest $postBody, $optParams = [])
{
$params = ['resource' => $resource, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('testIamPermissions', [$params], TestIamPermissionsResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsLocationsMigrationJobsObjects::class, 'Google_Service_DatabaseMigrationService_Resource_ProjectsLocationsMigrationJobsObjects');
@@ -0,0 +1,121 @@
<?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\DatabaseMigrationService\Resource;
use Google\Service\DatabaseMigrationService\CancelOperationRequest;
use Google\Service\DatabaseMigrationService\DatamigrationEmpty;
use Google\Service\DatabaseMigrationService\ListOperationsResponse;
use Google\Service\DatabaseMigrationService\Operation;
/**
* The "operations" collection of methods.
* Typical usage is:
* <code>
* $datamigrationService = new Google\Service\DatabaseMigrationService(...);
* $operations = $datamigrationService->projects_locations_operations;
* </code>
*/
class ProjectsLocationsOperations 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 DatamigrationEmpty
* @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], DatamigrationEmpty::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 DatamigrationEmpty
* @throws \Google\Service\Exception
*/
public function delete($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('delete', [$params], DatamigrationEmpty::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.listProjectsLocationsOperations)
*
* @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.
* @opt_param bool returnPartialSuccess When set to `true`, operations that are
* reachable are returned as normal, and those that are unreachable are returned
* in the ListOperationsResponse.unreachable field. This can only be `true` when
* reading across collections. For example, when `parent` is set to
* `"projects/example/locations/-"`. This field is not supported by default and
* will result in an `UNIMPLEMENTED` error if set unless explicitly documented
* otherwise in service or product specific documentation.
* @return ListOperationsResponse
* @throws \Google\Service\Exception
*/
public function listProjectsLocationsOperations($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(ProjectsLocationsOperations::class, 'Google_Service_DatabaseMigrationService_Resource_ProjectsLocationsOperations');
@@ -0,0 +1,212 @@
<?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\DatabaseMigrationService\Resource;
use Google\Service\DatabaseMigrationService\ListPrivateConnectionsResponse;
use Google\Service\DatabaseMigrationService\Operation;
use Google\Service\DatabaseMigrationService\Policy;
use Google\Service\DatabaseMigrationService\PrivateConnection;
use Google\Service\DatabaseMigrationService\SetIamPolicyRequest;
use Google\Service\DatabaseMigrationService\TestIamPermissionsRequest;
use Google\Service\DatabaseMigrationService\TestIamPermissionsResponse;
/**
* The "privateConnections" collection of methods.
* Typical usage is:
* <code>
* $datamigrationService = new Google\Service\DatabaseMigrationService(...);
* $privateConnections = $datamigrationService->projects_locations_privateConnections;
* </code>
*/
class ProjectsLocationsPrivateConnections extends \Google\Service\Resource
{
/**
* Creates a new private connection in a given project and location.
* (privateConnections.create)
*
* @param string $parent Required. The parent that owns the collection of
* PrivateConnections.
* @param PrivateConnection $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string privateConnectionId Required. The private connection
* identifier.
* @opt_param string requestId Optional. A unique ID used to identify the
* request. If the server receives two requests with the same ID, then the
* second request is ignored. It is recommended to always set this value to a
* UUID. The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores
* (_), and hyphens (-). The maximum length is 40 characters.
* @opt_param bool skipValidation Optional. If set to true, will skip
* validations.
* @opt_param bool validateOnly Optional. For PSC Interface only - get the
* tenant project before creating the resource.
* @return Operation
* @throws \Google\Service\Exception
*/
public function create($parent, PrivateConnection $postBody, $optParams = [])
{
$params = ['parent' => $parent, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], Operation::class);
}
/**
* Deletes a single Database Migration Service private connection.
* (privateConnections.delete)
*
* @param string $name Required. The name of the private connection to delete.
* @param array $optParams Optional parameters.
*
* @opt_param string requestId Optional. A unique ID used to identify the
* request. If the server receives two requests with the same ID, then the
* second request is ignored. It is recommended to always set this value to a
* UUID. The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores
* (_), and hyphens (-). The maximum length is 40 characters.
* @return Operation
* @throws \Google\Service\Exception
*/
public function delete($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('delete', [$params], Operation::class);
}
/**
* Gets details of a single private connection. (privateConnections.get)
*
* @param string $name Required. The name of the private connection to get.
* @param array $optParams Optional parameters.
* @return PrivateConnection
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], PrivateConnection::class);
}
/**
* Gets the access control policy for a resource. Returns an empty policy if the
* resource exists and does not have a policy set.
* (privateConnections.getIamPolicy)
*
* @param string $resource REQUIRED: The resource for which the policy is being
* requested. See [Resource
* names](https://cloud.google.com/apis/design/resource_names) for the
* appropriate value for this field.
* @param array $optParams Optional parameters.
*
* @opt_param int options.requestedPolicyVersion Optional. The maximum policy
* version that will be used to format the policy. Valid values are 0, 1, and 3.
* Requests specifying an invalid value will be rejected. Requests for policies
* with any conditional role bindings must specify version 3. Policies with no
* conditional role bindings may specify any valid value or leave the field
* unset. The policy in the response might use the policy version that you
* specified, or it might use a lower policy version. For example, if you
* specify version 3, but the policy has no conditional role bindings, the
* response uses version 1. To learn which resources support conditions in their
* IAM policies, see the [IAM
* documentation](https://cloud.google.com/iam/help/conditions/resource-
* policies).
* @return Policy
* @throws \Google\Service\Exception
*/
public function getIamPolicy($resource, $optParams = [])
{
$params = ['resource' => $resource];
$params = array_merge($params, $optParams);
return $this->call('getIamPolicy', [$params], Policy::class);
}
/**
* Retrieves a list of private connections in a given project and location.
* (privateConnections.listProjectsLocationsPrivateConnections)
*
* @param string $parent Required. The parent that owns the collection of
* private connections.
* @param array $optParams Optional parameters.
*
* @opt_param string filter Optional. A filter expression that filters private
* connections listed in the response. The expression must specify the field
* name, a comparison operator, and the value that you want to use for
* filtering. The value must be a string, a number, or a boolean. The comparison
* operator must be either =, !=, >, or <. For example, list private connections
* created this year by specifying **createTime %gt;
* 2021-01-01T00:00:00.000000000Z**.
* @opt_param string orderBy Optional. Order by fields for the result.
* @opt_param int pageSize Optional. Maximum number of private connections to
* return. If unspecified, at most 50 private connections that are returned. The
* maximum value is 1000; values above 1000 are coerced to 1000.
* @opt_param string pageToken Optional. Page token received from a previous
* `ListPrivateConnections` call. Provide this to retrieve the subsequent page.
* When paginating, all other parameters provided to `ListPrivateConnections`
* must match the call that provided the page token.
* @return ListPrivateConnectionsResponse
* @throws \Google\Service\Exception
*/
public function listProjectsLocationsPrivateConnections($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], ListPrivateConnectionsResponse::class);
}
/**
* Sets the access control policy on the specified resource. Replaces any
* existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and
* `PERMISSION_DENIED` errors. (privateConnections.setIamPolicy)
*
* @param string $resource REQUIRED: The resource for which the policy is being
* specified. See [Resource
* names](https://cloud.google.com/apis/design/resource_names) for the
* appropriate value for this field.
* @param SetIamPolicyRequest $postBody
* @param array $optParams Optional parameters.
* @return Policy
* @throws \Google\Service\Exception
*/
public function setIamPolicy($resource, SetIamPolicyRequest $postBody, $optParams = [])
{
$params = ['resource' => $resource, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('setIamPolicy', [$params], Policy::class);
}
/**
* Returns permissions that a caller has on the specified resource. If the
* resource does not exist, this will return an empty set of permissions, not a
* `NOT_FOUND` error. Note: This operation is designed to be used for building
* permission-aware UIs and command-line tools, not for authorization checking.
* This operation may "fail open" without warning.
* (privateConnections.testIamPermissions)
*
* @param string $resource REQUIRED: The resource for which the policy detail is
* being requested. See [Resource
* names](https://cloud.google.com/apis/design/resource_names) for the
* appropriate value for this field.
* @param TestIamPermissionsRequest $postBody
* @param array $optParams Optional parameters.
* @return TestIamPermissionsResponse
* @throws \Google\Service\Exception
*/
public function testIamPermissions($resource, TestIamPermissionsRequest $postBody, $optParams = [])
{
$params = ['resource' => $resource, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('testIamPermissions', [$params], TestIamPermissionsResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsLocationsPrivateConnections::class, 'Google_Service_DatabaseMigrationService_Resource_ProjectsLocationsPrivateConnections');