Package com.contentful.java.cma.model
Class CMAAsset
- java.lang.Object
-
- com.contentful.java.cma.model.CMAResource
-
- com.contentful.java.cma.model.CMAAsset
-
public class CMAAsset extends CMAResource
Represents a resource of type Asset.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCMAAsset.FieldsCollect all fields of an asset.
-
Field Summary
Fields Modifier and Type Field Description CMAMetadatametadata
-
Constructor Summary
Constructors Constructor Description CMAAsset()Create a new asset, setting the system's type field.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CMAAsset.FieldsgetFields()CMAMetadatagetMetadata()java.lang.IntegergetVersion()Convenience for getting the version of this resource.CMAAssetsetEnvironmentId(java.lang.String environmentId)Convenience method for setting an environment id.CMAAssetsetFields(CMAAsset.Fields fields)Sets new fields for this Asset.CMAAssetsetId(java.lang.String id)Convenience: Update the id of this entry without going throughCMAResource.getSystem().CMAAssetsetMetadata(CMAMetadata metadata)Sets the metadata for this asset.CMAAssetsetSpaceId(java.lang.String spaceId)Convenience: Update the space id of this entry without going throughCMAResource.getSystem().CMAAssetsetSystem(CMASystem system)Sets the system field.CMAAssetsetVersion(java.lang.Integer version)Convenience: Update the version of this entry without going throughCMAResource.getSystem().java.lang.StringtoString()-
Methods inherited from class com.contentful.java.cma.model.CMAResource
getEnvironmentId, getId, getSpaceId, getSystem, getVisibility, isArchived, isPublished, setVisibility
-
-
-
-
Field Detail
-
metadata
public CMAMetadata metadata
-
-
Method Detail
-
getFields
public CMAAsset.Fields getFields()
- Returns:
- fields for this asset.
-
setFields
public CMAAsset setFields(CMAAsset.Fields fields)
Sets new fields for this Asset.- Parameters:
fields- fields to overwrite the current set of fields.- Returns:
- this
CMAAssetinstance
-
setSystem
public CMAAsset setSystem(CMASystem system)
Sets the system field.- Overrides:
setSystemin classCMAResource- Parameters:
system- sets the system property.- Returns:
- this instance for chaining.
-
getMetadata
public CMAMetadata getMetadata()
-
setMetadata
public CMAAsset setMetadata(CMAMetadata metadata)
Sets the metadata for this asset.- Parameters:
metadata- TheCMAMetadatainstance to associate with this asset.- Returns:
- This
CMAAssetinstance for method chaining.
-
setId
public CMAAsset setId(java.lang.String id)
Convenience: Update the id of this entry without going throughCMAResource.getSystem().- Overrides:
setIdin classCMAResource- Parameters:
id- to be set.- Returns:
- the calling instance for chaining.
-
getVersion
public java.lang.Integer getVersion()
Convenience for getting the version of this resource.- Overrides:
getVersionin classCMAResource- Returns:
- the calling instance for chaining.
-
setVersion
public CMAAsset setVersion(java.lang.Integer version)
Convenience: Update the version of this entry without going throughCMAResource.getSystem().- Overrides:
setVersionin classCMAResource- Parameters:
version- to be set.- Returns:
- the calling instance for chaining.
-
setSpaceId
public CMAAsset setSpaceId(java.lang.String spaceId)
Convenience: Update the space id of this entry without going throughCMAResource.getSystem().- Overrides:
setSpaceIdin classCMAResource- Parameters:
spaceId- to be set.- Returns:
- the calling instance for chaining.
-
setEnvironmentId
public CMAAsset setEnvironmentId(java.lang.String environmentId)
Convenience method for setting an environment id.- Overrides:
setEnvironmentIdin classCMAResource- Parameters:
environmentId- the id to be set.- Returns:
- the calling
CMAResourcefor chaining.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classCMAResource- Returns:
- a human readable string, representing the object.
-
-