Skip to content

Commit

Permalink
chore: remove beta httpjson (#2358)
Browse files Browse the repository at this point in the history
Fixes #2101 ☕️
  • Loading branch information
JoeWang1127 authored Feb 15, 2024
1 parent 5a821c5 commit 7da92b1
Show file tree
Hide file tree
Showing 22 changed files with 2 additions and 66 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ protected List<MethodDefinition> createNestedBuilderCreatorMethods(
String newBuilderMethodName,
String createDefaultMethodName,
List<AnnotationNode> annotations) {
AnnotationNode betaApiAnnotaiton =
AnnotationNode.builder().setType(FIXED_TYPESTORE.get("BetaApi")).build();

List<MethodDefinition> methods = new ArrayList<>();
methods.addAll(
Expand All @@ -59,10 +57,7 @@ protected List<MethodDefinition> createNestedBuilderCreatorMethods(
typeStore,
"newHttpJsonBuilder",
"createHttpJsonDefault",
ImmutableList.<AnnotationNode>builder()
.addAll(annotations)
.add(betaApiAnnotaiton)
.build()));
ImmutableList.<AnnotationNode>builder().addAll(annotations).build()));
}
return methods;
}
Expand All @@ -77,9 +72,6 @@ protected List<MethodDefinition> createNewBuilderMethods(
CommentStatement comment) {
List<MethodDefinition> methods = new ArrayList<>();

AnnotationNode betaApiAnnotaiton =
AnnotationNode.builder().setType(FIXED_TYPESTORE.get("BetaApi")).build();

Iterator<String> transportNames = getTransportContext().transportNames().iterator();

methods.addAll(
Expand All @@ -98,10 +90,7 @@ protected List<MethodDefinition> createNewBuilderMethods(
typeStore,
"newHttpJsonBuilder",
"createHttpJsonDefault",
ImmutableList.<AnnotationNode>builder()
.addAll(annotations)
.add(betaApiAnnotaiton)
.build(),
ImmutableList.<AnnotationNode>builder().addAll(annotations).build(),
new SettingsCommentComposer(transportNames.next())
.getNewTransportBuilderMethodComment()));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,19 +210,6 @@ protected List<MethodDefinition> createOperationsStubGetterMethod(
return super.createOperationsStubGetterMethod(service, operationsStubVarExpr);
}

@Override
protected List<AnnotationNode> createClassAnnotations(Service service) {
List<AnnotationNode> annotations = super.createClassAnnotations(service);

TypeNode betaApiType = FIXED_TYPESTORE.get("BetaApi");

if (annotations.stream().noneMatch(a -> betaApiType.equals(a.type()))) {
annotations.add(AnnotationNode.builder().setType(betaApiType).build());
}

return annotations;
}

@Override
protected List<MethodDefinition> createGetMethodDescriptorsMethod(
Service service,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,6 @@ public class EchoSettings extends ClientSettings<EchoSettings> {
}

/** Returns a new REST builder for this class. */
@BetaApi
public static Builder newHttpJsonBuilder() {
return Builder.createHttpJsonDefault();
}
Expand Down Expand Up @@ -219,7 +218,6 @@ public class EchoSettings extends ClientSettings<EchoSettings> {
return new Builder(EchoStubSettings.newBuilder());
}

@BetaApi
private static Builder createHttpJsonDefault() {
return new Builder(EchoStubSettings.newHttpJsonBuilder());
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.google.auto.populate.field.stub;

import com.google.api.core.BetaApi;
import com.google.api.core.InternalApi;
import com.google.api.gax.core.BackgroundResource;
import com.google.api.gax.core.BackgroundResourceAggregation;
Expand Down Expand Up @@ -36,7 +35,6 @@ import javax.annotation.Generated;
* <p>This class is for advanced usage and reflects the underlying API directly.
*/
@Generated("by gapic-generator-java")
@BetaApi
public class HttpJsonAutoPopulateFieldTestingStub extends AutoPopulateFieldTestingStub {
private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build();

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.google.explicit.dynamic.routing.header.stub;

import com.google.api.core.BetaApi;
import com.google.api.core.InternalApi;
import com.google.api.gax.core.BackgroundResource;
import com.google.api.gax.core.BackgroundResourceAggregation;
Expand Down Expand Up @@ -35,7 +34,6 @@ import javax.annotation.Generated;
* <p>This class is for advanced usage and reflects the underlying API directly.
*/
@Generated("by gapic-generator-java")
@BetaApi
public class HttpJsonExplicitDynamicRoutingHeaderTestingStub
extends ExplicitDynamicRoutingHeaderTestingStub {
private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,6 @@ public static Builder newBuilder() {
}

/** Returns a new REST builder for this class. */
@BetaApi
public static Builder newHttpJsonBuilder() {
return Builder.createHttpJsonDefault();
}
Expand Down Expand Up @@ -254,7 +253,6 @@ private static Builder createDefault() {
return new Builder(ComplianceStubSettings.newBuilder());
}

@BetaApi
private static Builder createHttpJsonDefault() {
return new Builder(ComplianceStubSettings.newHttpJsonBuilder());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,6 @@ public static Builder newBuilder() {
}

/** Returns a new REST builder for this class. */
@BetaApi
public static Builder newHttpJsonBuilder() {
return Builder.createHttpJsonDefault();
}
Expand Down Expand Up @@ -270,7 +269,6 @@ private static Builder createDefault() {
return new Builder(EchoStubSettings.newBuilder());
}

@BetaApi
private static Builder createHttpJsonDefault() {
return new Builder(EchoStubSettings.newHttpJsonBuilder());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,6 @@ public static Builder newBuilder() {
}

/** Returns a new REST builder for this class. */
@BetaApi
public static Builder newHttpJsonBuilder() {
return Builder.createHttpJsonDefault();
}
Expand Down Expand Up @@ -232,7 +231,6 @@ private static Builder createDefault() {
return new Builder(IdentityStubSettings.newBuilder());
}

@BetaApi
private static Builder createHttpJsonDefault() {
return new Builder(IdentityStubSettings.newHttpJsonBuilder());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,6 @@ public static Builder newBuilder() {
}

/** Returns a new REST builder for this class. */
@BetaApi
public static Builder newHttpJsonBuilder() {
return Builder.createHttpJsonDefault();
}
Expand Down Expand Up @@ -290,7 +289,6 @@ private static Builder createDefault() {
return new Builder(MessagingStubSettings.newBuilder());
}

@BetaApi
private static Builder createHttpJsonDefault() {
return new Builder(MessagingStubSettings.newHttpJsonBuilder());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,6 @@ public static Builder newBuilder() {
}

/** Returns a new REST builder for this class. */
@BetaApi
public static Builder newHttpJsonBuilder() {
return Builder.createHttpJsonDefault();
}
Expand Down Expand Up @@ -242,7 +241,6 @@ private static Builder createDefault() {
return new Builder(SequenceServiceStubSettings.newBuilder());
}

@BetaApi
private static Builder createHttpJsonDefault() {
return new Builder(SequenceServiceStubSettings.newHttpJsonBuilder());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,6 @@ public static Builder newBuilder() {
}

/** Returns a new REST builder for this class. */
@BetaApi
public static Builder newHttpJsonBuilder() {
return Builder.createHttpJsonDefault();
}
Expand Down Expand Up @@ -249,7 +248,6 @@ private static Builder createDefault() {
return new Builder(TestingStubSettings.newBuilder());
}

@BetaApi
private static Builder createHttpJsonDefault() {
return new Builder(TestingStubSettings.newHttpJsonBuilder());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ public static Builder newBuilder() {
}

/** Returns a new REST builder for this class. */
@BetaApi
public static Builder newHttpJsonBuilder() {
return Builder.createHttpJsonDefault();
}
Expand Down Expand Up @@ -176,7 +175,6 @@ private static Builder createDefault() {
return new Builder(ConnectionServiceStubSettings.newBuilder());
}

@BetaApi
private static Builder createHttpJsonDefault() {
return new Builder(ConnectionServiceStubSettings.newHttpJsonBuilder());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

import static com.google.cloud.apigeeconnect.v1.ConnectionServiceClient.ListConnectionsPagedResponse;

import com.google.api.core.BetaApi;
import com.google.api.core.InternalApi;
import com.google.api.gax.core.BackgroundResource;
import com.google.api.gax.core.BackgroundResourceAggregation;
Expand Down Expand Up @@ -49,7 +48,6 @@
* <p>This class is for advanced usage and reflects the underlying API directly.
*/
@Generated("by gapic-generator-java")
@BetaApi
public class HttpJsonConnectionServiceStub extends ConnectionServiceStub {
private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,6 @@ public static Builder newBuilder() {
}

/** Returns a new REST builder for this class. */
@BetaApi
public static Builder newHttpJsonBuilder() {
return Builder.createHttpJsonDefault();
}
Expand Down Expand Up @@ -304,7 +303,6 @@ private static Builder createDefault() {
return new Builder(AssetServiceStubSettings.newBuilder());
}

@BetaApi
private static Builder createHttpJsonDefault() {
return new Builder(AssetServiceStubSettings.newHttpJsonBuilder());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import static com.google.cloud.asset.v1.AssetServiceClient.SearchAllIamPoliciesPagedResponse;
import static com.google.cloud.asset.v1.AssetServiceClient.SearchAllResourcesPagedResponse;

import com.google.api.core.BetaApi;
import com.google.api.core.InternalApi;
import com.google.api.gax.core.BackgroundResource;
import com.google.api.gax.core.BackgroundResourceAggregation;
Expand Down Expand Up @@ -91,7 +90,6 @@
* <p>This class is for advanced usage and reflects the underlying API directly.
*/
@Generated("by gapic-generator-java")
@BetaApi
public class HttpJsonAssetServiceStub extends AssetServiceStub {
private static final TypeRegistry typeRegistry =
TypeRegistry.newBuilder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import static com.google.cloud.compute.v1small.AddressesClient.AggregatedListPagedResponse;
import static com.google.cloud.compute.v1small.AddressesClient.ListPagedResponse;

import com.google.api.core.BetaApi;
import com.google.api.core.InternalApi;
import com.google.api.gax.core.BackgroundResource;
import com.google.api.gax.core.BackgroundResourceAggregation;
Expand Down Expand Up @@ -59,7 +58,6 @@
* <p>This class is for advanced usage and reflects the underlying API directly.
*/
@Generated("by gapic-generator-java")
@BetaApi
public class HttpJsonAddressesStub extends AddressesStub {
private static final TypeRegistry typeRegistry =
TypeRegistry.newBuilder().add(Operation.getDescriptor()).build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

package com.google.cloud.compute.v1small.stub;

import com.google.api.core.BetaApi;
import com.google.api.core.InternalApi;
import com.google.api.gax.core.BackgroundResource;
import com.google.api.gax.core.BackgroundResourceAggregation;
Expand Down Expand Up @@ -54,7 +53,6 @@
* <p>This class is for advanced usage and reflects the underlying API directly.
*/
@Generated("by gapic-generator-java")
@BetaApi
public class HttpJsonRegionOperationsStub extends RegionOperationsStub {
private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,6 @@ public static Builder newBuilder() {
}

/** Returns a new REST builder for this class. */
@BetaApi
public static Builder newHttpJsonBuilder() {
return Builder.createHttpJsonDefault();
}
Expand Down Expand Up @@ -189,7 +188,6 @@ private static Builder createDefault() {
return new Builder(IamCredentialsStubSettings.newBuilder());
}

@BetaApi
private static Builder createHttpJsonDefault() {
return new Builder(IamCredentialsStubSettings.newHttpJsonBuilder());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

package com.google.cloud.iam.credentials.v1.stub;

import com.google.api.core.BetaApi;
import com.google.api.core.InternalApi;
import com.google.api.gax.core.BackgroundResource;
import com.google.api.gax.core.BackgroundResourceAggregation;
Expand Down Expand Up @@ -53,7 +52,6 @@
* <p>This class is for advanced usage and reflects the underlying API directly.
*/
@Generated("by gapic-generator-java")
@BetaApi
public class HttpJsonIamCredentialsStub extends IamCredentialsStub {
private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,6 @@ public static Builder newBuilder() {
}

/** Returns a new REST builder for this class. */
@BetaApi
public static Builder newHttpJsonBuilder() {
return Builder.createHttpJsonDefault();
}
Expand Down Expand Up @@ -244,7 +243,6 @@ private static Builder createDefault() {
return new Builder(LibraryServiceStubSettings.newBuilder());
}

@BetaApi
private static Builder createHttpJsonDefault() {
return new Builder(LibraryServiceStubSettings.newHttpJsonBuilder());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import static com.google.cloud.example.library.v1.LibraryServiceClient.ListBooksPagedResponse;
import static com.google.cloud.example.library.v1.LibraryServiceClient.ListShelvesPagedResponse;

import com.google.api.core.BetaApi;
import com.google.api.core.InternalApi;
import com.google.api.gax.core.BackgroundResource;
import com.google.api.gax.core.BackgroundResourceAggregation;
Expand Down Expand Up @@ -64,7 +63,6 @@
* <p>This class is for advanced usage and reflects the underlying API directly.
*/
@Generated("by gapic-generator-java")
@BetaApi
public class HttpJsonLibraryServiceStub extends LibraryServiceStub {
private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,6 @@ public static Builder newBuilder() {
}

/** Returns a new REST builder for this class. */
@BetaApi
public static Builder newHttpJsonBuilder() {
return Builder.createHttpJsonDefault();
}
Expand Down Expand Up @@ -278,7 +277,6 @@ private static Builder createDefault() {
return new Builder(CloudRedisStubSettings.newBuilder());
}

@BetaApi
private static Builder createHttpJsonDefault() {
return new Builder(CloudRedisStubSettings.newHttpJsonBuilder());
}
Expand Down

0 comments on commit 7da92b1

Please sign in to comment.