class ProjectsLocationsDatasetsConsentStoresConsents extends Resource (View source)

The "consents" collection of methods.

Typical usage is:

 $healthcareService = new Google\Service\CloudHealthcare(...);
 $consents = $healthcareService->projects_locations_datasets_consentStores_consents;

Methods

activate(string $name, ActivateConsentRequest $postBody, array $optParams = [])

Activates the latest revision of the specified Consent by committing a new revision with state updated to ACTIVE. If the latest revision of the specified Consent is in the ACTIVE state, no new revision is committed. A FAILED_PRECONDITION error occurs if the latest revision of the specified Consent is in the REJECTED or REVOKED state. (consents.activate)

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

Creates a new Consent in the parent consent store. (consents.create)

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

Deletes the Consent and its revisions. To keep a record of the Consent but mark it inactive, see [RevokeConsent]. To delete a revision of a Consent, see [DeleteConsentRevision]. This operation does not delete the related Consent artifact. (consents.delete)

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

Deletes the specified revision of a Consent. An INVALID_ARGUMENT error occurs if the specified revision is the latest revision. (consents.deleteRevision)

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

Gets the specified revision of a Consent, or the latest revision if revision_id is not specified in the resource name. (consents.get)

listProjectsLocationsDatasetsConsentStoresConsents(string $parent, array $optParams = [])

Lists the Consent in the given consent store, returning each Consent's latest revision. (consents.listProjectsLocationsDatasetsConsentStoresConsents)

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

Lists the revisions of the specified Consent in reverse chronological order.

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

Updates the latest revision of the specified Consent by committing a new revision with the changes. A FAILED_PRECONDITION error occurs if the latest revision of the specified Consent is in the REJECTED or REVOKED state.

reject(string $name, RejectConsentRequest $postBody, array $optParams = [])

Rejects the latest revision of the specified Consent by committing a new revision with state updated to REJECTED. If the latest revision of the specified Consent is in the REJECTED state, no new revision is committed. A FAILED_PRECONDITION error occurs if the latest revision of the specified Consent is in the ACTIVE or REVOKED state. (consents.reject)

revoke(string $name, RevokeConsentRequest $postBody, array $optParams = [])

Revokes the latest revision of the specified Consent by committing a new revision with state updated to REVOKED. If the latest revision of the specified Consent is in the REVOKED state, no new revision is committed. A FAILED_PRECONDITION error occurs if the latest revision of the given consent is in DRAFT or REJECTED state. (consents.revoke)

Details

Consent activate(string $name, ActivateConsentRequest $postBody, array $optParams = [])

Activates the latest revision of the specified Consent by committing a new revision with state updated to ACTIVE. If the latest revision of the specified Consent is in the ACTIVE state, no new revision is committed. A FAILED_PRECONDITION error occurs if the latest revision of the specified Consent is in the REJECTED or REVOKED state. (consents.activate)

Parameters

string $name

Required. The resource name of the Consent to activate, of the form projects/{project_id}/locations/{location_id}/datasets/{dataset_ id}/consentStores/{consent_store_id}/consents/{consent_id}. An INVALID_ARGUMENT error occurs if revision_id is specified in the name.

ActivateConsentRequest $postBody
array $optParams

Optional parameters.

Return Value

Consent

Exceptions

Exception

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

Creates a new Consent in the parent consent store. (consents.create)

Parameters

string $parent

Required. Name of the consent store.

Consent $postBody
array $optParams

Optional parameters.

Return Value

Consent

Exceptions

Exception

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

Deletes the Consent and its revisions. To keep a record of the Consent but mark it inactive, see [RevokeConsent]. To delete a revision of a Consent, see [DeleteConsentRevision]. This operation does not delete the related Consent artifact. (consents.delete)

Parameters

string $name

Required. The resource name of the Consent to delete, of the form projects/{project_id}/locations/{location_id}/datasets/{dataset_id} /consentStores/{consent_store_id}/consents/{consent_id}. An INVALID_ARGUMENT error occurs if revision_id is specified in the name.

array $optParams

Optional parameters.

Return Value

