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\Dataform\Resource;
/**
* The "projects" collection of methods.
* Typical usage is:
* <code>
* $dataformService = new Google\Service\Dataform(...);
* $projects = $dataformService->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_Dataform_Resource_Projects');
@@ -0,0 +1,157 @@
<?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\Dataform\Resource;
use Google\Service\Dataform\Config;
use Google\Service\Dataform\ListLocationsResponse;
use Google\Service\Dataform\Location;
use Google\Service\Dataform\QueryUserRootContentsResponse;
/**
* The "locations" collection of methods.
* Typical usage is:
* <code>
* $dataformService = new Google\Service\Dataform(...);
* $locations = $dataformService->projects_locations;
* </code>
*/
class ProjectsLocations extends \Google\Service\Resource
{
/**
* 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);
}
/**
* Get default config for a given project and location. (locations.getConfig)
*
* @param string $name Required. The config name.
* @param array $optParams Optional parameters.
* @return Config
* @throws \Google\Service\Exception
*/
public function getConfig($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('getConfig', [$params], Config::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);
}
/**
* Returns the contents of a caller's root folder in a given location. The root
* folder contains all resources that are created by the user and not contained
* in any other folder. (locations.queryUserRootContents)
*
* @param string $location Required. Location of the user root folder to list
* contents for. Format: projects/locations
* @param array $optParams Optional parameters.
*
* @opt_param string filter Optional. Optional filtering for the returned list.
* Filtering is currently only supported on the `display_name` field. Example: *
* `filter="display_name="MyFolder""`
* @opt_param string orderBy Optional. Field to additionally sort results by.
* Will order Folders before Repositories, and then by `order_by` in ascending
* order. Supported keywords: display_name (default), created_at,
* last_modified_at. Examples: * `orderBy="display_name"` *
* `orderBy="display_name desc"`
* @opt_param int pageSize Optional. Maximum number of paths to return. The
* server may return fewer items than requested. If unspecified, the server will
* pick an appropriate default.
* @opt_param string pageToken Optional. Page token received from a previous
* `QueryUserRootContents` call. Provide this to retrieve the subsequent page.
* When paginating, all other parameters provided to
* `QueryUserRootFolderContents`, with the exception of `page_size`, must match
* the call that provided the page token.
* @return QueryUserRootContentsResponse
* @throws \Google\Service\Exception
*/
public function queryUserRootContents($location, $optParams = [])
{
$params = ['location' => $location];
$params = array_merge($params, $optParams);
return $this->call('queryUserRootContents', [$params], QueryUserRootContentsResponse::class);
}
/**
* Update default config for a given project and location. **Note:** *This
* method does not fully implement [AIP/134](https://google.aip.dev/134). The
* wildcard entry () is treated as a bad request, and when the `field_mask` is
* omitted, the request is treated as a full update on all modifiable fields.*
* (locations.updateConfig)
*
* @param string $name Identifier. The config name.
* @param Config $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string updateMask Optional. Specifies the fields to be updated in
* the config.
* @return Config
* @throws \Google\Service\Exception
*/
public function updateConfig($name, Config $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('updateConfig', [$params], Config::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsLocations::class, 'Google_Service_Dataform_Resource_ProjectsLocations');
@@ -0,0 +1,112 @@
<?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\Dataform\Resource;
use Google\Service\Dataform\Policy;
use Google\Service\Dataform\SetIamPolicyRequest;
use Google\Service\Dataform\TestIamPermissionsRequest;
use Google\Service\Dataform\TestIamPermissionsResponse;
/**
* The "collections" collection of methods.
* Typical usage is:
* <code>
* $dataformService = new Google\Service\Dataform(...);
* $collections = $dataformService->projects_locations_collections;
* </code>
*/
class ProjectsLocationsCollections extends \Google\Service\Resource
{
/**
* Gets the access control policy for a resource. Returns an empty policy if the
* resource exists and does not have a policy set. (collections.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);
}
/**
* Sets the access control policy on the specified resource. Replaces any
* existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and
* `PERMISSION_DENIED` errors. (collections.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.
* (collections.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(ProjectsLocationsCollections::class, 'Google_Service_Dataform_Resource_ProjectsLocationsCollections');
@@ -0,0 +1,246 @@
<?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\Dataform\Resource;
use Google\Service\Dataform\DataformEmpty;
use Google\Service\Dataform\DeleteFolderTreeRequest;
use Google\Service\Dataform\Folder;
use Google\Service\Dataform\MoveFolderRequest;
use Google\Service\Dataform\Operation;
use Google\Service\Dataform\Policy;
use Google\Service\Dataform\QueryFolderContentsResponse;
use Google\Service\Dataform\SetIamPolicyRequest;
use Google\Service\Dataform\TestIamPermissionsRequest;
use Google\Service\Dataform\TestIamPermissionsResponse;
/**
* The "folders" collection of methods.
* Typical usage is:
* <code>
* $dataformService = new Google\Service\Dataform(...);
* $folders = $dataformService->projects_locations_folders;
* </code>
*/
class ProjectsLocationsFolders extends \Google\Service\Resource
{
/**
* Creates a new Folder in a given project and location. (folders.create)
*
* @param string $parent Required. The location in which to create the Folder.
* Must be in the format `projects/locations`.
* @param Folder $postBody
* @param array $optParams Optional parameters.
* @return Folder
* @throws \Google\Service\Exception
*/
public function create($parent, Folder $postBody, $optParams = [])
{
$params = ['parent' => $parent, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], Folder::class);
}
/**
* Deletes a single Folder. (folders.delete)
*
* @param string $name Required. The Folder's name.
* @param array $optParams Optional parameters.
* @return DataformEmpty
* @throws \Google\Service\Exception
*/
public function delete($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('delete', [$params], DataformEmpty::class);
}
/**
* Deletes a Folder with its contents (Folders, Repositories, Workspaces,
* ReleaseConfigs, and WorkflowConfigs). (folders.deleteTree)
*
* @param string $name Required. The Folder's name. Format:
* projects/{project}/locations/{location}/folders/{folder}
* @param DeleteFolderTreeRequest $postBody
* @param array $optParams Optional parameters.
* @return Operation
* @throws \Google\Service\Exception
*/
public function deleteTree($name, DeleteFolderTreeRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('deleteTree', [$params], Operation::class);
}
/**
* Fetches a single Folder. (folders.get)
*
* @param string $name Required. The Folder's name.
* @param array $optParams Optional parameters.
* @return Folder
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], Folder::class);
}
/**
* Gets the access control policy for a resource. Returns an empty policy if the
* resource exists and does not have a policy set. (folders.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);
}
/**
* Moves a Folder to a new Folder, TeamFolder, or the root location.
* (folders.move)
*
* @param string $name Required. The full resource name of the Folder to move.
* @param MoveFolderRequest $postBody
* @param array $optParams Optional parameters.
* @return Operation
* @throws \Google\Service\Exception
*/
public function move($name, MoveFolderRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('move', [$params], Operation::class);
}
/**
* Updates a single Folder. (folders.patch)
*
* @param string $name Identifier. The Folder's name.
* @param Folder $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string updateMask Optional. Specifies the fields to be updated in
* the Folder. If left unset, all fields that can be updated, will be updated. A
* few fields cannot be updated and will be ignored if specified in the
* update_mask (e.g. parent_name, team_folder_name).
* @return Folder
* @throws \Google\Service\Exception
*/
public function patch($name, Folder $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('patch', [$params], Folder::class);
}
/**
* Returns the contents of a given Folder. (folders.queryFolderContents)
*
* @param string $folder Required. Resource name of the Folder to list contents
* for. Format: projects/locations/folders
* @param array $optParams Optional parameters.
*
* @opt_param string filter Optional. Optional filtering for the returned list.
* Filtering is currently only supported on the `display_name` field. Example: *
* `filter="display_name="MyFolder""`
* @opt_param string orderBy Optional. Field to additionally sort results by.
* Will order Folders before Repositories, and then by `order_by` in ascending
* order. Supported keywords: display_name (default), create_time,
* last_modified_time. Examples: * `orderBy="display_name"` *
* `orderBy="display_name desc"`
* @opt_param int pageSize Optional. Maximum number of paths to return. The
* server may return fewer items than requested. If unspecified, the server will
* pick an appropriate default.
* @opt_param string pageToken Optional. Page token received from a previous
* `QueryFolderContents` call. Provide this to retrieve the subsequent page.
* When paginating, all other parameters provided to `QueryFolderContents`, with
* the exception of `page_size`, must match the call that provided the page
* token.
* @return QueryFolderContentsResponse
* @throws \Google\Service\Exception
*/
public function queryFolderContents($folder, $optParams = [])
{
$params = ['folder' => $folder];
$params = array_merge($params, $optParams);
return $this->call('queryFolderContents', [$params], QueryFolderContentsResponse::class);
}
/**
* Sets the access control policy on the specified resource. Replaces any
* existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and
* `PERMISSION_DENIED` errors. (folders.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. (folders.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(ProjectsLocationsFolders::class, 'Google_Service_Dataform_Resource_ProjectsLocationsFolders');
@@ -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\Dataform\Resource;
use Google\Service\Dataform\CancelOperationRequest;
use Google\Service\Dataform\DataformEmpty;
use Google\Service\Dataform\ListOperationsResponse;
use Google\Service\Dataform\Operation;
/**
* The "operations" collection of methods.
* Typical usage is:
* <code>
* $dataformService = new Google\Service\Dataform(...);
* $operations = $dataformService->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 DataformEmpty
* @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], DataformEmpty::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 DataformEmpty
* @throws \Google\Service\Exception
*/
public function delete($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('delete', [$params], DataformEmpty::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_Dataform_Resource_ProjectsLocationsOperations');
@@ -0,0 +1,364 @@
<?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\Dataform\Resource;
use Google\Service\Dataform\CommitRepositoryChangesRequest;
use Google\Service\Dataform\CommitRepositoryChangesResponse;
use Google\Service\Dataform\ComputeRepositoryAccessTokenStatusResponse;
use Google\Service\Dataform\DataformEmpty;
use Google\Service\Dataform\FetchRemoteBranchesResponse;
use Google\Service\Dataform\FetchRepositoryHistoryResponse;
use Google\Service\Dataform\ListRepositoriesResponse;
use Google\Service\Dataform\MoveRepositoryRequest;
use Google\Service\Dataform\Operation;
use Google\Service\Dataform\Policy;
use Google\Service\Dataform\QueryRepositoryDirectoryContentsResponse;
use Google\Service\Dataform\ReadRepositoryFileResponse;
use Google\Service\Dataform\Repository;
use Google\Service\Dataform\SetIamPolicyRequest;
use Google\Service\Dataform\TestIamPermissionsRequest;
use Google\Service\Dataform\TestIamPermissionsResponse;
/**
* The "repositories" collection of methods.
* Typical usage is:
* <code>
* $dataformService = new Google\Service\Dataform(...);
* $repositories = $dataformService->projects_locations_repositories;
* </code>
*/
class ProjectsLocationsRepositories extends \Google\Service\Resource
{
/**
* Applies a Git commit to a Repository. The Repository must not have a value
* for `git_remote_settings.url`. (repositories.commit)
*
* @param string $name Required. The repository's name.
* @param CommitRepositoryChangesRequest $postBody
* @param array $optParams Optional parameters.
* @return CommitRepositoryChangesResponse
* @throws \Google\Service\Exception
*/
public function commit($name, CommitRepositoryChangesRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('commit', [$params], CommitRepositoryChangesResponse::class);
}
/**
* Computes a Repository's Git access token status.
* (repositories.computeAccessTokenStatus)
*
* @param string $name Required. The repository's name.
* @param array $optParams Optional parameters.
* @return ComputeRepositoryAccessTokenStatusResponse
* @throws \Google\Service\Exception
*/
public function computeAccessTokenStatus($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('computeAccessTokenStatus', [$params], ComputeRepositoryAccessTokenStatusResponse::class);
}
/**
* Creates a new Repository in a given project and location.
* (repositories.create)
*
* @param string $parent Required. The location in which to create the
* repository. Must be in the format `projects/locations`.
* @param Repository $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string repositoryId Required. The ID to use for the repository,
* which will become the final component of the repository's resource name.
* @return Repository
* @throws \Google\Service\Exception
*/
public function create($parent, Repository $postBody, $optParams = [])
{
$params = ['parent' => $parent, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], Repository::class);
}
/**
* Deletes a single Repository. (repositories.delete)
*
* @param string $name Required. The repository's name.
* @param array $optParams Optional parameters.
*
* @opt_param bool force Optional. If set to true, child resources of this
* repository (compilation results and workflow invocations) will also be
* deleted. Otherwise, the request will only succeed if the repository has no
* child resources. **Note:** *This flag doesn't support deletion of workspaces,
* release configs or workflow configs. If any of such resources exists in the
* repository, the request will fail.*.
* @return DataformEmpty
* @throws \Google\Service\Exception
*/
public function delete($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('delete', [$params], DataformEmpty::class);
}
/**
* Fetches a Repository's history of commits. The Repository must not have a
* value for `git_remote_settings.url`. (repositories.fetchHistory)
*
* @param string $name Required. The repository's name.
* @param array $optParams Optional parameters.
*
* @opt_param int pageSize Optional. Maximum number of commits to return. The
* server may return fewer items than requested. If unspecified, the server will
* pick an appropriate default.
* @opt_param string pageToken Optional. Page token received from a previous
* `FetchRepositoryHistory` call. Provide this to retrieve the subsequent page.
* When paginating, all other parameters provided to `FetchRepositoryHistory`,
* with the exception of `page_size`, must match the call that provided the page
* token.
* @return FetchRepositoryHistoryResponse
* @throws \Google\Service\Exception
*/
public function fetchHistory($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('fetchHistory', [$params], FetchRepositoryHistoryResponse::class);
}
/**
* Fetches a Repository's remote branches. (repositories.fetchRemoteBranches)
*
* @param string $name Required. The repository's name.
* @param array $optParams Optional parameters.
* @return FetchRemoteBranchesResponse
* @throws \Google\Service\Exception
*/
public function fetchRemoteBranches($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('fetchRemoteBranches', [$params], FetchRemoteBranchesResponse::class);
}
/**
* Fetches a single Repository. (repositories.get)
*
* @param string $name Required. The repository's name.
* @param array $optParams Optional parameters.
* @return Repository
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], Repository::class);
}
/**
* Gets the access control policy for a resource. Returns an empty policy if the
* resource exists and does not have a policy set. (repositories.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 Repositories in a given project and location. **Note:** *This method
* can return repositories not shown in the [Dataform
* UI](https://console.cloud.google.com/bigquery/dataform)*.
* (repositories.listProjectsLocationsRepositories)
*
* @param string $parent Required. The location in which to list repositories.
* Must be in the format `projects/locations`.
* @param array $optParams Optional parameters.
*
* @opt_param string filter Optional. Filter for the returned list.
* @opt_param string orderBy Optional. This field only supports ordering by
* `name`. If unspecified, the server will choose the ordering. If specified,
* the default order is ascending for the `name` field.
* @opt_param int pageSize Optional. Maximum number of repositories to return.
* The server may return fewer items than requested. If unspecified, the server
* will pick an appropriate default.
* @opt_param string pageToken Optional. Page token received from a previous
* `ListRepositories` call. Provide this to retrieve the subsequent page. When
* paginating, all other parameters provided to `ListRepositories`, with the
* exception of `page_size`, must match the call that provided the page token.
* @return ListRepositoriesResponse
* @throws \Google\Service\Exception
*/
public function listProjectsLocationsRepositories($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], ListRepositoriesResponse::class);
}
/**
* Moves a Repository to a new location. (repositories.move)
*
* @param string $name Required. The full resource name of the repository to
* move.
* @param MoveRepositoryRequest $postBody
* @param array $optParams Optional parameters.
* @return Operation
* @throws \Google\Service\Exception
*/
public function move($name, MoveRepositoryRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('move', [$params], Operation::class);
}
/**
* Updates a single Repository. **Note:** *This method does not fully implement
* [AIP/134](https://google.aip.dev/134). The wildcard entry () is treated as a
* bad request, and when the `field_mask` is omitted, the request is treated as
* a full update on all modifiable fields.* (repositories.patch)
*
* @param string $name Identifier. The repository's name.
* @param Repository $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string updateMask Optional. Specifies the fields to be updated in
* the repository. If left unset, all fields will be updated.
* @return Repository
* @throws \Google\Service\Exception
*/
public function patch($name, Repository $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('patch', [$params], Repository::class);
}
/**
* Returns the contents of a given Repository directory. The Repository must not
* have a value for `git_remote_settings.url`.
* (repositories.queryDirectoryContents)
*
* @param string $name Required. The repository's name.
* @param array $optParams Optional parameters.
*
* @opt_param string commitSha Optional. The Commit SHA for the commit to query
* from. If unset, the directory will be queried from HEAD.
* @opt_param int pageSize Optional. Maximum number of paths to return. The
* server may return fewer items than requested. If unspecified, the server will
* pick an appropriate default.
* @opt_param string pageToken Optional. Page token received from a previous
* `QueryRepositoryDirectoryContents` call. Provide this to retrieve the
* subsequent page. When paginating, all other parameters provided to
* `QueryRepositoryDirectoryContents`, with the exception of `page_size`, must
* match the call that provided the page token.
* @opt_param string path Optional. The directory's full path including
* directory name, relative to root. If left unset, the root is used.
* @return QueryRepositoryDirectoryContentsResponse
* @throws \Google\Service\Exception
*/
public function queryDirectoryContents($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('queryDirectoryContents', [$params], QueryRepositoryDirectoryContentsResponse::class);
}
/**
* Returns the contents of a file (inside a Repository). The Repository must not
* have a value for `git_remote_settings.url`. (repositories.readFile)
*
* @param string $name Required. The repository's name.
* @param array $optParams Optional parameters.
*
* @opt_param string commitSha Optional. The commit SHA for the commit to read
* from. If unset, the file will be read from HEAD.
* @opt_param string path Required. Full file path to read including filename,
* from repository root.
* @return ReadRepositoryFileResponse
* @throws \Google\Service\Exception
*/
public function readFile($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('readFile', [$params], ReadRepositoryFileResponse::class);
}
/**
* Sets the access control policy on the specified resource. Replaces any
* existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and
* `PERMISSION_DENIED` errors. (repositories.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.
* (repositories.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(ProjectsLocationsRepositories::class, 'Google_Service_Dataform_Resource_ProjectsLocationsRepositories');
@@ -0,0 +1,87 @@
<?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\Dataform\Resource;
use Google\Service\Dataform\Policy;
use Google\Service\Dataform\SetIamPolicyRequest;
/**
* The "commentThreads" collection of methods.
* Typical usage is:
* <code>
* $dataformService = new Google\Service\Dataform(...);
* $commentThreads = $dataformService->projects_locations_repositories_commentThreads;
* </code>
*/
class ProjectsLocationsRepositoriesCommentThreads extends \Google\Service\Resource
{
/**
* Gets the access control policy for a resource. Returns an empty policy if the
* resource exists and does not have a policy set. (commentThreads.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);
}
/**
* Sets the access control policy on the specified resource. Replaces any
* existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and
* `PERMISSION_DENIED` errors. (commentThreads.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);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsLocationsRepositoriesCommentThreads::class, 'Google_Service_Dataform_Resource_ProjectsLocationsRepositoriesCommentThreads');
@@ -0,0 +1,87 @@
<?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\Dataform\Resource;
use Google\Service\Dataform\Policy;
use Google\Service\Dataform\SetIamPolicyRequest;
/**
* The "comments" collection of methods.
* Typical usage is:
* <code>
* $dataformService = new Google\Service\Dataform(...);
* $comments = $dataformService->projects_locations_repositories_commentThreads_comments;
* </code>
*/
class ProjectsLocationsRepositoriesCommentThreadsComments extends \Google\Service\Resource
{
/**
* Gets the access control policy for a resource. Returns an empty policy if the
* resource exists and does not have a policy set. (comments.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);
}
/**
* Sets the access control policy on the specified resource. Replaces any
* existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and
* `PERMISSION_DENIED` errors. (comments.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);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsLocationsRepositoriesCommentThreadsComments::class, 'Google_Service_Dataform_Resource_ProjectsLocationsRepositoriesCommentThreadsComments');
@@ -0,0 +1,127 @@
<?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\Dataform\Resource;
use Google\Service\Dataform\CompilationResult;
use Google\Service\Dataform\ListCompilationResultsResponse;
use Google\Service\Dataform\QueryCompilationResultActionsResponse;
/**
* The "compilationResults" collection of methods.
* Typical usage is:
* <code>
* $dataformService = new Google\Service\Dataform(...);
* $compilationResults = $dataformService->projects_locations_repositories_compilationResults;
* </code>
*/
class ProjectsLocationsRepositoriesCompilationResults extends \Google\Service\Resource
{
/**
* Creates a new CompilationResult in a given project and location.
* (compilationResults.create)
*
* @param string $parent Required. The repository in which to create the
* compilation result. Must be in the format `projects/locations/repositories`.
* @param CompilationResult $postBody
* @param array $optParams Optional parameters.
* @return CompilationResult
* @throws \Google\Service\Exception
*/
public function create($parent, CompilationResult $postBody, $optParams = [])
{
$params = ['parent' => $parent, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], CompilationResult::class);
}
/**
* Fetches a single CompilationResult. (compilationResults.get)
*
* @param string $name Required. The compilation result's name. LINT.ThenChange(
* //depot/google3/google/cloud/dataform/v2main/data_pipelines.proto:GetCompilat
* ionResultRequest)
* @param array $optParams Optional parameters.
* @return CompilationResult
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], CompilationResult::class);
}
/**
* Lists CompilationResults in a given Repository.
* (compilationResults.listProjectsLocationsRepositoriesCompilationResults)
*
* @param string $parent Required. The repository in which to list compilation
* results. Must be in the format `projects/locations/repositories`.
* @param array $optParams Optional parameters.
*
* @opt_param string filter Optional. Filter for the returned list. LINT.ThenCha
* nge(//depot/google3/google/cloud/dataform/v2main/data_pipelines.proto:ListCom
* pilationResultsRequest)
* @opt_param string orderBy Optional. This field only supports ordering by
* `name` and `create_time`. If unspecified, the server will choose the
* ordering. If specified, the default order is ascending for the `name` field.
* @opt_param int pageSize Optional. Maximum number of compilation results to
* return. The server may return fewer items than requested. If unspecified, the
* server will pick an appropriate default.
* @opt_param string pageToken Optional. Page token received from a previous
* `ListCompilationResults` call. Provide this to retrieve the subsequent page.
* When paginating, all other parameters provided to `ListCompilationResults`,
* with the exception of `page_size`, must match the call that provided the page
* token.
* @return ListCompilationResultsResponse
* @throws \Google\Service\Exception
*/
public function listProjectsLocationsRepositoriesCompilationResults($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], ListCompilationResultsResponse::class);
}
/**
* Returns CompilationResultActions in a given CompilationResult.
* (compilationResults.query)
*
* @param string $name Required. The compilation result's name.
* @param array $optParams Optional parameters.
*
* @opt_param string filter Optional. Optional filter for the returned list.
* Filtering is only currently supported on the `file_path` field.
* @opt_param int pageSize Optional. Maximum number of compilation results to
* return. The server may return fewer items than requested. If unspecified, the
* server will pick an appropriate default.
* @opt_param string pageToken Optional. Page token received from a previous
* `QueryCompilationResultActions` call. Provide this to retrieve the subsequent
* page. When paginating, all other parameters provided to
* `QueryCompilationResultActions`, with the exception of `page_size`, must
* match the call that provided the page token.
* @return QueryCompilationResultActionsResponse
* @throws \Google\Service\Exception
*/
public function query($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('query', [$params], QueryCompilationResultActionsResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsLocationsRepositoriesCompilationResults::class, 'Google_Service_Dataform_Resource_ProjectsLocationsRepositoriesCompilationResults');
@@ -0,0 +1,137 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Dataform\Resource;
use Google\Service\Dataform\DataformEmpty;
use Google\Service\Dataform\ListReleaseConfigsResponse;
use Google\Service\Dataform\ReleaseConfig;
/**
* The "releaseConfigs" collection of methods.
* Typical usage is:
* <code>
* $dataformService = new Google\Service\Dataform(...);
* $releaseConfigs = $dataformService->projects_locations_repositories_releaseConfigs;
* </code>
*/
class ProjectsLocationsRepositoriesReleaseConfigs extends \Google\Service\Resource
{
/**
* Creates a new ReleaseConfig in a given Repository. (releaseConfigs.create)
*
* @param string $parent Required. The repository in which to create the release
* config. Must be in the format `projects/locations/repositories`.
* @param ReleaseConfig $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string releaseConfigId Required. The ID to use for the release
* config, which will become the final component of the release config's
* resource name. LINT.ThenChange(//depot/google3/google/cloud/dataform/v2main/d
* ata_pipelines.proto:CreateReleaseConfigRequest)
* @return ReleaseConfig
* @throws \Google\Service\Exception
*/
public function create($parent, ReleaseConfig $postBody, $optParams = [])
{
$params = ['parent' => $parent, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], ReleaseConfig::class);
}
/**
* Deletes a single ReleaseConfig. (releaseConfigs.delete)
*
* @param string $name Required. The release config's name. LINT.ThenChange(//de
* pot/google3/google/cloud/dataform/v2main/data_pipelines.proto:DeleteReleaseCo
* nfigRequest)
* @param array $optParams Optional parameters.
* @return DataformEmpty
* @throws \Google\Service\Exception
*/
public function delete($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('delete', [$params], DataformEmpty::class);
}
/**
* Fetches a single ReleaseConfig. (releaseConfigs.get)
*
* @param string $name Required. The release config's name. LINT.ThenChange(//de
* pot/google3/google/cloud/dataform/v2main/data_pipelines.proto:GetReleaseConfi
* gRequest)
* @param array $optParams Optional parameters.
* @return ReleaseConfig
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], ReleaseConfig::class);
}
/**
* Lists ReleaseConfigs in a given Repository.
* (releaseConfigs.listProjectsLocationsRepositoriesReleaseConfigs)
*
* @param string $parent Required. The repository in which to list release
* configs. Must be in the format `projects/locations/repositories`.
* @param array $optParams Optional parameters.
*
* @opt_param int pageSize Optional. Maximum number of release configs to
* return. The server may return fewer items than requested. If unspecified, the
* server will pick an appropriate default.
* @opt_param string pageToken Optional. Page token received from a previous
* `ListReleaseConfigs` call. Provide this to retrieve the subsequent page. When
* paginating, all other parameters provided to `ListReleaseConfigs`, with the
* exception of `page_size`, must match the call that provided the page token. L
* INT.ThenChange(//depot/google3/google/cloud/dataform/v2main/data_pipelines.pr
* oto:ListReleaseConfigsRequest)
* @return ListReleaseConfigsResponse
* @throws \Google\Service\Exception
*/
public function listProjectsLocationsRepositoriesReleaseConfigs($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], ListReleaseConfigsResponse::class);
}
/**
* Updates a single ReleaseConfig. **Note:** *This method does not fully
* implement [AIP/134](https://google.aip.dev/134). The wildcard entry () is
* treated as a bad request, and when the `field_mask` is omitted, the request
* is treated as a full update on all modifiable fields.* (releaseConfigs.patch)
*
* @param string $name Identifier. The release config's name.
* @param ReleaseConfig $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string updateMask Optional. Specifies the fields to be updated in
* the release config. If left unset, all fields will be updated.
* @return ReleaseConfig
* @throws \Google\Service\Exception
*/
public function patch($name, ReleaseConfig $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('patch', [$params], ReleaseConfig::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsLocationsRepositoriesReleaseConfigs::class, 'Google_Service_Dataform_Resource_ProjectsLocationsRepositoriesReleaseConfigs');
@@ -0,0 +1,132 @@
<?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\Dataform\Resource;
use Google\Service\Dataform\DataformEmpty;
use Google\Service\Dataform\ListWorkflowConfigsResponse;
use Google\Service\Dataform\WorkflowConfig;
/**
* The "workflowConfigs" collection of methods.
* Typical usage is:
* <code>
* $dataformService = new Google\Service\Dataform(...);
* $workflowConfigs = $dataformService->projects_locations_repositories_workflowConfigs;
* </code>
*/
class ProjectsLocationsRepositoriesWorkflowConfigs extends \Google\Service\Resource
{
/**
* Creates a new WorkflowConfig in a given Repository. (workflowConfigs.create)
*
* @param string $parent Required. The repository in which to create the
* workflow config. Must be in the format `projects/locations/repositories`.
* @param WorkflowConfig $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string workflowConfigId Required. The ID to use for the workflow
* config, which will become the final component of the workflow config's
* resource name.
* @return WorkflowConfig
* @throws \Google\Service\Exception
*/
public function create($parent, WorkflowConfig $postBody, $optParams = [])
{
$params = ['parent' => $parent, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], WorkflowConfig::class);
}
/**
* Deletes a single WorkflowConfig. (workflowConfigs.delete)
*
* @param string $name Required. The workflow config's name.
* @param array $optParams Optional parameters.
* @return DataformEmpty
* @throws \Google\Service\Exception
*/
public function delete($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('delete', [$params], DataformEmpty::class);
}
/**
* Fetches a single WorkflowConfig. (workflowConfigs.get)
*
* @param string $name Required. The workflow config's name.
* @param array $optParams Optional parameters.
* @return WorkflowConfig
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], WorkflowConfig::class);
}
/**
* Lists WorkflowConfigs in a given Repository.
* (workflowConfigs.listProjectsLocationsRepositoriesWorkflowConfigs)
*
* @param string $parent Required. The repository in which to list workflow
* configs. Must be in the format `projects/locations/repositories`.
* @param array $optParams Optional parameters.
*
* @opt_param int pageSize Optional. Maximum number of workflow configs to
* return. The server may return fewer items than requested. If unspecified, the
* server will pick an appropriate default.
* @opt_param string pageToken Optional. Page token received from a previous
* `ListWorkflowConfigs` call. Provide this to retrieve the subsequent page.
* When paginating, all other parameters provided to `ListWorkflowConfigs`, with
* the exception of `page_size`, must match the call that provided the page
* token.
* @return ListWorkflowConfigsResponse
* @throws \Google\Service\Exception
*/
public function listProjectsLocationsRepositoriesWorkflowConfigs($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], ListWorkflowConfigsResponse::class);
}
/**
* Updates a single WorkflowConfig. **Note:** *This method does not fully
* implement [AIP/134](https://google.aip.dev/134). The wildcard entry () is
* treated as a bad request, and when the `field_mask` is omitted, the request
* is treated as a full update on all modifiable fields.*
* (workflowConfigs.patch)
*
* @param string $name Identifier. The workflow config's name.
* @param WorkflowConfig $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string updateMask Optional. Specifies the fields to be updated in
* the workflow config. If left unset, all fields will be updated.
* @return WorkflowConfig
* @throws \Google\Service\Exception
*/
public function patch($name, WorkflowConfig $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('patch', [$params], WorkflowConfig::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsLocationsRepositoriesWorkflowConfigs::class, 'Google_Service_Dataform_Resource_ProjectsLocationsRepositoriesWorkflowConfigs');
@@ -0,0 +1,154 @@
<?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\Dataform\Resource;
use Google\Service\Dataform\CancelWorkflowInvocationRequest;
use Google\Service\Dataform\CancelWorkflowInvocationResponse;
use Google\Service\Dataform\DataformEmpty;
use Google\Service\Dataform\ListWorkflowInvocationsResponse;
use Google\Service\Dataform\QueryWorkflowInvocationActionsResponse;
use Google\Service\Dataform\WorkflowInvocation;
/**
* The "workflowInvocations" collection of methods.
* Typical usage is:
* <code>
* $dataformService = new Google\Service\Dataform(...);
* $workflowInvocations = $dataformService->projects_locations_repositories_workflowInvocations;
* </code>
*/
class ProjectsLocationsRepositoriesWorkflowInvocations extends \Google\Service\Resource
{
/**
* Requests cancellation of a running WorkflowInvocation.
* (workflowInvocations.cancel)
*
* @param string $name Required. The workflow invocation resource's name.
* @param CancelWorkflowInvocationRequest $postBody
* @param array $optParams Optional parameters.
* @return CancelWorkflowInvocationResponse
* @throws \Google\Service\Exception
*/
public function cancel($name, CancelWorkflowInvocationRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('cancel', [$params], CancelWorkflowInvocationResponse::class);
}
/**
* Creates a new WorkflowInvocation in a given Repository.
* (workflowInvocations.create)
*
* @param string $parent Required. The repository in which to create the
* workflow invocation. Must be in the format `projects/locations/repositories`.
* @param WorkflowInvocation $postBody
* @param array $optParams Optional parameters.
* @return WorkflowInvocation
* @throws \Google\Service\Exception
*/
public function create($parent, WorkflowInvocation $postBody, $optParams = [])
{
$params = ['parent' => $parent, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], WorkflowInvocation::class);
}
/**
* Deletes a single WorkflowInvocation. (workflowInvocations.delete)
*
* @param string $name Required. The workflow invocation resource's name.
* @param array $optParams Optional parameters.
* @return DataformEmpty
* @throws \Google\Service\Exception
*/
public function delete($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('delete', [$params], DataformEmpty::class);
}
/**
* Fetches a single WorkflowInvocation. (workflowInvocations.get)
*
* @param string $name Required. The workflow invocation resource's name.
* @param array $optParams Optional parameters.
* @return WorkflowInvocation
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], WorkflowInvocation::class);
}
/**
* Lists WorkflowInvocations in a given Repository.
* (workflowInvocations.listProjectsLocationsRepositoriesWorkflowInvocations)
*
* @param string $parent Required. The parent resource of the WorkflowInvocation
* type. Must be in the format `projects/locations/repositories`.
* @param array $optParams Optional parameters.
*
* @opt_param string filter Optional. Filter for the returned list.
* @opt_param string orderBy Optional. This field only supports ordering by
* `name`. If unspecified, the server will choose the ordering. If specified,
* the default order is ascending for the `name` field.
* @opt_param int pageSize Optional. Maximum number of workflow invocations to
* return. The server may return fewer items than requested. If unspecified, the
* server will pick an appropriate default.
* @opt_param string pageToken Optional. Page token received from a previous
* `ListWorkflowInvocations` call. Provide this to retrieve the subsequent page.
* When paginating, all other parameters provided to `ListWorkflowInvocations`,
* with the exception of `page_size`, must match the call that provided the page
* token.
* @return ListWorkflowInvocationsResponse
* @throws \Google\Service\Exception
*/
public function listProjectsLocationsRepositoriesWorkflowInvocations($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], ListWorkflowInvocationsResponse::class);
}
/**
* Returns WorkflowInvocationActions in a given WorkflowInvocation.
* (workflowInvocations.query)
*
* @param string $name Required. The workflow invocation's name.
* @param array $optParams Optional parameters.
*
* @opt_param int pageSize Optional. Maximum number of workflow invocations to
* return. The server may return fewer items than requested. If unspecified, the
* server will pick an appropriate default.
* @opt_param string pageToken Optional. Page token received from a previous
* `QueryWorkflowInvocationActions` call. Provide this to retrieve the
* subsequent page. When paginating, all other parameters provided to
* `QueryWorkflowInvocationActions`, with the exception of `page_size`, must
* match the call that provided the page token.
* @return QueryWorkflowInvocationActionsResponse
* @throws \Google\Service\Exception
*/
public function query($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('query', [$params], QueryWorkflowInvocationActionsResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsLocationsRepositoriesWorkflowInvocations::class, 'Google_Service_Dataform_Resource_ProjectsLocationsRepositoriesWorkflowInvocations');
@@ -0,0 +1,518 @@
<?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\Dataform\Resource;
use Google\Service\Dataform\CommitWorkspaceChangesRequest;
use Google\Service\Dataform\CommitWorkspaceChangesResponse;
use Google\Service\Dataform\DataformEmpty;
use Google\Service\Dataform\FetchFileDiffResponse;
use Google\Service\Dataform\FetchFileGitStatusesResponse;
use Google\Service\Dataform\FetchGitAheadBehindResponse;
use Google\Service\Dataform\InstallNpmPackagesRequest;
use Google\Service\Dataform\InstallNpmPackagesResponse;
use Google\Service\Dataform\ListWorkspacesResponse;
use Google\Service\Dataform\MakeDirectoryRequest;
use Google\Service\Dataform\MakeDirectoryResponse;
use Google\Service\Dataform\MoveDirectoryRequest;
use Google\Service\Dataform\MoveDirectoryResponse;
use Google\Service\Dataform\MoveFileRequest;
use Google\Service\Dataform\MoveFileResponse;
use Google\Service\Dataform\Policy;
use Google\Service\Dataform\PullGitCommitsRequest;
use Google\Service\Dataform\PullGitCommitsResponse;
use Google\Service\Dataform\PushGitCommitsRequest;
use Google\Service\Dataform\PushGitCommitsResponse;
use Google\Service\Dataform\QueryDirectoryContentsResponse;
use Google\Service\Dataform\ReadFileResponse;
use Google\Service\Dataform\RemoveDirectoryRequest;
use Google\Service\Dataform\RemoveDirectoryResponse;
use Google\Service\Dataform\RemoveFileRequest;
use Google\Service\Dataform\RemoveFileResponse;
use Google\Service\Dataform\ResetWorkspaceChangesRequest;
use Google\Service\Dataform\ResetWorkspaceChangesResponse;
use Google\Service\Dataform\SearchFilesResponse;
use Google\Service\Dataform\SetIamPolicyRequest;
use Google\Service\Dataform\TestIamPermissionsRequest;
use Google\Service\Dataform\TestIamPermissionsResponse;
use Google\Service\Dataform\Workspace;
use Google\Service\Dataform\WriteFileRequest;
use Google\Service\Dataform\WriteFileResponse;
/**
* The "workspaces" collection of methods.
* Typical usage is:
* <code>
* $dataformService = new Google\Service\Dataform(...);
* $workspaces = $dataformService->projects_locations_repositories_workspaces;
* </code>
*/
class ProjectsLocationsRepositoriesWorkspaces extends \Google\Service\Resource
{
/**
* Applies a Git commit for uncommitted files in a Workspace.
* (workspaces.commit)
*
* @param string $name Required. The workspace's name.
* @param CommitWorkspaceChangesRequest $postBody
* @param array $optParams Optional parameters.
* @return CommitWorkspaceChangesResponse
* @throws \Google\Service\Exception
*/
public function commit($name, CommitWorkspaceChangesRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('commit', [$params], CommitWorkspaceChangesResponse::class);
}
/**
* Creates a new Workspace in a given Repository. (workspaces.create)
*
* @param string $parent Required. The repository in which to create the
* workspace. Must be in the format `projects/locations/repositories`.
* @param Workspace $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string workspaceId Required. The ID to use for the workspace,
* which will become the final component of the workspace's resource name.
* @return Workspace
* @throws \Google\Service\Exception
*/
public function create($parent, Workspace $postBody, $optParams = [])
{
$params = ['parent' => $parent, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], Workspace::class);
}
/**
* Deletes a single Workspace. (workspaces.delete)
*
* @param string $name Required. The workspace resource's name.
* @param array $optParams Optional parameters.
* @return DataformEmpty
* @throws \Google\Service\Exception
*/
public function delete($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('delete', [$params], DataformEmpty::class);
}
/**
* Fetches Git diff for an uncommitted file in a Workspace.
* (workspaces.fetchFileDiff)
*
* @param string $workspace Required. The workspace's name.
* @param array $optParams Optional parameters.
*
* @opt_param string path Required. The file's full path including filename,
* relative to the workspace root.
* @return FetchFileDiffResponse
* @throws \Google\Service\Exception
*/
public function fetchFileDiff($workspace, $optParams = [])
{
$params = ['workspace' => $workspace];
$params = array_merge($params, $optParams);
return $this->call('fetchFileDiff', [$params], FetchFileDiffResponse::class);
}
/**
* Fetches Git statuses for the files in a Workspace.
* (workspaces.fetchFileGitStatuses)
*
* @param string $name Required. The workspace's name.
* @param array $optParams Optional parameters.
* @return FetchFileGitStatusesResponse
* @throws \Google\Service\Exception
*/
public function fetchFileGitStatuses($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('fetchFileGitStatuses', [$params], FetchFileGitStatusesResponse::class);
}
/**
* Fetches Git ahead/behind against a remote branch.
* (workspaces.fetchGitAheadBehind)
*
* @param string $name Required. The workspace's name.
* @param array $optParams Optional parameters.
*
* @opt_param string remoteBranch Optional. The name of the branch in the Git
* remote against which this workspace should be compared. If left unset, the
* repository's default branch name will be used.
* @return FetchGitAheadBehindResponse
* @throws \Google\Service\Exception
*/
public function fetchGitAheadBehind($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('fetchGitAheadBehind', [$params], FetchGitAheadBehindResponse::class);
}
/**
* Fetches a single Workspace. (workspaces.get)
*
* @param string $name Required. The workspace's name.
* @param array $optParams Optional parameters.
* @return Workspace
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], Workspace::class);
}
/**
* Gets the access control policy for a resource. Returns an empty policy if the
* resource exists and does not have a policy set. (workspaces.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);
}
/**
* Installs dependency NPM packages (inside a Workspace).
* (workspaces.installNpmPackages)
*
* @param string $workspace Required. The workspace's name.
* @param InstallNpmPackagesRequest $postBody
* @param array $optParams Optional parameters.
* @return InstallNpmPackagesResponse
* @throws \Google\Service\Exception
*/
public function installNpmPackages($workspace, InstallNpmPackagesRequest $postBody, $optParams = [])
{
$params = ['workspace' => $workspace, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('installNpmPackages', [$params], InstallNpmPackagesResponse::class);
}
/**
* Lists Workspaces in a given Repository.
* (workspaces.listProjectsLocationsRepositoriesWorkspaces)
*
* @param string $parent Required. The repository in which to list workspaces.
* Must be in the format `projects/locations/repositories`.
* @param array $optParams Optional parameters.
*
* @opt_param string filter Optional. Filter for the returned list.
* @opt_param string orderBy Optional. This field only supports ordering by
* `name`. If unspecified, the server will choose the ordering. If specified,
* the default order is ascending for the `name` field.
* @opt_param int pageSize Optional. Maximum number of workspaces to return. The
* server may return fewer items than requested. If unspecified, the server will
* pick an appropriate default.
* @opt_param string pageToken Optional. Page token received from a previous
* `ListWorkspaces` call. Provide this to retrieve the subsequent page. When
* paginating, all other parameters provided to `ListWorkspaces`, with the
* exception of `page_size`, must match the call that provided the page token.
* @return ListWorkspacesResponse
* @throws \Google\Service\Exception
*/
public function listProjectsLocationsRepositoriesWorkspaces($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], ListWorkspacesResponse::class);
}
/**
* Creates a directory inside a Workspace. (workspaces.makeDirectory)
*
* @param string $workspace Required. The workspace's name.
* @param MakeDirectoryRequest $postBody
* @param array $optParams Optional parameters.
* @return MakeDirectoryResponse
* @throws \Google\Service\Exception
*/
public function makeDirectory($workspace, MakeDirectoryRequest $postBody, $optParams = [])
{
$params = ['workspace' => $workspace, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('makeDirectory', [$params], MakeDirectoryResponse::class);
}
/**
* Moves a directory (inside a Workspace), and all of its contents, to a new
* location. (workspaces.moveDirectory)
*
* @param string $workspace Required. The workspace's name.
* @param MoveDirectoryRequest $postBody
* @param array $optParams Optional parameters.
* @return MoveDirectoryResponse
* @throws \Google\Service\Exception
*/
public function moveDirectory($workspace, MoveDirectoryRequest $postBody, $optParams = [])
{
$params = ['workspace' => $workspace, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('moveDirectory', [$params], MoveDirectoryResponse::class);
}
/**
* Moves a file (inside a Workspace) to a new location. (workspaces.moveFile)
*
* @param string $workspace Required. The workspace's name.
* @param MoveFileRequest $postBody
* @param array $optParams Optional parameters.
* @return MoveFileResponse
* @throws \Google\Service\Exception
*/
public function moveFile($workspace, MoveFileRequest $postBody, $optParams = [])
{
$params = ['workspace' => $workspace, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('moveFile', [$params], MoveFileResponse::class);
}
/**
* Pulls Git commits from the Repository's remote into a Workspace.
* (workspaces.pull)
*
* @param string $name Required. The workspace's name.
* @param PullGitCommitsRequest $postBody
* @param array $optParams Optional parameters.
* @return PullGitCommitsResponse
* @throws \Google\Service\Exception
*/
public function pull($name, PullGitCommitsRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('pull', [$params], PullGitCommitsResponse::class);
}
/**
* Pushes Git commits from a Workspace to the Repository's remote.
* (workspaces.push)
*
* @param string $name Required. The workspace's name.
* @param PushGitCommitsRequest $postBody
* @param array $optParams Optional parameters.
* @return PushGitCommitsResponse
* @throws \Google\Service\Exception
*/
public function push($name, PushGitCommitsRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('push', [$params], PushGitCommitsResponse::class);
}
/**
* Returns the contents of a given Workspace directory.
* (workspaces.queryDirectoryContents)
*
* @param string $workspace Required. The workspace's name.
* @param array $optParams Optional parameters.
*
* @opt_param int pageSize Optional. Maximum number of paths to return. The
* server may return fewer items than requested. If unspecified, the server will
* pick an appropriate default.
* @opt_param string pageToken Optional. Page token received from a previous
* `QueryDirectoryContents` call. Provide this to retrieve the subsequent page.
* When paginating, all other parameters provided to `QueryDirectoryContents`,
* with the exception of `page_size`, must match the call that provided the page
* token.
* @opt_param string path Optional. The directory's full path including
* directory name, relative to the workspace root. If left unset, the workspace
* root is used.
* @opt_param string view Optional. Specifies the metadata to return for each
* directory entry. If unspecified, the default is
* `DIRECTORY_CONTENTS_VIEW_BASIC`. Currently the
* `DIRECTORY_CONTENTS_VIEW_METADATA` view is not supported by CMEK-protected
* workspaces.
* @return QueryDirectoryContentsResponse
* @throws \Google\Service\Exception
*/
public function queryDirectoryContents($workspace, $optParams = [])
{
$params = ['workspace' => $workspace];
$params = array_merge($params, $optParams);
return $this->call('queryDirectoryContents', [$params], QueryDirectoryContentsResponse::class);
}
/**
* Returns the contents of a file (inside a Workspace). (workspaces.readFile)
*
* @param string $workspace Required. The workspace's name.
* @param array $optParams Optional parameters.
*
* @opt_param string path Required. The file's full path including filename,
* relative to the workspace root.
* @opt_param string revision Optional. The Git revision of the file to return.
* If left empty, the current contents of `path` will be returned.
* @return ReadFileResponse
* @throws \Google\Service\Exception
*/
public function readFile($workspace, $optParams = [])
{
$params = ['workspace' => $workspace];
$params = array_merge($params, $optParams);
return $this->call('readFile', [$params], ReadFileResponse::class);
}
/**
* Deletes a directory (inside a Workspace) and all of its contents.
* (workspaces.removeDirectory)
*
* @param string $workspace Required. The workspace's name.
* @param RemoveDirectoryRequest $postBody
* @param array $optParams Optional parameters.
* @return RemoveDirectoryResponse
* @throws \Google\Service\Exception
*/
public function removeDirectory($workspace, RemoveDirectoryRequest $postBody, $optParams = [])
{
$params = ['workspace' => $workspace, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('removeDirectory', [$params], RemoveDirectoryResponse::class);
}
/**
* Deletes a file (inside a Workspace). (workspaces.removeFile)
*
* @param string $workspace Required. The workspace's name.
* @param RemoveFileRequest $postBody
* @param array $optParams Optional parameters.
* @return RemoveFileResponse
* @throws \Google\Service\Exception
*/
public function removeFile($workspace, RemoveFileRequest $postBody, $optParams = [])
{
$params = ['workspace' => $workspace, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('removeFile', [$params], RemoveFileResponse::class);
}
/**
* Performs a Git reset for uncommitted files in a Workspace. (workspaces.reset)
*
* @param string $name Required. The workspace's name.
* @param ResetWorkspaceChangesRequest $postBody
* @param array $optParams Optional parameters.
* @return ResetWorkspaceChangesResponse
* @throws \Google\Service\Exception
*/
public function reset($name, ResetWorkspaceChangesRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('reset', [$params], ResetWorkspaceChangesResponse::class);
}
/**
* Finds the contents of a given Workspace directory by filter.
* (workspaces.searchFiles)
*
* @param string $workspace Required. The workspace's name.
* @param array $optParams Optional parameters.
*
* @opt_param string filter Optional. Optional filter for the returned list in
* filtering format. Filtering is only currently supported on the `path` field.
* See https://google.aip.dev/160 for details.
* @opt_param int pageSize Optional. Maximum number of search results to return.
* The server may return fewer items than requested. If unspecified, the server
* will pick an appropriate default.
* @opt_param string pageToken Optional. Page token received from a previous
* `SearchFilesRequest` call. Provide this to retrieve the subsequent page. When
* paginating, all other parameters provided to `SearchFilesRequest`, with the
* exception of `page_size`, must match the call that provided the page token.
* @return SearchFilesResponse
* @throws \Google\Service\Exception
*/
public function searchFiles($workspace, $optParams = [])
{
$params = ['workspace' => $workspace];
$params = array_merge($params, $optParams);
return $this->call('searchFiles', [$params], SearchFilesResponse::class);
}
/**
* Sets the access control policy on the specified resource. Replaces any
* existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and
* `PERMISSION_DENIED` errors. (workspaces.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.
* (workspaces.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);
}
/**
* Writes to a file (inside a Workspace). (workspaces.writeFile)
*
* @param string $workspace Required. The workspace's name.
* @param WriteFileRequest $postBody
* @param array $optParams Optional parameters.
* @return WriteFileResponse
* @throws \Google\Service\Exception
*/
public function writeFile($workspace, WriteFileRequest $postBody, $optParams = [])
{
$params = ['workspace' => $workspace, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('writeFile', [$params], WriteFileResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsLocationsRepositoriesWorkspaces::class, 'Google_Service_Dataform_Resource_ProjectsLocationsRepositoriesWorkspaces');
@@ -0,0 +1,261 @@
<?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\Dataform\Resource;
use Google\Service\Dataform\DataformEmpty;
use Google\Service\Dataform\DeleteTeamFolderTreeRequest;
use Google\Service\Dataform\Operation;
use Google\Service\Dataform\Policy;
use Google\Service\Dataform\QueryTeamFolderContentsResponse;
use Google\Service\Dataform\SearchTeamFoldersResponse;
use Google\Service\Dataform\SetIamPolicyRequest;
use Google\Service\Dataform\TeamFolder;
use Google\Service\Dataform\TestIamPermissionsRequest;
use Google\Service\Dataform\TestIamPermissionsResponse;
/**
* The "teamFolders" collection of methods.
* Typical usage is:
* <code>
* $dataformService = new Google\Service\Dataform(...);
* $teamFolders = $dataformService->projects_locations_teamFolders;
* </code>
*/
class ProjectsLocationsTeamFolders extends \Google\Service\Resource
{
/**
* Creates a new TeamFolder in a given project and location.
* (teamFolders.create)
*
* @param string $parent Required. The location in which to create the
* TeamFolder. Must be in the format `projects/locations`.
* @param TeamFolder $postBody
* @param array $optParams Optional parameters.
* @return TeamFolder
* @throws \Google\Service\Exception
*/
public function create($parent, TeamFolder $postBody, $optParams = [])
{
$params = ['parent' => $parent, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], TeamFolder::class);
}
/**
* Deletes a single TeamFolder. (teamFolders.delete)
*
* @param string $name Required. The TeamFolder's name.
* @param array $optParams Optional parameters.
* @return DataformEmpty
* @throws \Google\Service\Exception
*/
public function delete($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('delete', [$params], DataformEmpty::class);
}
/**
* Deletes a TeamFolder with its contents (Folders, Repositories, Workspaces,
* ReleaseConfigs, and WorkflowConfigs). (teamFolders.deleteTree)
*
* @param string $name Required. The TeamFolder's name. Format:
* projects/{project}/locations/{location}/teamFolders/{team_folder}
* @param DeleteTeamFolderTreeRequest $postBody
* @param array $optParams Optional parameters.
* @return Operation
* @throws \Google\Service\Exception
*/
public function deleteTree($name, DeleteTeamFolderTreeRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('deleteTree', [$params], Operation::class);
}
/**
* Fetches a single TeamFolder. (teamFolders.get)
*
* @param string $name Required. The TeamFolder's name.
* @param array $optParams Optional parameters.
* @return TeamFolder
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], TeamFolder::class);
}
/**
* Gets the access control policy for a resource. Returns an empty policy if the
* resource exists and does not have a policy set. (teamFolders.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);
}
/**
* Updates a single TeamFolder. (teamFolders.patch)
*
* @param string $name Identifier. The TeamFolder's name.
* @param TeamFolder $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string updateMask Optional. Specifies the fields to be updated in
* the Folder. If left unset, all fields will be updated.
* @return TeamFolder
* @throws \Google\Service\Exception
*/
public function patch($name, TeamFolder $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('patch', [$params], TeamFolder::class);
}
/**
* Returns the contents of a given TeamFolder. (teamFolders.queryContents)
*
* @param string $teamFolder Required. Resource name of the TeamFolder to list
* contents for. Format: `projects/locations/teamFolders`.
* @param array $optParams Optional parameters.
*
* @opt_param string filter Optional. Optional filtering for the returned list.
* Filtering is currently only supported on the `display_name` field. Example: *
* `filter="display_name="MyFolder""`
* @opt_param string orderBy Optional. Field to additionally sort results by.
* Will order Folders before Repositories, and then by `order_by` in ascending
* order. Supported keywords: `display_name` (default), `create_time`,
* last_modified_time. Examples: * `orderBy="display_name"` *
* `orderBy="display_name desc"`
* @opt_param int pageSize Optional. Maximum number of paths to return. The
* server may return fewer items than requested. If unspecified, the server will
* pick an appropriate default.
* @opt_param string pageToken Optional. Page token received from a previous
* `QueryTeamFolderContents` call. Provide this to retrieve the subsequent page.
* When paginating, all other parameters provided to `QueryTeamFolderContents`,
* with the exception of `page_size`, must match the call that provided the page
* token.
* @return QueryTeamFolderContentsResponse
* @throws \Google\Service\Exception
*/
public function queryContents($teamFolder, $optParams = [])
{
$params = ['teamFolder' => $teamFolder];
$params = array_merge($params, $optParams);
return $this->call('queryContents', [$params], QueryTeamFolderContentsResponse::class);
}
/**
* Returns all TeamFolders in a given location that the caller has access to and
* match the provided filter. (teamFolders.search)
*
* @param string $location Required. Location in which to query TeamFolders.
* Format: `projects/locations`.
* @param array $optParams Optional parameters.
*
* @opt_param string filter Optional. Optional filtering for the returned list.
* Filtering is currently only supported on the `display_name` field. Example: *
* `filter="display_name="MyFolder""`
* @opt_param string orderBy Optional. Field to additionally sort results by.
* Supported keywords: `display_name` (default), `create_time`,
* `last_modified_time`. Examples: * `orderBy="display_name"` *
* `orderBy="display_name desc"`
* @opt_param int pageSize Optional. Maximum number of TeamFolders to return.
* The server may return fewer items than requested. If unspecified, the server
* will pick a default of page_size = 50.
* @opt_param string pageToken Optional. Page token received from a previous
* `SearchTeamFolders` call. Provide this to retrieve the subsequent page. When
* paginating, all other parameters provided to `SearchTeamFolders`, with the
* exception of `page_size`, must match the call that provided the page token.
* @return SearchTeamFoldersResponse
* @throws \Google\Service\Exception
*/
public function search($location, $optParams = [])
{
$params = ['location' => $location];
$params = array_merge($params, $optParams);
return $this->call('search', [$params], SearchTeamFoldersResponse::class);
}
/**
* Sets the access control policy on the specified resource. Replaces any
* existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and
* `PERMISSION_DENIED` errors. (teamFolders.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.
* (teamFolders.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(ProjectsLocationsTeamFolders::class, 'Google_Service_Dataform_Resource_ProjectsLocationsTeamFolders');