Skip to content

Commit e5c56f7

Browse files
uibmsumitkumartiwari
authored andcommitted
feat(2021-10-19): Updated the sdk as per the 2021-10-19 api spec (#32)
1 parent aa9d01e commit e5c56f7

File tree

72 files changed

+4543
-105
lines changed

Some content is hidden

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

72 files changed

+4543
-105
lines changed

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

+1-2
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,7 @@
229229
import com.ibm.cloud.is.vpc.v1.model.InstanceGroupManager;
230230
import com.ibm.cloud.is.vpc.v1.model.InstanceGroupManagerAction;
231231
import com.ibm.cloud.is.vpc.v1.model.InstanceGroupManagerActionPatch;
232+
import com.ibm.cloud.is.vpc.v1.model.InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup;
232233
import com.ibm.cloud.is.vpc.v1.model.InstanceGroupManagerActionsCollection;
233234
import com.ibm.cloud.is.vpc.v1.model.InstanceGroupManagerCollection;
234235
import com.ibm.cloud.is.vpc.v1.model.InstanceGroupManagerPatch;
@@ -483,8 +484,6 @@
483484
import com.ibm.cloud.is.vpc.v1.model.Zone;
484485
import com.ibm.cloud.is.vpc.v1.model.ZoneCollection;
485486
import com.ibm.cloud.is.vpc.v1.model.ZoneIdentityByName;
486-
import com.ibm.cloud.is.vpc.v1.model.InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup;
487-
488487
import com.ibm.cloud.sdk.core.http.Response;
489488
import com.ibm.cloud.sdk.core.service.exception.ServiceResponseException;
490489
import com.ibm.cloud.sdk.core.util.CredentialUtils;

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

+30-13
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
*/
1313

1414
/*
15-
* IBM OpenAPI SDK Code Generator Version: 3.38.0-07189efd-20210827-205025
15+
* IBM OpenAPI SDK Code Generator Version: 3.39.0-748eb4ca-20210917-165907
1616
*/
1717

1818
package com.ibm.cloud.is.vpc.v1;
@@ -414,15 +414,15 @@
414414
* The IBM Cloud Virtual Private Cloud (VPC) API can be used to programmatically provision and manage infrastructure
415415
* resources, including virtual server instances, subnets, volumes, and load balancers.
416416
*
417-
* API Version: 2021-09-07
417+
* API Version: 2021-10-19
418418
*/
419419
public class Vpc extends BaseService {
420420

421421
public static final String DEFAULT_SERVICE_NAME = "vpc";
422422

423423
public static final String DEFAULT_SERVICE_URL = "https://us-south.iaas.cloud.ibm.com/v1";
424424

425-
private String version = "2021-09-07";
425+
private String version = "2021-10-19";
426426

427427
private Long generation = Long.valueOf("2");
428428

@@ -752,8 +752,9 @@ public ServiceCall<DefaultRoutingTable> getVpcDefaultRoutingTable(GetVpcDefaultR
752752
/**
753753
* Retrieve a VPC's default security group.
754754
*
755-
* This request retrieves the default security group for the VPC specified by the identifier in the URL. The default
756-
* security group is applied to any new network interfaces in the VPC that do not specify a security group.
755+
* This request retrieves the default security group for the VPC specified by the identifier in the URL. Resources
756+
* that optionally allow a security group to be specified upon creation will be attached to this security group if a
757+
* security group is not specified.
757758
*
758759
* @param getVpcDefaultSecurityGroupOptions the {@link GetVpcDefaultSecurityGroupOptions} containing the options for the call
759760
* @return a {@link ServiceCall} with a result of type {@link DefaultSecurityGroup}
@@ -6526,7 +6527,8 @@ public ServiceCall<IKEPolicy> createIkePolicy(CreateIkePolicyOptions createIkePo
65266527
/**
65276528
* Delete an IKE policy.
65286529
*
6529-
* This request deletes an IKE policy. This operation cannot be reversed.
6530+
* This request deletes an IKE policy. This operation cannot be reversed. For this request to succeed, there must not
6531+
* be any VPN gateway connections using this policy.
65306532
*
65316533
* @param deleteIkePolicyOptions the {@link DeleteIkePolicyOptions} containing the options for the call
65326534
* @return a {@link ServiceCall} with a void result
@@ -6709,7 +6711,8 @@ public ServiceCall<IPsecPolicy> createIpsecPolicy(CreateIpsecPolicyOptions creat
67096711
/**
67106712
* Delete an IPsec policy.
67116713
*
6712-
* This request deletes an IPsec policy. This operation cannot be reversed.
6714+
* This request deletes an IPsec policy. This operation cannot be reversed. For this request to succeed, there must
6715+
* not be any VPN gateway connections using this policy.
67136716
*
67146717
* @param deleteIpsecPolicyOptions the {@link DeleteIpsecPolicyOptions} containing the options for the call
67156718
* @return a {@link ServiceCall} with a void result
@@ -6885,8 +6888,9 @@ public ServiceCall<VPNGateway> createVpnGateway(CreateVpnGatewayOptions createVp
68856888
/**
68866889
* Delete a VPN gateway.
68876890
*
6888-
* This request deletes a VPN gateway. A VPN gateway with a `status` of `pending` cannot be deleted. This operation
6889-
* deletes all VPN gateway connections associated with this VPN gateway. This operation cannot be reversed.
6891+
* This request deletes a VPN gateway. This operation cannot be reversed. For this request to succeed, the VPN gateway
6892+
* must not have a `status` of `pending`, and there must not be any VPC routes using the VPN gateway's connections as
6893+
* a next hop.
68906894
*
68916895
* @param deleteVpnGatewayOptions the {@link DeleteVpnGatewayOptions} containing the options for the call
68926896
* @return a {@link ServiceCall} with a void result
@@ -7019,7 +7023,8 @@ public ServiceCall<VPNGatewayConnection> createVpnGatewayConnection(CreateVpnGat
70197023
/**
70207024
* Delete a VPN gateway connection.
70217025
*
7022-
* This request deletes a VPN gateway connection. This operation cannot be reversed.
7026+
* This request deletes a VPN gateway connection. This operation cannot be reversed. For this request to succeed,
7027+
* there must not be VPC routes using this VPN connection as a next hop.
70237028
*
70247029
* @param deleteVpnGatewayConnectionOptions the {@link DeleteVpnGatewayConnectionOptions} containing the options for the call
70257030
* @return a {@link ServiceCall} with a void result
@@ -7466,6 +7471,9 @@ public ServiceCall<LoadBalancer> createLoadBalancer(CreateLoadBalancerOptions cr
74667471
if (createLoadBalancerOptions.resourceGroup() != null) {
74677472
contentJson.add("resource_group", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createLoadBalancerOptions.resourceGroup()));
74687473
}
7474+
if (createLoadBalancerOptions.routeMode() != null) {
7475+
contentJson.addProperty("route_mode", createLoadBalancerOptions.routeMode());
7476+
}
74697477
if (createLoadBalancerOptions.securityGroups() != null) {
74707478
contentJson.add("security_groups", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createLoadBalancerOptions.securityGroups()));
74717479
}
@@ -7626,7 +7634,6 @@ public ServiceCall<LoadBalancerListener> createLoadBalancerListener(CreateLoadBa
76267634
builder.query("version", String.valueOf(this.version));
76277635
builder.query("generation", String.valueOf(this.generation));
76287636
final JsonObject contentJson = new JsonObject();
7629-
contentJson.addProperty("port", createLoadBalancerListenerOptions.port());
76307637
contentJson.addProperty("protocol", createLoadBalancerListenerOptions.protocol());
76317638
if (createLoadBalancerListenerOptions.acceptProxyProtocol() != null) {
76327639
contentJson.addProperty("accept_proxy_protocol", createLoadBalancerListenerOptions.acceptProxyProtocol());
@@ -7646,6 +7653,15 @@ public ServiceCall<LoadBalancerListener> createLoadBalancerListener(CreateLoadBa
76467653
if (createLoadBalancerListenerOptions.policies() != null) {
76477654
contentJson.add("policies", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createLoadBalancerListenerOptions.policies()));
76487655
}
7656+
if (createLoadBalancerListenerOptions.port() != null) {
7657+
contentJson.addProperty("port", createLoadBalancerListenerOptions.port());
7658+
}
7659+
if (createLoadBalancerListenerOptions.portMax() != null) {
7660+
contentJson.addProperty("port_max", createLoadBalancerListenerOptions.portMax());
7661+
}
7662+
if (createLoadBalancerListenerOptions.portMin() != null) {
7663+
contentJson.addProperty("port_min", createLoadBalancerListenerOptions.portMin());
7664+
}
76497665
builder.bodyJson(contentJson);
76507666
ResponseConverter<LoadBalancerListener> responseConverter =
76517667
ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken<LoadBalancerListener>() { }.getType());
@@ -8752,8 +8768,9 @@ public ServiceCall<FlowLogCollector> createFlowLogCollector(CreateFlowLogCollect
87528768
/**
87538769
* Delete a flow log collector.
87548770
*
8755-
* This request stops and deletes a flow log collector. Collected flow logs remain available within the flow log
8756-
* collector's bucket.
8771+
* This request stops and deletes a flow log collector. This operation cannot be reversed.
8772+
*
8773+
* Collected flow logs remain available within the flow log collector's Cloud Object Storage bucket.
87578774
*
87588775
* @param deleteFlowLogCollectorOptions the {@link DeleteFlowLogCollectorOptions} containing the options for the call
87598776
* @return a {@link ServiceCall} with a void result

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

+3-2
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,9 @@ public Builder newBuilder() {
138138
/**
139139
* Gets the publicKey.
140140
*
141-
* A unique public SSH key to import, encoded in PEM format. The key (prior to encoding) must be either 2048 or 4096
142-
* bits long.
141+
* A unique public SSH key to import, in OpenSSH format (consisting of three space-separated fields: the algorithm
142+
* name, base64-encoded key, and a comment). The algorithm and comment fields may be omitted, as only the key field is
143+
* imported.
143144
*
144145
* @return the publicKey
145146
*/

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

+90-32
Original file line numberDiff line numberDiff line change
@@ -39,39 +39,45 @@ public interface Protocol {
3939
}
4040

4141
protected String loadBalancerId;
42-
protected Long port;
4342
protected String protocol;
4443
protected Boolean acceptProxyProtocol;
4544
protected CertificateInstanceIdentity certificateInstance;
4645
protected Long connectionLimit;
4746
protected LoadBalancerPoolIdentity defaultPool;
4847
protected LoadBalancerListenerHTTPSRedirectPrototype httpsRedirect;
4948
protected List<LoadBalancerListenerPolicyPrototype> policies;
49+
protected Long port;
50+
protected Long portMax;
51+
protected Long portMin;
5052

5153
/**
5254
* Builder.
5355
*/
5456
public static class Builder {
5557
private String loadBalancerId;
56-
private Long port;
5758
private String protocol;
5859
private Boolean acceptProxyProtocol;
5960
private CertificateInstanceIdentity certificateInstance;
6061
private Long connectionLimit;
6162
private LoadBalancerPoolIdentity defaultPool;
6263
private LoadBalancerListenerHTTPSRedirectPrototype httpsRedirect;
6364
private List<LoadBalancerListenerPolicyPrototype> policies;
65+
private Long port;
66+
private Long portMax;
67+
private Long portMin;
6468

6569
private Builder(CreateLoadBalancerListenerOptions createLoadBalancerListenerOptions) {
6670
this.loadBalancerId = createLoadBalancerListenerOptions.loadBalancerId;
67-
this.port = createLoadBalancerListenerOptions.port;
6871
this.protocol = createLoadBalancerListenerOptions.protocol;
6972
this.acceptProxyProtocol = createLoadBalancerListenerOptions.acceptProxyProtocol;
7073
this.certificateInstance = createLoadBalancerListenerOptions.certificateInstance;
7174
this.connectionLimit = createLoadBalancerListenerOptions.connectionLimit;
7275
this.defaultPool = createLoadBalancerListenerOptions.defaultPool;
7376
this.httpsRedirect = createLoadBalancerListenerOptions.httpsRedirect;
7477
this.policies = createLoadBalancerListenerOptions.policies;
78+
this.port = createLoadBalancerListenerOptions.port;
79+
this.portMax = createLoadBalancerListenerOptions.portMax;
80+
this.portMin = createLoadBalancerListenerOptions.portMin;
7581
}
7682

7783
/**
@@ -84,12 +90,10 @@ public Builder() {
8490
* Instantiates a new builder with required properties.
8591
*
8692
* @param loadBalancerId the loadBalancerId
87-
* @param port the port
8893
* @param protocol the protocol
8994
*/
90-
public Builder(String loadBalancerId, Long port, String protocol) {
95+
public Builder(String loadBalancerId, String protocol) {
9196
this.loadBalancerId = loadBalancerId;
92-
this.port = port;
9397
this.protocol = protocol;
9498
}
9599

@@ -129,17 +133,6 @@ public Builder loadBalancerId(String loadBalancerId) {
129133
return this;
130134
}
131135

132-
/**
133-
* Set the port.
134-
*
135-
* @param port the port
136-
* @return the CreateLoadBalancerListenerOptions builder
137-
*/
138-
public Builder port(long port) {
139-
this.port = port;
140-
return this;
141-
}
142-
143136
/**
144137
* Set the protocol.
145138
*
@@ -217,24 +210,57 @@ public Builder policies(List<LoadBalancerListenerPolicyPrototype> policies) {
217210
this.policies = policies;
218211
return this;
219212
}
213+
214+
/**
215+
* Set the port.
216+
*
217+
* @param port the port
218+
* @return the CreateLoadBalancerListenerOptions builder
219+
*/
220+
public Builder port(long port) {
221+
this.port = port;
222+
return this;
223+
}
224+
225+
/**
226+
* Set the portMax.
227+
*
228+
* @param portMax the portMax
229+
* @return the CreateLoadBalancerListenerOptions builder
230+
*/
231+
public Builder portMax(long portMax) {
232+
this.portMax = portMax;
233+
return this;
234+
}
235+
236+
/**
237+
* Set the portMin.
238+
*
239+
* @param portMin the portMin
240+
* @return the CreateLoadBalancerListenerOptions builder
241+
*/
242+
public Builder portMin(long portMin) {
243+
this.portMin = portMin;
244+
return this;
245+
}
220246
}
221247

222248
protected CreateLoadBalancerListenerOptions(Builder builder) {
223249
com.ibm.cloud.sdk.core.util.Validator.notEmpty(builder.loadBalancerId,
224250
"loadBalancerId cannot be empty");
225-
com.ibm.cloud.sdk.core.util.Validator.notNull(builder.port,
226-
"port cannot be null");
227251
com.ibm.cloud.sdk.core.util.Validator.notNull(builder.protocol,
228252
"protocol cannot be null");
229253
loadBalancerId = builder.loadBalancerId;
230-
port = builder.port;
231254
protocol = builder.protocol;
232255
acceptProxyProtocol = builder.acceptProxyProtocol;
233256
certificateInstance = builder.certificateInstance;
234257
connectionLimit = builder.connectionLimit;
235258
defaultPool = builder.defaultPool;
236259
httpsRedirect = builder.httpsRedirect;
237260
policies = builder.policies;
261+
port = builder.port;
262+
portMax = builder.portMax;
263+
portMin = builder.portMin;
238264
}
239265

240266
/**
@@ -257,18 +283,6 @@ public String loadBalancerId() {
257283
return loadBalancerId;
258284
}
259285

260-
/**
261-
* Gets the port.
262-
*
263-
* The listener port number. Each listener in the load balancer must have a unique
264-
* `port` and `protocol` combination.
265-
*
266-
* @return the port
267-
*/
268-
public Long port() {
269-
return port;
270-
}
271-
272286
/**
273287
* Gets the protocol.
274288
*
@@ -360,5 +374,49 @@ public LoadBalancerListenerHTTPSRedirectPrototype httpsRedirect() {
360374
public List<LoadBalancerListenerPolicyPrototype> policies() {
361375
return policies;
362376
}
377+
378+
/**
379+
* Gets the port.
380+
*
381+
* The listener port number, or the inclusive lower bound of the port range. Each listener in the load balancer must
382+
* have a unique `port` and `protocol` combination.
383+
*
384+
* Not supported for load balancers operating with route mode enabled.
385+
*
386+
* @return the port
387+
*/
388+
public Long port() {
389+
return port;
390+
}
391+
392+
/**
393+
* Gets the portMax.
394+
*
395+
* The inclusive upper bound of the range of ports used by this listener. Must not be less than `port_min`.
396+
*
397+
* At present, only load balancers operating with route mode enabled support different values for `port_min` and
398+
* `port_max`. When route mode is enabled, only a value of
399+
* `65535` is supported for `port_max`.
400+
*
401+
* @return the portMax
402+
*/
403+
public Long portMax() {
404+
return portMax;
405+
}
406+
407+
/**
408+
* Gets the portMin.
409+
*
410+
* The inclusive lower bound of the range of ports used by this listener. Must not be greater than `port_max`.
411+
*
412+
* At present, only load balancers operating with route mode enabled support different values for `port_min` and
413+
* `port_max`. When route mode is enabled, only a value of
414+
* `1` is supported for `port_min`.
415+
*
416+
* @return the portMin
417+
*/
418+
public Long portMin() {
419+
return portMin;
420+
}
363421
}
364422

0 commit comments

Comments
 (0)