1
2
3
4
5 package org.apache.maven.model;
6
7 import java.io.Serializable;
8 import java.util.AbstractList;
9 import java.util.Collections;
10 import java.util.HashMap;
11 import java.util.List;
12 import java.util.Map;
13 import java.util.Objects;
14 import java.util.stream.Collectors;
15 import java.util.stream.Stream;
16 import org.apache.maven.api.annotations.Generated;
17 import org.apache.maven.api.annotations.Nonnull;
18
19 @Generated
20 public class Scm
21 extends BaseObject
22 {
23
24 public Scm() {
25 this(org.apache.maven.api.model.Scm.newInstance());
26 }
27
28 public Scm(org.apache.maven.api.model.Scm delegate) {
29 this(delegate, null);
30 }
31
32 public Scm(org.apache.maven.api.model.Scm delegate, BaseObject parent) {
33 super(delegate, parent);
34 }
35
36 public Scm clone(){
37 return new Scm(getDelegate());
38 }
39
40 public org.apache.maven.api.model.Scm getDelegate() {
41 return (org.apache.maven.api.model.Scm) super.getDelegate();
42 }
43
44 @Override
45 public boolean equals(Object o) {
46 if (this == o) {
47 return true;
48 }
49 if (o == null || !(o instanceof Scm)) {
50 return false;
51 }
52 Scm that = (Scm) o;
53 return Objects.equals(this.delegate, that.delegate);
54 }
55
56 @Override
57 public int hashCode() {
58 return getDelegate().hashCode();
59 }
60
61 public String getConnection() {
62 return getDelegate().getConnection();
63 }
64
65 public void setConnection(String connection) {
66 if (!Objects.equals(connection, getConnection())) {
67 update(getDelegate().withConnection(connection));
68 }
69 }
70
71 public String getDeveloperConnection() {
72 return getDelegate().getDeveloperConnection();
73 }
74
75 public void setDeveloperConnection(String developerConnection) {
76 if (!Objects.equals(developerConnection, getDeveloperConnection())) {
77 update(getDelegate().withDeveloperConnection(developerConnection));
78 }
79 }
80
81 public String getTag() {
82 return getDelegate().getTag();
83 }
84
85 public void setTag(String tag) {
86 if (!Objects.equals(tag, getTag())) {
87 update(getDelegate().withTag(tag));
88 }
89 }
90
91 public String getUrl() {
92 return getDelegate().getUrl();
93 }
94
95 public void setUrl(String url) {
96 if (!Objects.equals(url, getUrl())) {
97 update(getDelegate().withUrl(url));
98 }
99 }
100
101 public String getChildScmConnectionInheritAppendPath() {
102 return getDelegate().getChildScmConnectionInheritAppendPath();
103 }
104
105 public void setChildScmConnectionInheritAppendPath(String childScmConnectionInheritAppendPath) {
106 if (!Objects.equals(childScmConnectionInheritAppendPath, getChildScmConnectionInheritAppendPath())) {
107 update(getDelegate().withChildScmConnectionInheritAppendPath(childScmConnectionInheritAppendPath));
108 }
109 }
110
111 public String getChildScmDeveloperConnectionInheritAppendPath() {
112 return getDelegate().getChildScmDeveloperConnectionInheritAppendPath();
113 }
114
115 public void setChildScmDeveloperConnectionInheritAppendPath(String childScmDeveloperConnectionInheritAppendPath) {
116 if (!Objects.equals(childScmDeveloperConnectionInheritAppendPath, getChildScmDeveloperConnectionInheritAppendPath())) {
117 update(getDelegate().withChildScmDeveloperConnectionInheritAppendPath(childScmDeveloperConnectionInheritAppendPath));
118 }
119 }
120
121 public String getChildScmUrlInheritAppendPath() {
122 return getDelegate().getChildScmUrlInheritAppendPath();
123 }
124
125 public void setChildScmUrlInheritAppendPath(String childScmUrlInheritAppendPath) {
126 if (!Objects.equals(childScmUrlInheritAppendPath, getChildScmUrlInheritAppendPath())) {
127 update(getDelegate().withChildScmUrlInheritAppendPath(childScmUrlInheritAppendPath));
128 }
129 }
130
131 public InputLocation getLocation(Object key) {
132 org.apache.maven.api.model.InputLocation loc = getDelegate().getLocation(key);
133 return loc != null ? new InputLocation(loc) : null;
134 }
135
136 public void setLocation(Object key, InputLocation location) {
137 update(org.apache.maven.api.model.Scm.newBuilder(getDelegate(), true)
138 .location(key, location.toApiLocation()).build());
139 }
140
141 protected boolean replace(Object oldDelegate, Object newDelegate) {
142 if (super.replace(oldDelegate, newDelegate)) {
143 return true;
144 }
145 return false;
146 }
147
148 public static List<org.apache.maven.api.model.Scm> scmToApiV4(List<Scm> list) {
149 return list != null ? new WrapperList<>(list, Scm::getDelegate, Scm::new) : null;
150 }
151
152 public static List<Scm> scmToApiV3(List<org.apache.maven.api.model.Scm> list) {
153 return list != null ? new WrapperList<>(list, Scm::new, Scm::getDelegate) : null;
154 }
155
156
157
158
159 public boolean isChildScmConnectionInheritAppendPath()
160 {
161 return ( getChildScmConnectionInheritAppendPath() != null ) ? Boolean.parseBoolean( getChildScmConnectionInheritAppendPath() ) : true;
162 }
163
164 public boolean isChildScmDeveloperConnectionInheritAppendPath()
165 {
166 return ( getChildScmDeveloperConnectionInheritAppendPath() != null ) ? Boolean.parseBoolean( getChildScmDeveloperConnectionInheritAppendPath() ) : true;
167 }
168
169 public boolean isChildScmUrlInheritAppendPath()
170 {
171 return ( getChildScmUrlInheritAppendPath() != null ) ? Boolean.parseBoolean( getChildScmUrlInheritAppendPath() ) : true;
172 }
173
174
175
176
177
178
179
180
181 public String toString()
182 {
183 return "Scm {connection=" + getConnection() + "}";
184 }
185
186
187 }