Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
佳 邓
Gitlab4j Api
Commits
b3b0867a
Commit
b3b0867a
authored
Aug 18, 2018
by
Greg Messner
Browse files
Added withXXX() methods (#235).
parent
b50c50a2
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/org/gitlab4j/api/models/SystemHook.java
View file @
b3b0867a
...
...
@@ -6,6 +6,8 @@ import javax.xml.bind.annotation.XmlAccessType;
import
javax.xml.bind.annotation.XmlAccessorType
;
import
javax.xml.bind.annotation.XmlRootElement
;
import
org.gitlab4j.api.utils.JacksonJson
;
@XmlRootElement
@XmlAccessorType
(
XmlAccessType
.
FIELD
)
public
class
SystemHook
{
...
...
@@ -74,18 +76,43 @@ public class SystemHook {
return
repositoryUpdateEvents
;
}
public
SystemHook
withId
(
Integer
id
)
{
this
.
id
=
id
;
return
(
this
);
}
public
SystemHook
withUrl
(
String
url
)
{
this
.
url
=
url
;
return
(
this
);
}
public
SystemHook
withCreatedAt
(
Date
createdAt
)
{
this
.
createdAt
=
createdAt
;
return
(
this
);
}
public
SystemHook
withPushEvents
(
Boolean
pushEvents
)
{
this
.
pushEvents
=
pushEvents
;
return
(
this
);
}
public
SystemHook
withTagPushEvents
(
Boolean
tagPushEvents
)
{
this
.
tagPushEvents
=
tagPushEvents
;
return
(
this
);
}
public
SystemHook
withEnableSslVerification
(
Boolean
enableSslVerification
)
{
this
.
enableSslVerification
=
enableSslVerification
;
return
(
this
);
}
public
SystemHook
withRepositoryUpdateEvents
(
Boolean
repositoryUpdateEvents
)
{
this
.
repositoryUpdateEvents
=
repositoryUpdateEvents
;
return
(
this
);
}
@Override
public
String
toString
()
{
final
StringBuilder
sb
=
new
StringBuilder
(
"SystemHook{"
);
sb
.
append
(
"id="
).
append
(
id
);
sb
.
append
(
", url='"
).
append
(
url
).
append
(
'\''
);
sb
.
append
(
", createdAt="
).
append
(
createdAt
);
sb
.
append
(
", pushEvents="
).
append
(
pushEvents
);
sb
.
append
(
", tagPushEvents="
).
append
(
tagPushEvents
);
sb
.
append
(
", enableSslVerification="
).
append
(
enableSslVerification
);
sb
.
append
(
", repositoryUpdateEvents="
).
append
(
repositoryUpdateEvents
);
sb
.
append
(
'}'
);
return
sb
.
toString
();
return
(
JacksonJson
.
toJsonString
(
this
));
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment