All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.maps.routing.v2.stub.HttpJsonRoutesCallableFactory Maven / Gradle / Ivy

Go to download

Routes API Routes API is the next generation, performance optimized version of the existing Directions API and Distance Matrix API. It helps you find the ideal route from A to Z, calculates ETAs and distances for matrices of origin and destination locations, and also offers new features.

There is a newer version: 1.39.0
Show newest version
/*
 * Copyright 2023 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * 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
 *
 * 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.maps.routing.v2.stub;

import com.google.api.core.BetaApi;
import com.google.api.gax.httpjson.HttpJsonCallSettings;
import com.google.api.gax.httpjson.HttpJsonCallableFactory;
import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable;
import com.google.api.gax.httpjson.HttpJsonStubCallableFactory;
import com.google.api.gax.httpjson.longrunning.stub.OperationsStub;
import com.google.api.gax.rpc.BatchingCallSettings;
import com.google.api.gax.rpc.ClientContext;
import com.google.api.gax.rpc.OperationCallSettings;
import com.google.api.gax.rpc.OperationCallable;
import com.google.api.gax.rpc.PagedCallSettings;
import com.google.api.gax.rpc.ServerStreamingCallSettings;
import com.google.api.gax.rpc.ServerStreamingCallable;
import com.google.api.gax.rpc.UnaryCallSettings;
import com.google.api.gax.rpc.UnaryCallable;
import com.google.longrunning.Operation;
import javax.annotation.Generated;

// AUTO-GENERATED DOCUMENTATION AND CLASS.
/**
 * REST callable factory implementation for the Routes service API.
 *
 * 

This class is for advanced usage. */ @Generated("by gapic-generator-java") @BetaApi public class HttpJsonRoutesCallableFactory implements HttpJsonStubCallableFactory { @Override public UnaryCallable createUnaryCallable( HttpJsonCallSettings httpJsonCallSettings, UnaryCallSettings callSettings, ClientContext clientContext) { return HttpJsonCallableFactory.createUnaryCallable( httpJsonCallSettings, callSettings, clientContext); } @Override public UnaryCallable createPagedCallable( HttpJsonCallSettings httpJsonCallSettings, PagedCallSettings callSettings, ClientContext clientContext) { return HttpJsonCallableFactory.createPagedCallable( httpJsonCallSettings, callSettings, clientContext); } @Override public UnaryCallable createBatchingCallable( HttpJsonCallSettings httpJsonCallSettings, BatchingCallSettings callSettings, ClientContext clientContext) { return HttpJsonCallableFactory.createBatchingCallable( httpJsonCallSettings, callSettings, clientContext); } @BetaApi( "The surface for long-running operations is not stable yet and may change in the future.") @Override public OperationCallable createOperationCallable( HttpJsonCallSettings httpJsonCallSettings, OperationCallSettings callSettings, ClientContext clientContext, OperationsStub operationsStub) { UnaryCallable innerCallable = HttpJsonCallableFactory.createBaseUnaryCallable( httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); HttpJsonOperationSnapshotCallable initialCallable = new HttpJsonOperationSnapshotCallable( innerCallable, httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); return HttpJsonCallableFactory.createOperationCallable( callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); } @Override public ServerStreamingCallable createServerStreamingCallable( HttpJsonCallSettings httpJsonCallSettings, ServerStreamingCallSettings callSettings, ClientContext clientContext) { return HttpJsonCallableFactory.createServerStreamingCallable( httpJsonCallSettings, callSettings, clientContext); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy