FOSSology
4.4.0
Open Source License Compliance by Open Source Software
SuccessfulAgent.php
Go to the documentation of this file.
1
<?php
2
/*
3
SPDX-FileCopyrightText: © 2023 Akash Kumar Sah <akashsah2003@gmail.com>
4
SPDX-License-Identifier: GPL-2.0-only
5
*/
10
namespace
Fossology\UI\Api\Models;
11
12
13
class
SuccessfulAgent
14
{
19
private
$agentId
;
24
private
$agentRev
;
29
private
$agentName
;
30
36
public
function
__construct
(
$agentId
,
$agentRev
,
$agentName
)
37
{
38
$this->agentId =
$agentId
;
39
$this->agentRev =
$agentRev
;
40
$this->agentName =
$agentName
;
41
}
42
46
public
function
getAgentId
()
47
{
48
return
$this->agentId
;
49
}
50
54
public
function
getAgentRev
()
55
{
56
return
$this->agentRev
;
57
}
58
62
public
function
getAgentName
()
63
{
64
return
$this->agentName
;
65
}
66
67
73
public
function
getJSON
($version=ApiVersion::V1)
74
{
75
return
json_encode($this->
getArray
($version));
76
}
77
83
public
function
getArray
($version=ApiVersion::V1)
84
{
85
if
($version == ApiVersion::V2) {
86
return
[
87
'agentId'
=> $this->
getAgentId
(),
88
'agentRev'
=> $this->
getAgentRev
(),
89
'agentName'
=> $this->
getAgentName
()
90
];
91
}
92
return
[
93
'agent_id'
=> $this->
getAgentId
(),
94
'agent_rev'
=> $this->
getAgentRev
(),
95
'agent_name'
=> $this->
getAgentName
()
96
];
97
}
98
102
public
function
setAgentId
(
$agentId
)
103
{
104
$this->agentId =
$agentId
;
105
}
106
110
public
function
setAgentRev
(
$agentRev
)
111
{
112
$this->agentRev =
$agentRev
;
113
}
114
118
public
function
setAgentName
(
$agentName
)
119
{
120
$this->agentName =
$agentName
;
121
}
122
}
Fossology\UI\Api\Models\SuccessfulAgent
Definition:
SuccessfulAgent.php:14
Fossology\UI\Api\Models\SuccessfulAgent\$agentName
$agentName
Definition:
SuccessfulAgent.php:29
Fossology\UI\Api\Models\SuccessfulAgent\$agentRev
$agentRev
Definition:
SuccessfulAgent.php:24
Fossology\UI\Api\Models\SuccessfulAgent\getJSON
getJSON($version=ApiVersion::V1)
Definition:
SuccessfulAgent.php:73
Fossology\UI\Api\Models\SuccessfulAgent\getAgentName
getAgentName()
Definition:
SuccessfulAgent.php:62
Fossology\UI\Api\Models\SuccessfulAgent\getAgentRev
getAgentRev()
Definition:
SuccessfulAgent.php:54
Fossology\UI\Api\Models\SuccessfulAgent\$agentId
$agentId
Definition:
SuccessfulAgent.php:19
Fossology\UI\Api\Models\SuccessfulAgent\getAgentId
getAgentId()
Definition:
SuccessfulAgent.php:46
Fossology\UI\Api\Models\SuccessfulAgent\setAgentName
setAgentName($agentName)
Definition:
SuccessfulAgent.php:118
Fossology\UI\Api\Models\SuccessfulAgent\setAgentId
setAgentId($agentId)
Definition:
SuccessfulAgent.php:102
Fossology\UI\Api\Models\SuccessfulAgent\setAgentRev
setAgentRev($agentRev)
Definition:
SuccessfulAgent.php:110
Fossology\UI\Api\Models\SuccessfulAgent\__construct
__construct($agentId, $agentRev, $agentName)
Definition:
SuccessfulAgent.php:36
Fossology\UI\Api\Models\SuccessfulAgent\getArray
getArray($version=ApiVersion::V1)
Definition:
SuccessfulAgent.php:83
src
www
ui
api
Models
SuccessfulAgent.php
Generated on Mon Nov 18 2024 07:37:14 for FOSSology by
1.9.1