Class ContentResponseModelBase<TValueResponseModelBase, TVariantResponseModel>
Serves as the base class for content response models in the Umbraco CMS API, using generic parameters to specify the value and variant response model types.
Namespace: Umbraco.Cms.Api.Management.ViewModels.Content
Assembly: Umbraco.Cms.Api.Management.dll
Syntax
public abstract class ContentResponseModelBase<TValueResponseModelBase, TVariantResponseModel> : ContentModelBase<TValueResponseModelBase, TVariantResponseModel>, IHasFlags where TValueResponseModelBase : ValueModelBase where TVariantResponseModel : VariantResponseModelBase
Type Parameters
| Name | Description |
|---|---|
| TValueResponseModelBase | |
| TVariantResponseModel |
Constructors
View SourceContentResponseModelBase()
Declaration
protected ContentResponseModelBase()
Properties
View SourceFlags
Gets or sets the collection of flags associated with the content response.
Declaration
public IEnumerable<FlagModel> Flags { get; set; }
Property Value
| Type | Description |
|---|---|
| IEnumerable<FlagModel> |
Id
Gets or sets the unique identifier of the content.
Declaration
public Guid Id { get; set; }
Property Value
| Type | Description |
|---|---|
| Guid |
Methods
View SourceAddFlag(string)
Adds a flag with the specified alias to the content response model.
Declaration
public void AddFlag(string alias)
Parameters
| Type | Name | Description |
|---|---|---|
| string | alias | The alias of the flag to add. |
RemoveFlag(string)
Removes a flag with the specified alias from the content response model.
Declaration
public void RemoveFlag(string alias)
Parameters
| Type | Name | Description |
|---|---|---|
| string | alias | The alias of the flag to remove. |