Skip to content

Commit cd0a584

Browse files
authored
feat(merge-patch): Update vpc service with API version 2020-10-06 (#9)
* feat(merge-patch): Update vpc service with API version 2020-10-06 * fix(travis): update travis build
1 parent f6c7555 commit cd0a584

File tree

774 files changed

+11211
-6986
lines changed

Some content is hidden

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

774 files changed

+11211
-6986
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ before_script:
4242
&& mvn versions:set -DnewVersion=${TRAVIS_TAG} -DgenerateBackupPoms=false
4343
|| true
4444
script:
45-
- mvn clean verify $MVN_ARGS
45+
- mvn clean verify -DskipITs $MVN_ARGS
4646

4747
before_deploy:
4848
- pip install --user bump2version

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ package:
22
mvn package
33

44
install:
5-
mvn clean install
5+
mvn clean install -DskipITs

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

+934-1,220
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
/*
2+
* (C) Copyright IBM Corp. 2020.
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.Map;
16+
17+
import com.google.gson.annotations.SerializedName;
18+
import com.ibm.cloud.sdk.core.service.model.GenericModel;
19+
import com.ibm.cloud.sdk.core.util.GsonSingleton;
20+
21+
/**
22+
* AddressPrefixPatch.
23+
*/
24+
public class AddressPrefixPatch extends GenericModel {
25+
26+
protected String name;
27+
@SerializedName("is_default")
28+
protected Boolean isDefault;
29+
30+
/**
31+
* Builder.
32+
*/
33+
public static class Builder {
34+
private String name;
35+
private Boolean isDefault;
36+
37+
private Builder(AddressPrefixPatch addressPrefixPatch) {
38+
this.name = addressPrefixPatch.name;
39+
this.isDefault = addressPrefixPatch.isDefault;
40+
}
41+
42+
/**
43+
* Instantiates a new builder.
44+
*/
45+
public Builder() {
46+
}
47+
48+
/**
49+
* Builds a AddressPrefixPatch.
50+
*
51+
* @return the new AddressPrefixPatch instance
52+
*/
53+
public AddressPrefixPatch build() {
54+
return new AddressPrefixPatch(this);
55+
}
56+
57+
/**
58+
* Set the name.
59+
*
60+
* @param name the name
61+
* @return the AddressPrefixPatch builder
62+
*/
63+
public Builder name(String name) {
64+
this.name = name;
65+
return this;
66+
}
67+
68+
/**
69+
* Set the isDefault.
70+
*
71+
* @param isDefault the isDefault
72+
* @return the AddressPrefixPatch builder
73+
*/
74+
public Builder isDefault(Boolean isDefault) {
75+
this.isDefault = isDefault;
76+
return this;
77+
}
78+
}
79+
80+
protected AddressPrefixPatch(Builder builder) {
81+
name = builder.name;
82+
isDefault = builder.isDefault;
83+
}
84+
85+
/**
86+
* New builder.
87+
*
88+
* @return a AddressPrefixPatch builder
89+
*/
90+
public Builder newBuilder() {
91+
return new Builder(this);
92+
}
93+
94+
/**
95+
* Gets the name.
96+
*
97+
* The user-defined name for this address prefix. Names must be unique within the VPC the address prefix resides in.
98+
*
99+
* @return the name
100+
*/
101+
public String name() {
102+
return name;
103+
}
104+
105+
/**
106+
* Gets the isDefault.
107+
*
108+
* Indicates whether this is the default prefix for this zone in this VPC. Updating to true makes this prefix the
109+
* default prefix for this zone in this VPC, provided the VPC currently has no default address prefix for this zone.
110+
* Updating to false removes the default prefix for this zone in this VPC.
111+
*
112+
* @return the isDefault
113+
*/
114+
public Boolean isDefault() {
115+
return isDefault;
116+
}
117+
118+
/**
119+
* Construct a JSON merge-patch from the AddressPrefixPatch.
120+
*
121+
* Note that properties of the AddressPrefixPatch with null values are not represented in the constructed
122+
* JSON merge-patch object, but can be explicitly set afterward to signify a property delete.
123+
*
124+
* @return a JSON merge-patch for the AddressPrefixPatch
125+
*/
126+
public Map<String, Object> asPatch() {
127+
return GsonSingleton.getGson().fromJson(this.toString(), Map.class);
128+
}
129+
130+
}
131+

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

+23-23
Original file line numberDiff line numberDiff line change
@@ -21,23 +21,23 @@ public class CreateInstanceVolumeAttachmentOptions extends GenericModel {
2121

2222
protected String instanceId;
2323
protected VolumeIdentity volume;
24-
protected String name;
2524
protected Boolean deleteVolumeOnInstanceDelete;
25+
protected String name;
2626

2727
/**
2828
* Builder.
2929
*/
3030
public static class Builder {
3131
private String instanceId;
3232
private VolumeIdentity volume;
33-
private String name;
3433
private Boolean deleteVolumeOnInstanceDelete;
34+
private String name;
3535

3636
private Builder(CreateInstanceVolumeAttachmentOptions createInstanceVolumeAttachmentOptions) {
3737
this.instanceId = createInstanceVolumeAttachmentOptions.instanceId;
3838
this.volume = createInstanceVolumeAttachmentOptions.volume;
39-
this.name = createInstanceVolumeAttachmentOptions.name;
4039
this.deleteVolumeOnInstanceDelete = createInstanceVolumeAttachmentOptions.deleteVolumeOnInstanceDelete;
40+
this.name = createInstanceVolumeAttachmentOptions.name;
4141
}
4242

4343
/**
@@ -89,24 +89,24 @@ public Builder volume(VolumeIdentity volume) {
8989
}
9090

9191
/**
92-
* Set the name.
92+
* Set the deleteVolumeOnInstanceDelete.
9393
*
94-
* @param name the name
94+
* @param deleteVolumeOnInstanceDelete the deleteVolumeOnInstanceDelete
9595
* @return the CreateInstanceVolumeAttachmentOptions builder
9696
*/
97-
public Builder name(String name) {
98-
this.name = name;
97+
public Builder deleteVolumeOnInstanceDelete(Boolean deleteVolumeOnInstanceDelete) {
98+
this.deleteVolumeOnInstanceDelete = deleteVolumeOnInstanceDelete;
9999
return this;
100100
}
101101

102102
/**
103-
* Set the deleteVolumeOnInstanceDelete.
103+
* Set the name.
104104
*
105-
* @param deleteVolumeOnInstanceDelete the deleteVolumeOnInstanceDelete
105+
* @param name the name
106106
* @return the CreateInstanceVolumeAttachmentOptions builder
107107
*/
108-
public Builder deleteVolumeOnInstanceDelete(Boolean deleteVolumeOnInstanceDelete) {
109-
this.deleteVolumeOnInstanceDelete = deleteVolumeOnInstanceDelete;
108+
public Builder name(String name) {
109+
this.name = name;
110110
return this;
111111
}
112112
}
@@ -118,8 +118,8 @@ protected CreateInstanceVolumeAttachmentOptions(Builder builder) {
118118
"volume cannot be null");
119119
instanceId = builder.instanceId;
120120
volume = builder.volume;
121-
name = builder.name;
122121
deleteVolumeOnInstanceDelete = builder.deleteVolumeOnInstanceDelete;
122+
name = builder.name;
123123
}
124124

125125
/**
@@ -154,26 +154,26 @@ public VolumeIdentity volume() {
154154
}
155155

156156
/**
157-
* Gets the name.
157+
* Gets the deleteVolumeOnInstanceDelete.
158158
*
159-
* The user-defined name for this volume attachment. If unspecified, the name will be a hyphenated list of
160-
* randomly-selected words.
159+
* If set to true, when deleting the instance the volume will also be deleted.
161160
*
162-
* @return the name
161+
* @return the deleteVolumeOnInstanceDelete
163162
*/
164-
public String name() {
165-
return name;
163+
public Boolean deleteVolumeOnInstanceDelete() {
164+
return deleteVolumeOnInstanceDelete;
166165
}
167166

168167
/**
169-
* Gets the deleteVolumeOnInstanceDelete.
168+
* Gets the name.
170169
*
171-
* If set to true, when deleting the instance the volume will also be deleted.
170+
* The user-defined name for this volume attachment. If unspecified, the name will be a hyphenated list of
171+
* randomly-selected words.
172172
*
173-
* @return the deleteVolumeOnInstanceDelete
173+
* @return the name
174174
*/
175-
public Boolean deleteVolumeOnInstanceDelete() {
176-
return deleteVolumeOnInstanceDelete;
175+
public String name() {
176+
return name;
177177
}
178178
}
179179

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ public String vpcId() {
166166
*
167167
* The IPv4 range of the address prefix, expressed in CIDR format. The request must not overlap with any existing
168168
* address prefixes in the VPC, and must fall within the [RFC 1918](https://tools.ietf.org/html/rfc1918) address
169-
* ranges. The prefix length of the address prefix's CIDR must be between `/8` (16,777,216 addresses) and `/29` (8
169+
* ranges. The prefix length of the address prefix's CIDR must be between `/9` (8,388,608 addresses) and `/29` (8
170170
* addresses).
171171
*
172172
* @return the cidr

0 commit comments

Comments
 (0)