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
752622fb
Commit
752622fb
authored
Sep 13, 2019
by
Greg Messner
Browse files
Added constants for the SearchApi (#425).
parent
be795a9e
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/org/gitlab4j/api/Constants.java
View file @
752622fb
...
@@ -614,4 +614,80 @@ public interface Constants {
...
@@ -614,4 +614,80 @@ public interface Constants {
return
(
enumHelper
.
toString
(
this
));
return
(
enumHelper
.
toString
(
this
));
}
}
}
}
/**
* Enum for the search scope when doing a globalSearch() with the SearchApi.
*/
public
enum
SearchScope
{
PROJECTS
,
ISSUES
,
MERGE_REQUESTS
,
MILESTONES
,
SNIPPET_TITLES
,
SNIPPET_BLOBS
,
USERS
,
BLOBS
,
COMMITS
,
WIKI_BLOBS
;
private
static
JacksonJsonEnumHelper
<
SearchScope
>
enumHelper
=
new
JacksonJsonEnumHelper
<>(
SearchScope
.
class
);
@JsonCreator
public
static
SearchScope
forValue
(
String
value
)
{
return
enumHelper
.
forValue
(
value
);
}
@JsonValue
public
String
toValue
()
{
return
(
enumHelper
.
toString
(
this
));
}
@Override
public
String
toString
()
{
return
(
enumHelper
.
toString
(
this
));
}
}
/**
* Enum for the search scope when doing a groupSearch() with the SearchApi.
*/
public
enum
GroupSearchScope
{
PROJECTS
,
ISSUES
,
MERGE_REQUESTS
,
MILESTONES
,
USERS
;
private
static
JacksonJsonEnumHelper
<
GroupSearchScope
>
enumHelper
=
new
JacksonJsonEnumHelper
<>(
GroupSearchScope
.
class
);
@JsonCreator
public
static
GroupSearchScope
forValue
(
String
value
)
{
return
enumHelper
.
forValue
(
value
);
}
@JsonValue
public
String
toValue
()
{
return
(
enumHelper
.
toString
(
this
));
}
@Override
public
String
toString
()
{
return
(
enumHelper
.
toString
(
this
));
}
}
/**
* Enum for the search scope when doing a projectSearch() with the SearchApi.
*/
public
enum
ProjectSearchScope
{
BLOBS
,
COMMITS
,
ISSUES
,
MERGE_REQUESTS
,
MILESTONES
,
NOTES
,
WIKI_BLOBS
,
USERS
;
private
static
JacksonJsonEnumHelper
<
ProjectSearchScope
>
enumHelper
=
new
JacksonJsonEnumHelper
<>(
ProjectSearchScope
.
class
);
@JsonCreator
public
static
ProjectSearchScope
forValue
(
String
value
)
{
return
enumHelper
.
forValue
(
value
);
}
@JsonValue
public
String
toValue
()
{
return
(
enumHelper
.
toString
(
this
));
}
@Override
public
String
toString
()
{
return
(
enumHelper
.
toString
(
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