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

Commit

Permalink
chore: migrate to microgenerator (#78)
Browse files Browse the repository at this point in the history
This PR was generated using Autosynth. 🌈

Synth log will be available here:
https://source.cloud.google.com/results/invocations/7b434ed7-41bc-42d7-adee-51bd18fb325b/targets

- [ ] To automatically regenerate this PR, check this box.

PiperOrigin-RevId: 346372957
Source-Link: googleapis/googleapis@857f70d
PiperOrigin-RevId: 346126713
Source-Link: googleapis/googleapis@b8b2f8c
PiperOrigin-RevId: 345476969
Source-Link: googleapis/googleapis@7be2c82
PiperOrigin-RevId: 345067549
Source-Link: googleapis/googleapis@8cfc6c8
PiperOrigin-RevId: 344906237
Source-Link: googleapis/googleapis@14adde9
PiperOrigin-RevId: 344134135
Source-Link: googleapis/googleapis@b11a87f
  • Loading branch information
yoshi-automation committed Dec 14, 2020
1 parent b94e01a commit 811573d
Show file tree
Hide file tree
Showing 14 changed files with 905 additions and 980 deletions.

Large diffs are not rendered by default.

Expand Up @@ -5,14 +5,15 @@
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.google.cloud.video.transcoder.v1beta1;

import static com.google.cloud.video.transcoder.v1beta1.TranscoderServiceClient.ListJobTemplatesPagedResponse;
Expand All @@ -35,7 +36,7 @@
import java.util.List;
import javax.annotation.Generated;

// AUTO-GENERATED DOCUMENTATION AND CLASS
// AUTO-GENERATED DOCUMENTATION AND CLASS.
/**
* Settings class to configure an instance of {@link TranscoderServiceClient}.
*
Expand All @@ -52,23 +53,24 @@
*
* <p>For example, to set the total timeout of createJob to 30 seconds:
*
* <pre>
* <code>
* <pre>{@code
* TranscoderServiceSettings.Builder transcoderServiceSettingsBuilder =
* TranscoderServiceSettings.newBuilder();
* transcoderServiceSettingsBuilder
* .createJobSettings()
* .setRetrySettings(
* transcoderServiceSettingsBuilder.createJobSettings().getRetrySettings().toBuilder()
* transcoderServiceSettingsBuilder
* .createJobSettings()
* .getRetrySettings()
* .toBuilder()
* .setTotalTimeout(Duration.ofSeconds(30))
* .build());
* TranscoderServiceSettings transcoderServiceSettings = transcoderServiceSettingsBuilder.build();
* </code>
* </pre>
* }</pre>
*/
@Generated("by gapic-generator")
@BetaApi
@Generated("by gapic-generator-java")
public class TranscoderServiceSettings extends ClientSettings<TranscoderServiceSettings> {

/** Returns the object with the settings used for calls to createJob. */
public UnaryCallSettings<CreateJobRequest, Job> createJobSettings() {
return ((TranscoderServiceStubSettings) getStubSettings()).createJobSettings();
Expand Down Expand Up @@ -172,18 +174,15 @@ protected TranscoderServiceSettings(Builder settingsBuilder) throws IOException

/** Builder for TranscoderServiceSettings. */
public static class Builder extends ClientSettings.Builder<TranscoderServiceSettings, Builder> {

protected Builder() throws IOException {
this((ClientContext) null);
this(((ClientContext) null));
}

protected Builder(ClientContext clientContext) {
super(TranscoderServiceStubSettings.newBuilder(clientContext));
}

private static Builder createDefault() {
return new Builder(TranscoderServiceStubSettings.newBuilder());
}

protected Builder(TranscoderServiceSettings settings) {
super(settings.getStubSettings().toBuilder());
}
Expand All @@ -192,11 +191,15 @@ protected Builder(TranscoderServiceStubSettings.Builder stubSettings) {
super(stubSettings);
}

private static Builder createDefault() {
return new Builder(TranscoderServiceStubSettings.newBuilder());
}

public TranscoderServiceStubSettings.Builder getStubSettingsBuilder() {
return ((TranscoderServiceStubSettings.Builder) getStubSettings());
}

// NEXT_MAJOR_VER: remove 'throws Exception'
// NEXT_MAJOR_VER: remove 'throws Exception'.
/**
* Applies the given settings updater function to all of the unary API methods in this service.
*
Expand Down
Expand Up @@ -5,7 +5,7 @@
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
Expand All @@ -15,9 +15,7 @@
*/

/**
* A client to Transcoder API.
*
* <p>The interfaces provided are listed below, along with usage samples.
* The interfaces provided are listed below, along with usage samples.
*
* <p>======================= TranscoderServiceClient =======================
*
Expand All @@ -28,18 +26,8 @@
* equalization, content concatenation, and digital ad-stitch ready content generation.
*
* <p>Sample for TranscoderServiceClient:
*
* <pre>
* <code>
* try (TranscoderServiceClient transcoderServiceClient = TranscoderServiceClient.create()) {
* LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
* Job job = Job.newBuilder().build();
* Job response = transcoderServiceClient.createJob(parent, job);
* }
* </code>
* </pre>
*/
@Generated("by gapic-generator")
@Generated("by gapic-generator-java")
package com.google.cloud.video.transcoder.v1beta1;

import javax.annotation.Generated;
Expand Up @@ -5,17 +5,17 @@
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.google.cloud.video.transcoder.v1beta1.stub;

import com.google.api.core.BetaApi;
import com.google.api.gax.grpc.GrpcCallSettings;
import com.google.api.gax.grpc.GrpcCallableFactory;
import com.google.api.gax.grpc.GrpcStubCallableFactory;
Expand All @@ -31,18 +31,19 @@
import com.google.api.gax.rpc.StreamingCallSettings;
import com.google.api.gax.rpc.UnaryCallSettings;
import com.google.api.gax.rpc.UnaryCallable;
import com.google.longrunning.Operation;
import com.google.longrunning.stub.OperationsStub;
import javax.annotation.Generated;

// AUTO-GENERATED DOCUMENTATION AND CLASS
// AUTO-GENERATED DOCUMENTATION AND CLASS.
/**
* gRPC callable factory implementation for Transcoder API.
* gRPC callable factory implementation for the TranscoderService service API.
*
* <p>This class is for advanced usage.
*/
@Generated("by gapic-generator")
@BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
public class GrpcTranscoderServiceCallableFactory implements GrpcStubCallableFactory {

@Override
public <RequestT, ResponseT> UnaryCallable<RequestT, ResponseT> createUnaryCallable(
GrpcCallSettings<RequestT, ResponseT> grpcCallSettings,
Expand All @@ -55,61 +56,58 @@ public <RequestT, ResponseT> UnaryCallable<RequestT, ResponseT> createUnaryCalla
public <RequestT, ResponseT, PagedListResponseT>
UnaryCallable<RequestT, PagedListResponseT> createPagedCallable(
GrpcCallSettings<RequestT, ResponseT> grpcCallSettings,
PagedCallSettings<RequestT, ResponseT, PagedListResponseT> pagedCallSettings,
PagedCallSettings<RequestT, ResponseT, PagedListResponseT> callSettings,
ClientContext clientContext) {
return GrpcCallableFactory.createPagedCallable(
grpcCallSettings, pagedCallSettings, clientContext);
return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext);
}

@Override
public <RequestT, ResponseT> UnaryCallable<RequestT, ResponseT> createBatchingCallable(
GrpcCallSettings<RequestT, ResponseT> grpcCallSettings,
BatchingCallSettings<RequestT, ResponseT> batchingCallSettings,
BatchingCallSettings<RequestT, ResponseT> callSettings,
ClientContext clientContext) {
return GrpcCallableFactory.createBatchingCallable(
grpcCallSettings, batchingCallSettings, clientContext);
grpcCallSettings, callSettings, clientContext);
}

@BetaApi(
"The surface for long-running operations is not stable yet and may change in the future.")
@Override
public <RequestT, ResponseT, MetadataT>
OperationCallable<RequestT, ResponseT, MetadataT> createOperationCallable(
GrpcCallSettings<RequestT, com.google.longrunning.Operation> grpcCallSettings,
OperationCallSettings<RequestT, ResponseT, MetadataT> operationCallSettings,
GrpcCallSettings<RequestT, Operation> grpcCallSettings,
OperationCallSettings<RequestT, ResponseT, MetadataT> callSettings,
ClientContext clientContext,
OperationsStub operationsStub) {
return GrpcCallableFactory.createOperationCallable(
grpcCallSettings, operationCallSettings, clientContext, operationsStub);
grpcCallSettings, callSettings, clientContext, operationsStub);
}

@Override
public <RequestT, ResponseT>
BidiStreamingCallable<RequestT, ResponseT> createBidiStreamingCallable(
GrpcCallSettings<RequestT, ResponseT> grpcCallSettings,
StreamingCallSettings<RequestT, ResponseT> streamingCallSettings,
StreamingCallSettings<RequestT, ResponseT> callSettings,
ClientContext clientContext) {
return GrpcCallableFactory.createBidiStreamingCallable(
grpcCallSettings, streamingCallSettings, clientContext);
grpcCallSettings, callSettings, clientContext);
}

@Override
public <RequestT, ResponseT>
ServerStreamingCallable<RequestT, ResponseT> createServerStreamingCallable(
GrpcCallSettings<RequestT, ResponseT> grpcCallSettings,
ServerStreamingCallSettings<RequestT, ResponseT> streamingCallSettings,
ServerStreamingCallSettings<RequestT, ResponseT> callSettings,
ClientContext clientContext) {
return GrpcCallableFactory.createServerStreamingCallable(
grpcCallSettings, streamingCallSettings, clientContext);
grpcCallSettings, callSettings, clientContext);
}

@Override
public <RequestT, ResponseT>
ClientStreamingCallable<RequestT, ResponseT> createClientStreamingCallable(
GrpcCallSettings<RequestT, ResponseT> grpcCallSettings,
StreamingCallSettings<RequestT, ResponseT> streamingCallSettings,
StreamingCallSettings<RequestT, ResponseT> callSettings,
ClientContext clientContext) {
return GrpcCallableFactory.createClientStreamingCallable(
grpcCallSettings, streamingCallSettings, clientContext);
grpcCallSettings, callSettings, clientContext);
}
}

0 comments on commit 811573d

Please sign in to comment.