Class: MicrosoftGraph::Models::ContentType

Inherits:
Entity
  • Object
show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/content_type.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Entity

#additional_data, #additional_data=, #id, #id=, #odata_type, #odata_type=

Constructor Details

#initializeObject

Instantiates a new contentType and sets the default values.



160
161
162
# File 'lib/models/content_type.rb', line 160

def initialize()
    super
end

Class Method Details

.create_from_discriminator_value(parse_node) ⇒ Object

Creates a new instance of the appropriate class based on discriminator value

Parameters:

  • parse_node

    The parse node to use to read the discriminator value and create the object

Returns:

  • a content_type

Raises:

  • (StandardError)


168
169
170
171
# File 'lib/models/content_type.rb', line 168

def self.create_from_discriminator_value(parse_node)
    raise StandardError, 'parse_node cannot be null' if parse_node.nil?
    return ContentType.new
end

Instance Method Details

#associated_hubs_urlsObject

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 will be applied to the lists in the enforced sites.

Returns:

  • a string



70
71
72
# File 'lib/models/content_type.rb', line 70

def associated_hubs_urls
    return @associated_hubs_urls
end

#associated_hubs_urls=(value) ⇒ Object

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 will be applied to the lists in the enforced sites.

Parameters:

  • value

    Value to set for the associatedHubsUrls property.

Returns:

  • a void



78
79
80
# File 'lib/models/content_type.rb', line 78

def associated_hubs_urls=(value)
    @associated_hubs_urls = value
end

#baseObject

Gets the base property value. Parent contentType from which this content type is derived.

Returns:

  • a content_type



85
86
87
# File 'lib/models/content_type.rb', line 85

def base
    return @base
end

#base=(value) ⇒ Object

Sets the base property value. Parent contentType from which this content type is derived.

Parameters:

  • value

    Value to set for the base property.

Returns:

  • a void



93
94
95
# File 'lib/models/content_type.rb', line 93

def base=(value)
    @base = value
end

#base_typesObject

Gets the baseTypes property value. The collection of content types that are ancestors of this content type.

Returns:

  • a content_type



100
101
102
# File 'lib/models/content_type.rb', line 100

def base_types
    return @base_types
end

#base_types=(value) ⇒ Object

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.

Returns:

  • a void



108
109
110
# File 'lib/models/content_type.rb', line 108

def base_types=(value)
    @base_types = value
end

Gets the columnLinks property value. The collection of columns that are required by this content type.

Returns:

  • a column_link



115
116
117
# File 'lib/models/content_type.rb', line 115

def column_links
    return @column_links
end

#column_links=(value) ⇒ Object

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.

Returns:

  • a void



123
124
125
# File 'lib/models/content_type.rb', line 123

def column_links=(value)
    @column_links = value
end

#column_positionsObject

Gets the columnPositions property value. Column order information in a content type.

Returns:

  • a column_definition



130
131
132
# File 'lib/models/content_type.rb', line 130

def column_positions
    return @column_positions
end

#column_positions=(value) ⇒ Object

Sets the columnPositions property value. Column order information in a content type.

Parameters:

  • value

    Value to set for the columnPositions property.

Returns:

  • a void



138
139
140
# File 'lib/models/content_type.rb', line 138

def column_positions=(value)
    @column_positions = value
end

#columnsObject

Gets the columns property value. The collection of column definitions for this contentType.

Returns:

  • a column_definition



145
146
147
# File 'lib/models/content_type.rb', line 145

def columns
    return @columns
end

#columns=(value) ⇒ Object

Sets the columns property value. The collection of column definitions for this contentType.

Parameters:

  • value

    Value to set for the columns property.

Returns:

  • a void



153
154
155
# File 'lib/models/content_type.rb', line 153

def columns=(value)
    @columns = value
end

#descriptionObject

Gets the description property value. The descriptive text for the item.

Returns:

  • a string



176
177
178
# File 'lib/models/content_type.rb', line 176

def description
    return @description
end

#description=(value) ⇒ Object

Sets the description property value. The descriptive text for the item.

Parameters:

  • value

    Value to set for the description property.

Returns:

  • a void



184
185
186
# File 'lib/models/content_type.rb', line 184

