@@ -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