Class: MicrosoftGraph::Models::Channel

Inherits:
Entity
  • Object
show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/channel.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 channel and sets the default values.



53
54
55
# File 'lib/models/channel.rb', line 53

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 channel

Raises:

  • (StandardError)


76
77
78
79
# File 'lib/models/channel.rb', line 76

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

Instance Method Details

#created_date_timeObject

Gets the createdDateTime property value. Read only. Timestamp at which the channel was created.

Returns:

  • a date_time



60
61
62
# File 'lib/models/channel.rb', line 60

def created_date_time
    return @created_date_time
end

#created_date_time=(value) ⇒ Object

Sets the createdDateTime property value. Read only. Timestamp at which the channel was created.

Parameters:

  • value

    Value to set for the createdDateTime property.

Returns:

  • a void



68
69
70
# File 'lib/models/channel.rb', line 68

def created_date_time=(value)
    @created_date_time = value
end

#descriptionObject

Gets the description property value. Optional textual description for the channel.

Returns:

  • a string



84
85
86
# File 'lib/models/channel.rb', line 84

def description
    return @description
end

#description=(value) ⇒ Object

Sets the description property value. Optional textual description for the channel.

Parameters:

  • value

    Value to set for the description property.

Returns:

  • a void



92
93
94
# File 'lib/models/channel.rb', line 92

def description=(value)
    @description = value
end

#display_nameObject

Gets the displayName property value. Channel name as it will appear to the user in Microsoft Teams. The maximum length is 50 characters.

Returns:

  • a string



99
100
101
# File 'lib/models/channel.rb', line 99

def display_name
    return @display_name
end

#display_name=(value) ⇒ Object

Sets the displayName property value. Channel name as it will appear to the user in Microsoft Teams. The maximum length is 50 characters.

Parameters:

  • value

    Value to set for the displayName property.

Returns:

  • a void



107
108
109
# File 'lib/models/channel.rb', line 107

def display_name=(value)
    @display_name = value
end

#emailObject

Gets the email property value. The email address for sending messages to the channel. Read-only.

Returns:

  • a string



114
115
116
# File 'lib/models/channel.rb', line 114

def email
    return @email
end

#email=(value) ⇒ Object

Sets the email property value. The email address for sending messages to the channel. Read-only.

Parameters:

  • value

    Value to set for the email property.

Returns:

  • a void



122
123
124
# File 'lib/models/channel.rb', line 122

def email=(value)
    @email = value
end

#files_folderObject

Gets the filesFolder property value. Metadata for the location where the channel’s files are stored.

Returns:

  • a drive_item



129
130
131
# File 'lib/models/channel.rb', line 129

def files_folder
    return @files_folder
end

#files_folder=(value) ⇒ Object

Sets the filesFolder property value. Metadata for the location where the channel’s files are stored.

Parameters:

  • value

    Value to set for the filesFolder property.

Returns:

  • a void



137
138
139
# File 'lib/models/channel.rb', line 137

def files_folder=(value)
    @files_folder = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
# File 'lib/models/channel.rb', line 144

def get_field_deserializers()
    return super.merge({
        "createdDateTime" => lambda {|n| @created_date_time = n.get_date_time_value() },
        "description" => lambda {|n| @description = n.get_string_value() },
        "displayName" => lambda {|n| @display_name = n.get_string_value() },
        "email" => lambda {|n| @email = n.get_string_value() },
        "filesFolder" => lambda {|n| @files_folder = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::DriveItem.create_from_discriminator_value(pn) }) },
        "isFavoriteByDefault" => lambda {|n| @is_favorite_by_default = n.get_boolean_value() },
        "members" => lambda {|n| @members = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::ConversationMember.create_from_discriminator_value(pn) }) },
        "membershipType" => lambda {|n| @membership_type = n.get_enum_value(MicrosoftGraph::Models::ChannelMembershipType) },
        "messages" => lambda {|n| @messages = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::ChatMessage.create_from_discriminator_value(pn) }) },
        "sharedWithTeams" => lambda {|n| @shared_with_teams = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::SharedWithChannelTeamInfo.create_from_discriminator_value(pn) }) },
        "tabs" => lambda {|n| @tabs = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::TeamsTab.create_from_discriminator_value(pn) }) },
        "tenantId" => lambda {|n| @tenant_id = n.get_string_value() },
        "webUrl" => lambda {|n| @web_url = n.get_string_value() },
    })
end

#is_favorite_by_defaultObject

Gets the isFavoriteByDefault property value. Indicates whether the channel should automatically be marked ‘favorite’ for all members of the team. Can only be set programmatically with Create team. Default: false.

Returns:

  • a boolean



165
166
167
# File 'lib/models/channel.rb', line 165

def is_favorite_by_default
    return @is_favorite_by_default
end

#is_favorite_by_default=(value) ⇒ Object

Sets the isFavoriteByDefault property value. Indicates whether the channel should automatically be marked ‘favorite’ for all members of the team. Can only be set programmatically with Create team. Default: false.

Parameters:

  • value

    Value to set for the isFavoriteByDefault property.

Returns:

  • a void



173
174
175
# File 'lib/models/channel.rb', line 173

def is_favorite_by_default=(value)
    @is_favorite_by_default = value
end

#membersObject

Gets the members property value. A collection of membership records associated with the channel.

