예제 #1
0
 private GlobalOrganizationOperationsSettings(GlobalOrganizationOperationsSettings existing) : base(existing)
 {
     gax::GaxPreconditions.CheckNotNull(existing, nameof(existing));
     DeleteSettings = existing.DeleteSettings;
     GetSettings    = existing.GetSettings;
     ListSettings   = existing.ListSettings;
     OnCopy(existing);
 }
예제 #2
0
        /// <summary>
        /// Constructs a client wrapper for the GlobalOrganizationOperations service, with the specified gRPC client and
        /// settings.
        /// </summary>
        /// <param name="grpcClient">The underlying gRPC client.</param>
        /// <param name="settings">
        /// The base <see cref="GlobalOrganizationOperationsSettings"/> used within this client.
        /// </param>
        public GlobalOrganizationOperationsClientImpl(GlobalOrganizationOperations.GlobalOrganizationOperationsClient grpcClient, GlobalOrganizationOperationsSettings settings)
        {
            GrpcClient = grpcClient;
            GlobalOrganizationOperationsSettings effectiveSettings = settings ?? GlobalOrganizationOperationsSettings.GetDefault();
            gaxgrpc::ClientHelper clientHelper = new gaxgrpc::ClientHelper(effectiveSettings);

            _callDelete = clientHelper.BuildApiCall <DeleteGlobalOrganizationOperationRequest, DeleteGlobalOrganizationOperationResponse>(grpcClient.DeleteAsync, grpcClient.Delete, effectiveSettings.DeleteSettings).WithGoogleRequestParam("operation", request => request.Operation);
            Modify_ApiCall(ref _callDelete);
            Modify_DeleteApiCall(ref _callDelete);
            _callGet = clientHelper.BuildApiCall <GetGlobalOrganizationOperationRequest, Operation>(grpcClient.GetAsync, grpcClient.Get, effectiveSettings.GetSettings).WithGoogleRequestParam("operation", request => request.Operation);
            Modify_ApiCall(ref _callGet);
            Modify_GetApiCall(ref _callGet);
            _callList = clientHelper.BuildApiCall <ListGlobalOrganizationOperationsRequest, OperationList>(grpcClient.ListAsync, grpcClient.List, effectiveSettings.ListSettings);
            Modify_ApiCall(ref _callList);
            Modify_ListApiCall(ref _callList);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }
예제 #3
0
 partial void OnCopy(GlobalOrganizationOperationsSettings existing);
예제 #4
0
 partial void OnConstruction(GlobalOrganizationOperations.GlobalOrganizationOperationsClient grpcClient, GlobalOrganizationOperationsSettings effectiveSettings, gaxgrpc::ClientHelper clientHelper);
예제 #5
0
        /// <summary>
        /// Creates a <see cref="GlobalOrganizationOperationsClient"/> 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="GlobalOrganizationOperationsSettings"/>.</param>
        /// <returns>The created <see cref="GlobalOrganizationOperationsClient"/>.</returns>
        internal static GlobalOrganizationOperationsClient Create(grpccore::CallInvoker callInvoker, GlobalOrganizationOperationsSettings settings = null)
        {
            gax::GaxPreconditions.CheckNotNull(callInvoker, nameof(callInvoker));
            grpcinter::Interceptor interceptor = settings?.Interceptor;

            if (interceptor != null)
            {
                callInvoker = grpcinter::CallInvokerExtensions.Intercept(callInvoker, interceptor);
            }
            GlobalOrganizationOperations.GlobalOrganizationOperationsClient grpcClient = new GlobalOrganizationOperations.GlobalOrganizationOperationsClient(callInvoker);
            return(new GlobalOrganizationOperationsClientImpl(grpcClient, settings));
        }