Skip to content
This repository has been archived by the owner on Jul 17, 2023. It is now read-only.

Commit

Permalink
feat: Remove EnableService and DisableService RPC methods and related…
Browse files Browse the repository at this point in the history
… protos from service management API (#203)

* chore: cleanup unused imports in google/api/servicemanagement/v1

PiperOrigin-RevId: 428077790

Source-Link: googleapis/googleapis@4807247

Source-Link: googleapis/googleapis-gen@3b0415f
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiM2IwNDE1ZjQ2ZGQxOTBlMzUyNGQ4MGJjOGU2NmU4YTE2MWNlYzk1NSJ9

* 🦉 Updates from OwlBot

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* feat: Remove EnableService and DisableService RPC methods and related protos from service management API
BREAKING CHANGE:

PiperOrigin-RevId: 428693468

Source-Link: googleapis/googleapis@42a19d6

Source-Link: googleapis/googleapis-gen@58bcf19
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNThiY2YxOTM1ZWNiMmJkZGVhMGI2M2NiMDNiOGE4YmM1NWUxNzY5ZiJ9

* 🦉 Updates from OwlBot

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* chore: add clirr ignored differences

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Neenu1995 <neenushaji@google.com>
  • Loading branch information
3 people committed Feb 25, 2022
1 parent b18a02a commit 6af0eb6
Show file tree
Hide file tree
Showing 45 changed files with 467 additions and 4,509 deletions.
25 changes: 25 additions & 0 deletions google-cloud-service-management/clirr-ignored-differences.xml
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- see http://www.mojohaus.org/clirr-maven-plugin/examples/ignored-differences.html -->
<differences>

<difference>
<differenceType>7002</differenceType>
<className>com/google/cloud/api/servicemanagement/v1/ServiceManager*</className>
<method>* enableService*(*)</method>
</difference>
<difference>
<differenceType>7002</differenceType>
<className>com/google/cloud/api/servicemanagement/v1/ServiceManager*</className>
<method>* disableService*(*)</method>
</difference>
<difference>
<differenceType>7002</differenceType>
<className>com/google/cloud/api/servicemanagement/v1/stub/*ServiceManager*</className>
<method>* enableService*(*)</method>
</difference>
<difference>
<differenceType>7002</differenceType>
<className>com/google/cloud/api/servicemanagement/v1/stub/*ServiceManager*</className>
<method>* disableService*(*)</method>
</difference>
</differences>

Large diffs are not rendered by default.

Expand Up @@ -37,10 +37,6 @@
import com.google.api.servicemanagement.v1.CreateServiceRequest;
import com.google.api.servicemanagement.v1.CreateServiceRolloutRequest;
import com.google.api.servicemanagement.v1.DeleteServiceRequest;
import com.google.api.servicemanagement.v1.DisableServiceRequest;
import com.google.api.servicemanagement.v1.DisableServiceResponse;
import com.google.api.servicemanagement.v1.EnableServiceRequest;
import com.google.api.servicemanagement.v1.EnableServiceResponse;
import com.google.api.servicemanagement.v1.GenerateConfigReportRequest;
import com.google.api.servicemanagement.v1.GenerateConfigReportResponse;
import com.google.api.servicemanagement.v1.GetServiceConfigRequest;
Expand Down Expand Up @@ -204,48 +200,6 @@ public UnaryCallSettings<CreateServiceRolloutRequest, Operation> createServiceRo
return ((ServiceManagerStubSettings) getStubSettings()).generateConfigReportSettings();
}

/**
* Returns the object with the settings used for calls to enableService.
*
* @deprecated This method is deprecated and will be removed in the next major version update.
*/
@Deprecated
public UnaryCallSettings<EnableServiceRequest, Operation> enableServiceSettings() {
return ((ServiceManagerStubSettings) getStubSettings()).enableServiceSettings();
}

/**
* Returns the object with the settings used for calls to enableService.
*
* @deprecated This method is deprecated and will be removed in the next major version update.
*/
@Deprecated
public OperationCallSettings<EnableServiceRequest, EnableServiceResponse, OperationMetadata>
enableServiceOperationSettings() {
return ((ServiceManagerStubSettings) getStubSettings()).enableServiceOperationSettings();
}

/**
* Returns the object with the settings used for calls to disableService.
*
* @deprecated This method is deprecated and will be removed in the next major version update.
*/
@Deprecated
public UnaryCallSettings<DisableServiceRequest, Operation> disableServiceSettings() {
return ((ServiceManagerStubSettings) getStubSettings()).disableServiceSettings();
}

/**
* Returns the object with the settings used for calls to disableService.
*
* @deprecated This method is deprecated and will be removed in the next major version update.
*/
@Deprecated
public OperationCallSettings<DisableServiceRequest, DisableServiceResponse, OperationMetadata>
disableServiceOperationSettings() {
return ((ServiceManagerStubSettings) getStubSettings()).disableServiceOperationSettings();
}

public static final ServiceManagerSettings create(ServiceManagerStubSettings stub)
throws IOException {
return new ServiceManagerSettings.Builder(stub.toBuilder()).build();
Expand Down Expand Up @@ -453,50 +407,6 @@ public UnaryCallSettings.Builder<GetServiceConfigRequest, Service> getServiceCon
return getStubSettingsBuilder().generateConfigReportSettings();
}

/**
* Returns the builder for the settings used for calls to enableService.
*
* @deprecated This method is deprecated and will be removed in the next major version update.
*/
@Deprecated
public UnaryCallSettings.Builder<EnableServiceRequest, Operation> enableServiceSettings() {
return getStubSettingsBuilder().enableServiceSettings();
}

/**
* Returns the builder for the settings used for calls to enableService.
*
* @deprecated This method is deprecated and will be removed in the next major version update.
*/
@Deprecated
public OperationCallSettings.Builder<
EnableServiceRequest, EnableServiceResponse, OperationMetadata>
enableServiceOperationSettings() {
return getStubSettingsBuilder().enableServiceOperationSettings();
}

/**
* Returns the builder for the settings used for calls to disableService.
*
* @deprecated This method is deprecated and will be removed in the next major version update.
*/
@Deprecated
public UnaryCallSettings.Builder<DisableServiceRequest, Operation> disableServiceSettings() {
return getStubSettingsBuilder().disableServiceSettings();
}

/**
* Returns the builder for the settings used for calls to disableService.
*
* @deprecated This method is deprecated and will be removed in the next major version update.
*/
@Deprecated
public OperationCallSettings.Builder<
DisableServiceRequest, DisableServiceResponse, OperationMetadata>
disableServiceOperationSettings() {
return getStubSettingsBuilder().disableServiceOperationSettings();
}

@Override
public ServiceManagerSettings build() throws IOException {
return new ServiceManagerSettings(this);
Expand Down
Expand Up @@ -22,12 +22,6 @@
"DeleteService": {
"methods": ["deleteServiceAsync", "deleteServiceAsync", "deleteServiceOperationCallable", "deleteServiceCallable"]
},
"DisableService": {
"methods": ["disableServiceAsync", "disableServiceAsync", "disableServiceOperationCallable", "disableServiceCallable"]
},
"EnableService": {
"methods": ["enableServiceAsync", "enableServiceAsync", "enableServiceOperationCallable", "enableServiceCallable"]
},
"GenerateConfigReport": {
"methods": ["generateConfigReport", "generateConfigReport", "generateConfigReportCallable"]
},
Expand Down
Expand Up @@ -15,12 +15,13 @@
*/

/**
* The interfaces provided are listed below, along with usage samples.
* A client to Service Management API
*
* <p>The interfaces provided are listed below, along with usage samples.
*
* <p>======================= ServiceManagerClient =======================
*
* <p>Service Description: [Google Service Management
* API](https://cloud.google.com/service-management/overview)
* <p>Service Description: [Google Service Management API](/service-management/overview)
*
* <p>Sample for ServiceManagerClient:
*
Expand Down
Expand Up @@ -32,10 +32,6 @@
import com.google.api.servicemanagement.v1.CreateServiceRequest;
import com.google.api.servicemanagement.v1.CreateServiceRolloutRequest;
import com.google.api.servicemanagement.v1.DeleteServiceRequest;
import com.google.api.servicemanagement.v1.DisableServiceRequest;
import com.google.api.servicemanagement.v1.DisableServiceResponse;
import com.google.api.servicemanagement.v1.EnableServiceRequest;
import com.google.api.servicemanagement.v1.EnableServiceResponse;
import com.google.api.servicemanagement.v1.GenerateConfigReportRequest;
import com.google.api.servicemanagement.v1.GenerateConfigReportResponse;
import com.google.api.servicemanagement.v1.GetServiceConfigRequest;
Expand Down Expand Up @@ -210,26 +206,6 @@ public class GrpcServiceManagerStub extends ServiceManagerStub {
ProtoUtils.marshaller(GenerateConfigReportResponse.getDefaultInstance()))
.build();

private static final MethodDescriptor<EnableServiceRequest, Operation>
enableServiceMethodDescriptor =
MethodDescriptor.<EnableServiceRequest, Operation>newBuilder()
.setType(MethodDescriptor.MethodType.UNARY)
.setFullMethodName("google.api.servicemanagement.v1.ServiceManager/EnableService")
.setRequestMarshaller(
ProtoUtils.marshaller(EnableServiceRequest.getDefaultInstance()))
.setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance()))
.build();

private static final MethodDescriptor<DisableServiceRequest, Operation>
disableServiceMethodDescriptor =
MethodDescriptor.<DisableServiceRequest, Operation>newBuilder()
.setType(MethodDescriptor.MethodType.UNARY)
.setFullMethodName("google.api.servicemanagement.v1.ServiceManager/DisableService")
.setRequestMarshaller(
ProtoUtils.marshaller(DisableServiceRequest.getDefaultInstance()))
.setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance()))
.build();

private final UnaryCallable<ListServicesRequest, ListServicesResponse> listServicesCallable;
private final UnaryCallable<ListServicesRequest, ListServicesPagedResponse>
listServicesPagedCallable;
Expand Down Expand Up @@ -264,12 +240,6 @@ public class GrpcServiceManagerStub extends ServiceManagerStub {
createServiceRolloutOperationCallable;
private final UnaryCallable<GenerateConfigReportRequest, GenerateConfigReportResponse>
generateConfigReportCallable;
private final UnaryCallable<EnableServiceRequest, Operation> enableServiceCallable;
private final OperationCallable<EnableServiceRequest, EnableServiceResponse, OperationMetadata>
enableServiceOperationCallable;
private final UnaryCallable<DisableServiceRequest, Operation> disableServiceCallable;
private final OperationCallable<DisableServiceRequest, DisableServiceResponse, OperationMetadata>
disableServiceOperationCallable;

private final BackgroundResource backgroundResources;
private final GrpcOperationsStub operationsStub;
Expand Down Expand Up @@ -432,26 +402,6 @@ protected GrpcServiceManagerStub(
GrpcCallSettings.<GenerateConfigReportRequest, GenerateConfigReportResponse>newBuilder()
.setMethodDescriptor(generateConfigReportMethodDescriptor)
.build();
GrpcCallSettings<EnableServiceRequest, Operation> enableServiceTransportSettings =
GrpcCallSettings.<EnableServiceRequest, Operation>newBuilder()
.setMethodDescriptor(enableServiceMethodDescriptor)
.setParamsExtractor(
request -> {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("service_name", String.valueOf(request.getServiceName()));
return params.build();
})
.build();
GrpcCallSettings<DisableServiceRequest, Operation> disableServiceTransportSettings =
GrpcCallSettings.<DisableServiceRequest, Operation>newBuilder()
.setMethodDescriptor(disableServiceMethodDescriptor)
.setParamsExtractor(
request -> {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("service_name", String.valueOf(request.getServiceName()));
return params.build();
})
.build();

this.listServicesCallable =
callableFactory.createUnaryCallable(
Expand Down Expand Up @@ -549,24 +499,6 @@ protected GrpcServiceManagerStub(
generateConfigReportTransportSettings,
settings.generateConfigReportSettings(),
clientContext);
this.enableServiceCallable =
callableFactory.createUnaryCallable(
enableServiceTransportSettings, settings.enableServiceSettings(), clientContext);
this.enableServiceOperationCallable =
callableFactory.createOperationCallable(
enableServiceTransportSettings,
settings.enableServiceOperationSettings(),
clientContext,
operationsStub);
this.disableServiceCallable =
callableFactory.createUnaryCallable(
disableServiceTransportSettings, settings.disableServiceSettings(), clientContext);
this.disableServiceOperationCallable =
callableFactory.createOperationCallable(
disableServiceTransportSettings,
settings.disableServiceOperationSettings(),
clientContext,
operationsStub);

this.backgroundResources =
new BackgroundResourceAggregation(clientContext.getBackgroundResources());
Expand Down Expand Up @@ -691,28 +623,6 @@ public UnaryCallable<CreateServiceRolloutRequest, Operation> createServiceRollou
return generateConfigReportCallable;
}

@Override
public UnaryCallable<EnableServiceRequest, Operation> enableServiceCallable() {
return enableServiceCallable;
}

@Override
public OperationCallable<EnableServiceRequest, EnableServiceResponse, OperationMetadata>
enableServiceOperationCallable() {
return enableServiceOperationCallable;
}

@Override
public UnaryCallable<DisableServiceRequest, Operation> disableServiceCallable() {
return disableServiceCallable;
}

@Override
public OperationCallable<DisableServiceRequest, DisableServiceResponse, OperationMetadata>
disableServiceOperationCallable() {
return disableServiceOperationCallable;
}

@Override
public final void close() {
try {
Expand Down
Expand Up @@ -28,10 +28,6 @@
import com.google.api.servicemanagement.v1.CreateServiceRequest;
import com.google.api.servicemanagement.v1.CreateServiceRolloutRequest;
import com.google.api.servicemanagement.v1.DeleteServiceRequest;
import com.google.api.servicemanagement.v1.DisableServiceRequest;
import com.google.api.servicemanagement.v1.DisableServiceResponse;
import com.google.api.servicemanagement.v1.EnableServiceRequest;
import com.google.api.servicemanagement.v1.EnableServiceResponse;
import com.google.api.servicemanagement.v1.GenerateConfigReportRequest;
import com.google.api.servicemanagement.v1.GenerateConfigReportResponse;
import com.google.api.servicemanagement.v1.GetServiceConfigRequest;
Expand Down Expand Up @@ -164,28 +160,6 @@ public UnaryCallable<CreateServiceRolloutRequest, Operation> createServiceRollou
throw new UnsupportedOperationException("Not implemented: generateConfigReportCallable()");
}

@Deprecated
public OperationCallable<EnableServiceRequest, EnableServiceResponse, OperationMetadata>
enableServiceOperationCallable() {
throw new UnsupportedOperationException("Not implemented: enableServiceOperationCallable()");
}

@Deprecated
public UnaryCallable<EnableServiceRequest, Operation> enableServiceCallable() {
throw new UnsupportedOperationException("Not implemented: enableServiceCallable()");
}

@Deprecated
public OperationCallable<DisableServiceRequest, DisableServiceResponse, OperationMetadata>
disableServiceOperationCallable() {
throw new UnsupportedOperationException("Not implemented: disableServiceOperationCallable()");
}

@Deprecated
public UnaryCallable<DisableServiceRequest, Operation> disableServiceCallable() {
throw new UnsupportedOperationException("Not implemented: disableServiceCallable()");
}

@Override
public abstract void close();
}

0 comments on commit 6af0eb6

Please sign in to comment.