# Cloud Healthcare API . projects . locations . datasets . consentStores . consents

## Instance Methods

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

Close httplib2 connections.

Creates a new Consent in the parent Consent store.

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.

Deletes the specified revision of a Consent. An INVALID_ARGUMENT error occurs if the specified revision is the latest revision.

Gets the specified revision of a Consent, or the latest revision if `revision_id` is not specified in the resource name.

Lists the Consent in the given Consent store, returning each consent's latest revision.

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

Retrieves the next page of results.

Retrieves the next page of results.

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 given consent is in the `REJECTED` or `REVOKED` state.

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

Revokes the latest revision of the specified Consent by committing a new revision with `state` updated to `REVOKED`. If the latest revision of the given 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.

### Method Details

`activate(name, body=None, x__xgafv=None)`

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

    Args:
      name: string, 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. (required)
      body: object, The request body.
        The object takes the form of:

    { # Activates the latest revision of the specified Consent by committing a new revision with `state` updated to `ACTIVE`. If the latest revision of the given consent is in the `ACTIVE` state, no new revision is committed.
        "consentArtifact": "A String", # Required. The resource name of the consent artifact that contains proof of the end user's consent, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}/consentArtifacts/{consent_artifact_id}`. If the draft consent had a consent artifact, this consent artifact overwrites it.
        "expireTime": "A String", # Timestamp in UTC of when this consent is considered expired.
        "ttl": "A String", # The time to live for this consent from when it is marked as active.
      }

      x__xgafv: string, V1 error format.
        Allowed values
          1 - v1 error format
          2 - v2 error format

    Returns:
      An object of the form:

        { # Represents an end user's consent.
        "expireTime": "A String", # Timestamp in UTC of when this consent is considered expired.
        "state": "A String", # Indicates the current state of this consent.
        "policies": [ # Represents an end user's consent in terms of the resources that can be accessed and under what conditions.
          { # Represents an end user's consent in terms of the resources that can be accessed and under what conditions.
            "resourceAttributes": [ # The data resources that this policy applies to. A data resource is a match if it matches all the attributes listed here.
              { # An attribute value for a consent or data mapping. Each Attribute must have a corresponding AttributeDefinition in the consent store that defines the default and allowed values.
                "values": [ # The value of the attribute. Must be an acceptable value as defined in the consent store. For example, if the consent store defines "data type" with acceptable values "questionnaire" and "step-count", when the attribute name is data type, this field must contain one of those values.
                  "A String",
                ],
                "attributeDefinitionId": "A String", # Indicates the name of an attribute defined at the consent store.
              },
            ],
            "authorizationRule": { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() < 100" Example (Equality): title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email" Example (Logic): title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' && document.type != 'internal'" Example (Data Manipulation): title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # The request conditions to meet to grant access.
              "description": "A String", # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
              "location": "A String", # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
              "expression": "A String", # Textual representation of an expression in Common Expression Language syntax.
              "title": "A String", # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
            },
          },
        ],
        "consentArtifact": "A String", # Required. The resource name of the consent artifact that contains proof of the end user's consent, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}/consentArtifacts/{consent_artifact_id}`.
        "name": "A String", # Resource name of the Consent, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}/consents/{consent_id}`.
        "revisionCreateTime": "A String", # Output only. The timestamp that the revision was created.
        "revisionId": "A String", # Output only. The revision ID of the consent. The format is an 8-character hexadecimal string. Refer to a specific revision of a Consent by appending `@{revision_id}` to the Consent's resource name.
        "userId": "A String", # Required. User's UUID provided by the client.
        "ttl": "A String", # Input only. The time to live for this consent from when it is created.
      }

`close()`

    Close httplib2 connections.

