Ejemplo n.º 1
0
 private RecordingsSettings(RecordingsSettings existing) : base(existing)
 {
     gax::GaxPreconditions.CheckNotNull(existing, nameof(existing));
     GetRecordingSettings    = existing.GetRecordingSettings;
     ListRecordingsSettings  = existing.ListRecordingsSettings;
     DeleteRecordingSettings = existing.DeleteRecordingSettings;
     OnCopy(existing);
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Creates a <see cref="RecordingsClient"/> 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="RecordingsSettings"/>.</param>
        /// <returns>The created <see cref="RecordingsClient"/>.</returns>
        internal static RecordingsClient Create(grpccore::CallInvoker callInvoker, RecordingsSettings settings = null)
        {
            gax::GaxPreconditions.CheckNotNull(callInvoker, nameof(callInvoker));
            grpcinter::Interceptor interceptor = settings?.Interceptor;

            if (interceptor != null)
            {
                callInvoker = grpcinter::CallInvokerExtensions.Intercept(callInvoker, interceptor);
            }
            Recordings.RecordingsClient grpcClient = new Recordings.RecordingsClient(callInvoker);
            return(new RecordingsClientImpl(grpcClient, settings));
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Constructs a client wrapper for the Recordings service, with the specified gRPC client and settings.
        /// </summary>
        /// <param name="grpcClient">The underlying gRPC client.</param>
        /// <param name="settings">The base <see cref="RecordingsSettings"/> used within this client.</param>
        public RecordingsClientImpl(Recordings.RecordingsClient grpcClient, RecordingsSettings settings)
        {
            GrpcClient = grpcClient;
            RecordingsSettings    effectiveSettings = settings ?? RecordingsSettings.GetDefault();
            gaxgrpc::ClientHelper clientHelper      = new gaxgrpc::ClientHelper(effectiveSettings);

            _callGetRecording = clientHelper.BuildApiCall <GetRecordingRequest, Recording>(grpcClient.GetRecordingAsync, grpcClient.GetRecording, effectiveSettings.GetRecordingSettings).WithGoogleRequestParam("name", request => request.Name);
            Modify_ApiCall(ref _callGetRecording);
            Modify_GetRecordingApiCall(ref _callGetRecording);
            _callListRecordings = clientHelper.BuildApiCall <ListRecordingsRequest, ListRecordingsResponse>(grpcClient.ListRecordingsAsync, grpcClient.ListRecordings, effectiveSettings.ListRecordingsSettings).WithGoogleRequestParam("parent", request => request.Parent);
            Modify_ApiCall(ref _callListRecordings);
            Modify_ListRecordingsApiCall(ref _callListRecordings);
            _callDeleteRecording = clientHelper.BuildApiCall <DeleteRecordingRequest, Recording>(grpcClient.DeleteRecordingAsync, grpcClient.DeleteRecording, effectiveSettings.DeleteRecordingSettings).WithGoogleRequestParam("name", request => request.Name);
            Modify_ApiCall(ref _callDeleteRecording);
            Modify_DeleteRecordingApiCall(ref _callDeleteRecording);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }
Ejemplo n.º 4
0
 partial void OnConstruction(Recordings.RecordingsClient grpcClient, RecordingsSettings effectiveSettings, gaxgrpc::ClientHelper clientHelper);
Ejemplo n.º 5
0
 partial void OnCopy(RecordingsSettings existing);