# Genomics API . datasets

## Instance Methods

Creates a new dataset.

Deletes a dataset.

Gets a dataset by ID.

Lists datasets within a project.

Retrieves the next page of results.

Updates a dataset. This method supports patch semantics.

Undeletes a dataset by restoring a dataset which was deleted via this API. This operation is only possible for a week after the deletion occurred.

### Method Details

`create(body, x__xgafv=None)`

    Creates a new dataset.

    Args:
      body: object, The request body. (required)
        The object takes the form of:

    { # A Dataset is a collection of genomic data.
      "projectId": "A String", # The Google Developers Console project ID that this dataset belongs to.
      "id": "A String", # The server-generated dataset ID, unique across all datasets.
      "createTime": "A String", # The time this dataset was created, in seconds from the epoch.
      "name": "A String", # The dataset name.
    }

      x__xgafv: string, V1 error format.

    Returns:
      An object of the form:

        { # A Dataset is a collection of genomic data.
        "projectId": "A String", # The Google Developers Console project ID that this dataset belongs to.
        "id": "A String", # The server-generated dataset ID, unique across all datasets.
        "createTime": "A String", # The time this dataset was created, in seconds from the epoch.
        "name": "A String", # The dataset name.
      }

`delete(datasetId, x__xgafv=None)`

    Deletes a dataset.

    Args:
      datasetId: string, The ID of the dataset to be deleted. (required)
      x__xgafv: string, V1 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(datasetId, x__xgafv=None)`

    Gets a dataset by ID.

    Args:
      datasetId: string, The ID of the dataset. (required)
      x__xgafv: string, V1 error format.

    Returns:
      An object of the form:

        { # A Dataset is a collection of genomic data.
        "projectId": "A String", # The Google Developers Console project ID that this dataset belongs to.
        "id": "A String", # The server-generated dataset ID, unique across all datasets.
        "createTime": "A String", # The time this dataset was created, in seconds from the epoch.
        "name": "A String", # The dataset name.
      }

`getIamPolicy(resource, body, x__xgafv=None)`

    Args:
      resource: string, REQUIRED: The resource for which policy is being specified. Format is `datasets/`. (required)
      body: object, The request body. (required)
        The object takes the form of:

    { # Request message for `GetIamPolicy` method.
      }

      x__xgafv: string, V1 error format.

    Returns:
      An object of the form:

        { # Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources. A `Policy` consists of a list of `bindings`. A `Binding` binds a list of `members` to a `role`, where the members can be user accounts, Google groups, Google domains, and service accounts. A `role` is a named list of permissions defined by IAM. **Example** { "bindings": [ { "role": "roles/owner", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-other-app@appspot.gserviceaccount.com"] }, { "role": "roles/viewer", "members": ["user:sean@example.com"] } ] } For a description of IAM and its features, see the [IAM developer's guide](https://cloud.google.com/iam).
        "bindings": [ # Associates a list of `members` to a `role`. Multiple `bindings` must not be specified for the same `role`. `bindings` with no members will result in an error.
          { # Associates `members` with a `role`.
            "role": "A String", # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. Required
            "members": [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following formats: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@gmail.com` or `joe@example.com`. * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: A Google Apps domain name that represents all the users of that domain. For example, `google.com` or `example.com`.
              "A String",
            ],
          },
        ],
        "version": 42, # Version of the `Policy`. The default version is 0.
        "etag": "A String", # Can be used to perform a read-modify-write.
      }

`list(pageSize=None, projectId=None, pageToken=None, x__xgafv=None)`

    Lists datasets within a project.

    Args:
      pageSize: integer, The maximum number of results returned by this request. If unspecified, defaults to 50. The maximum value is 1024.
      projectId: string, Required. The project to list datasets for.
      pageToken: string, The continuation token, which is used to page through large result sets. To get the next page of results, set this parameter to the value of `nextPageToken` from the previous response.
      x__xgafv: string, V1 error format.

    Returns:
      An object of the form:

        { # The dataset list response.
        "nextPageToken": "A String", # The continuation token, which is used to page through large result sets. Provide this value in a subsequent request to return the next page of results. This field will be empty if there aren't any additional results.
        "datasets": [ # The list of matching Datasets.
          { # A Dataset is a collection of genomic data.
            "projectId": "A String", # The Google Developers Console project ID that this dataset belongs to.
            "id": "A String", # The server-generated dataset ID, unique across all datasets.
            "createTime": "A String", # The time this dataset was created, in seconds from the epoch.
            "name": "A String", # The dataset name.
          },
        ],
      }

