private AuthorizedCertificatesSettings(AuthorizedCertificatesSettings existing) : base(existing) { gax::GaxPreconditions.CheckNotNull(existing, nameof(existing)); ListAuthorizedCertificatesSettings = existing.ListAuthorizedCertificatesSettings; GetAuthorizedCertificateSettings = existing.GetAuthorizedCertificateSettings; CreateAuthorizedCertificateSettings = existing.CreateAuthorizedCertificateSettings; UpdateAuthorizedCertificateSettings = existing.UpdateAuthorizedCertificateSettings; DeleteAuthorizedCertificateSettings = existing.DeleteAuthorizedCertificateSettings; OnCopy(existing); }
/// <summary> /// Constructs a client wrapper for the AuthorizedCertificates service, with the specified gRPC client and /// settings. /// </summary> /// <param name="grpcClient">The underlying gRPC client.</param> /// <param name="settings"> /// The base <see cref="AuthorizedCertificatesSettings"/> used within this client. /// </param> public AuthorizedCertificatesClientImpl(AuthorizedCertificates.AuthorizedCertificatesClient grpcClient, AuthorizedCertificatesSettings settings) { GrpcClient = grpcClient; AuthorizedCertificatesSettings effectiveSettings = settings ?? AuthorizedCertificatesSettings.GetDefault(); gaxgrpc::ClientHelper clientHelper = new gaxgrpc::ClientHelper(effectiveSettings); _callListAuthorizedCertificates = clientHelper.BuildApiCall <ListAuthorizedCertificatesRequest, ListAuthorizedCertificatesResponse>(grpcClient.ListAuthorizedCertificatesAsync, grpcClient.ListAuthorizedCertificates, effectiveSettings.ListAuthorizedCertificatesSettings).WithGoogleRequestParam("parent", request => request.Parent); Modify_ApiCall(ref _callListAuthorizedCertificates); Modify_ListAuthorizedCertificatesApiCall(ref _callListAuthorizedCertificates); _callGetAuthorizedCertificate = clientHelper.BuildApiCall <GetAuthorizedCertificateRequest, AuthorizedCertificate>(grpcClient.GetAuthorizedCertificateAsync, grpcClient.GetAuthorizedCertificate, effectiveSettings.GetAuthorizedCertificateSettings).WithGoogleRequestParam("name", request => request.Name); Modify_ApiCall(ref _callGetAuthorizedCertificate); Modify_GetAuthorizedCertificateApiCall(ref _callGetAuthorizedCertificate); _callCreateAuthorizedCertificate = clientHelper.BuildApiCall <CreateAuthorizedCertificateRequest, AuthorizedCertificate>(grpcClient.CreateAuthorizedCertificateAsync, grpcClient.CreateAuthorizedCertificate, effectiveSettings.CreateAuthorizedCertificateSettings).WithGoogleRequestParam("parent", request => request.Parent); Modify_ApiCall(ref _callCreateAuthorizedCertificate); Modify_CreateAuthorizedCertificateApiCall(ref _callCreateAuthorizedCertificate); _callUpdateAuthorizedCertificate = clientHelper.BuildApiCall <UpdateAuthorizedCertificateRequest, AuthorizedCertificate>(grpcClient.UpdateAuthorizedCertificateAsync, grpcClient.UpdateAuthorizedCertificate, effectiveSettings.UpdateAuthorizedCertificateSettings).WithGoogleRequestParam("name", request => request.Name); Modify_ApiCall(ref _callUpdateAuthorizedCertificate); Modify_UpdateAuthorizedCertificateApiCall(ref _callUpdateAuthorizedCertificate); _callDeleteAuthorizedCertificate = clientHelper.BuildApiCall <DeleteAuthorizedCertificateRequest, wkt::Empty>(grpcClient.DeleteAuthorizedCertificateAsync, grpcClient.DeleteAuthorizedCertificate, effectiveSettings.DeleteAuthorizedCertificateSettings).WithGoogleRequestParam("name", request => request.Name); Modify_ApiCall(ref _callDeleteAuthorizedCertificate); Modify_DeleteAuthorizedCertificateApiCall(ref _callDeleteAuthorizedCertificate); OnConstruction(grpcClient, effectiveSettings, clientHelper); }
partial void OnCopy(AuthorizedCertificatesSettings existing);
partial void OnConstruction(AuthorizedCertificates.AuthorizedCertificatesClient grpcClient, AuthorizedCertificatesSettings effectiveSettings, gaxgrpc::ClientHelper clientHelper);
/// <summary> /// Creates a <see cref="AuthorizedCertificatesClient"/> 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="AuthorizedCertificatesSettings"/>.</param> /// <returns>The created <see cref="AuthorizedCertificatesClient"/>.</returns> internal static AuthorizedCertificatesClient Create(grpccore::CallInvoker callInvoker, AuthorizedCertificatesSettings settings = null) { gax::GaxPreconditions.CheckNotNull(callInvoker, nameof(callInvoker)); grpcinter::Interceptor interceptor = settings?.Interceptor; if (interceptor != null) { callInvoker = grpcinter::CallInvokerExtensions.Intercept(callInvoker, interceptor); } AuthorizedCertificates.AuthorizedCertificatesClient grpcClient = new AuthorizedCertificates.AuthorizedCertificatesClient(callInvoker); return(new AuthorizedCertificatesClientImpl(grpcClient, settings)); }