Class Dataset
- java.lang.Object
-
- com.amazonaws.services.cognitosync.model.Dataset
-
- All Implemented Interfaces:
Serializable,Cloneable
public class Dataset extends Object implements Serializable, Cloneable
A collection of data for an identity pool. An identity pool can have multiple datasets. A dataset is per identity and can be general or associated with a particular entity in an application (like a saved game). Datasets are automatically created if they don't exist. Data is synced by dataset, and a dataset can hold up to 1MB of key-value pairs.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Dataset()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Datasetclone()booleanequals(Object obj)DategetCreationDate()Date on which the dataset was created.StringgetDatasetName()A string of up to 128 characters.LonggetDataStorage()Total size in bytes of the records in this dataset.StringgetIdentityId()A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito.StringgetLastModifiedBy()The device that made the last change to this dataset.DategetLastModifiedDate()Date when the dataset was last modified.LonggetNumRecords()Number of records in this dataset.inthashCode()voidsetCreationDate(Date creationDate)Date on which the dataset was created.voidsetDatasetName(String datasetName)A string of up to 128 characters.voidsetDataStorage(Long dataStorage)Total size in bytes of the records in this dataset.voidsetIdentityId(String identityId)A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito.voidsetLastModifiedBy(String lastModifiedBy)The device that made the last change to this dataset.voidsetLastModifiedDate(Date lastModifiedDate)Date when the dataset was last modified.voidsetNumRecords(Long numRecords)Number of records in this dataset.StringtoString()Returns a string representation of this object; useful for testing and debugging.DatasetwithCreationDate(Date creationDate)Date on which the dataset was created.DatasetwithDatasetName(String datasetName)A string of up to 128 characters.DatasetwithDataStorage(Long dataStorage)Total size in bytes of the records in this dataset.DatasetwithIdentityId(String identityId)A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito.DatasetwithLastModifiedBy(String lastModifiedBy)The device that made the last change to this dataset.DatasetwithLastModifiedDate(Date lastModifiedDate)Date when the dataset was last modified.DatasetwithNumRecords(Long numRecords)Number of records in this dataset.
-
-
-
Method Detail
-
setIdentityId
public void setIdentityId(String identityId)
A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. GUID generation is unique within a region.- Parameters:
identityId- A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. GUID generation is unique within a region.
-
getIdentityId
public String getIdentityId()
A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. GUID generation is unique within a region.- Returns:
- A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. GUID generation is unique within a region.
-
withIdentityId
public Dataset withIdentityId(String identityId)
A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. GUID generation is unique within a region.- Parameters:
identityId- A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. GUID generation is unique within a region.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setDatasetName
public void setDatasetName(String datasetName)
A string of up to 128 characters. Allowed characters are a-z, A-Z, 0-9, '_' (underscore), '-' (dash), and '.' (dot).- Parameters:
datasetName- A string of up to 128 characters. Allowed characters are a-z, A-Z, 0-9, '_' (underscore), '-' (dash), and '.' (dot).
-
getDatasetName
public String getDatasetName()
A string of up to 128 characters. Allowed characters are a-z, A-Z, 0-9, '_' (underscore), '-' (dash), and '.' (dot).- Returns:
- A string of up to 128 characters. Allowed characters are a-z, A-Z, 0-9, '_' (underscore), '-' (dash), and '.' (dot).
-
withDatasetName
public Dataset withDatasetName(String datasetName)
A string of up to 128 characters. Allowed characters are a-z, A-Z, 0-9, '_' (underscore), '-' (dash), and '.' (dot).- Parameters:
datasetName- A string of up to 128 characters. Allowed characters are a-z, A-Z, 0-9, '_' (underscore), '-' (dash), and '.' (dot).- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setCreationDate
public void setCreationDate(Date creationDate)
Date on which the dataset was created.- Parameters:
creationDate- Date on which the dataset was created.
-
getCreationDate
public Date getCreationDate()
Date on which the dataset was created.- Returns:
- Date on which the dataset was created.
-
withCreationDate
public Dataset withCreationDate(Date creationDate)
Date on which the dataset was created.- Parameters:
creationDate- Date on which the dataset was created.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setLastModifiedDate
public void setLastModifiedDate(Date lastModifiedDate)
Date when the dataset was last modified.- Parameters:
lastModifiedDate- Date when the dataset was last modified.
-
getLastModifiedDate
public Date getLastModifiedDate()
Date when the dataset was last modified.- Returns:
- Date when the dataset was last modified.
-
withLastModifiedDate
public Dataset withLastModifiedDate(Date lastModifiedDate)
Date when the dataset was last modified.- Parameters:
lastModifiedDate- Date when the dataset was last modified.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setLastModifiedBy
public void setLastModifiedBy(String lastModifiedBy)
The device that made the last change to this dataset.- Parameters:
lastModifiedBy- The device that made the last change to this dataset.
-
getLastModifiedBy
public String getLastModifiedBy()
The device that made the last change to this dataset.- Returns:
- The device that made the last change to this dataset.
-
withLastModifiedBy
public Dataset withLastModifiedBy(String lastModifiedBy)
The device that made the last change to this dataset.- Parameters:
lastModifiedBy- The device that made the last change to this dataset.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setDataStorage
public void setDataStorage(Long dataStorage)
Total size in bytes of the records in this dataset.- Parameters:
dataStorage- Total size in bytes of the records in this dataset.
-
getDataStorage
public Long getDataStorage()
Total size in bytes of the records in this dataset.- Returns:
- Total size in bytes of the records in this dataset.
-
withDataStorage
public Dataset withDataStorage(Long dataStorage)
Total size in bytes of the records in this dataset.- Parameters:
dataStorage- Total size in bytes of the records in this dataset.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setNumRecords
public void setNumRecords(Long numRecords)
Number of records in this dataset.- Parameters:
numRecords- Number of records in this dataset.
-
getNumRecords
public Long getNumRecords()
Number of records in this dataset.- Returns:
- Number of records in this dataset.
-
withNumRecords
public Dataset withNumRecords(Long numRecords)
Number of records in this dataset.- Parameters:
numRecords- Number of records in this dataset.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
toString
public String toString()
Returns a string representation of this object; useful for testing and debugging.- Overrides:
toStringin classObject- Returns:
- A string representation of this object.
- See Also:
Object.toString()
-
-