`create(parent, body=None, x__xgafv=None)`

    Creates a new Consent in the parent Consent store.

    Args:
      parent: string, Required. Name of the consent store. (required)
      body: object, The request body.
        The object takes the form of:

    { # Represents an end user's consent.
      "expireTime": "A String", # Timestamp in UTC of when this consent is considered expired.
      "state": "A String", # Indicates the current state of this consent.
      "policies": [ # Represents an end user's consent in terms of the resources that can be accessed and under what conditions.
        { # Represents an end user's consent in terms of the resources that can be accessed and under what conditions.
          "resourceAttributes": [ # The data resources that this policy applies to. A data resource is a match if it matches all the attributes listed here.
            { # An attribute value for a consent or data mapping. Each Attribute must have a corresponding AttributeDefinition in the consent store that defines the default and allowed values.
              "values": [ # The value of the attribute. Must be an acceptable value as defined in the consent store. For example, if the consent store defines "data type" with acceptable values "questionnaire" and "step-count", when the attribute name is data type, this field must contain one of those values.
                "A String",
              ],
              "attributeDefinitionId": "A String", # Indicates the name of an attribute defined at the consent store.
            },
          ],
          "authorizationRule": { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() < 100" Example (Equality): title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email" Example (Logic): title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' && document.type != 'internal'" Example (Data Manipulation): title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # The request conditions to meet to grant access.
            "description": "A String", # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
            "location": "A String", # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
            "expression": "A String", # Textual representation of an expression in Common Expression Language syntax.
            "title": "A String", # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
          },
        },
      ],
      "consentArtifact": "A String", # Required. The resource name of the consent artifact that contains proof of the end user's consent, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}/consentArtifacts/{consent_artifact_id}`.
      "name": "A String", # Resource name of the Consent, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}/consents/{consent_id}`.
      "revisionCreateTime": "A String", # Output only. The timestamp that the revision was created.
      "revisionId": "A String", # Output only. The revision ID of the consent. The format is an 8-character hexadecimal string. Refer to a specific revision of a Consent by appending `@{revision_id}` to the Consent's resource name.
      "userId": "A String", # Required. User's UUID provided by the client.
      "ttl": "A String", # Input only. The time to live for this consent from when it is created.
    }

      x__xgafv: string, V1 error format.
        Allowed values
          1 - v1 error format
          2 - v2 error format

    Returns:
      An object of the form:

        { # Represents an end user's consent.
        "expireTime": "A String", # Timestamp in UTC of when this consent is considered expired.
        "state": "A String", # Indicates the current state of this consent.
        "policies": [ # Represents an end user's consent in terms of the resources that can be accessed and under what conditions.
          { # Represents an end user's consent in terms of the resources that can be accessed and under what conditions.
            "resourceAttributes": [ # The data resources that this policy applies to. A data resource is a match if it matches all the attributes listed here.
              { # An attribute value for a consent or data mapping. Each Attribute must have a corresponding AttributeDefinition in the consent store that defines the default and allowed values.
                "values": [ # The value of the attribute. Must be an acceptable value as defined in the consent store. For example, if the consent store defines "data type" with acceptable values "questionnaire" and "step-count", when the attribute name is data type, this field must contain one of those values.
                  "A String",
                ],
                "attributeDefinitionId": "A String", # Indicates the name of an attribute defined at the consent store.
              },
            ],
            "authorizationRule": { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() < 100" Example (Equality): title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email" Example (Logic): title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' && document.type != 'internal'" Example (Data Manipulation): title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # The request conditions to meet to grant access.
              "description": "A String", # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
              "location": "A String", # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
              "expression": "A String", # Textual representation of an expression in Common Expression Language syntax.
              "title": "A String", # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
            },
          },
        ],
        "consentArtifact": "A String", # Required. The resource name of the consent artifact that contains proof of the end user's consent, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}/consentArtifacts/{consent_artifact_id}`.
        "name": "A String", # Resource name of the Consent, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}/consents/{consent_id}`.
        "revisionCreateTime": "A String", # Output only. The timestamp that the revision was created.
        "revisionId": "A String", # Output only. The revision ID of the consent. The format is an 8-character hexadecimal string. Refer to a specific revision of a Consent by appending `@{revision_id}` to the Consent's resource name.
        "userId": "A String", # Required. User's UUID provided by the client.
        "ttl": "A String", # Input only. The time to live for this consent from when it is created.
      }

