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

            _callGetMediaFile = clientHelper.BuildApiCall <GetMediaFileRequest, gagvr::MediaFile>(grpcClient.GetMediaFileAsync, grpcClient.GetMediaFile, effectiveSettings.GetMediaFileSettings).WithGoogleRequestParam("resource_name", request => request.ResourceName);
            Modify_ApiCall(ref _callGetMediaFile);
            Modify_GetMediaFileApiCall(ref _callGetMediaFile);
            _callMutateMediaFiles = clientHelper.BuildApiCall <MutateMediaFilesRequest, MutateMediaFilesResponse>(grpcClient.MutateMediaFilesAsync, grpcClient.MutateMediaFiles, effectiveSettings.MutateMediaFilesSettings).WithGoogleRequestParam("customer_id", request => request.CustomerId);
            Modify_ApiCall(ref _callMutateMediaFiles);
            Modify_MutateMediaFilesApiCall(ref _callMutateMediaFiles);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }
Esempio n. 3
0
 partial void OnCopy(MediaFileServiceSettings existing);
Esempio n. 4
0
 partial void OnConstruction(MediaFileService.MediaFileServiceClient grpcClient, MediaFileServiceSettings effectiveSettings, gaxgrpc::ClientHelper clientHelper);
Esempio n. 5
0
        /// <summary>
        /// Creates a <see cref="MediaFileServiceClient"/> 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="MediaFileServiceSettings"/>.</param>
        /// <returns>The created <see cref="MediaFileServiceClient"/>.</returns>
        internal static MediaFileServiceClient Create(grpccore::CallInvoker callInvoker, MediaFileServiceSettings settings = null)
        {
            gax::GaxPreconditions.CheckNotNull(callInvoker, nameof(callInvoker));
            grpcinter::Interceptor interceptor = settings?.Interceptor;

            if (interceptor != null)
            {
                callInvoker = grpcinter::CallInvokerExtensions.Intercept(callInvoker, interceptor);
            }
            MediaFileService.MediaFileServiceClient grpcClient = new MediaFileService.MediaFileServiceClient(callInvoker);
            return(new MediaFileServiceClientImpl(grpcClient, settings));
        }