Class: TeamBattlesSdk::Generated::Models::ApiUserConnection

Inherits:
Object
  • Object
show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/teambattles_sdk/generated/models/api_user_connection.rb

Overview

API-safe public account connection.

Defined Under Namespace

Classes: ApiUserConnectionConnectedAt, ApiUserConnectionUrl, ApiUserConnectionUsername

Class Method Summary collapse

Instance Method Summary collapse

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 api_user_connection

Raises:

  • (StandardError)


53
54
55
56
# File 'lib/teambattles_sdk/generated/models/api_user_connection.rb', line 53

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

Instance Method Details

#connected_atObject

Gets the connectedAt property value. The connectedAt property

Returns:

  • a api_user_connection_connected_at



37
38
39
# File 'lib/teambattles_sdk/generated/models/api_user_connection.rb', line 37

def connected_at
    return @connected_at
end

#connected_at=(value) ⇒ Object

Sets the connectedAt property value. The connectedAt property

Parameters:

  • value

    Value to set for the connectedAt property.

Returns:

  • a void



45
46
47
# File 'lib/teambattles_sdk/generated/models/api_user_connection.rb', line 45

def connected_at=(value)
    @connected_at = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



61
62
63
64
65
66
67
68
69
70
71
# File 'lib/teambattles_sdk/generated/models/api_user_connection.rb', line 61

def get_field_deserializers()
    return {
        "connectedAt" => lambda {|n| @connected_at = n.get_object_value(lambda {|pn| ApiUserConnection::ApiUserConnectionConnectedAt.create_from_discriminator_value(pn) }) },
        "id" => lambda {|n| @id = n.get_string_value() },
        "isPrimary" => lambda {|n| @is_primary = n.get_boolean_value() },
        "isVerified" => lambda {|n| @is_verified = n.get_boolean_value() },
        "platform" => lambda {|n| @platform = n.get_string_value() },
        "url" => lambda {|n| @url = n.get_object_value(lambda {|pn| ApiUserConnection::ApiUserConnectionUrl.create_from_discriminator_value(pn) }) },
        "username" => lambda {|n| @username = n.get_object_value(lambda {|pn| ApiUserConnection::ApiUserConnectionUsername.create_from_discriminator_value(pn) }) },
    }
end

#idObject

Gets the id property value. Connection ID.

Returns:

  • a string



76
77
78
# File 'lib/teambattles_sdk/generated/models/api_user_connection.rb', line 76

def id
    return @id
end

#id=(value) ⇒ Object

Sets the id property value. Connection ID.

Parameters:

  • value

    Value to set for the id property.

Returns:

  • a void



84
85
86
# File 'lib/teambattles_sdk/generated/models/api_user_connection.rb', line 84

def id=(value)
    @id = value
end

#is_primaryObject

Gets the isPrimary property value. The isPrimary property

Returns:

  • a boolean



91
92
93
# File 'lib/teambattles_sdk/generated/models/api_user_connection.rb', line 91

def is_primary
    return @is_primary
end

#is_primary=(value) ⇒ Object

Sets the isPrimary property value. The isPrimary property

Parameters:

  • value

    Value to set for the isPrimary property.

Returns:

  • a void



99
100
101
# File 'lib/teambattles_sdk/generated/models/api_user_connection.rb', line 99

def is_primary=(value)
    @is_primary = value
end

#is_verifiedObject

Gets the isVerified property value. The isVerified property

Returns:

  • a boolean



106
107
108
# File 'lib/teambattles_sdk/generated/models/api_user_connection.rb', line 106

def is_verified
    return @is_verified
end

#is_verified=(value) ⇒ Object

Sets the isVerified property value. The isVerified property

Parameters:

  • value

    Value to set for the isVerified property.

Returns:

  • a void



114
115
116
# File 'lib/teambattles_sdk/generated/models/api_user_connection.rb', line 114

def is_verified=(value)
    @is_verified = value
end

#platformObject

Gets the platform property value. Connected platform.

Returns:

  • a string



121
122
123
# File 'lib/teambattles_sdk/generated/models/api_user_connection.rb', line 121

def platform
    return @platform
end

#platform=(value) ⇒ Object

Sets the platform property value. Connected platform.

Parameters:

  • value

    Value to set for the platform property.

Returns:

  • a void



129
130
131
# File 'lib/teambattles_sdk/generated/models/api_user_connection.rb', line 129

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


137
138
139
140
141
142
143
144
145
146
# File 'lib/teambattles_sdk/generated/models/api_user_connection.rb', line 137

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    writer.write_object_value("connectedAt", @connected_at)
    writer.write_string_value("id", @id)
    writer.write_boolean_value("isPrimary", @is_primary)
    writer.write_boolean_value("isVerified", @is_verified)
    writer.write_string_value("platform", @platform)
    writer.write_object_value("url", @url)
    writer.write_object_value("username", @username)
end

#urlObject

Gets the url property value. The url property

Returns:

  • a api_user_connection_url



151
152
153
# File 'lib/teambattles_sdk/generated/models/api_user_connection.rb', line 151

def url
    return @url
end

#url=(value) ⇒ Object

Sets the url property value. The url property

Parameters:

  • value

    Value to set for the url property.

Returns:

  • a void



159
160
161
# File 'lib/teambattles_sdk/generated/models/api_user_connection.rb', line 159

def url=(value)
    @url = value
end

#usernameObject

Gets the username property value. The username property

Returns:

  • a api_user_connection_username



166
167
168
# File 'lib/teambattles_sdk/generated/models/api_user_connection.rb', line 166

def username
    return @username
end

#username=(value) ⇒ Object

Sets the username property value. The username property

Parameters:

  • value

    Value to set for the username property.

Returns:

  • a void



174
175
176
# File 'lib/teambattles_sdk/generated/models/api_user_connection.rb', line 174

def username=(value)
    @username = value
end