`delete(name, x__xgafv=None)`

    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.

    Args:
      name: string, 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. (required)
      x__xgafv: string, V1 error format.
        Allowed values
          1 - v1 error format
          2 - v2 error format

    Returns:
      An object of the form:

        { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.
      }

`deleteRevision(name, x__xgafv=None)`

    Deletes the specified revision of a Consent. An INVALID_ARGUMENT error occurs if the specified revision is the latest revision.

    Args:
      name: string, 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. (required)
      x__xgafv: string, V1 error format.
        Allowed values
          1 - v1 error format
          2 - v2 error format

    Returns:
      An object of the form:

        { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.
      }

`get(name, x__xgafv=None)`

    Gets the specified revision of a Consent, or the latest revision if `revision_id` is not specified in the resource name.

    Args:
      name: string, 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: `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}/consents/{consent_id}@{revision_id}` (required)
      x__xgafv: string, V1 error format.
        Allowed values
          1 - v1 error format
          2 - v2 error format

    Returns:
      An object of the form:

        { # Represents an end user's consent.
        "expireTime": "A String", # Timestamp in UTC of when this consent is considered expired.
        "state": "A String", # Indicates the current state of this consent.
        "policies": [ # Represents an end user's consent in terms of the resources that can be accessed and under what conditions.
          { # Represents an end user's consent in terms of the resources that can be accessed and under what conditions.
            "resourceAttributes": [ # The data resources that this policy applies to. A data resource is a match if it matches all the attributes listed here.
              { # An attribute value for a consent or data mapping. Each Attribute must have a corresponding AttributeDefinition in the consent store that defines the default and allowed values.
                "values": [ # The value of the attribute. Must be an acceptable value as defined in the consent store. For example, if the consent store defines "data type" with acceptable values "questionnaire" and "step-count", when the attribute name is data type, this field must contain one of those values.
                  "A String",
                ],
                "attributeDefinitionId": "A String", # Indicates the name of an attribute defined at the consent store.
              },
            ],
            "authorizationRule": { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() < 100" Example (Equality): title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email" Example (Logic): title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' && document.type != 'internal'" Example (Data Manipulation): title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # The request conditions to meet to grant access.
              "description": "A String", # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
              "location": "A String", # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
              "expression": "A String", # Textual representation of an expression in Common Expression Language syntax.
              "title": "A String", # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
            },
          },
        ],
        "consentArtifact": "A String", # Required. The resource name of the consent artifact that contains proof of the end user's consent, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}/consentArtifacts/{consent_artifact_id}`.
        "name": "A String", # Resource name of the Consent, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}/consents/{consent_id}`.
        "revisionCreateTime": "A String", # Output only. The timestamp that the revision was created.
        "revisionId": "A String", # Output only. The revision ID of the consent. The format is an 8-character hexadecimal string. Refer to a specific revision of a Consent by appending `@{revision_id}` to the Consent's resource name.
        "userId": "A String", # Required. User's UUID provided by the client.
        "ttl": "A String", # Input only. The time to live for this consent from when it is created.
      }