def description=(value)
    @description = value
end

#document_setObject

Gets the documentSet property value. Document Set metadata.

Returns:

  • a document_set



191
192
193
# File 'lib/models/content_type.rb', line 191

def document_set
    return @document_set
end

#document_set=(value) ⇒ Object

Sets the documentSet property value. Document Set metadata.

Parameters:

  • value

    Value to set for the documentSet property.

Returns:

  • a void



199
200
201
# File 'lib/models/content_type.rb', line 199

def document_set=(value)
    @document_set = value
end

#document_templateObject

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 document_set_content



206
207
208
# File 'lib/models/content_type.rb', line 206

def document_template
    return @document_template
end

#document_template=(value) ⇒ Object

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.

Returns:

  • a void



214
215
216
# File 'lib/models/content_type.rb', line 214

def document_template=(value)
    @document_template = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
# File 'lib/models/content_type.rb', line 221

def get_field_deserializers()
    return super.merge({
        "associatedHubsUrls" => lambda {|n| @associated_hubs_urls = n.get_collection_of_primitive_values(String) },
        "base" => lambda {|n| @base = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::ContentType.create_from_discriminator_value(pn) }) },
        "baseTypes" => lambda {|n| @base_types = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::ContentType.create_from_discriminator_value(pn) }) },
        "columnLinks" => lambda {|n| @column_links = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::ColumnLink.create_from_discriminator_value(pn) }) },
        "columnPositions" => lambda {|n| @column_positions = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::ColumnDefinition.create_from_discriminator_value(pn) }) },
        "columns" => lambda {|n| @columns = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::ColumnDefinition.create_from_discriminator_value(pn) }) },
        "description" => lambda {|n| @description = n.get_string_value() },
        "documentSet" => lambda {|n| @document_set = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::DocumentSet.create_from_discriminator_value(pn) }) },
        "documentTemplate" => lambda {|n| @document_template = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::DocumentSetContent.create_from_discriminator_value(pn) }) },
        "group" => lambda {|n| @group = n.get_string_value() },
        "hidden" => lambda {|n| @hidden = n.get_boolean_value() },
        "inheritedFrom" => lambda {|n| @inherited_from = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::ItemReference.create_from_discriminator_value(pn) }) },
        "isBuiltIn" => lambda {|n| @is_built_in = n.get_boolean_value() },
        "name" => lambda {|n| @name = n.get_string_value() },
        "order" => lambda {|n| @order = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::ContentTypeOrder.create_from_discriminator_value(pn) }) },
        "parentId" => lambda {|n| @parent_id = n.get_string_value() },
        "propagateChanges" => lambda {|n| @propagate_changes = n.get_boolean_value() },
        "readOnly" => lambda {|n| @read_only = n.get_boolean_value() },
        "sealed" => lambda {|n| @sealed = n.get_boolean_value() },
    })
end

#groupObject

Gets the group property value. The name of the group this content type belongs to. Helps organize related content types.

Returns:

  • a string



248
249
250
# File 'lib/models/content_type.rb', line 248

def group
    return @group
end

#group=(value) ⇒ Object

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.

Returns:

  • a void



256
257
258
# File 'lib/models/content_type.rb', line 256

def group=(value)
    @group = value
end

#hiddenObject

Gets the hidden property value. Indicates whether the content type is hidden in the list’s ‘New’ menu.

Returns:

  • a boolean



263
264
265
# File 'lib/models/content_type.rb', line 263

def hidden
    return @hidden
end

#hidden=(value) ⇒ Object

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.

Returns:

  • a void



271
272
273
# File 'lib/models/content_type.rb', line 271

def hidden=(value)
    @hidden = value
end

#inherited_fromObject

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 item_reference



278
279
280
# File 'lib/models/content_type.rb', line 278

def inherited_from
    return @inherited_from
end

#inherited_from=(value) ⇒ Object

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.

Returns:

  • a void



286
287
288
# File 'lib/models/content_type.rb', line 286

def inherited_from=(value)
    @inherited_from = value
end

#is_built_inObject

Gets the isBuiltIn property value. Specifies if a content type is a built-in content type.

Returns:

  • a boolean



293
294
295
# File 'lib/models/content_type.rb', line 293