HealthcareEmpty

Exceptions

Exception

HealthcareEmpty deleteRevision(string $name, array $optParams = [])

Deletes the specified revision of a Consent. An INVALID_ARGUMENT error occurs if the specified revision is the latest revision. (consents.deleteRevision)

Parameters

string $name

Required. The resource name of the Consent revision to delete, of the form projects/{project_id}/locations/{location_id}/datasets/{ dataset_id}/consentStores/{consent_store_id}/consents/{consent_id}@{revision_ id}. An INVALID_ARGUMENT error occurs if revision_id is not specified in the name.

array $optParams

Optional parameters.

Return Value

HealthcareEmpty

Exceptions

Exception

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

Gets the specified revision of a Consent, or the latest revision if revision_id is not specified in the resource name. (consents.get)

Parameters

string $name

Required. The resource name of the Consent to retrieve, of the form projects/{project_id}/locations/{location_id}/datasets/{dataset_ id}/consentStores/{consent_store_id}/consents/{consent_id}. In order to retrieve a previous revision of the Consent, also provide the revision ID: p rojects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentSto res/{consent_store_id}/consents/{consent_id}@{revision_id}

array $optParams

Optional parameters.

Return Value

Consent

Exceptions

Exception

ListConsentsResponse listProjectsLocationsDatasetsConsentStoresConsents(string $parent, array $optParams = [])

Lists the Consent in the given consent store, returning each Consent's latest revision. (consents.listProjectsLocationsDatasetsConsentStoresConsents)

Parameters

string $parent

Required. Name of the consent store to retrieve Consents from.

array $optParams

Optional parameters.

Return Value

ListConsentsResponse

Exceptions

Exception

ListConsentRevisionsResponse listRevisions(string $name, array $optParams = [])

Lists the revisions of the specified Consent in reverse chronological order.

(consents.listRevisions)

Parameters

string $name

Required. The resource name of the Consent to retrieve revisions for.

array $optParams

Optional parameters.

Return Value

ListConsentRevisionsResponse

Exceptions

Exception

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

Updates the latest revision of the specified Consent by committing a new revision with the changes. A FAILED_PRECONDITION error occurs if the latest revision of the specified Consent is in the REJECTED or REVOKED state.

(consents.patch)

Parameters

string $name

Identifier. Resource name of the Consent, of the form pr ojects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStor es/{consent_store_id}/consents/{consent_id}. Cannot be changed after creation.

Consent $postBody
array $optParams

Optional parameters.

Return Value

Consent

Exceptions

Exception

Consent reject(string $name, RejectConsentRequest $postBody, array $optParams = [])

Rejects the latest revision of the specified Consent by committing a new revision with state updated to REJECTED. If the latest revision of the specified Consent is in the REJECTED state, no new revision is committed. A FAILED_PRECONDITION error occurs if the latest revision of the specified Consent is in the ACTIVE or REVOKED state. (consents.reject)

Parameters

string $name

Required. The resource name of the Consent to reject, of the form projects/{project_id}/locations/{location_id}/datasets/{dataset_id} /consentStores/{consent_store_id}/consents/{consent_id}. An INVALID_ARGUMENT error occurs if revision_id is specified in the name.

RejectConsentRequest $postBody
array $optParams

Optional parameters.

Return Value

Consent

Exceptions

Exception

Consent revoke(string $name, RevokeConsentRequest $postBody, array $optParams = [])

Revokes the latest revision of the specified Consent by committing a new revision with state updated to REVOKED. If the latest revision of the specified Consent is in the REVOKED state, no new revision is committed. A FAILED_PRECONDITION error occurs if the latest revision of the given consent is in DRAFT or REJECTED state. (consents.revoke)

Parameters

string $name

Required. The resource name of the Consent to revoke, of the form projects/{project_id}/locations/{location_id}/datasets/{dataset_id} /consentStores/{consent_store_id}/consents/{consent_id}. An INVALID_ARGUMENT error occurs if revision_id is specified in the name.

RevokeConsentRequest $postBody
array $optParams

Optional parameters.

Return Value

Consent

Exceptions

Exception