`list(parent, pageSize=None, pageToken=None, filter=None, x__xgafv=None)`

    Lists the Consent in the given Consent store, returning each consent's latest revision.

    Args:
      parent: string, Required. Name of the Consent store to retrieve consents from. (required)
      pageSize: integer, Limit on the number of consents to return in a single response. If zero the default page size of 100 is used.
      pageToken: string, The next_page_token value returned from the previous List request, if any.
      filter: string, Restricts the consents returned to those matching a filter. Syntax: https://cloud.google.com/appengine/docs/standard/python/search/query_strings The fields available for filtering are: - user_id - consent_artifact - state - state_change_time
      x__xgafv: string, V1 error format.
        Allowed values
          1 - v1 error format
          2 - v2 error format

    Returns:
      An object of the form:

        { # Lists the Consents in the given Consent store.
        "nextPageToken": "A String", # Token to retrieve the next page of results or empty if there are no more results in the list.
        "consents": [ # The returned consents. The maximum number of consents returned is determined by the value of page_size in the ListConsentsRequest.
          { # Represents an end user's consent.
            "expireTime": "A String", # Timestamp in UTC of when this consent is considered expired.
            "state": "A String", # Indicates the current state of this consent.
            "policies": [ # Represents an end user's consent in terms of the resources that can be accessed and under what conditions.
              { # Represents an end user's consent in terms of the resources that can be accessed and under what conditions.
                "resourceAttributes": [ # The data resources that this policy applies to. A data resource is a match if it matches all the attributes listed here.
                  { # An attribute value for a consent or data mapping. Each Attribute must have a corresponding AttributeDefinition in the consent store that defines the default and allowed values.
                    "values": [ # The value of the attribute. Must be an acceptable value as defined in the consent store. For example, if the consent store defines "data type" with acceptable values "questionnaire" and "step-count", when the attribute name is data type, this field must contain one of those values.
                      "A String",
                    ],
                    "attributeDefinitionId": "A String", # Indicates the name of an attribute defined at the consent store.
                  },
                ],
                "authorizationRule": { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() < 100" Example (Equality): title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email" Example (Logic): title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' && document.type != 'internal'" Example (Data Manipulation): title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # The request conditions to meet to grant access.
                  "description": "A String", # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
                  "location": "A String", # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
                  "expression": "A String", # Textual representation of an expression in Common Expression Language syntax.
                  "title": "A String", # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
                },
              },
            ],
            "consentArtifact": "A String", # Required. The resource name of the consent artifact that contains proof of the end user's consent, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}/consentArtifacts/{consent_artifact_id}`.
            "name": "A String", # Resource name of the Consent, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}/consents/{consent_id}`.
            "revisionCreateTime": "A String", # Output only. The timestamp that the revision was created.
            "revisionId": "A String", # Output only. The revision ID of the consent. The format is an 8-character hexadecimal string. Refer to a specific revision of a Consent by appending `@{revision_id}` to the Consent's resource name.
            "userId": "A String", # Required. User's UUID provided by the client.
            "ttl": "A String", # Input only. The time to live for this consent from when it is created.
          },
        ],
      }

`listRevisions(name, pageToken=None, pageSize=None, filter=None, x__xgafv=None)`

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

    Args:
      name: string, Required. The resource name of the consent to retrieve revisions for. (required)
      pageToken: string, Token to retrieve the next page of results or empty if there are no more results in the list.
      pageSize: integer, Limit on the number of revisions to return in a single response. If zero the default page size of 100 is used.
      filter: string, Restricts the revisions returned to those matching a filter. Syntax: https://cloud.google.com/appengine/docs/standard/python/search/query_strings. Fields/functions available for filtering are: - user_id - consent_artifact - state - revision_create_time
      x__xgafv: string, V1 error format.
        Allowed values
          1 - v1 error format
          2 - v2 error format

    Returns:
      An object of the form:

        { # Lists the revisions of the given Consent in reverse chronological order.
        "nextPageToken": "A String", # Token to retrieve the next page of results or empty if there are no more results in the list.
        "consents": [ # The returned consent revisions. The maximum number of revisions returned is determined by the value of `page_size` in the ListConsentRevisionsRequest.
          { # Represents an end user's consent.
            "expireTime": "A String", # Timestamp in UTC of when this consent is considered expired.
            "state": "A String", # Indicates the current state of this consent.
            "policies": [ # Represents an end user's consent in terms of the resources that can be accessed and under what conditions.
              { # Represents an end user's consent in terms of the resources that can be accessed and under what conditions.
                "resourceAttributes": [ # The data resources that this policy applies to. A data resource is a match if it matches all the attributes listed here.
                  { # An attribute value for a consent or data mapping. Each Attribute must have a corresponding AttributeDefinition in the consent store that defines the default and allowed values.
                    "values": [ # The value of the attribute. Must be an acceptable value as defined in the consent store. For example, if the consent store defines "data type" with acceptable values "questionnaire" and "step-count", when the attribute name is data type, this field must contain one of those values.
                      "A String",
                    ],
                    "attributeDefinitionId": "A String", # Indicates the name of an attribute defined at the consent store.
                  },
                ],
                "authorizationRule": { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() < 100" Example (Equality): title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email" Example (Logic): title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' && document.type != 'internal'" Example (Data Manipulation): title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # The request conditions to meet to grant access.
                  "description": "A String", # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
                  "location": "A String", # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
                  "expression": "A String", # Textual representation of an expression in Common Expression Language syntax.
                  "title": "A String", # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
                },
              },
            ],
            "consentArtifact": "A String", # Required. The resource name of the consent artifact that contains proof of the end user's consent, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}/consentArtifacts/{consent_artifact_id}`.
            "name": "A String", # Resource name of the Consent, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}/consents/{consent_id}`.
            "revisionCreateTime": "A String", # Output only. The timestamp that the revision was created.
            "revisionId": "A String", # Output only. The revision ID of the consent. The format is an 8-character hexadecimal string. Refer to a specific revision of a Consent by appending `@{revision_id}` to the Consent's resource name.
            "userId": "A String", # Required. User's UUID provided by the client.
            "ttl": "A String", # Input only. The time to live for this consent from when it is created.
          },
        ],
      }

