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

com.vendasta.sales.v1.internal.SalesGRPCClient Maven / Gradle / Ivy

The newest version!
/**
 Code generated by sdkgen
 Generated on 2020-04-07 19:12:16.797285 +0000 UTC using container gcr.io/repcore-prod/sdkgen:latest
 DO NOT EDIT!
*/

package com.vendasta.sales.v1.internal;

import com.google.protobuf.*;
import com.vendasta.sales.v1.generated.ApiProto;
import com.vendasta.sales.v1.generated.SalespersonProto;
import com.vendasta.sales.v1.generated.SalesGrpc;
import com.vendasta.vax.GRPCClient;
import com.vendasta.vax.RequestOptions;
import com.vendasta.vax.SDKException;
import io.grpc.ManagedChannel;
import java.io.InputStream;


public class SalesGRPCClient extends GRPCClient implements SalesClientInterface {
    public SalesGRPCClient(String host, String scope, boolean secure) {
        super(host, scope, secure);
    }

    public SalesGRPCClient(String host, String scope, boolean secure, float defaultTimeout) {
        super(host, scope, secure, defaultTimeout);
    }

    public SalesGRPCClient(String host, String scope, InputStream serviceAccount, boolean secure, float defaultTimeout) {
        super(host, scope, serviceAccount, secure, defaultTimeout);
    }

    @Override
    protected SalesGrpc.SalesBlockingStub newBlockingStub(ManagedChannel channel) {
        return SalesGrpc.newBlockingStub(channel);
    }
    
    public GetAutoAssignConfigResponse GetAutoAssignConfig(GetAutoAssignConfigRequest req, RequestOptions.Builder options) throws SDKException {
        ApiProto.GetAutoAssignConfigResponse response = this.doRequest("getAutoAssignConfig", req.toProto(), options);
        return GetAutoAssignConfigResponse.fromProto(response);
    }
    
    public Empty CreateOrUpdateAutoAssignConfig(CreateOrUpdateAutoAssignConfigRequest req, RequestOptions.Builder options) throws SDKException {
        Empty response = this.doRequest("createOrUpdateAutoAssignConfig", req.toProto(), options);
        return response;
    }
    
    public Salesperson GetSalesperson(GetSalespersonRequest req, RequestOptions.Builder options) throws SDKException {
        SalespersonProto.Salesperson response = this.doRequest("getSalesperson", req.toProto(), options);
        return Salesperson.fromProto(response);
    }
    
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy