Skip to content

Commit 88939c6

Browse files
authored
feat(2022-07-13): updated the sdk as per the api spec released on 2022-07-13 for backup and vpn servers (#40)
Signed-off-by: Ujjwal Kumar <[email protected]>
1 parent bf98cdf commit 88939c6

File tree

285 files changed

+22038
-3852
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

285 files changed

+22038
-3852
lines changed

checkstyle.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
<module name="NewlineAtEndOfFile"/>
1616
<module name="FileLength">
17-
<property name="max" value="10000"/>
17+
<property name="max" value="100000"/>
1818
</module>
1919
<module name="FileTabCharacter"/>
2020

modules/examples/src/main/java/com/ibm/cloud/is/vpc/v1/VPCExamples.java

+528-41
Large diffs are not rendered by default.

modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/Vpc.java

+949-75
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
/*
2+
* (C) Copyright IBM Corp. 2020, 2021, 2022.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
5+
* the License. You may obtain a copy of the License at
6+
*
7+
* http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
10+
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
11+
* specific language governing permissions and limitations under the License.
12+
*/
13+
package com.ibm.cloud.is.vpc.v1.model;
14+
15+
import com.ibm.cloud.sdk.core.service.model.GenericModel;
16+
17+
/**
18+
* The addSecurityGroupTarget options.
19+
*/
20+
public class AddSecurityGroupTargetOptions extends GenericModel {
21+
22+
protected String securityGroupId;
23+
protected String id;
24+
25+
/**
26+
* Builder.
27+
*/
28+
public static class Builder {
29+
private String securityGroupId;
30+
private String id;
31+
32+
private Builder(AddSecurityGroupTargetOptions addSecurityGroupTargetOptions) {
33+
this.securityGroupId = addSecurityGroupTargetOptions.securityGroupId;
34+
this.id = addSecurityGroupTargetOptions.id;
35+
}
36+
37+
/**
38+
* Instantiates a new builder.
39+
*/
40+
public Builder() {
41+
}
42+
43+
/**
44+
* Instantiates a new builder with required properties.
45+
*
46+
* @param securityGroupId the securityGroupId
47+
* @param id the id
48+
*/
49+
public Builder(String securityGroupId, String id) {
50+
this.securityGroupId = securityGroupId;
51+
this.id = id;
52+
}
53+
54+
/**
55+
* Builds a AddSecurityGroupTargetOptions.
56+
*
57+
* @return the new AddSecurityGroupTargetOptions instance
58+
*/
59+
public AddSecurityGroupTargetOptions build() {
60+
return new AddSecurityGroupTargetOptions(this);
61+
}
62+
63+
/**
64+
* Set the securityGroupId.
65+
*
66+
* @param securityGroupId the securityGroupId
67+
* @return the AddSecurityGroupTargetOptions builder
68+
*/
69+
public Builder securityGroupId(String securityGroupId) {
70+
this.securityGroupId = securityGroupId;
71+
return this;
72+
}
73+
74+
/**
75+
* Set the id.
76+
*
77+
* @param id the id
78+
* @return the AddSecurityGroupTargetOptions builder
79+
*/
80+
public Builder id(String id) {
81+
this.id = id;
82+
return this;
83+
}
84+
}
85+
86+
protected AddSecurityGroupTargetOptions(Builder builder) {
87+
com.ibm.cloud.sdk.core.util.Validator.notEmpty(builder.securityGroupId,
88+
"securityGroupId cannot be empty");
89+
com.ibm.cloud.sdk.core.util.Validator.notEmpty(builder.id,
90+
"id cannot be empty");
91+
securityGroupId = builder.securityGroupId;
92+
id = builder.id;
93+
}
94+
95+
/**
96+
* New builder.
97+
*
98+
* @return a AddSecurityGroupTargetOptions builder
99+
*/
100+
public Builder newBuilder() {
101+
return new Builder(this);
102+
}
103+
104+
/**
105+
* Gets the securityGroupId.
106+
*
107+
* The security group identifier.
108+
*
109+
* @return the securityGroupId
110+
*/
111+
public String securityGroupId() {
112+
return securityGroupId;
113+
}
114+
115+
/**
116+
* Gets the id.
117+
*
118+
* The security group target identifier.
119+
*
120+
* @return the id
121+
*/
122+
public String id() {
123+
return id;
124+
}
125+
}
126+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,222 @@
1+
/*
2+
* (C) Copyright IBM Corp. 2020, 2021, 2022.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
5+
* the License. You may obtain a copy of the License at
6+
*
7+
* http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
10+
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
11+
* specific language governing permissions and limitations under the License.
12+
*/
13+
package com.ibm.cloud.is.vpc.v1.model;
14+
15+
import java.util.Date;
16+
import java.util.List;
17+
18+
import com.google.gson.annotations.SerializedName;
19+
import com.ibm.cloud.sdk.core.service.model.GenericModel;
20+
21+
/**
22+
* BackupPolicy.
23+
*/
24+
public class BackupPolicy extends GenericModel {
25+
26+
/**
27+
* The lifecycle state of the backup policy.
28+
*/
29+
public interface LifecycleState {
30+
/** deleting. */
31+
String DELETING = "deleting";
32+
/** failed. */
33+
String FAILED = "failed";
34+
/** pending. */
35+
String PENDING = "pending";
36+
/** stable. */
37+
String STABLE = "stable";
38+
/** suspended. */
39+
String SUSPENDED = "suspended";
40+
/** updating. */
41+
String UPDATING = "updating";
42+
/** waiting. */
43+
String WAITING = "waiting";
44+
}
45+
46+
/**
47+
* The resource type.
48+
*/
49+
public interface MatchResourceTypes {
50+
/** volume. */
51+
String VOLUME = "volume";
52+
}
53+
54+
/**
55+
* The resource type.
56+
*/
57+
public interface ResourceType {
58+
/** backup_policy. */
59+
String BACKUP_POLICY = "backup_policy";
60+
}
61+
62+
@SerializedName("created_at")
63+
protected Date createdAt;
64+
protected String crn;
65+
protected String href;
66+
protected String id;
67+
@SerializedName("last_job_completed_at")
68+
protected Date lastJobCompletedAt;
69+
@SerializedName("lifecycle_state")
70+
protected String lifecycleState;
71+
@SerializedName("match_resource_types")
72+
protected List<String> matchResourceTypes;
73+
@SerializedName("match_user_tags")
74+
protected List<String> matchUserTags;
75+
protected String name;
76+
protected List<BackupPolicyPlanReference> plans;
77+
@SerializedName("resource_group")
78+
protected ResourceGroupReference resourceGroup;
79+
@SerializedName("resource_type")
80+
protected String resourceType;
81+
82+
/**
83+
* Gets the createdAt.
84+
*
85+
* The date and time that the backup policy was created.
86+
*
87+
* @return the createdAt
88+
*/
89+
public Date getCreatedAt() {
90+
return createdAt;
91+
}
92+
93+
/**
94+
* Gets the crn.
95+
*
96+
* The CRN for this backup policy.
97+
*
98+
* @return the crn
99+
*/
100+
public String getCrn() {
101+
return crn;
102+
}
103+
104+
/**
105+
* Gets the href.
106+
*
107+
* The URL for this backup policy.
108+
*
109+
* @return the href
110+
*/
111+
public String getHref() {
112+
return href;
113+
}
114+
115+
/**
116+
* Gets the id.
117+
*
118+
* The unique identifier for this backup policy.
119+
*
120+
* @return the id
121+
*/
122+
public String getId() {
123+
return id;
124+
}
125+
126+
/**
127+
* Gets the lastJobCompletedAt.
128+
*
129+
* The date and time that the most recent job for this backup policy completed.
130+
*
131+
* If absent, no job has yet completed for this backup policy.
132+
*
133+
* @return the lastJobCompletedAt
134+
*/
135+
public Date getLastJobCompletedAt() {
136+
return lastJobCompletedAt;
137+
}
138+
139+
/**
140+
* Gets the lifecycleState.
141+
*
142+
* The lifecycle state of the backup policy.
143+
*
144+
* @return the lifecycleState
145+
*/
146+
public String getLifecycleState() {
147+
return lifecycleState;
148+
}
149+
150+
/**
151+
* Gets the matchResourceTypes.
152+
*
153+
* A resource type this backup policy applies to. Resources that have both a matching type and a matching user tag
154+
* will be subject to the backup policy.
155+
*
156+
* The enumerated values for this property will expand in the future. When processing this property, check for and log
157+
* unknown values. Optionally halt processing and surface the error, or bypass the backup policy on which the
158+
* unexpected property value was encountered.
159+
*
160+
* @return the matchResourceTypes
161+
*/
162+
public List<String> getMatchResourceTypes() {
163+
return matchResourceTypes;
164+
}
165+
166+
/**
167+
* Gets the matchUserTags.
168+
*
169+
* The user tags this backup policy applies to. Resources that have both a matching user tag and a matching type will
170+
* be subject to the backup policy.
171+
*
172+
* @return the matchUserTags
173+
*/
174+
public List<String> getMatchUserTags() {
175+
return matchUserTags;
176+
}
177+
178+
/**
179+
* Gets the name.
180+
*
181+
* The unique user-defined name for this backup policy.
182+
*
183+
* @return the name
184+
*/
185+
public String getName() {
186+
return name;
187+
}
188+
189+
/**
190+
* Gets the plans.
191+
*
192+
* The plans for the backup policy.
193+
*
194+
* @return the plans
195+
*/
196+
public List<BackupPolicyPlanReference> getPlans() {
197+
return plans;
198+
}
199+
200+
/**
201+
* Gets the resourceGroup.
202+
*
203+
* The resource group for this backup policy.
204+
*
205+
* @return the resourceGroup
206+
*/
207+
public ResourceGroupReference getResourceGroup() {
208+
return resourceGroup;
209+
}
210+
211+
/**
212+
* Gets the resourceType.
213+
*
214+
* The resource type.
215+
*
216+
* @return the resourceType
217+
*/
218+
public String getResourceType() {
219+
return resourceType;
220+
}
221+
}
222+

0 commit comments

Comments
 (0)