`listRevisions_next(previous_request, previous_response)`

    Retrieves the next page of results.

    Args:
      previous_request: The request for the previous page. (required)
      previous_response: The response from the request for the previous page. (required)

    Returns:
      A request object that you can call 'execute()' on to request the next
      page. Returns None if there are no more items in the collection.

`list_next(previous_request, previous_response)`

    Retrieves the next page of results.

    Args:
      previous_request: The request for the previous page. (required)
      previous_response: The response from the request for the previous page. (required)

    Returns:
      A request object that you can call 'execute()' on to request the next
      page. Returns None if there are no more items in the collection.

`patch(name, body=None, updateMask=None, x__xgafv=None)`

    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 given consent is in the `REJECTED` or `REVOKED` state.

    Args:
      name: string, Resource name of the Consent, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}/consents/{consent_id}`. (required)
      body: object, The request body.
        The object takes the form of:

    { # Represents an end user's consent.
      "expireTime": "A String", # Timestamp in UTC of when this consent is considered expired.
      "state": "A String", # Indicates the current state of this consent.
      "policies": [ # Represents an end user's consent in terms of the resources that can be accessed and under what conditions.
        { # Represents an end user's consent in terms of the resources that can be accessed and under what conditions.
          "resourceAttributes": [ # The data resources that this policy applies to. A data resource is a match if it matches all the attributes listed here.
            { # An attribute value for a consent or data mapping. Each Attribute must have a corresponding AttributeDefinition in the consent store that defines the default and allowed values.
              "values": [ # The value of the attribute. Must be an acceptable value as defined in the consent store. For example, if the consent store defines "data type" with acceptable values "questionnaire" and "step-count", when the attribute name is data type, this field must contain one of those values.
                "A String",
              ],
              "attributeDefinitionId": "A String", # Indicates the name of an attribute defined at the consent store.
            },
          ],
          "authorizationRule": { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() < 100" Example (Equality): title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email" Example (Logic): title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' && document.type != 'internal'" Example (Data Manipulation): title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # The request conditions to meet to grant access.
            "description": "A String", # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
            "location": "A String", # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
            "expression": "A String", # Textual representation of an expression in Common Expression Language syntax.
            "title": "A String", # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
          },
        },
      ],
      "consentArtifact": "A String", # Required. The resource name of the consent artifact that contains proof of the end user's consent, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}/consentArtifacts/{consent_artifact_id}`.
      "name": "A String", # Resource name of the Consent, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}/consents/{consent_id}`.
      "revisionCreateTime": "A String", # Output only. The timestamp that the revision was created.
      "revisionId": "A String", # Output only. The revision ID of the consent. The format is an 8-character hexadecimal string. Refer to a specific revision of a Consent by appending `@{revision_id}` to the Consent's resource name.
      "userId": "A String", # Required. User's UUID provided by the client.
      "ttl": "A String", # Input only. The time to live for this consent from when it is created.
    }

      updateMask: string, The update mask to apply to the resource. For the `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. The `user_id`, `policies`, and `consent_artifact` fields can be updated.
      x__xgafv: string, V1 error format.
        Allowed values
          1 - v1 error format
          2 - v2 error format

    Returns:
      An object of the form:

        { # Represents an end user's consent.
        "expireTime": "A String", # Timestamp in UTC of when this consent is considered expired.
        "state": "A String", # Indicates the current state of this consent.
        "policies": [ # Represents an end user's consent in terms of the resources that can be accessed and under what conditions.
          { # Represents an end user's consent in terms of the resources that can be accessed and under what conditions.
            "resourceAttributes": [ # The data resources that this policy applies to. A data resource is a match if it matches all the attributes listed here.
              { # An attribute value for a consent or data mapping. Each Attribute must have a corresponding AttributeDefinition in the consent store that defines the default and allowed values.
                "values": [ # The value of the attribute. Must be an acceptable value as defined in the consent store. For example, if the consent store defines "data type" with acceptable values "questionnaire" and "step-count", when the attribute name is data type, this field must contain one of those values.
                  "A String",
                ],
                "attributeDefinitionId": "A String", # Indicates the name of an attribute defined at the consent store.
              },
            ],
            "authorizationRule": { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() < 100" Example (Equality): title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email" Example (Logic): title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' && document.type != 'internal'" Example (Data Manipulation): title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # The request conditions to meet to grant access.
              "description": "A String", # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
              "location": "A String", # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
              "expression": "A String", # Textual representation of an expression in Common Expression Language syntax.
              "title": "A String", # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
            },
          },
        ],
        "consentArtifact": "A String", # Required. The resource name of the consent artifact that contains proof of the end user's consent, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}/consentArtifacts/{consent_artifact_id}`.
        "name": "A String", # Resource name of the Consent, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}/consents/{consent_id}`.
        "revisionCreateTime": "A String", # Output only. The timestamp that the revision was created.
        "revisionId": "A String", # Output only. The revision ID of the consent. The format is an 8-character hexadecimal string. Refer to a specific revision of a Consent by appending `@{revision_id}` to the Consent's resource name.
        "userId": "A String", # Required. User's UUID provided by the client.
        "ttl": "A String", # Input only. The time to live for this consent from when it is created.
      }

