Class: TeamBattlesSdk::Generated::Models::ApiOwnConnection

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

Overview

API-safe connection for the API key owner, including private fields.

Defined Under Namespace

Classes: ApiOwnConnectionConnectedAt, ApiOwnConnectionGamingPlatform, ApiOwnConnectionRegion, ApiOwnConnectionUrl, ApiOwnConnectionUsername

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_own_connection

Raises:

  • (StandardError)


65
66
67
68
# File 'lib/teambattles_sdk/generated/models/api_own_connection.rb', line 65

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

Instance Method Details

#connected_atObject

Gets the connectedAt property value. The connectedAt property

Returns:

  • a api_own_connection_connected_at



49
50
51
# File 'lib/teambattles_sdk/generated/models/api_own_connection.rb', line 49

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



57
58
59
# File 'lib/teambattles_sdk/generated/models/api_own_connection.rb', line 57

def connected_at=(value)
    @connected_at = value
end

#gaming_platformObject

Gets the gamingPlatform property value. Gaming platform (e.g. pc / console), when set.

Returns:

  • a api_own_connection_gaming_platform



73
74
75
# File 'lib/teambattles_sdk/generated/models/api_own_connection.rb', line 73

def gaming_platform
    return @gaming_platform
end

#gaming_platform=(value) ⇒ Object

Sets the gamingPlatform property value. Gaming platform (e.g. pc / console), when set.

Parameters:

  • value

    Value to set for the gamingPlatform property.

Returns:

  • a void



81
82
83
# File 'lib/teambattles_sdk/generated/models/api_own_connection.rb', line 81

def gaming_platform=(value)
    @gaming_platform = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# File 'lib/teambattles_sdk/generated/models/api_own_connection.rb', line 88

def get_field_deserializers()
    return {
        "connectedAt" => lambda {|n| @connected_at = n.get_object_value(lambda {|pn| ApiOwnConnection::ApiOwnConnectionConnectedAt.create_from_discriminator_value(pn) }) },
        "gamingPlatform" => lambda {|n| @gaming_platform = n.get_object_value(lambda {|pn| ApiOwnConnection::ApiOwnConnectionGamingPlatform.create_from_discriminator_value(pn) }) },
        "id" => lambda {|n| @id = n.get_string_value() },
        "isPrimary" => lambda {|n| @is_primary = n.get_boolean_value() },
        "isSelfReported" => lambda {|n| @is_self_reported = n.get_boolean_value() },
        "isVerified" => lambda {|n| @is_verified = n.get_boolean_value() },
        "platform" => lambda {|n| @platform = n.get_string_value() },
        "region" => lambda {|n| @region = n.get_object_value(lambda {|pn| ApiOwnConnection::ApiOwnConnectionRegion.create_from_discriminator_value(pn) }) },
        "showOnProfile" => lambda {|n| @show_on_profile = n.get_boolean_value() },
        "url" => lambda {|n| @url = n.get_object_value(lambda {|pn| ApiOwnConnection::ApiOwnConnectionUrl.create_from_discriminator_value(pn) }) },
        "username" => lambda {|n| @username = n.get_object_value(lambda {|pn| ApiOwnConnection::ApiOwnConnectionUsername.create_from_discriminator_value(pn) }) },
    }
end

#idObject

Gets the id property value. Connection ID.

Returns:

  • a string



107
108
109
# File 'lib/teambattles_sdk/generated/models/api_own_connection.rb', line 107

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



115
116
117
# File 'lib/teambattles_sdk/generated/models/api_own_connection.rb', line 115

def id=(value)
    @id = value
end

#is_primaryObject

Gets the isPrimary property value. The isPrimary property

Returns:

  • a boolean



122
123
124
# File 'lib/teambattles_sdk/generated/models/api_own_connection.rb', line 122

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



130
131
132
# File 'lib/teambattles_sdk/generated/models/api_own_connection.rb', line 130

def is_primary=(value)
    @is_primary = value
end

#is_self_reportedObject

Gets the isSelfReported property value. True when the connection was self-reported (ownership unverified).

Returns:

  • a boolean



137
138
139
# File 'lib/teambattles_sdk/generated/models/api_own_connection.rb', line 137

def is_self_reported
    return @is_self_reported
end

#is_self_reported=(value) ⇒ Object

Sets the isSelfReported property value. True when the connection was self-reported (ownership unverified).

Parameters:

  • value

    Value to set for the isSelfReported property.

Returns:

  • a void



145
146
147
# File 'lib/teambattles_sdk/generated/models/api_own_connection.rb', line 145

def is_self_reported=(value)
    @is_self_reported = value
end

#is_verifiedObject

Gets the isVerified property value. The isVerified property

Returns:

  • a boolean



152
153
154
# File 'lib/teambattles_sdk/generated/models/api_own_connection.rb', line 152

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



160
161
162
# File 'lib/teambattles_sdk/generated/models/api_own_connection.rb', line 160

def is_verified=(value)
    @is_verified = value
end

#platformObject

Gets the platform property value. Connected platform.

Returns:

  • a string



167
168
169
# File 'lib/teambattles_sdk/generated/models/api_own_connection.rb', line 167

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



175
176
177
# File 'lib/teambattles_sdk/generated/models/api_own_connection.rb', line 175

def platform=(value)
    @platform = value
end

#regionObject

Gets the region property value. Connection region, when set.

Returns:

  • a api_own_connection_region



182
183
184
# File 'lib/teambattles_sdk/generated/models/api_own_connection.rb', line 182

def region
    return @region
end

#region=(value) ⇒ Object

Sets the region property value. Connection region, when set.

Parameters:

  • value

    Value to set for the region property.

Returns:

  • a void



190
191
192
# File 'lib/teambattles_sdk/generated/models/api_own_connection.rb', line 190

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


198
199
200
201
202
203
204
205
206
207
208
209
210
211
# File 'lib/teambattles_sdk/generated/models/api_own_connection.rb', line 198

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

#show_on_profileObject

Gets the showOnProfile property value. Whether the owner has chosen to show this connection on their profile.

Returns:

  • a boolean



216
217
218
# File 'lib/teambattles_sdk/generated/models/api_own_connection.rb', line 216

def show_on_profile
    return @show_on_profile
end

#show_on_profile=(value) ⇒ Object

Sets the showOnProfile property value. Whether the owner has chosen to show this connection on their profile.

Parameters:

  • value

    Value to set for the showOnProfile property.

Returns:

  • a void



224
225
226
# File 'lib/teambattles_sdk/generated/models/api_own_connection.rb', line 224

def show_on_profile=(value)
    @show_on_profile = value
end

#urlObject

Gets the url property value. The url property

Returns:

  • a api_own_connection_url



231
232
233
# File 'lib/teambattles_sdk/generated/models/api_own_connection.rb', line 231

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



239
240
241
# File 'lib/teambattles_sdk/generated/models/api_own_connection.rb', line 239

def url=(value)
    @url = value
end

#usernameObject

Gets the username property value. The username property

Returns:

  • a api_own_connection_username



246
247
248
# File 'lib/teambattles_sdk/generated/models/api_own_connection.rb', line 246

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



254
255
256
# File 'lib/teambattles_sdk/generated/models/api_own_connection.rb', line 254

def username=(value)
    @username = value
end