File tree Expand file tree Collapse file tree 4 files changed +28
-2
lines changed
sdk-platform-java/api-common-java/src/main/java/com/google/api/resourcenames Expand file tree Collapse file tree 4 files changed +28
-2
lines changed Original file line number Diff line number Diff line change 3737@ BetaApi
3838public interface ResourceName {
3939
40- /** The ResourceNameType of the resource name object. */
40+ /**
41+ * The ResourceNameType of the resource name object.
42+ *
43+ * @deprecated With Oneof types being converted to use inheritance, this is no longer necessary.
44+ */
45+ @ Deprecated
4146 public ResourceNameType getType ();
4247}
Original file line number Diff line number Diff line change 3636/**
3737 * An interface that resource name types must implement. A ResourceNameType class is required for
3838 * any class that implements {@link ResourceName}.
39+ *
40+ * @deprecated With Oneof types being converted to use inheritance, this is no longer necessary.
3941 */
4042@ BetaApi
43+ @ Deprecated
4144public interface ResourceNameType {}
Original file line number Diff line number Diff line change @@ -48,10 +48,18 @@ private UntypedResourceName(String rawValue) {
4848 this .rawValue = Preconditions .checkNotNull (rawValue );
4949 }
5050
51+ /**
52+ * @deprecated use {@link #of(ResourceName)} instead.
53+ */
54+ @ Deprecated
5155 public static UntypedResourceName from (ResourceName resourceName ) {
5256 return new UntypedResourceName (resourceName .toString ());
5357 }
5458
59+ public static UntypedResourceName of (ResourceName resourceName ) {
60+ return new UntypedResourceName (resourceName .toString ());
61+ }
62+
5563 public static UntypedResourceName parse (String formattedString ) {
5664 return new UntypedResourceName (formattedString );
5765 }
@@ -60,7 +68,12 @@ public static boolean isParsableFrom(String formattedString) {
6068 return true ;
6169 }
6270
71+ /*
72+ * @deprecated With Oneof types being converted to use inheritance, this is
73+ * no longer necessary.
74+ */
6375 @ Override
76+ @ Deprecated
6477 public ResourceNameType getType () {
6578 return UntypedResourceNameType .instance ();
6679 }
Original file line number Diff line number Diff line change 3333
3434import com .google .api .core .BetaApi ;
3535
36- /** The ResourceNameType for {@link UntypedResourceName}. */
36+ /**
37+ * The ResourceNameType for {@link UntypedResourceName}.
38+ *
39+ * @deprecated With Oneof types being converted to use inheritance, this is no longer necessary.
40+ */
3741@ BetaApi
42+ @ Deprecated
3843public class UntypedResourceNameType implements ResourceNameType {
3944
4045 private static UntypedResourceNameType instance = new UntypedResourceNameType ();
You can’t perform that action at this time.
0 commit comments