1c405753c34a6abffb0f01aca099e656df19e55d
[so.git] / common / src / main / java / org / onap / so / client / aai / entities / bulkprocess / Transaction.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP - SO
4  * ================================================================================
5  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6  * ================================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  * 
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  * 
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  * ============LICENSE_END=========================================================
19  */
20
21 package org.onap.so.client.aai.entities.bulkprocess;
22
23 import java.util.ArrayList;
24 import java.util.List;
25
26 import com.fasterxml.jackson.annotation.JsonInclude;
27 import com.fasterxml.jackson.annotation.JsonProperty;
28 import com.fasterxml.jackson.annotation.JsonPropertyOrder;
29
30 @JsonInclude(JsonInclude.Include.NON_NULL)
31 @JsonPropertyOrder({
32 "patch",
33 "patch",
34 "delete"
35 })
36 public class Transaction {
37
38 @JsonInclude(JsonInclude.Include.NON_EMPTY)
39 @JsonProperty("put")
40 private List<OperationBody> put = new ArrayList<>();
41
42 @JsonInclude(JsonInclude.Include.NON_EMPTY)
43 @JsonProperty("patch")
44 private List<OperationBody> patch = new ArrayList<>();
45
46 @JsonInclude(JsonInclude.Include.NON_EMPTY)
47 @JsonProperty("delete")
48 private List<OperationBody> delete = new ArrayList<>();
49
50 @JsonProperty("put")
51 public List<OperationBody> getPut() {
52 return put;
53 }
54
55 @JsonProperty("put")
56 public void setPut(List<OperationBody> put) {
57 this.put = put;
58 }
59
60 public Transaction withPut(List<OperationBody> put) {
61 this.put = put;
62 return this;
63 }
64
65 @JsonProperty("patch")
66 public List<OperationBody> getPatch() {
67 return patch;
68 }
69
70 @JsonProperty("patch")
71 public void setPatch(List<OperationBody> patch) {
72 this.patch = patch;
73 }
74
75 public Transaction withPatch(List<OperationBody> patch) {
76 this.patch = patch;
77 return this;
78 }
79
80 @JsonProperty("delete")
81 public List<OperationBody> getDelete() {
82 return delete;
83 }
84
85 @JsonProperty("delete")
86 public void setDelete(List<OperationBody> delete) {
87 this.delete = delete;
88 }
89
90 public Transaction withDelete(List<OperationBody> delete) {
91 this.delete = delete;
92 return this;
93 }
94
95 }