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

            _callTroubleshootIamPolicy = clientHelper.BuildApiCall <TroubleshootIamPolicyRequest, TroubleshootIamPolicyResponse>(grpcClient.TroubleshootIamPolicyAsync, grpcClient.TroubleshootIamPolicy, effectiveSettings.TroubleshootIamPolicySettings);
            Modify_ApiCall(ref _callTroubleshootIamPolicy);
            Modify_TroubleshootIamPolicyApiCall(ref _callTroubleshootIamPolicy);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }
예제 #2
0
        /// <summary>
        /// Creates a <see cref="IamCheckerClient"/> 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="IamCheckerSettings"/>.</param>
        /// <returns>The created <see cref="IamCheckerClient"/>.</returns>
        internal static IamCheckerClient Create(grpccore::CallInvoker callInvoker, IamCheckerSettings settings = null)
        {
            gax::GaxPreconditions.CheckNotNull(callInvoker, nameof(callInvoker));
            grpcinter::Interceptor interceptor = settings?.Interceptor;

            if (interceptor != null)
            {
                callInvoker = grpcinter::CallInvokerExtensions.Intercept(callInvoker, interceptor);
            }
            IamChecker.IamCheckerClient grpcClient = new IamChecker.IamCheckerClient(callInvoker);
            return(new IamCheckerClientImpl(grpcClient, settings));
        }
예제 #3
0
 partial void OnCopy(IamCheckerSettings existing);
예제 #4
0
 private IamCheckerSettings(IamCheckerSettings existing) : base(existing)
 {
     gax::GaxPreconditions.CheckNotNull(existing, nameof(existing));
     TroubleshootIamPolicySettings = existing.TroubleshootIamPolicySettings;
     OnCopy(existing);
 }
예제 #5
0
 partial void OnConstruction(IamChecker.IamCheckerClient grpcClient, IamCheckerSettings effectiveSettings, gaxgrpc::ClientHelper clientHelper);