Class ContentMetadataUpdateRequest
Request to update content metadata
Inheritance
Inherited Members
Namespace: System.Dynamic.ExpandoObject
Syntax
public class ContentMetadataUpdateRequest
Properties
Content
The content data of the content. It's an object of dynamic metadata whose structure is defined in the Content schema identified by
the ContentSchemaId property. Updating the Content property is only possible for virtual items (contents
whose ContentType is Virtual).
Update of content data will be done only if this attribute has any data, i.e. if it's not null or empty.
Declaration
public object Content { get; set; }
Property Value
System.Object
|
ContentFieldsUpdateOptions
Options to modify the behavior for updating the content.
Merge: the values specified in the Content object are merged to the existing content.
Replace: the values specified in the Content object entirely replace the content.
Defaults to Merge.
Declaration
public UpdateOption ContentFieldsUpdateOptions { get; set; }
Property Value
UpdateOption
|
LayerFieldsUpdateOptions
Options to modify the behavior for updating the values of schemas.
Merge: the values specified in the Metadata dictionary are merged to the existing values of the corresponding schema on the content.
Replace: the values specified in the Metadata dictionary entirely replace any existing value of the corresponding schema on the content.
Defaults to Merge.
Declaration
public UpdateOption LayerFieldsUpdateOptions { get; set; }
Property Value
UpdateOption
|
LayerSchemaIds
An optional list of IDs of the schemas that should be updated/replaced based on the options below and Metadata provided.
The SchemaType of the specified schemas must be Layer.
Declaration
public ICollection<string> LayerSchemaIds { get; set; }
Property Value
System.Collections.Generic.ICollection<System.String>
|
LayerSchemasUpdateOptions
Options to modify the behavior for updating the layers.
Merge: the content is updated so that the assigned layers to the content will be a merge of the ones specified in the LayerSchemaIds property
and the ones already existing; existing assigned layers not specified in the property are kept and missing layers are assigned.
Replace: the content is updated so that only the layers specified in the LayerSchemaIds property are assigned to the content;
existing assigned layers not specified in the property are removed and missing layers are assigned.
Defaults to Merge.
Declaration
public UpdateOption LayerSchemasUpdateOptions { get; set; }
Property Value
UpdateOption
|
Metadata
The dynamic data structure matching the field schematics of the schemas with type layer (LayerSchemaIds).
The metadata belonging to the layers of the content. It's a dictionary of dynamic metadata whose structure is defined in the Layer schemas identified
by the LayerSchemaIds property.
If there are no data for a specified LayerSchemaId, it is treated as empty.
Declaration
public IDictionary<string, object> Metadata { get; set; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
|
Methods
FromJson(String)
Declaration
public static ContentMetadataUpdateRequest FromJson(string data)
Parameters
System.String
data
|
Returns
ContentMetadataUpdateRequest
|
LayerMergeUpdate<T, TProperty>(Expression<Func<T, TProperty>>, TProperty)
Creates a new ContentMetadataUpdateRequest to update one property (field) in one layer on a content.
Declaration
public static ContentMetadataUpdateRequest LayerMergeUpdate<T, TProperty>(Expression<Func<T, TProperty>> property, TProperty newValue)
Parameters
Expression<Func<T, TProperty>>
property
The property on the object (schema field) you want to update |
TProperty
newValue
New value you want to update the schema field to |
Returns
ContentMetadataUpdateRequest
Update request to update the field |
Type Parameters
T
Layer type |
TProperty
Property type |
Remarks
Layer name (schema ID) will be determined by schema ID defined in PictureparkSchemaAttribute on the layer class (if applied) or the name of the type. Anonymous classes are naturally not supported.
ToJson()
Declaration
public string ToJson()
Returns
System.String
|