# Cloud Translation API . projects . locations . adaptiveMtDatasets

## Instance Methods

Returns the adaptiveMtFiles Resource.

Returns the adaptiveMtSentences Resource.

Close httplib2 connections.

Creates an Adaptive MT dataset.

Deletes an Adaptive MT dataset, including all its entries and associated metadata.

Gets the Adaptive MT dataset.

Imports an AdaptiveMtFile and adds all of its sentences into the AdaptiveMtDataset.

Lists all Adaptive MT datasets for which the caller has read permission.

Retrieves the next page of results.

### Method Details

`close()`

    Close httplib2 connections.

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

    Creates an Adaptive MT dataset.

    Args:
      parent: string, Required. Name of the parent project. In form of `projects/{project-number-or-id}/locations/{location-id}` (required)
      body: object, The request body.
        The object takes the form of:

    { # An Adaptive MT Dataset.
      "createTime": "A String", # Output only. Timestamp when this dataset was created.
      "displayName": "A String", # The name of the dataset to show in the interface. The name can be up to 32 characters long and can consist only of ASCII Latin letters A-Z and a-z, underscores (_), and ASCII digits 0-9.
      "exampleCount": 42, # The number of examples in the dataset.
      "name": "A String", # Required. The resource name of the dataset, in form of `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset_id}`
      "sourceLanguageCode": "A String", # The BCP-47 language code of the source language.
      "targetLanguageCode": "A String", # The BCP-47 language code of the target language.
      "updateTime": "A String", # Output only. Timestamp when this dataset was last updated.
    }

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

    Returns:
      An object of the form:

        { # An Adaptive MT Dataset.
      "createTime": "A String", # Output only. Timestamp when this dataset was created.
      "displayName": "A String", # The name of the dataset to show in the interface. The name can be up to 32 characters long and can consist only of ASCII Latin letters A-Z and a-z, underscores (_), and ASCII digits 0-9.
      "exampleCount": 42, # The number of examples in the dataset.
      "name": "A String", # Required. The resource name of the dataset, in form of `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset_id}`
      "sourceLanguageCode": "A String", # The BCP-47 language code of the source language.
      "targetLanguageCode": "A String", # The BCP-47 language code of the target language.
      "updateTime": "A String", # Output only. Timestamp when this dataset was last updated.
    }

`delete(name, x__xgafv=None)`

    Deletes an Adaptive MT dataset, including all its entries and associated metadata.

    Args:
      name: string, Required. Name of the dataset. In the form of `projects/{project-number-or-id}/locations/{location-id}/adaptiveMtDatasets/{adaptive-mt-dataset-id}` (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); }
    }

`get(name, x__xgafv=None)`

    Gets the Adaptive MT dataset.

    Args:
      name: string, Required. Name of the dataset. In the form of `projects/{project-number-or-id}/locations/{location-id}/adaptiveMtDatasets/{adaptive-mt-dataset-id}` (required)
      x__xgafv: string, V1 error format.
        Allowed values
          1 - v1 error format
          2 - v2 error format

    Returns:
      An object of the form:

        { # An Adaptive MT Dataset.
      "createTime": "A String", # Output only. Timestamp when this dataset was created.
      "displayName": "A String", # The name of the dataset to show in the interface. The name can be up to 32 characters long and can consist only of ASCII Latin letters A-Z and a-z, underscores (_), and ASCII digits 0-9.
      "exampleCount": 42, # The number of examples in the dataset.
      "name": "A String", # Required. The resource name of the dataset, in form of `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset_id}`
      "sourceLanguageCode": "A String", # The BCP-47 language code of the source language.
      "targetLanguageCode": "A String", # The BCP-47 language code of the target language.
      "updateTime": "A String", # Output only. Timestamp when this dataset was last updated.
    }

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

    Imports an AdaptiveMtFile and adds all of its sentences into the AdaptiveMtDataset.

    Args:
      parent: string, Required. The resource name of the file, in form of `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}` (required)
      body: object, The request body.
        The object takes the form of:

    { # The request for importing an AdaptiveMt file along with its sentences.
      "fileInputSource": { # An inlined file. # Inline file source.
        "content": "A String", # Required. The file's byte contents.
        "displayName": "A String", # Required. The file's display name.
        "mimeType": "A String", # Required. The file's mime type.
      },
      "gcsInputSource": { # The Google Cloud Storage location for the input content. # Google Cloud Storage file source.
        "inputUri": "A String", # Required. Source data URI. For example, `gs://my_bucket/my_object`.
      },
    }

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

    Returns:
      An object of the form:

        { # The response for importing an AdaptiveMtFile
      "adaptiveMtFile": { # An AdaptiveMtFile. # Output only. The Adaptive MT file that was imported.
        "createTime": "A String", # Output only. Timestamp when this file was created.
        "displayName": "A String", # The file's display name.
        "entryCount": 42, # The number of entries that the file contains.
        "name": "A String", # Required. The resource name of the file, in form of `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}`
        "updateTime": "A String", # Output only. Timestamp when this file was last updated.
      },
    }

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

    Lists all Adaptive MT datasets for which the caller has read permission.

    Args:
      parent: string, Required. The resource name of the project from which to list the Adaptive MT datasets. `projects/{project-number-or-id}/locations/{location-id}` (required)
      filter: string, Optional. An expression for filtering the results of the request. Filter is not supported yet.
      pageSize: integer, Optional. Requested page size. The server may return fewer results than requested. If unspecified, the server picks an appropriate default.
      pageToken: string, Optional. A token identifying a page of results the server should return. Typically, this is the value of ListAdaptiveMtDatasetsResponse.next_page_token returned from the previous call to `ListAdaptiveMtDatasets` method. The first page is returned if `page_token`is empty or missing.
      x__xgafv: string, V1 error format.
        Allowed values
          1 - v1 error format
          2 - v2 error format

    Returns:
      An object of the form:

        { # A list of AdaptiveMtDatasets.
      "adaptiveMtDatasets": [ # Output only. A list of Adaptive MT datasets.
        { # An Adaptive MT Dataset.
          "createTime": "A String", # Output only. Timestamp when this dataset was created.
          "displayName": "A String", # The name of the dataset to show in the interface. The name can be up to 32 characters long and can consist only of ASCII Latin letters A-Z and a-z, underscores (_), and ASCII digits 0-9.
          "exampleCount": 42, # The number of examples in the dataset.
          "name": "A String", # Required. The resource name of the dataset, in form of `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset_id}`
          "sourceLanguageCode": "A String", # The BCP-47 language code of the source language.
          "targetLanguageCode": "A String", # The BCP-47 language code of the target language.
          "updateTime": "A String", # Output only. Timestamp when this dataset was last updated.
        },
      ],
      "nextPageToken": "A String", # Optional. A token to retrieve a page of results. Pass this value in the [ListAdaptiveMtDatasetsRequest.page_token] field in the subsequent call to `ListAdaptiveMtDatasets` method to retrieve the next page of results.
    }

`list_next()`

    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.