private AdGroupAssetServiceSettings(AdGroupAssetServiceSettings existing) : base(existing) { gax::GaxPreconditions.CheckNotNull(existing, nameof(existing)); GetAdGroupAssetSettings = existing.GetAdGroupAssetSettings; MutateAdGroupAssetsSettings = existing.MutateAdGroupAssetsSettings; OnCopy(existing); }
/// <summary> /// Constructs a client wrapper for the AdGroupAssetService service, with the specified gRPC client and /// settings. /// </summary> /// <param name="grpcClient">The underlying gRPC client.</param> /// <param name="settings">The base <see cref="AdGroupAssetServiceSettings"/> used within this client.</param> public AdGroupAssetServiceClientImpl(AdGroupAssetService.AdGroupAssetServiceClient grpcClient, AdGroupAssetServiceSettings settings) { GrpcClient = grpcClient; AdGroupAssetServiceSettings effectiveSettings = settings ?? AdGroupAssetServiceSettings.GetDefault(); gaxgrpc::ClientHelper clientHelper = new gaxgrpc::ClientHelper(effectiveSettings); _callGetAdGroupAsset = clientHelper.BuildApiCall <GetAdGroupAssetRequest, gagvr::AdGroupAsset>(grpcClient.GetAdGroupAssetAsync, grpcClient.GetAdGroupAsset, effectiveSettings.GetAdGroupAssetSettings).WithGoogleRequestParam("resource_name", request => request.ResourceName); Modify_ApiCall(ref _callGetAdGroupAsset); Modify_GetAdGroupAssetApiCall(ref _callGetAdGroupAsset); _callMutateAdGroupAssets = clientHelper.BuildApiCall <MutateAdGroupAssetsRequest, MutateAdGroupAssetsResponse>(grpcClient.MutateAdGroupAssetsAsync, grpcClient.MutateAdGroupAssets, effectiveSettings.MutateAdGroupAssetsSettings).WithGoogleRequestParam("customer_id", request => request.CustomerId); Modify_ApiCall(ref _callMutateAdGroupAssets); Modify_MutateAdGroupAssetsApiCall(ref _callMutateAdGroupAssets); OnConstruction(grpcClient, effectiveSettings, clientHelper); }
partial void OnConstruction(AdGroupAssetService.AdGroupAssetServiceClient grpcClient, AdGroupAssetServiceSettings effectiveSettings, gaxgrpc::ClientHelper clientHelper);
partial void OnCopy(AdGroupAssetServiceSettings existing);
/// <summary> /// Creates a <see cref="AdGroupAssetServiceClient"/> 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="AdGroupAssetServiceSettings"/>.</param> /// <returns>The created <see cref="AdGroupAssetServiceClient"/>.</returns> internal static AdGroupAssetServiceClient Create(grpccore::CallInvoker callInvoker, AdGroupAssetServiceSettings settings = null) { gax::GaxPreconditions.CheckNotNull(callInvoker, nameof(callInvoker)); grpcinter::Interceptor interceptor = settings?.Interceptor; if (interceptor != null) { callInvoker = grpcinter::CallInvokerExtensions.Intercept(callInvoker, interceptor); } AdGroupAssetService.AdGroupAssetServiceClient grpcClient = new AdGroupAssetService.AdGroupAssetServiceClient(callInvoker); return(new AdGroupAssetServiceClientImpl(grpcClient, settings)); }