class ProjectsRepos extends Resource (View source)

The "repos" collection of methods.

Typical usage is:

 $sourcerepoService = new Google\Service\CloudSourceRepositories(...);
 $repos = $sourcerepoService->projects_repos;

Methods

create(string $parent, Repo $postBody, array $optParams = [])

Creates a repo in the given project with the given name. If the named repository already exists, CreateRepo returns ALREADY_EXISTS.

delete(string $name, array $optParams = [])

Deletes a repo. (repos.delete)

get(string $name, array $optParams = [])

Returns information about a repo. (repos.get)

getIamPolicy(string $resource, array $optParams = [])

Gets the IAM policy policy for a resource. Returns an empty policy if the resource exists and does not have a policy set. (repos.getIamPolicy)

listProjectsRepos(string $name, array $optParams = [])

Returns all repos belonging to a project. The sizes of the repos are not set by ListRepos. To get the size of a repo, use GetRepo.

patch(string $name, UpdateRepoRequest $postBody, array $optParams = [])

Updates information about a repo. (repos.patch)

setIamPolicy(string $resource, SetIamPolicyRequest $postBody, array $optParams = [])

Sets the IAM policy on the specified resource. Replaces any existing policy.

sync(string $name, SyncRepoRequest $postBody, array $optParams = [])

Synchronize a connected repo. The response contains SyncRepoMetadata in the metadata field. (repos.sync)

testIamPermissions(string $resource, TestIamPermissionsRequest $postBody, array $optParams = [])

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. (repos.testIamPermissions)

Details

Repo create(string $parent, Repo $postBody, array $optParams = [])

Creates a repo in the given project with the given name. If the named repository already exists, CreateRepo returns ALREADY_EXISTS.

(repos.create)

Parameters

string $parent

The project in which to create the repo. Values are of the form projects/.

Repo $postBody
array $optParams

Optional parameters.

Return Value

Repo

Exceptions

Exception

SourcerepoEmpty delete(string $name, array $optParams = [])

Deletes a repo. (repos.delete)

Parameters

string $name

The name of the repo to delete. Values are of the form projects//repos/.

array $optParams

Optional parameters.

Return Value

SourcerepoEmpty

Exceptions

Exception

Repo get(string $name, array $optParams = [])

Returns information about a repo. (repos.get)

Parameters

string $name

The name of the requested repository. Values are of the form projects//repos/.

array $optParams

Optional parameters.

Return Value

Repo

Exceptions

Exception

Policy getIamPolicy(string $resource, array $optParams = [])

Gets the IAM policy policy for a resource. Returns an empty policy if the resource exists and does not have a policy set. (repos.getIamPolicy)

Parameters

string $resource

REQUIRED: The resource for which the policy is being requested. See Resource names for the appropriate value for this field.

array $optParams

Optional parameters.

Return Value

Policy

Exceptions

Exception

ListReposResponse listProjectsRepos(string $name, array $optParams = [])

Returns all repos belonging to a project. The sizes of the repos are not set by ListRepos. To get the size of a repo, use GetRepo.

(repos.listProjectsRepos)

Parameters

string $name

The project ID whose repos should be listed. Values are of the form projects/.

array $optParams

Optional parameters.

Return Value

ListReposResponse

Exceptions

Exception

Repo patch(string $name, UpdateRepoRequest $postBody, array $optParams = [])

Updates information about a repo. (repos.patch)

Parameters

string $name

The name of the requested repository. Values are of the form projects//repos/.

UpdateRepoRequest $postBody
array $optParams

Optional parameters.

Return Value

Repo

Exceptions

Exception

Policy setIamPolicy(string $resource, SetIamPolicyRequest $postBody, array $optParams = [])

Sets the IAM policy on the specified resource. Replaces any existing policy.

(repos.setIamPolicy)

Parameters

string $resource

REQUIRED: The resource for which the policy is being specified. See Resource names for the appropriate value for this field.

SetIamPolicyRequest $postBody
array $optParams

Optional parameters.

Return Value

Policy

Exceptions

Exception

Operation sync(string $name, SyncRepoRequest $postBody, array $optParams = [])

Synchronize a connected repo. The response contains SyncRepoMetadata in the metadata field. (repos.sync)

Parameters

string $name

The name of the repo to synchronize. Values are of the form projects//repos/.

SyncRepoRequest $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

TestIamPermissionsResponse testIamPermissions(string $resource, TestIamPermissionsRequest $postBody, array $optParams = [])

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. (repos.testIamPermissions)

Parameters

string $resource

REQUIRED: The resource for which the policy detail is being requested. See Resource names for the appropriate value for this field.

TestIamPermissionsRequest $postBody
array $optParams

Optional parameters.

Return Value

TestIamPermissionsResponse

Exceptions

Exception