def is_built_in
    return @is_built_in
end

#is_built_in=(value) ⇒ Object

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.

Returns:

  • a void



301
302
303
# File 'lib/models/content_type.rb', line 301

def is_built_in=(value)
    @is_built_in = value
end

#nameObject

Gets the name property value. The name of the content type.

Returns:

  • a string



308
309
310
# File 'lib/models/content_type.rb', line 308

def name
    return @name
end

#name=(value) ⇒ Object

Sets the name property value. The name of the content type.

Parameters:

  • value

    Value to set for the name property.

Returns:

  • a void



316
317
318
# File 'lib/models/content_type.rb', line 316

def name=(value)
    @name = value
end

#orderObject

Gets the order property value. Specifies the order in which the content type appears in the selection UI.

Returns:

  • a content_type_order



323
324
325
# File 'lib/models/content_type.rb', line 323

def order
    return @order
end

#order=(value) ⇒ Object

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.

Returns:

  • a void



331
332
333
# File 'lib/models/content_type.rb', line 331

def order=(value)
    @order = value
end

#parent_idObject

Gets the parentId property value. The unique identifier of the content type.

Returns:

  • a string



338
339
340
# File 'lib/models/content_type.rb', line 338

def parent_id
    return @parent_id
end

#parent_id=(value) ⇒ Object

Sets the parentId property value. The unique identifier of the content type.

Parameters:

  • value

    Value to set for the parentId property.

Returns:

  • a void



346
347
348
# File 'lib/models/content_type.rb', line 346

def parent_id=(value)
    @parent_id = value
end

#propagate_changesObject

Gets the propagateChanges property value. If true, any changes made to the content type will be pushed to inherited content types and lists that implement the content type.

Returns:

  • a boolean



353
354
355
# File 'lib/models/content_type.rb', line 353

def propagate_changes
    return @propagate_changes
end

#propagate_changes=(value) ⇒ Object

Sets the propagateChanges property value. If true, any changes made to the content type will be pushed to inherited content types and lists that implement the content type.

Parameters:

  • value

    Value to set for the propagateChanges property.

Returns:

  • a void



361
362
363
# File 'lib/models/content_type.rb', line 361

def propagate_changes=(value)
    @propagate_changes = value
end

#read_onlyObject

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



368
369
370
# File 'lib/models/content_type.rb', line 368

def read_only
    return @read_only
end

#read_only=(value) ⇒ Object

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.

Returns:

  • a void



376
377
378
# File 'lib/models/content_type.rb', line 376

def read_only=(value)
    @read_only = value
end

#sealedObject

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



383
384
385
# File 'lib/models/content_type.rb', line 383

def sealed
    return @sealed
end

#sealed=(value) ⇒ Object

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.

Returns:

  • a void



391
392
393
# File 'lib/models/content_type.rb', line 391

def sealed=(value)
    @sealed = value
end

#serialize(writer) ⇒ Object

Serializes information the current object

Parameters:

  • writer

    Serialization writer to use to serialize this model

Returns:

  • a void

Raises:

  • (StandardError)


399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
# File 'lib/models/content_type.rb', line 399

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_collection_of_primitive_values("associatedHubsUrls", @associated_hubs_urls)
    writer.write_object_value("base", @base)
    writer.write_collection_of_object_values("baseTypes", @base_types)
    writer.write_collection_of_object_values("columnLinks", @column_links)
    writer.write_collection_of_object_values("columnPositions", @column_positions)
    writer.write_collection_of_object_values("columns", @columns)
    writer.write_string_value("description", @description)
    writer.write_object_value("documentSet", @document_set)
    writer.write_object_value("documentTemplate", @document_template)
    writer.write_string_value("group", @group)
    writer.write_boolean_value("hidden", @hidden)
    writer.write_object_value("inheritedFrom", @inherited_from)
    writer.write_boolean_value("isBuiltIn", @is_built_in)
    writer.write_string_value("name", @name)
    writer.write_object_value("order", @order)
    writer.write_string_value("parentId", @parent_id)
    writer.write_boolean_value("propagateChanges", @propagate_changes)
    writer.write_boolean_value("readOnly", @read_only)
    writer.write_boolean_value("sealed", @sealed)
end