`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(datasetId, body, updateMask=None, x__xgafv=None)`

    Updates a dataset. This method supports patch semantics.

    Args:
      datasetId: string, The ID of the dataset to be updated. (required)
      body: object, The request body. (required)
        The object takes the form of:

    { # A Dataset is a collection of genomic data.
      "projectId": "A String", # The Google Developers Console project ID that this dataset belongs to.
      "id": "A String", # The server-generated dataset ID, unique across all datasets.
      "createTime": "A String", # The time this dataset was created, in seconds from the epoch.
      "name": "A String", # The dataset name.
    }

      updateMask: string, An optional mask specifying which fields to update. At this time, the only mutable field is [name][google.genomics.v1.Dataset.name]. The only acceptable value is "name". If unspecified, all mutable fields will be updated.
      x__xgafv: string, V1 error format.

    Returns:
      An object of the form:

        { # A Dataset is a collection of genomic data.
        "projectId": "A String", # The Google Developers Console project ID that this dataset belongs to.
        "id": "A String", # The server-generated dataset ID, unique across all datasets.
        "createTime": "A String", # The time this dataset was created, in seconds from the epoch.
        "name": "A String", # The dataset name.
      }

`setIamPolicy(resource, body, x__xgafv=None)`

    Args:
      resource: string, REQUIRED: The resource for which policy is being specified. Format is `datasets/`. (required)
      body: object, The request body. (required)
        The object takes the form of:

    { # Request message for `SetIamPolicy` method.
        "policy": { # Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources. A `Policy` consists of a list of `bindings`. A `Binding` binds a list of `members` to a `role`, where the members can be user accounts, Google groups, Google domains, and service accounts. A `role` is a named list of permissions defined by IAM. **Example** { "bindings": [ { "role": "roles/owner", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-other-app@appspot.gserviceaccount.com"] }, { "role": "roles/viewer", "members": ["user:sean@example.com"] } ] } For a description of IAM and its features, see the [IAM developer's guide](https://cloud.google.com/iam). # REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them.
          "bindings": [ # Associates a list of `members` to a `role`. Multiple `bindings` must not be specified for the same `role`. `bindings` with no members will result in an error.
            { # Associates `members` with a `role`.
              "role": "A String", # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. Required
              "members": [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following formats: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@gmail.com` or `joe@example.com`. * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: A Google Apps domain name that represents all the users of that domain. For example, `google.com` or `example.com`.
                "A String",
              ],
            },
          ],
          "version": 42, # Version of the `Policy`. The default version is 0.
          "etag": "A String", # Can be used to perform a read-modify-write.
        },
      }

      x__xgafv: string, V1 error format.

    Returns:
      An object of the form:

        { # Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources. A `Policy` consists of a list of `bindings`. A `Binding` binds a list of `members` to a `role`, where the members can be user accounts, Google groups, Google domains, and service accounts. A `role` is a named list of permissions defined by IAM. **Example** { "bindings": [ { "role": "roles/owner", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-other-app@appspot.gserviceaccount.com"] }, { "role": "roles/viewer", "members": ["user:sean@example.com"] } ] } For a description of IAM and its features, see the [IAM developer's guide](https://cloud.google.com/iam).
        "bindings": [ # Associates a list of `members` to a `role`. Multiple `bindings` must not be specified for the same `role`. `bindings` with no members will result in an error.
          { # Associates `members` with a `role`.
            "role": "A String", # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. Required
            "members": [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following formats: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@gmail.com` or `joe@example.com`. * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: A Google Apps domain name that represents all the users of that domain. For example, `google.com` or `example.com`.
              "A String",
            ],
          },
        ],
        "version": 42, # Version of the `Policy`. The default version is 0.
        "etag": "A String", # Can be used to perform a read-modify-write.
      }

`testIamPermissions(resource, body, x__xgafv=None)`

    Args:
      resource: string, REQUIRED: The resource for which policy is being specified. Format is `datasets/`. (required)
      body: object, The request body. (required)
        The object takes the form of:

    { # Request message for `TestIamPermissions` method.
        "permissions": [ # REQUIRED: The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. Allowed permissions are: * `genomics.datasets.create` * `genomics.datasets.delete` * `genomics.datasets.get` * `genomics.datasets.list` * `genomics.datasets.update` * `genomics.datasets.getIamPolicy` * `genomics.datasets.setIamPolicy`
          "A String",
        ],
      }

      x__xgafv: string, V1 error format.

    Returns:
      An object of the form:

        { # Response message for `TestIamPermissions` method.
        "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
          "A String",
        ],
      }

`undelete(datasetId, body, x__xgafv=None)`

    Undeletes a dataset by restoring a dataset which was deleted via this API. This operation is only possible for a week after the deletion occurred.

    Args:
      datasetId: string, The ID of the dataset to be undeleted. (required)
      body: object, The request body. (required)
        The object takes the form of:

    {
      }

      x__xgafv: string, V1 error format.

    Returns:
      An object of the form:

        { # A Dataset is a collection of genomic data.
        "projectId": "A String", # The Google Developers Console project ID that this dataset belongs to.
        "id": "A String", # The server-generated dataset ID, unique across all datasets.
        "createTime": "A String", # The time this dataset was created, in seconds from the epoch.
        "name": "A String", # The dataset name.
      }