`reject(name, body=None, x__xgafv=None)`

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

    Args:
      name: string, 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. (required)
      body: object, The request body.
        The object takes the form of:

    { # Rejects the latest revision of the specified Consent by committing a new revision with `state` updated to `REJECTED`. If the latest revision of the given consent is in the `REJECTED` state, no new revision is committed.
        "consentArtifact": "A String", # The resource name of the consent artifact that contains proof of the end user's rejection of the draft consent, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}/consentArtifacts/{consent_artifact_id}`. If the draft consent had a consent artifact, this consent artifact overwrites it.
      }

      x__xgafv: string, V1 error format.
        Allowed values
          1 - v1 error format
          2 - v2 error format

    Returns:
      An object of the form:

        { # Represents an end user's consent.
        "expireTime": "A String", # Timestamp in UTC of when this consent is considered expired.
        "state": "A String", # Indicates the current state of this consent.
        "policies": [ # Represents an end user's consent in terms of the resources that can be accessed and under what conditions.
          { # Represents an end user's consent in terms of the resources that can be accessed and under what conditions.
            "resourceAttributes": [ # The data resources that this policy applies to. A data resource is a match if it matches all the attributes listed here.
              { # An attribute value for a consent or data mapping. Each Attribute must have a corresponding AttributeDefinition in the consent store that defines the default and allowed values.
                "values": [ # The value of the attribute. Must be an acceptable value as defined in the consent store. For example, if the consent store defines "data type" with acceptable values "questionnaire" and "step-count", when the attribute name is data type, this field must contain one of those values.
                  "A String",
                ],
                "attributeDefinitionId": "A String", # Indicates the name of an attribute defined at the consent store.
              },
            ],
            "authorizationRule": { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() < 100" Example (Equality): title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email" Example (Logic): title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' && document.type != 'internal'" Example (Data Manipulation): title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # The request conditions to meet to grant access.
              "description": "A String", # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
              "location": "A String", # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
              "expression": "A String", # Textual representation of an expression in Common Expression Language syntax.
              "title": "A String", # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
            },
          },
        ],
        "consentArtifact": "A String", # Required. The resource name of the consent artifact that contains proof of the end user's consent, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}/consentArtifacts/{consent_artifact_id}`.
        "name": "A String", # Resource name of the Consent, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}/consents/{consent_id}`.
        "revisionCreateTime": "A String", # Output only. The timestamp that the revision was created.
        "revisionId": "A String", # Output only. The revision ID of the consent. The format is an 8-character hexadecimal string. Refer to a specific revision of a Consent by appending `@{revision_id}` to the Consent's resource name.
        "userId": "A String", # Required. User's UUID provided by the client.
        "ttl": "A String", # Input only. The time to live for this consent from when it is created.
      }

