Search Results for

    Show / Hide Table of Contents

    Class ContentMetadataUpdateRequest

    Request to update content metadata

    Inheritance
    object
    ContentMetadataUpdateRequest
    ContentMetadataUpdateItem
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: System.Dynamic.ExpandoObject
    Syntax
    [GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.0.0))")]
    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
    [JsonProperty("content", Required = Required.Default, NullValueHandling = NullValueHandling.Ignore)]
    public object Content { get; set; }
    Property Value
    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
    [JsonProperty("contentFieldsUpdateOptions", Required = Required.Always)]
    [Required(AllowEmptyStrings = true)]
    [JsonConverter(typeof(StringEnumConverter))]
    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
    [JsonProperty("layerFieldsUpdateOptions", Required = Required.Always)]
    [Required(AllowEmptyStrings = true)]
    [JsonConverter(typeof(StringEnumConverter))]
    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
    [JsonProperty("layerSchemaIds", Required = Required.Default, NullValueHandling = NullValueHandling.Ignore)]
    public ICollection<string> LayerSchemaIds { get; set; }
    Property Value
    ICollection<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
    [JsonProperty("layerSchemasUpdateOptions", Required = Required.Always)]
    [Required(AllowEmptyStrings = true)]
    [JsonConverter(typeof(StringEnumConverter))]
    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
    [JsonProperty("metadata", Required = Required.Default, NullValueHandling = NullValueHandling.Ignore)]
    public IDictionary<string, object> Metadata { get; set; }
    Property Value
    IDictionary<string, object>

    Methods

    FromJson(string)

    Declaration
    public static ContentMetadataUpdateRequest FromJson(string data)
    Parameters
    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
    string

    Back to top Generated by DocFX