Esempio n. 1
0
 private AnswerRecordsSettings(AnswerRecordsSettings existing) : base(existing)
 {
     gax::GaxPreconditions.CheckNotNull(existing, nameof(existing));
     ListAnswerRecordsSettings  = existing.ListAnswerRecordsSettings;
     UpdateAnswerRecordSettings = existing.UpdateAnswerRecordSettings;
     OnCopy(existing);
 }
Esempio n. 2
0
        /// <summary>
        /// Constructs a client wrapper for the AnswerRecords service, with the specified gRPC client and settings.
        /// </summary>
        /// <param name="grpcClient">The underlying gRPC client.</param>
        /// <param name="settings">The base <see cref="AnswerRecordsSettings"/> used within this client.</param>
        public AnswerRecordsClientImpl(AnswerRecords.AnswerRecordsClient grpcClient, AnswerRecordsSettings settings)
        {
            GrpcClient = grpcClient;
            AnswerRecordsSettings effectiveSettings = settings ?? AnswerRecordsSettings.GetDefault();
            gaxgrpc::ClientHelper clientHelper      = new gaxgrpc::ClientHelper(effectiveSettings);

            _callListAnswerRecords = clientHelper.BuildApiCall <ListAnswerRecordsRequest, ListAnswerRecordsResponse>(grpcClient.ListAnswerRecordsAsync, grpcClient.ListAnswerRecords, effectiveSettings.ListAnswerRecordsSettings).WithGoogleRequestParam("parent", request => request.Parent);
            Modify_ApiCall(ref _callListAnswerRecords);
            Modify_ListAnswerRecordsApiCall(ref _callListAnswerRecords);
            _callUpdateAnswerRecord = clientHelper.BuildApiCall <UpdateAnswerRecordRequest, AnswerRecord>(grpcClient.UpdateAnswerRecordAsync, grpcClient.UpdateAnswerRecord, effectiveSettings.UpdateAnswerRecordSettings).WithGoogleRequestParam("answer_record.name", request => request.AnswerRecord?.Name);
            Modify_ApiCall(ref _callUpdateAnswerRecord);
            Modify_UpdateAnswerRecordApiCall(ref _callUpdateAnswerRecord);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }
Esempio n. 3
0
 partial void OnConstruction(AnswerRecords.AnswerRecordsClient grpcClient, AnswerRecordsSettings effectiveSettings, gaxgrpc::ClientHelper clientHelper);
Esempio n. 4
0
 partial void OnCopy(AnswerRecordsSettings existing);
Esempio n. 5
0
        /// <summary>
        /// Creates a <see cref="AnswerRecordsClient"/> 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="AnswerRecordsSettings"/>.</param>
        /// <returns>The created <see cref="AnswerRecordsClient"/>.</returns>
        internal static AnswerRecordsClient Create(grpccore::CallInvoker callInvoker, AnswerRecordsSettings settings = null)
        {
            gax::GaxPreconditions.CheckNotNull(callInvoker, nameof(callInvoker));
            grpcinter::Interceptor interceptor = settings?.Interceptor;

            if (interceptor != null)
            {
                callInvoker = grpcinter::CallInvokerExtensions.Intercept(callInvoker, interceptor);
            }
            AnswerRecords.AnswerRecordsClient grpcClient = new AnswerRecords.AnswerRecordsClient(callInvoker);
            return(new AnswerRecordsClientImpl(grpcClient, settings));
        }