Files
plexruby/lib/plex_ruby_sdk/models/operations/getpin_authpincontainer.rb

81 lines
3.8 KiB
Ruby

# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
# typed: true
# frozen_string_literal: true
module PlexRubySDK
module Models
module Operations
GET_PIN_AUTH_PIN_CONTAINER_SERVERS = [
'https://plex.tv/api/v2'
].freeze
# Requests a new pin id used in the authentication flow
class GetPinAuthPinContainer
extend T::Sig
include Crystalline::MetadataFields
# The X-Client-Identifier used in the request
field :client_identifier, ::String, { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('clientIdentifier') } }
field :code, ::String, { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('code') } }
field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('createdAt'), 'decoder': Utils.datetime_from_iso_format(false) } }
field :expires_at, ::DateTime, { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('expiresAt'), 'decoder': Utils.datetime_from_iso_format(false) } }
# The number of seconds this pin expires, by default 900 seconds
field :expires_in, ::Integer, { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('expiresIn') } }
field :id, ::Integer, { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('id') } }
# Geo location data
field :location, Models::Operations::GeoData, { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('location') } }
field :product, ::String, { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('product') } }
field :qr, ::String, { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('qr') } }
field :trusted, T::Boolean, { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('trusted') } }
field :auth_token, T.nilable(::String), { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('authToken') } }
field :new_registration, T.nilable(::Object), { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('newRegistration') } }
sig { params(client_identifier: ::String, code: ::String, created_at: ::DateTime, expires_at: ::DateTime, expires_in: ::Integer, id: ::Integer, location: Models::Operations::GeoData, product: ::String, qr: ::String, trusted: T::Boolean, auth_token: T.nilable(::String), new_registration: T.nilable(::Object)).void }
def initialize(client_identifier: nil, code: nil, created_at: nil, expires_at: nil, expires_in: nil, id: nil, location: nil, product: nil, qr: nil, trusted: nil, auth_token: nil, new_registration: nil)
@client_identifier = client_identifier
@code = code
@created_at = created_at
@expires_at = expires_at
@expires_in = expires_in
@id = id
@location = location
@product = product
@qr = qr
@trusted = trusted
@auth_token = auth_token
@new_registration = new_registration
end
def ==(other)
return false unless other.is_a? self.class
return false unless @client_identifier == other.client_identifier
return false unless @code == other.code
return false unless @created_at == other.created_at
return false unless @expires_at == other.expires_at
return false unless @expires_in == other.expires_in
return false unless @id == other.id
return false unless @location == other.location
return false unless @product == other.product
return false unless @qr == other.qr
return false unless @trusted == other.trusted
return false unless @auth_token == other.auth_token
return false unless @new_registration == other.new_registration
true
end
end
end
end
end