示例#1
0
        /// <summary>
        /// Constructs a client wrapper for the CustomizerAttributeService service, with the specified gRPC client and
        /// settings.
        /// </summary>
        /// <param name="grpcClient">The underlying gRPC client.</param>
        /// <param name="settings">
        /// The base <see cref="CustomizerAttributeServiceSettings"/> used within this client.
        /// </param>
        public CustomizerAttributeServiceClientImpl(CustomizerAttributeService.CustomizerAttributeServiceClient grpcClient, CustomizerAttributeServiceSettings settings)
        {
            GrpcClient = grpcClient;
            CustomizerAttributeServiceSettings effectiveSettings = settings ?? CustomizerAttributeServiceSettings.GetDefault();
            gaxgrpc::ClientHelper clientHelper = new gaxgrpc::ClientHelper(effectiveSettings);

            _callMutateCustomizerAttributes = clientHelper.BuildApiCall <MutateCustomizerAttributesRequest, MutateCustomizerAttributesResponse>(grpcClient.MutateCustomizerAttributesAsync, grpcClient.MutateCustomizerAttributes, effectiveSettings.MutateCustomizerAttributesSettings).WithGoogleRequestParam("customer_id", request => request.CustomerId);
            Modify_ApiCall(ref _callMutateCustomizerAttributes);
            Modify_MutateCustomizerAttributesApiCall(ref _callMutateCustomizerAttributes);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }
示例#2
0
 partial void OnCopy(CustomizerAttributeServiceSettings existing);
示例#3
0
 private CustomizerAttributeServiceSettings(CustomizerAttributeServiceSettings existing) : base(existing)
 {
     gax::GaxPreconditions.CheckNotNull(existing, nameof(existing));
     MutateCustomizerAttributesSettings = existing.MutateCustomizerAttributesSettings;
     OnCopy(existing);
 }
示例#4
0
 partial void OnConstruction(CustomizerAttributeService.CustomizerAttributeServiceClient grpcClient, CustomizerAttributeServiceSettings effectiveSettings, gaxgrpc::ClientHelper clientHelper);
示例#5
0
        /// <summary>
        /// Creates a <see cref="CustomizerAttributeServiceClient"/> which uses the specified call invoker for remote
        /// operations.
        /// </summary>
        /// <param name="callInvoker">
        /// The <see cref="grpccore::CallInvoker"/> for remote operations. Must not be null.
        /// </param>
        /// <param name="settings">Optional <see cref="CustomizerAttributeServiceSettings"/>.</param>
        /// <returns>The created <see cref="CustomizerAttributeServiceClient"/>.</returns>
        internal static CustomizerAttributeServiceClient Create(grpccore::CallInvoker callInvoker, CustomizerAttributeServiceSettings settings = null)
        {
            gax::GaxPreconditions.CheckNotNull(callInvoker, nameof(callInvoker));
            grpcinter::Interceptor interceptor = settings?.Interceptor;

            if (interceptor != null)
            {
                callInvoker = grpcinter::CallInvokerExtensions.Intercept(callInvoker, interceptor);
            }
            CustomizerAttributeService.CustomizerAttributeServiceClient grpcClient = new CustomizerAttributeService.CustomizerAttributeServiceClient(callInvoker);
            return(new CustomizerAttributeServiceClientImpl(grpcClient, settings));
        }