public class CMAAsset extends CMAResource
| Modifier and Type | Class and Description |
|---|---|
static class |
CMAAsset.Fields
Collect all fields of an asset.
|
| Modifier and Type | Field and Description |
|---|---|
CMAMetadata |
metadata |
| Constructor and Description |
|---|
CMAAsset()
Create a new asset, setting the system's type field.
|
| Modifier and Type | Method and Description |
|---|---|
CMAAsset.Fields |
getFields() |
CMAMetadata |
getMetadata() |
Integer |
getVersion()
Convenience for getting the version of this resource.
|
CMAAsset |
setEnvironmentId(String environmentId)
Convenience method for setting an environment id.
|
CMAAsset |
setFields(CMAAsset.Fields fields)
Sets new fields for this Asset.
|
CMAAsset |
setId(String id)
Convenience: Update the id of this entry without going through
CMAResource.getSystem(). |
CMAAsset |
setMetadata(CMAMetadata metadata)
Sets the metadata for this asset.
|
CMAAsset |
setSpaceId(String spaceId)
Convenience: Update the space id of this entry without going through
CMAResource.getSystem(). |
CMAAsset |
setSystem(CMASystem system)
Sets the system field.
|
CMAAsset |
setVersion(Integer version)
Convenience: Update the version of this entry without going through
CMAResource.getSystem(). |
String |
toString() |
getEnvironmentId, getId, getSpaceId, getSystem, getVisibility, isArchived, isPublished, setVisibilitypublic CMAMetadata metadata
public CMAAsset.Fields getFields()
public CMAAsset setFields(CMAAsset.Fields fields)
fields - fields to overwrite the current set of fields.CMAAsset instancepublic CMAAsset setSystem(CMASystem system)
setSystem in class CMAResourcesystem - sets the system property.public CMAMetadata getMetadata()
public CMAAsset setMetadata(CMAMetadata metadata)
metadata - The CMAMetadata instance to associate with this asset.CMAAsset instance for method chaining.public CMAAsset setId(String id)
CMAResource.getSystem().setId in class CMAResourceid - to be set.public Integer getVersion()
getVersion in class CMAResourcepublic CMAAsset setVersion(Integer version)
CMAResource.getSystem().setVersion in class CMAResourceversion - to be set.public CMAAsset setSpaceId(String spaceId)
CMAResource.getSystem().setSpaceId in class CMAResourcespaceId - to be set.public CMAAsset setEnvironmentId(String environmentId)
setEnvironmentId in class CMAResourceenvironmentId - the id to be set.CMAResource for chaining.public String toString()
toString in class CMAResourceCopyright © 2026 Contentful, GmbH.. All rights reserved.