Class: Appwrite::Models::ProxyRule

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id:, created_at:, updated_at:, domain:, type:, trigger:, redirect_url:, redirect_status_code:, deployment_id:, deployment_resource_type: nil, deployment_resource_id:, deployment_vcs_provider_branch:, status:, logs:, renew_at:, expire_at:, certificate_status:, protocol:) ⇒ ProxyRule

Returns a new instance of ProxyRule.



25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# File 'lib/appwrite/models/proxy_rule.rb', line 25

def initialize(
    id:,
    created_at:,
    updated_at:,
    domain:,
    type:,
    trigger:,
    redirect_url:,
    redirect_status_code:,
    deployment_id:,
    deployment_resource_type: nil,
    deployment_resource_id:,
    deployment_vcs_provider_branch:,
    status:,
    logs:,
    renew_at:,
    expire_at:,
    certificate_status:,
    protocol:
)
    @id = id
    @created_at = created_at
    @updated_at = updated_at
    @domain = domain
    @type = type
    @trigger = trigger
    @redirect_url = redirect_url
    @redirect_status_code = redirect_status_code
    @deployment_id = deployment_id
    @deployment_resource_type = deployment_resource_type.nil? ? deployment_resource_type : validate_deployment_resource_type(deployment_resource_type)
    @deployment_resource_id = deployment_resource_id
    @deployment_vcs_provider_branch = deployment_vcs_provider_branch
    @status = validate_status(status)
    @logs = logs
    @renew_at = renew_at
    @expire_at = expire_at
    @certificate_status = certificate_status
    @protocol = validate_protocol(protocol)
end

Instance Attribute Details

#certificate_status ⇒ Object (readonly)

Returns the value of attribute certificate_status.



22
23
24
# File 'lib/appwrite/models/proxy_rule.rb', line 22

def certificate_status
  @certificate_status
end

#created_at ⇒ Object (readonly)

Returns the value of attribute created_at.



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

def created_at
  @created_at
end

#deployment_id ⇒ Object (readonly)

Returns the value of attribute deployment_id.



14
15
16
# File 'lib/appwrite/models/proxy_rule.rb', line 14

def deployment_id
  @deployment_id
end

#deployment_resource_id ⇒ Object (readonly)

Returns the value of attribute deployment_resource_id.



16
17
18
# File 'lib/appwrite/models/proxy_rule.rb', line 16

def deployment_resource_id
  @deployment_resource_id
end

#deployment_resource_type ⇒ Object (readonly)

Returns the value of attribute deployment_resource_type.



15
16
17
# File 'lib/appwrite/models/proxy_rule.rb', line 15

def deployment_resource_type
  @deployment_resource_type
end

#deployment_vcs_provider_branch ⇒ Object (readonly)

Returns the value of attribute deployment_vcs_provider_branch.



17
18
19
# File 'lib/appwrite/models/proxy_rule.rb', line 17

def deployment_vcs_provider_branch
  @deployment_vcs_provider_branch
end

#domain ⇒ Object (readonly)

Returns the value of attribute domain.



9
10
11
# File 'lib/appwrite/models/proxy_rule.rb', line 9

def domain
  @domain
end

#expire_at ⇒ Object (readonly)

Returns the value of attribute expire_at.



21
22
23
# File 'lib/appwrite/models/proxy_rule.rb', line 21

def expire_at
  @expire_at
end

#id ⇒ Object (readonly)

Returns the value of attribute id.



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

def id
  @id
end

#logs ⇒ Object (readonly)

Returns the value of attribute logs.



19
20
21
# File 'lib/appwrite/models/proxy_rule.rb', line 19

def logs
  @logs
end

#protocol ⇒ Object (readonly)

Returns the value of attribute protocol.



23
24
25
# File 'lib/appwrite/models/proxy_rule.rb', line 23

def protocol
  @protocol
end

#redirect_status_code ⇒ Object (readonly)

Returns the value of attribute redirect_status_code.



13
14
15
# File 'lib/appwrite/models/proxy_rule.rb', line 13

def redirect_status_code
  @redirect_status_code
end

#redirect_url ⇒ Object (readonly)

Returns the value of attribute redirect_url.



12
13
14
# File 'lib/appwrite/models/proxy_rule.rb', line 12

def redirect_url
  @redirect_url
end

#renew_at ⇒ Object (readonly)

Returns the value of attribute renew_at.



20
21
22
# File 'lib/appwrite/models/proxy_rule.rb', line 20

def renew_at
  @renew_at
end

#status ⇒ Object (readonly)

Returns the value of attribute status.



18
19
20
# File 'lib/appwrite/models/proxy_rule.rb', line 18

def status
  @status
end

#trigger ⇒ Object (readonly)

Returns the value of attribute trigger.



11
12
13
# File 'lib/appwrite/models/proxy_rule.rb', line 11

def trigger
  @trigger
end

#type ⇒ Object (readonly)

Returns the value of attribute type.



10
11
12
# File 'lib/appwrite/models/proxy_rule.rb', line 10

def type
  @type
end

#updated_at ⇒ Object (readonly)

Returns the value of attribute updated_at.



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

def updated_at
  @updated_at
end

Class Method Details

.from(map:) ⇒ Object



65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# File 'lib/appwrite/models/proxy_rule.rb', line 65

def self.from(map:)
    map = { "$id" => "", "$createdAt" => "", "$updatedAt" => "", "domain" => "", "type" => "", "trigger" => "", "redirectUrl" => "", "redirectStatusCode" => 301, "deploymentId" => "", "deploymentResourceId" => "", "deploymentVcsProviderBranch" => "", "status" => "unverified", "logs" => "", "expireAt" => "", "certificateStatus" => "", "protocol" => "http" }.merge(map)
    ProxyRule.new(
        id: map["$id"],
        created_at: map["$createdAt"],
        updated_at: map["$updatedAt"],
        domain: map["domain"],
        type: map["type"],
        trigger: map["trigger"],
        redirect_url: map["redirectUrl"],
        redirect_status_code: map["redirectStatusCode"],
        deployment_id: map["deploymentId"],
        deployment_resource_type: map["deploymentResourceType"],
        deployment_resource_id: map["deploymentResourceId"],
        deployment_vcs_provider_branch: map["deploymentVcsProviderBranch"],
        status: map["status"],
        logs: map["logs"],
        renew_at: map["renewAt"],
        expire_at: map["expireAt"],
        certificate_status: map["certificateStatus"],
        protocol: map["protocol"]
    )
end

Instance Method Details

#to_map ⇒ Object



89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# File 'lib/appwrite/models/proxy_rule.rb', line 89

def to_map
    {
        "$id": @id,
        "$createdAt": @created_at,
        "$updatedAt": @updated_at,
        "domain": @domain,
        "type": @type,
        "trigger": @trigger,
        "redirectUrl": @redirect_url,
        "redirectStatusCode": @redirect_status_code,
        "deploymentId": @deployment_id,
        "deploymentResourceType": @deployment_resource_type,
        "deploymentResourceId": @deployment_resource_id,
        "deploymentVcsProviderBranch": @deployment_vcs_provider_branch,
        "status": @status,
        "logs": @logs,
        "renewAt": @renew_at,
        "expireAt": @expire_at,
        "certificateStatus": @certificate_status,
        "protocol": @protocol
    }
end