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 Dataset
clone()
boolean
equals(Object obj)
Date
getCreationDate()
Date on which the dataset was created.String
getDatasetName()
A string of up to 128 characters.Long
getDataStorage()
Total size in bytes of the records in this dataset.String
getIdentityId()
A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito.String
getLastModifiedBy()
The device that made the last change to this dataset.Date
getLastModifiedDate()
Date when the dataset was last modified.Long
getNumRecords()
Number of records in this dataset.int
hashCode()
void
setCreationDate(Date creationDate)
Date on which the dataset was created.void
setDatasetName(String datasetName)
A string of up to 128 characters.void
setDataStorage(Long dataStorage)
Total size in bytes of the records in this dataset.void
setIdentityId(String identityId)
A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito.void
setLastModifiedBy(String lastModifiedBy)
The device that made the last change to this dataset.void
setLastModifiedDate(Date lastModifiedDate)
Date when the dataset was last modified.void
setNumRecords(Long numRecords)
Number of records in this dataset.String
toString()
Returns a string representation of this object; useful for testing and debugging.Dataset
withCreationDate(Date creationDate)
Date on which the dataset was created.Dataset
withDatasetName(String datasetName)
A string of up to 128 characters.Dataset
withDataStorage(Long dataStorage)
Total size in bytes of the records in this dataset.Dataset
withIdentityId(String identityId)
A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito.Dataset
withLastModifiedBy(String lastModifiedBy)
The device that made the last change to this dataset.Dataset
withLastModifiedDate(Date lastModifiedDate)
Date when the dataset was last modified.Dataset
withNumRecords(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:
toString
in classObject
- Returns:
- A string representation of this object.
- See Also:
Object.toString()
-
-