Class: Appwrite::Models::Oauth2Project

Inherits:
Object
  • Object
show all
Defined in:
lib/appwrite/models/oauth2_project.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id:, region:, endpoint:) ⇒ Oauth2Project

Returns a new instance of Oauth2Project.



10
11
12
13
14
15
16
17
18
# File 'lib/appwrite/models/oauth2_project.rb', line 10

def initialize(
    id:,
    region:,
    endpoint:
)
    @id = id
    @region = region
    @endpoint = endpoint
end

Instance Attribute Details

#endpointObject (readonly)

Returns the value of attribute endpoint.



8
9
10
# File 'lib/appwrite/models/oauth2_project.rb', line 8

def endpoint
  @endpoint
end

#idObject (readonly)

Returns the value of attribute id.



6
7
8
# File 'lib/appwrite/models/oauth2_project.rb', line 6

def id
  @id
end

#regionObject (readonly)

Returns the value of attribute region.



7
8
9
# File 'lib/appwrite/models/oauth2_project.rb', line 7

def region
  @region
end

Class Method Details

.from(map:) ⇒ Object



20
21
22
23
24
25
26
# File 'lib/appwrite/models/oauth2_project.rb', line 20

def self.from(map:)
    Oauth2Project.new(
        id: map["$id"],
        region: map["region"],
        endpoint: map["endpoint"]
    )
end

Instance Method Details

#to_mapObject



28
29
30
31
32
33
34
# File 'lib/appwrite/models/oauth2_project.rb', line 28

def to_map
    {
        "$id": @id,
        "region": @region,
        "endpoint": @endpoint
    }
end