`revoke(name, body=None, x__xgafv=None)`

    Revokes the latest revision of the specified Consent by committing a new revision with `state` updated to `REVOKED`. If the latest revision of the given 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.

    Args:
      name: string, 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. (required)
      body: object, The request body.
        The object takes the form of:

    { # Revokes the latest revision of the specified Consent by committing a new revision with `state` updated to `REVOKED`. If the latest revision of the given consent is in the `REVOKED` state, no new revision is committed.
        "consentArtifact": "A String", # The resource name of the consent artifact that contains proof of the end user's revocation of the consent, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}/consentArtifacts/{consent_artifact_id}`.
      }

      x__xgafv: string, V1 error format.
        Allowed values
          1 - v1 error format
          2 - v2 error format

    Returns:
      An object of the form:

        { # Represents an end user's consent.
        "expireTime": "A String", # Timestamp in UTC of when this consent is considered expired.
        "state": "A String", # Indicates the current state of this consent.
        "policies": [ # Represents an end user's consent in terms of the resources that can be accessed and under what conditions.
          { # Represents an end user's consent in terms of the resources that can be accessed and under what conditions.
            "resourceAttributes": [ # The data resources that this policy applies to. A data resource is a match if it matches all the attributes listed here.
              { # An attribute value for a consent or data mapping. Each Attribute must have a corresponding AttributeDefinition in the consent store that defines the default and allowed values.
                "values": [ # The value of the attribute. Must be an acceptable value as defined in the consent store. For example, if the consent store defines "data type" with acceptable values "questionnaire" and "step-count", when the attribute name is data type, this field must contain one of those values.
                  "A String",
                ],
                "attributeDefinitionId": "A String", # Indicates the name of an attribute defined at the consent store.
              },
            ],
            "authorizationRule": { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() < 100" Example (Equality): title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email" Example (Logic): title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' && document.type != 'internal'" Example (Data Manipulation): title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # The request conditions to meet to grant access.
              "description": "A String", # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
              "location": "A String", # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
              "expression": "A String", # Textual representation of an expression in Common Expression Language syntax.
              "title": "A String", # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
            },
          },
        ],
        "consentArtifact": "A String", # Required. The resource name of the consent artifact that contains proof of the end user's consent, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}/consentArtifacts/{consent_artifact_id}`.
        "name": "A String", # Resource name of the Consent, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}/consents/{consent_id}`.
        "revisionCreateTime": "A String", # Output only. The timestamp that the revision was created.
        "revisionId": "A String", # Output only. The revision ID of the consent. The format is an 8-character hexadecimal string. Refer to a specific revision of a Consent by appending `@{revision_id}` to the Consent's resource name.
        "userId": "A String", # Required. User's UUID provided by the client.
        "ttl": "A String", # Input only. The time to live for this consent from when it is created.
      }