diff --git a/src/main/java/com/google/api/resourcenames/ResourceName.java b/src/main/java/com/google/api/resourcenames/ResourceName.java index 54225babc..e67227fcf 100644 --- a/src/main/java/com/google/api/resourcenames/ResourceName.java +++ b/src/main/java/com/google/api/resourcenames/ResourceName.java @@ -35,13 +35,4 @@ /** An interface that generated resource name types must implement. */ @BetaApi -public interface ResourceName { - - /** - * The ResourceNameType of the resource name object. - * - * @deprecated With Oneof types being converted to use inheritance, this is no longer necessary. - */ - @Deprecated - public ResourceNameType getType(); -} +public interface ResourceName {} diff --git a/src/main/java/com/google/api/resourcenames/ResourceNameType.java b/src/main/java/com/google/api/resourcenames/ResourceNameType.java index 0fb3fabef..2cfe42ca4 100644 --- a/src/main/java/com/google/api/resourcenames/ResourceNameType.java +++ b/src/main/java/com/google/api/resourcenames/ResourceNameType.java @@ -34,8 +34,8 @@ import com.google.api.core.BetaApi; /** - * An interface that resource name types must implement. A ResourceNameType class is required for - * any class that implements {@link ResourceName}. + * An interface that resource name types used to have to implement. A ResourceNameType class was + * required for any class that implements {@link ResourceName}. * * @deprecated With Oneof types being converted to use inheritance, this is no longer necessary. */ diff --git a/src/main/java/com/google/api/resourcenames/UntypedResourceName.java b/src/main/java/com/google/api/resourcenames/UntypedResourceName.java index e47a98975..7e7cfe75d 100644 --- a/src/main/java/com/google/api/resourcenames/UntypedResourceName.java +++ b/src/main/java/com/google/api/resourcenames/UntypedResourceName.java @@ -48,14 +48,6 @@ private UntypedResourceName(String rawValue) { this.rawValue = Preconditions.checkNotNull(rawValue); } - /** - * @deprecated use {@link #of(ResourceName)} instead. - */ - @Deprecated - public static UntypedResourceName from(ResourceName resourceName) { - return new UntypedResourceName(resourceName.toString()); - } - public static UntypedResourceName of(ResourceName resourceName) { return new UntypedResourceName(resourceName.toString()); } @@ -68,16 +60,6 @@ public static boolean isParsableFrom(String formattedString) { return true; } - /* - * @deprecated With Oneof types being converted to use inheritance, this is - * no longer necessary. - */ - @Override - @Deprecated - public ResourceNameType getType() { - return UntypedResourceNameType.instance(); - } - @Override public String toString() { return rawValue; diff --git a/src/main/java/com/google/api/resourcenames/UntypedResourceNameType.java b/src/main/java/com/google/api/resourcenames/UntypedResourceNameType.java deleted file mode 100644 index 873241f28..000000000 --- a/src/main/java/com/google/api/resourcenames/UntypedResourceNameType.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2016, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -package com.google.api.resourcenames; - -import com.google.api.core.BetaApi; - -/** - * The ResourceNameType for {@link UntypedResourceName}. - * - * @deprecated With Oneof types being converted to use inheritance, this is no longer necessary. - */ -@BetaApi -@Deprecated -public class UntypedResourceNameType implements ResourceNameType { - - private static UntypedResourceNameType instance = new UntypedResourceNameType(); - - public static UntypedResourceNameType instance() { - return instance; - } - - private UntypedResourceNameType() {} -}