Class ContentType

java.lang.Object
com.microsoft.graph.models.Entity
com.microsoft.graph.models.ContentType
All Implemented Interfaces:
com.microsoft.kiota.serialization.AdditionalDataHolder, com.microsoft.kiota.serialization.Parsable, com.microsoft.kiota.store.BackedModel

@Generated("com.microsoft.kiota") public class ContentType extends Entity implements com.microsoft.kiota.serialization.Parsable
  • Constructor Details

    • ContentType

      public ContentType()
      Instantiates a new ContentType and sets the default values.
  • Method Details

    • createFromDiscriminatorValue

      @Nonnull public static ContentType createFromDiscriminatorValue(@Nonnull com.microsoft.kiota.serialization.ParseNode parseNode)
      Creates a new instance of the appropriate class based on discriminator value
      Parameters:
      parseNode - The parse node to use to read the discriminator value and create the object
      Returns:
      a ContentType
    • getAssociatedHubsUrls

      @Nullable public List<String> getAssociatedHubsUrls()
      Gets the associatedHubsUrls property value. List of canonical URLs for hub sites with which this content type is associated to. This will contain all hub sites where this content type is queued to be enforced or is already enforced. Enforcing a content type means that the content type is applied to the lists in the enforced sites.
      Returns:
      a List<String>
    • getBase

      @Nullable public ContentType getBase()
      Gets the base property value. Parent contentType from which this content type is derived.
      Returns:
      a ContentType
    • getBaseTypes

      @Nullable public List<ContentType> getBaseTypes()
      Gets the baseTypes property value. The collection of content types that are ancestors of this content type.
      Returns:
      a List<ContentType>
    • getColumnLinks

      @Nullable public List<ColumnLink> getColumnLinks()
      Gets the columnLinks property value. The collection of columns that are required by this content type.
      Returns:
      a List<ColumnLink>
    • getColumnPositions

      @Nullable public List<ColumnDefinition> getColumnPositions()
      Gets the columnPositions property value. Column order information in a content type.
      Returns:
      a List<ColumnDefinition>
    • getColumns

      @Nullable public List<ColumnDefinition> getColumns()
      Gets the columns property value. The collection of column definitions for this content type.
      Returns:
      a List<ColumnDefinition>
    • getDescription

      @Nullable public String getDescription()
      Gets the description property value. The descriptive text for the item.
      Returns:
      a String
    • getDocumentSet

      @Nullable public DocumentSet getDocumentSet()
      Gets the documentSet property value. Document Set metadata.
      Returns:
      a DocumentSet
    • getDocumentTemplate

      @Nullable public DocumentSetContent getDocumentTemplate()
      Gets the documentTemplate property value. Document template metadata. To make sure that documents have consistent content across a site and its subsites, you can associate a Word, Excel, or PowerPoint template with a site content type.
      Returns:
      a DocumentSetContent
    • getFieldDeserializers

      @Nonnull public Map<String,Consumer<com.microsoft.kiota.serialization.ParseNode>> getFieldDeserializers()
      The deserialization information for the current model
      Specified by:
      getFieldDeserializers in interface com.microsoft.kiota.serialization.Parsable
      Overrides:
      getFieldDeserializers in class Entity
      Returns:
      a Map<String,Consumer<com.microsoft.kiota.serialization.ParseNode>>
    • getGroup

      @Nullable public String getGroup()
      Gets the group property value. The name of the group this content type belongs to. Helps organize related content types.
      Returns:
      a String
    • getHidden

      @Nullable public Boolean getHidden()
      Gets the hidden property value. Indicates whether the content type is hidden in the list's 'New' menu.
      Returns:
      a Boolean
    • getInheritedFrom

      @Nullable public ItemReference getInheritedFrom()
      Gets the inheritedFrom property value. If this content type is inherited from another scope (like a site), provides a reference to the item where the content type is defined.
      Returns:
      a ItemReference
    • getIsBuiltIn

      @Nullable public Boolean getIsBuiltIn()
      Gets the isBuiltIn property value. Specifies if a content type is a built-in content type.
      Returns:
      a Boolean
    • getName

      @Nullable public String getName()
      Gets the name property value. The name of the content type.
      Returns:
      a String
    • getOrder

      @Nullable public ContentTypeOrder getOrder()
      Gets the order property value. Specifies the order in which the content type appears in the selection UI.
      Returns:
      a ContentTypeOrder
    • getParentId

      @Nullable public String getParentId()
      Gets the parentId property value. The unique identifier of the content type.
      Returns:
      a String
    • getPropagateChanges

      @Nullable public Boolean getPropagateChanges()
      Gets the propagateChanges property value. If true, any changes made to the content type are pushed to inherited content types and lists that implement the content type.
      Returns:
      a Boolean
    • getReadOnly

      @Nullable public Boolean getReadOnly()
      Gets the readOnly property value. If true, the content type can't be modified unless this value is first set to false.
      Returns:
      a Boolean
    • getSealed

      @Nullable public Boolean getSealed()
      Gets the sealed property value. If true, the content type can't be modified by users or through push-down operations. Only site collection administrators can seal or unseal content types.
      Returns:
      a Boolean
    • serialize

      public void serialize(@Nonnull com.microsoft.kiota.serialization.SerializationWriter writer)
      Serializes information the current object
      Specified by:
      serialize in interface com.microsoft.kiota.serialization.Parsable
      Overrides:
      serialize in class Entity
      Parameters:
      writer - Serialization writer to use to serialize this model
    • setAssociatedHubsUrls

      public void setAssociatedHubsUrls(@Nullable List<String> value)
      Sets the associatedHubsUrls property value. List of canonical URLs for hub sites with which this content type is associated to. This will contain all hub sites where this content type is queued to be enforced or is already enforced. Enforcing a content type means that the content type is applied to the lists in the enforced sites.
      Parameters:
      value - Value to set for the associatedHubsUrls property.
    • setBase

      public void setBase(@Nullable ContentType value)
      Sets the base property value. Parent contentType from which this content type is derived.
      Parameters:
      value - Value to set for the base property.
    • setBaseTypes

      public void setBaseTypes(@Nullable List<ContentType> value)
      Sets the baseTypes property value. The collection of content types that are ancestors of this content type.
      Parameters:
      value - Value to set for the baseTypes property.
    • setColumnLinks

      public void setColumnLinks(@Nullable List<ColumnLink> value)
      Sets the columnLinks property value. The collection of columns that are required by this content type.
      Parameters:
      value - Value to set for the columnLinks property.
    • setColumnPositions

      public void setColumnPositions(@Nullable List<ColumnDefinition> value)
      Sets the columnPositions property value. Column order information in a content type.
      Parameters:
      value - Value to set for the columnPositions property.
    • setColumns

      public void setColumns(@Nullable List<ColumnDefinition> value)
      Sets the columns property value. The collection of column definitions for this content type.
      Parameters:
      value - Value to set for the columns property.
    • setDescription

      public void setDescription(@Nullable String value)
      Sets the description property value. The descriptive text for the item.
      Parameters:
      value - Value to set for the description property.
    • setDocumentSet

      public void setDocumentSet(@Nullable DocumentSet value)
      Sets the documentSet property value. Document Set metadata.
      Parameters:
      value - Value to set for the documentSet property.
    • setDocumentTemplate

      public void setDocumentTemplate(@Nullable DocumentSetContent value)
      Sets the documentTemplate property value. Document template metadata. To make sure that documents have consistent content across a site and its subsites, you can associate a Word, Excel, or PowerPoint template with a site content type.
      Parameters:
      value - Value to set for the documentTemplate property.
    • setGroup

      public void setGroup(@Nullable String value)
      Sets the group property value. The name of the group this content type belongs to. Helps organize related content types.
      Parameters:
      value - Value to set for the group property.
    • setHidden

      public void setHidden(@Nullable Boolean value)
      Sets the hidden property value. Indicates whether the content type is hidden in the list's 'New' menu.
      Parameters:
      value - Value to set for the hidden property.
    • setInheritedFrom

      public void setInheritedFrom(@Nullable ItemReference value)
      Sets the inheritedFrom property value. If this content type is inherited from another scope (like a site), provides a reference to the item where the content type is defined.
      Parameters:
      value - Value to set for the inheritedFrom property.
    • setIsBuiltIn

      public void setIsBuiltIn(@Nullable Boolean value)
      Sets the isBuiltIn property value. Specifies if a content type is a built-in content type.
      Parameters:
      value - Value to set for the isBuiltIn property.
    • setName

      public void setName(@Nullable String value)
      Sets the name property value. The name of the content type.
      Parameters:
      value - Value to set for the name property.
    • setOrder

      public void setOrder(@Nullable ContentTypeOrder value)
      Sets the order property value. Specifies the order in which the content type appears in the selection UI.
      Parameters:
      value - Value to set for the order property.
    • setParentId

      public void setParentId(@Nullable String value)
      Sets the parentId property value. The unique identifier of the content type.
      Parameters:
      value - Value to set for the parentId property.
    • setPropagateChanges

      public void setPropagateChanges(@Nullable Boolean value)
      Sets the propagateChanges property value. If true, any changes made to the content type are pushed to inherited content types and lists that implement the content type.
      Parameters:
      value - Value to set for the propagateChanges property.
    • setReadOnly

      public void setReadOnly(@Nullable Boolean value)
      Sets the readOnly property value. If true, the content type can't be modified unless this value is first set to false.
      Parameters:
      value - Value to set for the readOnly property.
    • setSealed

      public void setSealed(@Nullable Boolean value)
      Sets the sealed property value. If true, the content type can't be modified by users or through push-down operations. Only site collection administrators can seal or unseal content types.
      Parameters:
      value - Value to set for the sealed property.