Returns:

  • a conversation_member



180
181
182
# File 'lib/models/channel.rb', line 180

def members
    return @members
end

#members=(value) ⇒ Object

Sets the members property value. A collection of membership records associated with the channel.

Parameters:

  • value

    Value to set for the members property.

Returns:

  • a void



188
189
190
# File 'lib/models/channel.rb', line 188

def members=(value)
    @members = value
end

#membership_typeObject

Gets the membershipType property value. The type of the channel. Can be set during creation and can’t be changed. The possible values are: standard, private, unknownFutureValue, shared. The default value is standard. Note that you must use the Prefer: include-unknown-enum-members request header to get the following value in this evolvable enum: shared.

Returns:

  • a channel_membership_type



195
196
197
# File 'lib/models/channel.rb', line 195

def membership_type
    return @membership_type
end

#membership_type=(value) ⇒ Object

Sets the membershipType property value. The type of the channel. Can be set during creation and can’t be changed. The possible values are: standard, private, unknownFutureValue, shared. The default value is standard. Note that you must use the Prefer: include-unknown-enum-members request header to get the following value in this evolvable enum: shared.

Parameters:

  • value

    Value to set for the membershipType property.

Returns:

  • a void



203
204
205
# File 'lib/models/channel.rb', line 203

def membership_type=(value)
    @membership_type = value
end

#messagesObject

Gets the messages property value. A collection of all the messages in the channel. A navigation property. Nullable.

Returns:

  • a chat_message



210
211
212
# File 'lib/models/channel.rb', line 210

def messages
    return @messages
end

#messages=(value) ⇒ Object

Sets the messages property value. A collection of all the messages in the channel. A navigation property. Nullable.

Parameters:

  • value

    Value to set for the messages property.

Returns:

  • a void



218
219
220
# File 'lib/models/channel.rb', line 218

def messages=(value)
    @messages = 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)


226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
# File 'lib/models/channel.rb', line 226

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_date_time_value("createdDateTime", @created_date_time)
    writer.write_string_value("description", @description)
    writer.write_string_value("displayName", @display_name)
    writer.write_string_value("email", @email)
    writer.write_object_value("filesFolder", @files_folder)
    writer.write_boolean_value("isFavoriteByDefault", @is_favorite_by_default)
    writer.write_collection_of_object_values("members", @members)
    writer.write_enum_value("membershipType", @membership_type)
    writer.write_collection_of_object_values("messages", @messages)
    writer.write_collection_of_object_values("sharedWithTeams", @shared_with_teams)
    writer.write_collection_of_object_values("tabs", @tabs)
    writer.write_string_value("tenantId", @tenant_id)
    writer.write_string_value("webUrl", @web_url)
end

#shared_with_teamsObject

Gets the sharedWithTeams property value. A collection of teams with which a channel is shared.

Returns:

  • a shared_with_channel_team_info



247
248
249
# File 'lib/models/channel.rb', line 247

def shared_with_teams
    return @shared_with_teams
end

#shared_with_teams=(value) ⇒ Object

Sets the sharedWithTeams property value. A collection of teams with which a channel is shared.

Parameters:

  • value

    Value to set for the sharedWithTeams property.

Returns:

  • a void



255
256
257
# File 'lib/models/channel.rb', line 255

def shared_with_teams=(value)
    @shared_with_teams = value
end

#tabsObject

Gets the tabs property value. A collection of all the tabs in the channel. A navigation property.

Returns:

  • a teams_tab



262
263
264
# File 'lib/models/channel.rb', line 262

def tabs
    return @tabs
end

#tabs=(value) ⇒ Object

Sets the tabs property value. A collection of all the tabs in the channel. A navigation property.

Parameters:

  • value

    Value to set for the tabs property.

Returns:

  • a void



270
271
272
# File 'lib/models/channel.rb', line 270

def tabs=(value)
    @tabs = value
end

#tenant_idObject

Gets the tenantId property value. The ID of the Azure Active Directory tenant.

Returns:

  • a string



277
278
279
# File 'lib/models/channel.rb', line 277

def tenant_id
    return @tenant_id
end

#tenant_id=(value) ⇒ Object

Sets the tenantId property value. The ID of the Azure Active Directory tenant.

Parameters:

  • value

    Value to set for the tenantId property.

Returns:

  • a void



285
286
287
# File 'lib/models/channel.rb', line 285

def tenant_id=(value)
    @tenant_id = value
end

#web_urlObject

Gets the webUrl property value. A hyperlink that will go to the channel in Microsoft Teams. This is the URL that you get when you right-click a channel in Microsoft Teams and select Get link to channel. This URL should be treated as an opaque blob, and not parsed. Read-only.

Returns:

  • a string



292
293
294
# File 'lib/models/channel.rb', line 292

def web_url
    return @web_url
end

#web_url=(value) ⇒ Object

Sets the webUrl property value. A hyperlink that will go to the channel in Microsoft Teams. This is the URL that you get when you right-click a channel in Microsoft Teams and select Get link to channel. This URL should be treated as an opaque blob, and not parsed. Read-only.

Parameters:

  • value

    Value to set for the webUrl property.

Returns:

  • a void



300
301
302
# File 'lib/models/channel.rb', line 300

def web_url=(value)
    @web_url = value
end