Skip to content

Commit fc9f9f7

Browse files
authored
Remove deperecated methods from GCE (#1753)
1 parent 9278868 commit fc9f9f7

111 files changed

Lines changed: 43 additions & 4649 deletions

File tree

Some content is hidden

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

google-cloud-compute/src/main/java/com/google/cloud/compute/Address.java

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,6 @@ public static class Builder extends AddressInfo.Builder {
6464
this.infoBuilder = new AddressInfo.BuilderImpl(address);
6565
}
6666

67-
@Override
68-
@Deprecated
69-
public Builder address(String address) {
70-
return setAddress(address);
71-
}
72-
7367
@Override
7468
public Builder setAddress(String address) {
7569
infoBuilder.setAddress(address);
@@ -82,12 +76,6 @@ Builder setCreationTimestamp(Long creationTimestamp) {
8276
return this;
8377
}
8478

85-
@Override
86-
@Deprecated
87-
public Builder description(String description) {
88-
return setDescription(description);
89-
}
90-
9179
@Override
9280
public Builder setDescription(String description) {
9381
infoBuilder.setDescription(description);
@@ -100,12 +88,6 @@ Builder setGeneratedId(String generatedId) {
10088
return this;
10189
}
10290

103-
@Override
104-
@Deprecated
105-
public Builder addressId(AddressId addressId) {
106-
return setAddressId(addressId);
107-
}
108-
10991
@Override
11092
public Builder setAddressId(AddressId addressId) {
11193
infoBuilder.setAddressId(addressId);
@@ -169,14 +151,6 @@ public Operation delete(OperationOption... options) {
169151
return compute.deleteAddress(getAddressId(), options);
170152
}
171153

172-
/**
173-
* Returns the address's {@code Compute} object used to issue requests.
174-
*/
175-
@Deprecated
176-
public Compute compute() {
177-
return getCompute();
178-
}
179-
180154
/**
181155
* Returns the address's {@code Compute} object used to issue requests.
182156
*/

google-cloud-compute/src/main/java/com/google/cloud/compute/AddressId.java

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -51,31 +51,11 @@ enum Type {
5151
this.address = checkNotNull(address);
5252
}
5353

54-
/**
55-
* Returns the type of this address identity.
56-
*/
57-
@Deprecated
58-
public abstract Type type();
59-
6054
/**
6155
* Returns the type of this address identity.
6256
*/
6357
public abstract Type getType();
6458

65-
/**
66-
* Returns the name of the address resource. The name must be 1-63 characters long and comply with
67-
* RFC1035. Specifically, the name must match the regular expression
68-
* {@code [a-z]([-a-z0-9]*[a-z0-9])?} which means the first character must be a lowercase letter,
69-
* and all following characters must be a dash, lowercase letter, or digit, except the last
70-
* character, which cannot be a dash.
71-
*
72-
* @see <a href="https://www.ietf.org/rfc/rfc1035.txt">RFC1035</a>
73-
*/
74-
@Deprecated
75-
public String address() {
76-
return getAddress();
77-
}
78-
7959
/**
8060
* Returns the name of the address resource. The name must be 1-63 characters long and comply with
8161
* RFC1035. Specifically, the name must match the regular expression

google-cloud-compute/src/main/java/com/google/cloud/compute/AddressInfo.java

Lines changed: 0 additions & 152 deletions
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,6 @@ public abstract static class Usage implements Serializable {
103103

104104
Usage() {}
105105

106-
/**
107-
* Returns the identities of resources currently using this address.
108-
*/
109-
@Deprecated
110-
public abstract List<? extends ResourceId> users();
111-
112106
/**
113107
* Returns the identities of resources currently using this address.
114108
*/
@@ -156,27 +150,13 @@ public static final class InstanceUsage extends Usage {
156150
this.instance = checkNotNull(instance);
157151
}
158152

159-
/**
160-
* Returns the identity of the instance using the address.
161-
*/
162-
@Deprecated
163-
public InstanceId instance() {
164-
return getInstance();
165-
}
166-
167153
/**
168154
* Returns the identity of the instance using the address.
169155
*/
170156
public InstanceId getInstance() {
171157
return instance;
172158
}
173159

174-
@Override
175-
@Deprecated
176-
public List<InstanceId> users() {
177-
return getUsers();
178-
}
179-
180160
@Override
181161
public List<InstanceId> getUsers() {
182162
return ImmutableList.of(instance);
@@ -217,27 +197,13 @@ public static final class RegionForwardingUsage extends Usage {
217197
this.forwardingRules = ImmutableList.copyOf(forwardingRules);
218198
}
219199

220-
/**
221-
* Returns a list of identities of region forwarding rules that are currently using the address.
222-
*/
223-
@Deprecated
224-
public List<RegionForwardingRuleId> forwardingRules() {
225-
return getForwardingRules();
226-
}
227-
228200
/**
229201
* Returns a list of identities of region forwarding rules that are currently using the address.
230202
*/
231203
public List<RegionForwardingRuleId> getForwardingRules() {
232204
return forwardingRules;
233205
}
234206

235-
@Override
236-
@Deprecated
237-
public List<RegionForwardingRuleId> users() {
238-
return getUsers();
239-
}
240-
241207
@Override
242208
public List<RegionForwardingRuleId> getUsers() {
243209
return forwardingRules;
@@ -279,27 +245,13 @@ public static final class GlobalForwardingUsage extends Usage {
279245
this.forwardingRules = ImmutableList.copyOf(forwardingRules);
280246
}
281247

282-
/**
283-
* Returns a list of identities of global forwarding rules that are currently using the address.
284-
*/
285-
@Deprecated
286-
public List<GlobalForwardingRuleId> forwardingRules() {
287-
return getForwardingRules();
288-
}
289-
290248
/**
291249
* Returns a list of identities of global forwarding rules that are currently using the address.
292250
*/
293251
public List<GlobalForwardingRuleId> getForwardingRules() {
294252
return forwardingRules;
295253
}
296254

297-
@Override
298-
@Deprecated
299-
public List<GlobalForwardingRuleId> users() {
300-
return getUsers();
301-
}
302-
303255
@Override
304256
public List<GlobalForwardingRuleId> getUsers() {
305257
return forwardingRules;
@@ -332,35 +284,20 @@ static GlobalForwardingUsage fromPb(Address addressPb) {
332284
*/
333285
public abstract static class Builder {
334286

335-
/**
336-
* Sets the actual IP address.
337-
*/
338-
@Deprecated
339-
public abstract Builder address(String address);
340-
341287
/**
342288
* Sets the actual IP address.
343289
*/
344290
public abstract Builder setAddress(String address);
345291

346292
abstract Builder setCreationTimestamp(Long creationTimestamp);
347293

348-
/**
349-
* Sets an optional textual description of the address.
350-
*/
351-
@Deprecated
352-
public abstract Builder description(String description);
353-
354294
/**
355295
* Sets an optional textual description of the address.
356296
*/
357297
public abstract Builder setDescription(String description);
358298

359299
abstract Builder setGeneratedId(String generatedId);
360300

361-
@Deprecated
362-
public abstract Builder addressId(AddressId addressId);
363-
364301
public abstract Builder setAddressId(AddressId addressId);
365302

366303
abstract Builder setStatus(Status status);
@@ -417,12 +354,6 @@ static final class BuilderImpl extends Builder {
417354
}
418355
}
419356

420-
@Override
421-
@Deprecated
422-
public BuilderImpl address(String address) {
423-
return setAddress(address);
424-
}
425-
426357
@Override
427358
public BuilderImpl setAddress(String address) {
428359
this.address = address;
@@ -435,12 +366,6 @@ BuilderImpl setCreationTimestamp(Long creationTimestamp) {
435366
return this;
436367
}
437368

438-
@Override
439-
@Deprecated
440-
public BuilderImpl description(String description) {
441-
return setDescription(description);
442-
}
443-
444369
@Override
445370
public BuilderImpl setDescription(String description) {
446371
this.description = description;
@@ -453,12 +378,6 @@ BuilderImpl setGeneratedId(String generatedId) {
453378
return this;
454379
}
455380

456-
@Override
457-
@Deprecated
458-
public BuilderImpl addressId(AddressId addressId) {
459-
return setAddressId(addressId);
460-
}
461-
462381
@Override
463382
public BuilderImpl setAddressId(AddressId addressId) {
464383
this.addressId = checkNotNull(addressId);
@@ -493,76 +412,34 @@ public AddressInfo build() {
493412
usage = builder.usage;
494413
}
495414

496-
/**
497-
* Returns the static external IP address represented by this object.
498-
*/
499-
@Deprecated
500-
public String address() {
501-
return getAddress();
502-
}
503-
504415
/**
505416
* Returns the static external IP address represented by this object.
506417
*/
507418
public String getAddress() {
508419
return address;
509420
}
510421

511-
/**
512-
* Returns the creation timestamp in milliseconds since epoch.
513-
*/
514-
@Deprecated
515-
public Long creationTimestamp() {
516-
return getCreationTimestamp();
517-
}
518-
519422
/**
520423
* Returns the creation timestamp in milliseconds since epoch.
521424
*/
522425
public Long getCreationTimestamp() {
523426
return creationTimestamp;
524427
}
525428

526-
/**
527-
* Returns an optional textual description of the address.
528-
*/
529-
@Deprecated
530-
public String description() {
531-
return getDescription();
532-
}
533-
534429
/**
535430
* Returns an optional textual description of the address.
536431
*/
537432
public String getDescription() {
538433
return description;
539434
}
540435

541-
/**
542-
* Returns the service-generated unique identifier for the address.
543-
*/
544-
@Deprecated
545-
public String generatedId() {
546-
return getGeneratedId();
547-
}
548-
549436
/**
550437
* Returns the service-generated unique identifier for the address.
551438
*/
552439
public String getGeneratedId() {
553440
return generatedId;
554441
}
555442

556-
/**
557-
* Returns the address identity. Returns {@link GlobalAddressId} for a global address, returns
558-
* {@link RegionAddressId} for a region address.
559-
*/
560-
@SuppressWarnings("unchecked")
561-
@Deprecated
562-
public <T extends AddressId> T addressId() {
563-
return getAddressId();
564-
}
565-
566443
/**
567444
* Returns the address identity. Returns {@link GlobalAddressId} for a global address, returns
568445
* {@link RegionAddressId} for a region address.
@@ -572,34 +449,13 @@ public <T extends AddressId> T getAddressId() {
572449
return (T) addressId;
573450
}
574451

575-
/**
576-
* Returns the status of the address.
577-
*/
578-
@Deprecated
579-
public Status status() {
580-
return getStatus();
581-
}
582-
583452
/**
584453
* Returns the status of the address.
585454
*/
586455
public Status getStatus() {
587456
return status;
588457
}
589458

590-
/**
591-
* Returns the usage information of the address. Returns an {@link InstanceUsage} object for
592-
* region addresses that are assigned to VM instances. Returns a {@link RegionForwardingUsage}
593-
* object for region addresses assigned to region forwarding rules. Returns a
594-
* {@link GlobalForwardingUsage} object for global addresses assigned to global forwarding rules.
595-
* Returns {@code null} if the address is not in use.
596-
*/
597-
@SuppressWarnings("unchecked")
598-
@Deprecated
599-
public <T extends Usage> T usage() {
600-
return getUsage();
601-
}
602-
603459
/**
604460
* Returns the usage information of the address. Returns an {@link InstanceUsage} object for
605461
* region addresses that are assigned to VM instances. Returns a {@link RegionForwardingUsage}
@@ -674,14 +530,6 @@ Address toPb() {
674530
return addressPb;
675531
}
676532

677-
/**
678-
* Returns a builder for the {@code AddressInfo} object given it's identity.
679-
*/
680-
@Deprecated
681-
public static Builder builder(AddressId addressId) {
682-
return newBuilder(addressId);
683-
}
684-
685533
/**
686534
* Returns a builder for the {@code AddressInfo} object given it's identity.
687535
*/

0 commit comments

Comments
 (0)