File tree Expand file tree Collapse file tree 3 files changed +111
-0
lines changed
azd/src/main/java/org/azd Expand file tree Collapse file tree 3 files changed +111
-0
lines changed Original file line number Diff line number Diff line change 1+ package org .azd .common .types ;
2+
3+ import com .fasterxml .jackson .annotation .JsonIgnoreProperties ;
4+ import com .fasterxml .jackson .annotation .JsonProperty ;
5+ import org .azd .enums .PatchOperation ;
6+
7+ /**
8+ * Source: https://learn.microsoft.com/en-us/rest/api/azure/devops/git/pull-request-statuses/update?view=azure-devops-rest-7.1&tabs=HTTP#jsonpatchdocument.
9+ * Model for path operation.
10+ */
11+ @ JsonIgnoreProperties (ignoreUnknown = true )
12+ public class JsonPatchDocument extends BaseAbstractMethod {
13+ /**
14+ * The path to copy from for the Move/Copy operation.
15+ */
16+ @ JsonProperty ("from" )
17+ private String from ;
18+ /**
19+ * The patch operation
20+ */
21+ @ JsonProperty ("op" )
22+ private PatchOperation operation ;
23+ /**
24+ * The path for the operation. In the case of an array, a zero based index can be used to specify
25+ * the position in the array (e.g. /biscuits/0/name).
26+ * The "-" character can be used instead of an index to insert at the end of the array (e.g. /biscuits/-).
27+ */
28+ @ JsonProperty ("path" )
29+ private String path ;
30+ /**
31+ * The value for the operation. This is either a primitive or a JToken.
32+ */
33+ @ JsonProperty ("value" )
34+ private Object value ;
35+
36+ public String getFrom () {
37+ return from ;
38+ }
39+
40+ public void setFrom (String from ) {
41+ this .from = from ;
42+ }
43+
44+ public PatchOperation getOperation () {
45+ return operation ;
46+ }
47+
48+ public void setOperation (PatchOperation operation ) {
49+ this .operation = operation ;
50+ }
51+
52+ public String getPath () {
53+ return path ;
54+ }
55+
56+ public void setPath (String path ) {
57+ this .path = path ;
58+ }
59+
60+ public Object getValue () {
61+ return value ;
62+ }
63+
64+ public void setValue (Object value ) {
65+ this .value = value ;
66+ }
67+ }
Original file line number Diff line number Diff line change 1+ package org .azd .enums ;
2+
3+ import com .fasterxml .jackson .annotation .JsonIgnoreProperties ;
4+ import com .fasterxml .jackson .annotation .JsonProperty ;
5+
6+ @ JsonIgnoreProperties (ignoreUnknown = true )
7+ public enum PatchOperation {
8+ @ JsonProperty ("add" )
9+ ADD ,
10+ @ JsonProperty ("copy" )
11+ COPY ,
12+ @ JsonProperty ("MOVE" )
13+ move ,
14+ @ JsonProperty ("remove" )
15+ REMOVE ,
16+ @ JsonProperty ("replace" )
17+ REPLACE ,
18+ @ JsonProperty ("test" )
19+ TEST ,
20+ }
Original file line number Diff line number Diff line change 1+ package org .azd .git .types ;
2+
3+ import com .fasterxml .jackson .annotation .JsonIgnoreProperties ;
4+ import com .fasterxml .jackson .annotation .JsonProperty ;
5+ import org .azd .common .types .BaseAbstractMethod ;
6+
7+ import java .util .List ;
8+
9+ /**
10+ * Represents a collection of Git pull request statuses
11+ */
12+ @ JsonIgnoreProperties (ignoreUnknown = true )
13+ public class GitStatuses extends BaseAbstractMethod {
14+ @ JsonProperty ("value" )
15+ private List <GitStatus > statuses ;
16+
17+ public List <GitStatus > getStatuses () {
18+ return statuses ;
19+ }
20+
21+ public void setStatuses (List <GitStatus > statuses ) {
22+ this .statuses = statuses ;
23+ }
24+ }
You can’t perform that action at this time.
0 commit comments