# Data Labeling API . projects . datasets . annotatedDatasets

## Instance Methods

Returns the dataItems Resource.

Returns the examples Resource.

Returns the feedbackThreads Resource.

Close httplib2 connections.

Deletes an annotated dataset by resource name.

Gets an annotated dataset by resource name.

Lists annotated datasets for a dataset. Pagination is supported.

Retrieves the next page of results.

### Method Details

`close()`

    Close httplib2 connections.

`delete(name, x__xgafv=None)`

    Deletes an annotated dataset by resource name.

    Args:
      name: string, Required. Name of the annotated dataset to delete, format: projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/ {annotated_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); } The JSON representation for `Empty` is empty JSON object `{}`.
    }

`get(name, x__xgafv=None)`

    Gets an annotated dataset by resource name.

    Args:
      name: string, Required. Name of the annotated dataset to get, format: projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/ {annotated_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:

        { # AnnotatedDataset is a set holding annotations for data in a Dataset. Each labeling task will generate an AnnotatedDataset under the Dataset that the task is requested for.
      "annotationSource": "A String", # Output only. Source of the annotation.
      "annotationType": "A String", # Output only. Type of the annotation. It is specified when starting labeling task.
      "blockingResources": [ # Output only. The names of any related resources that are blocking changes to the annotated dataset.
        "A String",
      ],
      "completedExampleCount": "A String", # Output only. Number of examples that have annotation in the annotated dataset.
      "createTime": "A String", # Output only. Time the AnnotatedDataset was created.
      "description": "A String", # Output only. The description of the AnnotatedDataset. It is specified in HumanAnnotationConfig when user starts a labeling task. Maximum of 10000 characters.
      "displayName": "A String", # Output only. The display name of the AnnotatedDataset. It is specified in HumanAnnotationConfig when user starts a labeling task. Maximum of 64 characters.
      "exampleCount": "A String", # Output only. Number of examples in the annotated dataset.
      "labelStats": { # Statistics about annotation specs. # Output only. Per label statistics.
        "exampleCount": { # Map of each annotation spec's example count. Key is the annotation spec name and value is the number of examples for that annotation spec. If the annotated dataset does not have annotation spec, the map will return a pair where the key is empty string and value is the total number of annotations.
          "a_key": "A String",
        },
      },
      "metadata": { # Metadata on AnnotatedDataset. # Output only. Additional information about AnnotatedDataset.
        "boundingPolyConfig": { # Config for image bounding poly (and bounding box) human labeling task. # Configuration for image bounding box and bounding poly task.
          "annotationSpecSet": "A String", # Required. Annotation spec set resource name.
          "instructionMessage": "A String", # Optional. Instruction message showed on contributors UI.
        },
        "eventConfig": { # Config for video event human labeling task. # Configuration for video event labeling task.
          "annotationSpecSets": [ # Required. The list of annotation spec set resource name. Similar to video classification, we support selecting event from multiple AnnotationSpecSet at the same time.
            "A String",
          ],
          "clipLength": 42, # Videos will be cut to smaller clips to make it easier for labelers to work on. Users can configure is field in seconds, if not set, default value is 60s.
          "overlapLength": 42, # The overlap length between different video clips. Users can configure is field in seconds, if not set, default value is 1s.
        },
        "humanAnnotationConfig": { # Configuration for how human labeling task should be done. # HumanAnnotationConfig used when requesting the human labeling task for this AnnotatedDataset.
          "annotatedDatasetDescription": "A String", # Optional. A human-readable description for AnnotatedDataset. The description can be up to 10000 characters long.
          "annotatedDatasetDisplayName": "A String", # Required. A human-readable name for AnnotatedDataset defined by users. Maximum of 64 characters .
          "contributorEmails": [ # Optional. If you want your own labeling contributors to manage and work on this labeling request, you can set these contributors here. We will give them access to the question types in crowdcompute. Note that these emails must be registered in crowdcompute worker UI: https://crowd-compute.appspot.com/
            "A String",
          ],
          "instruction": "A String", # Required. Instruction resource name.
          "labelGroup": "A String", # Optional. A human-readable label used to logically group labeling tasks. This string must match the regular expression `[a-zA-Z\\d_-]{0,128}`.
          "languageCode": "A String", # Optional. The Language of this question, as a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). Default value is en-US. Only need to set this when task is language related. For example, French text classification.
          "questionDuration": "A String", # Optional. Maximum duration for contributors to answer a question. Maximum is 3600 seconds. Default is 3600 seconds.
          "replicaCount": 42, # Optional. Replication of questions. Each question will be sent to up to this number of contributors to label. Aggregated answers will be returned. Default is set to 1. For image related labeling, valid values are 1, 3, 5.
          "userEmailAddress": "A String", # Email of the user who started the labeling task and should be notified by email. If empty no notification will be sent.
        },
        "imageClassificationConfig": { # Config for image classification human labeling task. # Configuration for image classification task.
          "allowMultiLabel": True or False, # Optional. If allow_multi_label is true, contributors are able to choose multiple labels for one image.
          "annotationSpecSet": "A String", # Required. Annotation spec set resource name.
          "answerAggregationType": "A String", # Optional. The type of how to aggregate answers.
        },
        "objectDetectionConfig": { # Config for video object detection human labeling task. Object detection will be conducted on the images extracted from the video, and those objects will be labeled with bounding boxes. User need to specify the number of images to be extracted per second as the extraction frame rate. # Configuration for video object detection task.
          "annotationSpecSet": "A String", # Required. Annotation spec set resource name.
          "extractionFrameRate": 3.14, # Required. Number of frames per second to be extracted from the video.
        },
        "objectTrackingConfig": { # Config for video object tracking human labeling task. # Configuration for video object tracking task.
          "annotationSpecSet": "A String", # Required. Annotation spec set resource name.
          "clipLength": 42, # Videos will be cut to smaller clips to make it easier for labelers to work on. Users can configure is field in seconds, if not set, default value is 20s.
          "overlapLength": 42, # The overlap length between different video clips. Users can configure is field in seconds, if not set, default value is 0.3s.
        },
        "polylineConfig": { # Config for image polyline human labeling task. # Configuration for image polyline task.
          "annotationSpecSet": "A String", # Required. Annotation spec set resource name.
          "instructionMessage": "A String", # Optional. Instruction message showed on contributors UI.
        },
        "segmentationConfig": { # Config for image segmentation # Configuration for image segmentation task.
          "annotationSpecSet": "A String", # Required. Annotation spec set resource name. format: projects/{project_id}/annotationSpecSets/{annotation_spec_set_id}
          "instructionMessage": "A String", # Instruction message showed on labelers UI.
        },
        "textClassificationConfig": { # Config for text classification human labeling task. # Configuration for text classification task.
          "allowMultiLabel": True or False, # Optional. If allow_multi_label is true, contributors are able to choose multiple labels for one text segment.
          "annotationSpecSet": "A String", # Required. Annotation spec set resource name.
          "sentimentConfig": { # Config for setting up sentiments. # Optional. Configs for sentiment selection. We deprecate sentiment analysis in data labeling side as it is incompatible with uCAIP.
            "enableLabelSentimentSelection": True or False, # If set to true, contributors will have the option to select sentiment of the label they selected, to mark it as negative or positive label. Default is false.
          },
        },
        "textEntityExtractionConfig": { # Config for text entity extraction human labeling task. # Configuration for text entity extraction task.
          "annotationSpecSet": "A String", # Required. Annotation spec set resource name.
        },
        "videoClassificationConfig": { # Config for video classification human labeling task. Currently two types of video classification are supported: 1. Assign labels on the entire video. 2. Split the video into multiple video clips based on camera shot, and assign labels on each video clip. # Configuration for video classification task.
          "annotationSpecSetConfigs": [ # Required. The list of annotation spec set configs. Since watching a video clip takes much longer time than an image, we support label with multiple AnnotationSpecSet at the same time. Labels in each AnnotationSpecSet will be shown in a group to contributors. Contributors can select one or more (depending on whether to allow multi label) from each group.
            { # Annotation spec set with the setting of allowing multi labels or not.
              "allowMultiLabel": True or False, # Optional. If allow_multi_label is true, contributors are able to choose multiple labels from one annotation spec set.
              "annotationSpecSet": "A String", # Required. Annotation spec set resource name.
            },
          ],
          "applyShotDetection": True or False, # Optional. Option to apply shot detection on the video.
        },
      },
      "name": "A String", # Output only. AnnotatedDataset resource name in format of: projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/ {annotated_dataset_id}
    }

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

    Lists annotated datasets for a dataset. Pagination is supported.

    Args:
      parent: string, Required. Name of the dataset to list annotated datasets, format: projects/{project_id}/datasets/{dataset_id} (required)
      filter: string, Optional. Filter is not supported at this moment.
      pageSize: integer, Optional. Requested page size. Server may return fewer results than requested. Default value is 100.
      pageToken: string, Optional. A token identifying a page of results for the server to return. Typically obtained by ListAnnotatedDatasetsResponse.next_page_token of the previous [DataLabelingService.ListAnnotatedDatasets] call. Return first page if empty.
      x__xgafv: string, V1 error format.
        Allowed values
          1 - v1 error format
          2 - v2 error format

    Returns:
      An object of the form:

        { # Results of listing annotated datasets for a dataset.
      "annotatedDatasets": [ # The list of annotated datasets to return.
        { # AnnotatedDataset is a set holding annotations for data in a Dataset. Each labeling task will generate an AnnotatedDataset under the Dataset that the task is requested for.
          "annotationSource": "A String", # Output only. Source of the annotation.
          "annotationType": "A String", # Output only. Type of the annotation. It is specified when starting labeling task.
          "blockingResources": [ # Output only. The names of any related resources that are blocking changes to the annotated dataset.
            "A String",
          ],
          "completedExampleCount": "A String", # Output only. Number of examples that have annotation in the annotated dataset.
          "createTime": "A String", # Output only. Time the AnnotatedDataset was created.
          "description": "A String", # Output only. The description of the AnnotatedDataset. It is specified in HumanAnnotationConfig when user starts a labeling task. Maximum of 10000 characters.
          "displayName": "A String", # Output only. The display name of the AnnotatedDataset. It is specified in HumanAnnotationConfig when user starts a labeling task. Maximum of 64 characters.
          "exampleCount": "A String", # Output only. Number of examples in the annotated dataset.
          "labelStats": { # Statistics about annotation specs. # Output only. Per label statistics.
            "exampleCount": { # Map of each annotation spec's example count. Key is the annotation spec name and value is the number of examples for that annotation spec. If the annotated dataset does not have annotation spec, the map will return a pair where the key is empty string and value is the total number of annotations.
              "a_key": "A String",
            },
          },
          "metadata": { # Metadata on AnnotatedDataset. # Output only. Additional information about AnnotatedDataset.
            "boundingPolyConfig": { # Config for image bounding poly (and bounding box) human labeling task. # Configuration for image bounding box and bounding poly task.
              "annotationSpecSet": "A String", # Required. Annotation spec set resource name.
              "instructionMessage": "A String", # Optional. Instruction message showed on contributors UI.
            },
            "eventConfig": { # Config for video event human labeling task. # Configuration for video event labeling task.
              "annotationSpecSets": [ # Required. The list of annotation spec set resource name. Similar to video classification, we support selecting event from multiple AnnotationSpecSet at the same time.
                "A String",
              ],
              "clipLength": 42, # Videos will be cut to smaller clips to make it easier for labelers to work on. Users can configure is field in seconds, if not set, default value is 60s.
              "overlapLength": 42, # The overlap length between different video clips. Users can configure is field in seconds, if not set, default value is 1s.
            },
            "humanAnnotationConfig": { # Configuration for how human labeling task should be done. # HumanAnnotationConfig used when requesting the human labeling task for this AnnotatedDataset.
              "annotatedDatasetDescription": "A String", # Optional. A human-readable description for AnnotatedDataset. The description can be up to 10000 characters long.
              "annotatedDatasetDisplayName": "A String", # Required. A human-readable name for AnnotatedDataset defined by users. Maximum of 64 characters .
              "contributorEmails": [ # Optional. If you want your own labeling contributors to manage and work on this labeling request, you can set these contributors here. We will give them access to the question types in crowdcompute. Note that these emails must be registered in crowdcompute worker UI: https://crowd-compute.appspot.com/
                "A String",
              ],
              "instruction": "A String", # Required. Instruction resource name.
              "labelGroup": "A String", # Optional. A human-readable label used to logically group labeling tasks. This string must match the regular expression `[a-zA-Z\\d_-]{0,128}`.
              "languageCode": "A String", # Optional. The Language of this question, as a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). Default value is en-US. Only need to set this when task is language related. For example, French text classification.
              "questionDuration": "A String", # Optional. Maximum duration for contributors to answer a question. Maximum is 3600 seconds. Default is 3600 seconds.
              "replicaCount": 42, # Optional. Replication of questions. Each question will be sent to up to this number of contributors to label. Aggregated answers will be returned. Default is set to 1. For image related labeling, valid values are 1, 3, 5.
              "userEmailAddress": "A String", # Email of the user who started the labeling task and should be notified by email. If empty no notification will be sent.
            },
            "imageClassificationConfig": { # Config for image classification human labeling task. # Configuration for image classification task.
              "allowMultiLabel": True or False, # Optional. If allow_multi_label is true, contributors are able to choose multiple labels for one image.
              "annotationSpecSet": "A String", # Required. Annotation spec set resource name.
              "answerAggregationType": "A String", # Optional. The type of how to aggregate answers.
            },
            "objectDetectionConfig": { # Config for video object detection human labeling task. Object detection will be conducted on the images extracted from the video, and those objects will be labeled with bounding boxes. User need to specify the number of images to be extracted per second as the extraction frame rate. # Configuration for video object detection task.
              "annotationSpecSet": "A String", # Required. Annotation spec set resource name.
              "extractionFrameRate": 3.14, # Required. Number of frames per second to be extracted from the video.
            },
            "objectTrackingConfig": { # Config for video object tracking human labeling task. # Configuration for video object tracking task.
              "annotationSpecSet": "A String", # Required. Annotation spec set resource name.
              "clipLength": 42, # Videos will be cut to smaller clips to make it easier for labelers to work on. Users can configure is field in seconds, if not set, default value is 20s.
              "overlapLength": 42, # The overlap length between different video clips. Users can configure is field in seconds, if not set, default value is 0.3s.
            },
            "polylineConfig": { # Config for image polyline human labeling task. # Configuration for image polyline task.
              "annotationSpecSet": "A String", # Required. Annotation spec set resource name.
              "instructionMessage": "A String", # Optional. Instruction message showed on contributors UI.
            },
            "segmentationConfig": { # Config for image segmentation # Configuration for image segmentation task.
              "annotationSpecSet": "A String", # Required. Annotation spec set resource name. format: projects/{project_id}/annotationSpecSets/{annotation_spec_set_id}
              "instructionMessage": "A String", # Instruction message showed on labelers UI.
            },
            "textClassificationConfig": { # Config for text classification human labeling task. # Configuration for text classification task.
              "allowMultiLabel": True or False, # Optional. If allow_multi_label is true, contributors are able to choose multiple labels for one text segment.
              "annotationSpecSet": "A String", # Required. Annotation spec set resource name.
              "sentimentConfig": { # Config for setting up sentiments. # Optional. Configs for sentiment selection. We deprecate sentiment analysis in data labeling side as it is incompatible with uCAIP.
                "enableLabelSentimentSelection": True or False, # If set to true, contributors will have the option to select sentiment of the label they selected, to mark it as negative or positive label. Default is false.
              },
            },
            "textEntityExtractionConfig": { # Config for text entity extraction human labeling task. # Configuration for text entity extraction task.
              "annotationSpecSet": "A String", # Required. Annotation spec set resource name.
            },
            "videoClassificationConfig": { # Config for video classification human labeling task. Currently two types of video classification are supported: 1. Assign labels on the entire video. 2. Split the video into multiple video clips based on camera shot, and assign labels on each video clip. # Configuration for video classification task.
              "annotationSpecSetConfigs": [ # Required. The list of annotation spec set configs. Since watching a video clip takes much longer time than an image, we support label with multiple AnnotationSpecSet at the same time. Labels in each AnnotationSpecSet will be shown in a group to contributors. Contributors can select one or more (depending on whether to allow multi label) from each group.
                { # Annotation spec set with the setting of allowing multi labels or not.
                  "allowMultiLabel": True or False, # Optional. If allow_multi_label is true, contributors are able to choose multiple labels from one annotation spec set.
                  "annotationSpecSet": "A String", # Required. Annotation spec set resource name.
                },
              ],
              "applyShotDetection": True or False, # Optional. Option to apply shot detection on the video.
            },
          },
          "name": "A String", # Output only. AnnotatedDataset resource name in format of: projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/ {annotated_dataset_id}
        },
      ],
      "nextPageToken": "A String", # A token to retrieve next page of results.
    }

`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.