/// <summary> /// Synchronously creates a <see cref="CarrierConstantServiceClient"/>, applying defaults for all unspecified settings, /// and creating a channel connecting to the given endpoint with application default credentials where /// necessary. See the example for how to use custom credentials. /// </summary> /// <example> /// This sample shows how to create a client using default credentials: /// <code> /// using Google.Ads.GoogleAds.V3.Services; /// ... /// // When running on Google Cloud Platform this will use the project Compute Credential. /// // Or set the GOOGLE_APPLICATION_CREDENTIALS environment variable to the path of a JSON /// // credential file to use that credential. /// CarrierConstantServiceClient client = CarrierConstantServiceClient.Create(); /// </code> /// This sample shows how to create a client using credentials loaded from a JSON file: /// <code> /// using Google.Ads.GoogleAds.V3.Services; /// using Google.Apis.Auth.OAuth2; /// using Grpc.Auth; /// using Grpc.Core; /// ... /// GoogleCredential cred = GoogleCredential.FromFile("/path/to/credentials.json"); /// Channel channel = new Channel( /// CarrierConstantServiceClient.DefaultEndpoint.Host, CarrierConstantServiceClient.DefaultEndpoint.Port, cred.ToChannelCredentials()); /// CarrierConstantServiceClient client = CarrierConstantServiceClient.Create(channel); /// ... /// // Shutdown the channel when it is no longer required. /// channel.ShutdownAsync().Wait(); /// </code> /// </example> /// <param name="endpoint">Optional <see cref="gaxgrpc::ServiceEndpoint"/>.</param> /// <param name="settings">Optional <see cref="CarrierConstantServiceSettings"/>.</param> /// <returns>The created <see cref="CarrierConstantServiceClient"/>.</returns> public static CarrierConstantServiceClient Create(gaxgrpc::ServiceEndpoint endpoint = null, CarrierConstantServiceSettings settings = null) { grpccore::Channel channel = s_channelPool.GetChannel(endpoint ?? DefaultEndpoint); return(Create(channel, settings)); }
/// <summary> /// Asynchronously creates a <see cref="AdGroupCriterionServiceClient"/>, applying defaults for all unspecified settings, /// and creating a channel connecting to the given endpoint with application default credentials where /// necessary. See the example for how to use custom credentials. /// </summary> /// <example> /// This sample shows how to create a client using default credentials: /// <code> /// using Google.Ads.GoogleAds.V3.Services; /// ... /// // When running on Google Cloud Platform this will use the project Compute Credential. /// // Or set the GOOGLE_APPLICATION_CREDENTIALS environment variable to the path of a JSON /// // credential file to use that credential. /// AdGroupCriterionServiceClient client = await AdGroupCriterionServiceClient.CreateAsync(); /// </code> /// This sample shows how to create a client using credentials loaded from a JSON file: /// <code> /// using Google.Ads.GoogleAds.V3.Services; /// using Google.Apis.Auth.OAuth2; /// using Grpc.Auth; /// using Grpc.Core; /// ... /// GoogleCredential cred = GoogleCredential.FromFile("/path/to/credentials.json"); /// Channel channel = new Channel( /// AdGroupCriterionServiceClient.DefaultEndpoint.Host, AdGroupCriterionServiceClient.DefaultEndpoint.Port, cred.ToChannelCredentials()); /// AdGroupCriterionServiceClient client = AdGroupCriterionServiceClient.Create(channel); /// ... /// // Shutdown the channel when it is no longer required. /// await channel.ShutdownAsync(); /// </code> /// </example> /// <param name="endpoint">Optional <see cref="gaxgrpc::ServiceEndpoint"/>.</param> /// <param name="settings">Optional <see cref="AdGroupCriterionServiceSettings"/>.</param> /// <returns>The task representing the created <see cref="AdGroupCriterionServiceClient"/>.</returns> public static async stt::Task <AdGroupCriterionServiceClient> CreateAsync(gaxgrpc::ServiceEndpoint endpoint = null, AdGroupCriterionServiceSettings settings = null) { grpccore::Channel channel = await s_channelPool.GetChannelAsync(endpoint ?? DefaultEndpoint).ConfigureAwait(false); return(Create(channel, settings)); }
/// <summary> /// Asynchronously creates a <see cref="RecaptchaEnterpriseServiceV1Beta1Client"/>, applying defaults for all unspecified settings, /// and creating a channel connecting to the given endpoint with application default credentials where /// necessary. See the example for how to use custom credentials. /// </summary> /// <example> /// This sample shows how to create a client using default credentials: /// <code> /// using Google.Cloud.RecaptchaEnterprise.V1Beta1; /// ... /// // When running on Google Cloud Platform this will use the project Compute Credential. /// // Or set the GOOGLE_APPLICATION_CREDENTIALS environment variable to the path of a JSON /// // credential file to use that credential. /// RecaptchaEnterpriseServiceV1Beta1Client client = await RecaptchaEnterpriseServiceV1Beta1Client.CreateAsync(); /// </code> /// This sample shows how to create a client using credentials loaded from a JSON file: /// <code> /// using Google.Cloud.RecaptchaEnterprise.V1Beta1; /// using Google.Apis.Auth.OAuth2; /// using Grpc.Auth; /// using Grpc.Core; /// ... /// GoogleCredential cred = GoogleCredential.FromFile("/path/to/credentials.json"); /// Channel channel = new Channel( /// RecaptchaEnterpriseServiceV1Beta1Client.DefaultEndpoint.Host, RecaptchaEnterpriseServiceV1Beta1Client.DefaultEndpoint.Port, cred.ToChannelCredentials()); /// RecaptchaEnterpriseServiceV1Beta1Client client = RecaptchaEnterpriseServiceV1Beta1Client.Create(channel); /// ... /// // Shutdown the channel when it is no longer required. /// await channel.ShutdownAsync(); /// </code> /// </example> /// <param name="endpoint">Optional <see cref="gaxgrpc::ServiceEndpoint"/>.</param> /// <param name="settings">Optional <see cref="RecaptchaEnterpriseServiceV1Beta1Settings"/>.</param> /// <returns>The task representing the created <see cref="RecaptchaEnterpriseServiceV1Beta1Client"/>.</returns> public static async stt::Task <RecaptchaEnterpriseServiceV1Beta1Client> CreateAsync(gaxgrpc::ServiceEndpoint endpoint = null, RecaptchaEnterpriseServiceV1Beta1Settings settings = null) { grpccore::Channel channel = await s_channelPool.GetChannelAsync(endpoint ?? DefaultEndpoint).ConfigureAwait(false); return(Create(channel, settings)); }
/// <summary> /// Synchronously creates a <see cref="RecaptchaEnterpriseServiceV1Beta1Client"/>, applying defaults for all unspecified settings, /// and creating a channel connecting to the given endpoint with application default credentials where /// necessary. See the example for how to use custom credentials. /// </summary> /// <example> /// This sample shows how to create a client using default credentials: /// <code> /// using Google.Cloud.RecaptchaEnterprise.V1Beta1; /// ... /// // When running on Google Cloud Platform this will use the project Compute Credential. /// // Or set the GOOGLE_APPLICATION_CREDENTIALS environment variable to the path of a JSON /// // credential file to use that credential. /// RecaptchaEnterpriseServiceV1Beta1Client client = RecaptchaEnterpriseServiceV1Beta1Client.Create(); /// </code> /// This sample shows how to create a client using credentials loaded from a JSON file: /// <code> /// using Google.Cloud.RecaptchaEnterprise.V1Beta1; /// using Google.Apis.Auth.OAuth2; /// using Grpc.Auth; /// using Grpc.Core; /// ... /// GoogleCredential cred = GoogleCredential.FromFile("/path/to/credentials.json"); /// Channel channel = new Channel( /// RecaptchaEnterpriseServiceV1Beta1Client.DefaultEndpoint.Host, RecaptchaEnterpriseServiceV1Beta1Client.DefaultEndpoint.Port, cred.ToChannelCredentials()); /// RecaptchaEnterpriseServiceV1Beta1Client client = RecaptchaEnterpriseServiceV1Beta1Client.Create(channel); /// ... /// // Shutdown the channel when it is no longer required. /// channel.ShutdownAsync().Wait(); /// </code> /// </example> /// <param name="endpoint">Optional <see cref="gaxgrpc::ServiceEndpoint"/>.</param> /// <param name="settings">Optional <see cref="RecaptchaEnterpriseServiceV1Beta1Settings"/>.</param> /// <returns>The created <see cref="RecaptchaEnterpriseServiceV1Beta1Client"/>.</returns> public static RecaptchaEnterpriseServiceV1Beta1Client Create(gaxgrpc::ServiceEndpoint endpoint = null, RecaptchaEnterpriseServiceV1Beta1Settings settings = null) { grpccore::Channel channel = s_channelPool.GetChannel(endpoint ?? DefaultEndpoint); return(Create(channel, settings)); }
/// <summary> /// Synchronously creates a <see cref="DomainCategoryServiceClient"/>, applying defaults for all unspecified settings, /// and creating a channel connecting to the given endpoint with application default credentials where /// necessary. See the example for how to use custom credentials. /// </summary> /// <example> /// This sample shows how to create a client using default credentials: /// <code> /// using Google.Ads.GoogleAds.V3.Services; /// ... /// // When running on Google Cloud Platform this will use the project Compute Credential. /// // Or set the GOOGLE_APPLICATION_CREDENTIALS environment variable to the path of a JSON /// // credential file to use that credential. /// DomainCategoryServiceClient client = DomainCategoryServiceClient.Create(); /// </code> /// This sample shows how to create a client using credentials loaded from a JSON file: /// <code> /// using Google.Ads.GoogleAds.V3.Services; /// using Google.Apis.Auth.OAuth2; /// using Grpc.Auth; /// using Grpc.Core; /// ... /// GoogleCredential cred = GoogleCredential.FromFile("/path/to/credentials.json"); /// Channel channel = new Channel( /// DomainCategoryServiceClient.DefaultEndpoint.Host, DomainCategoryServiceClient.DefaultEndpoint.Port, cred.ToChannelCredentials()); /// DomainCategoryServiceClient client = DomainCategoryServiceClient.Create(channel); /// ... /// // Shutdown the channel when it is no longer required. /// channel.ShutdownAsync().Wait(); /// </code> /// </example> /// <param name="endpoint">Optional <see cref="gaxgrpc::ServiceEndpoint"/>.</param> /// <param name="settings">Optional <see cref="DomainCategoryServiceSettings"/>.</param> /// <returns>The created <see cref="DomainCategoryServiceClient"/>.</returns> public static DomainCategoryServiceClient Create(gaxgrpc::ServiceEndpoint endpoint = null, DomainCategoryServiceSettings settings = null) { grpccore::Channel channel = s_channelPool.GetChannel(endpoint ?? DefaultEndpoint); return(Create(channel, settings)); }
/// <summary> /// Synchronously creates a <see cref="CustomerNegativeCriterionServiceClient"/>, applying defaults for all unspecified settings, /// and creating a channel connecting to the given endpoint with application default credentials where /// necessary. See the example for how to use custom credentials. /// </summary> /// <example> /// This sample shows how to create a client using default credentials: /// <code> /// using Google.Ads.GoogleAds.V2.Services; /// ... /// // When running on Google Cloud Platform this will use the project Compute Credential. /// // Or set the GOOGLE_APPLICATION_CREDENTIALS environment variable to the path of a JSON /// // credential file to use that credential. /// CustomerNegativeCriterionServiceClient client = CustomerNegativeCriterionServiceClient.Create(); /// </code> /// This sample shows how to create a client using credentials loaded from a JSON file: /// <code> /// using Google.Ads.GoogleAds.V2.Services; /// using Google.Apis.Auth.OAuth2; /// using Grpc.Auth; /// using Grpc.Core; /// ... /// GoogleCredential cred = GoogleCredential.FromFile("/path/to/credentials.json"); /// Channel channel = new Channel( /// CustomerNegativeCriterionServiceClient.DefaultEndpoint.Host, CustomerNegativeCriterionServiceClient.DefaultEndpoint.Port, cred.ToChannelCredentials()); /// CustomerNegativeCriterionServiceClient client = CustomerNegativeCriterionServiceClient.Create(channel); /// ... /// // Shutdown the channel when it is no longer required. /// channel.ShutdownAsync().Wait(); /// </code> /// </example> /// <param name="endpoint">Optional <see cref="gaxgrpc::ServiceEndpoint"/>.</param> /// <param name="settings">Optional <see cref="CustomerNegativeCriterionServiceSettings"/>.</param> /// <returns>The created <see cref="CustomerNegativeCriterionServiceClient"/>.</returns> public static CustomerNegativeCriterionServiceClient Create(gaxgrpc::ServiceEndpoint endpoint = null, CustomerNegativeCriterionServiceSettings settings = null) { grpccore::Channel channel = s_channelPool.GetChannel(endpoint ?? DefaultEndpoint); return(Create(channel, settings)); }
/// <summary> /// Synchronously creates a <see cref="SpeechClient"/>, applying defaults for all unspecified settings, and /// creating a channel connecting to the given endpoint with application default credentials where necessary. /// See the example for how to use custom credentials. /// </summary> /// <example> /// This sample shows how to create a client using default credentials: /// <code> /// using Google.Cloud.Vision.V1; /// ... /// // When running on Google Cloud Platform this will use the project Compute Credential. /// // Or set the GOOGLE_APPLICATION_CREDENTIALS environment variable to the path of a JSON /// // credential file to use that credential. /// ImageAnnotatorClient client = ImageAnnotatorClient.Create(); /// </code> /// This sample shows how to create a client using credentials loaded from a JSON file: /// <code> /// using Google.Cloud.Vision.V1; /// using Google.Apis.Auth.OAuth2; /// using Grpc.Auth; /// using Grpc.Core; /// ... /// GoogleCredential cred = GoogleCredential.FromFile("/path/to/credentials.json"); /// Channel channel = new Channel( /// ImageAnnotatorClient.DefaultEndpoint.Host, ImageAnnotatorClient.DefaultEndpoint.Port, cred.ToChannelCredentials()); /// ImageAnnotatorClient client = ImageAnnotatorClient.Create(channel); /// ... /// // Shutdown the channel when it is no longer required. /// channel.ShutdownAsync().Wait(); /// </code> /// </example> /// <param name="endpoint">Optional <see cref="gaxgrpc::ServiceEndpoint"/>.</param> /// <param name="settings">Optional <see cref="SpeechSettings"/>.</param> /// <returns>The created <see cref="SpeechClient"/>.</returns> public static SpeechClient Create(gaxgrpc::ServiceEndpoint endpoint = null, SpeechSettings settings = null) { grpccore::Channel channel = ChannelPool.GetChannel(endpoint ?? DefaultEndpoint); return(Create(channel, settings)); }
/// <summary> /// Synchronously creates a <see cref="AdGroupAudienceViewServiceClient"/>, applying defaults for all unspecified settings, /// and creating a channel connecting to the given endpoint with application default credentials where /// necessary. See the example for how to use custom credentials. /// </summary> /// <example> /// This sample shows how to create a client using default credentials: /// <code> /// using Google.Ads.GoogleAds.V1.Services; /// ... /// // When running on Google Cloud Platform this will use the project Compute Credential. /// // Or set the GOOGLE_APPLICATION_CREDENTIALS environment variable to the path of a JSON /// // credential file to use that credential. /// AdGroupAudienceViewServiceClient client = AdGroupAudienceViewServiceClient.Create(); /// </code> /// This sample shows how to create a client using credentials loaded from a JSON file: /// <code> /// using Google.Ads.GoogleAds.V1.Services; /// using Google.Apis.Auth.OAuth2; /// using Grpc.Auth; /// using Grpc.Core; /// ... /// GoogleCredential cred = GoogleCredential.FromFile("/path/to/credentials.json"); /// Channel channel = new Channel( /// AdGroupAudienceViewServiceClient.DefaultEndpoint.Host, AdGroupAudienceViewServiceClient.DefaultEndpoint.Port, cred.ToChannelCredentials()); /// AdGroupAudienceViewServiceClient client = AdGroupAudienceViewServiceClient.Create(channel); /// ... /// // Shutdown the channel when it is no longer required. /// channel.ShutdownAsync().Wait(); /// </code> /// </example> /// <param name="endpoint">Optional <see cref="gaxgrpc::ServiceEndpoint"/>.</param> /// <param name="settings">Optional <see cref="AdGroupAudienceViewServiceSettings"/>.</param> /// <returns>The created <see cref="AdGroupAudienceViewServiceClient"/>.</returns> public static AdGroupAudienceViewServiceClient Create(gaxgrpc::ServiceEndpoint endpoint = null, AdGroupAudienceViewServiceSettings settings = null) { grpccore::Channel channel = s_channelPool.GetChannel(endpoint ?? DefaultEndpoint); return(Create(channel, settings)); }
/// <summary> /// Synchronously creates a <see cref="ConversionAdjustmentUploadServiceClient"/>, applying defaults for all unspecified settings, /// and creating a channel connecting to the given endpoint with application default credentials where /// necessary. See the example for how to use custom credentials. /// </summary> /// <example> /// This sample shows how to create a client using default credentials: /// <code> /// using Google.Ads.GoogleAds.V1.Services; /// ... /// // When running on Google Cloud Platform this will use the project Compute Credential. /// // Or set the GOOGLE_APPLICATION_CREDENTIALS environment variable to the path of a JSON /// // credential file to use that credential. /// ConversionAdjustmentUploadServiceClient client = ConversionAdjustmentUploadServiceClient.Create(); /// </code> /// This sample shows how to create a client using credentials loaded from a JSON file: /// <code> /// using Google.Ads.GoogleAds.V1.Services; /// using Google.Apis.Auth.OAuth2; /// using Grpc.Auth; /// using Grpc.Core; /// ... /// GoogleCredential cred = GoogleCredential.FromFile("/path/to/credentials.json"); /// Channel channel = new Channel( /// ConversionAdjustmentUploadServiceClient.DefaultEndpoint.Host, ConversionAdjustmentUploadServiceClient.DefaultEndpoint.Port, cred.ToChannelCredentials()); /// ConversionAdjustmentUploadServiceClient client = ConversionAdjustmentUploadServiceClient.Create(channel); /// ... /// // Shutdown the channel when it is no longer required. /// channel.ShutdownAsync().Wait(); /// </code> /// </example> /// <param name="endpoint">Optional <see cref="gaxgrpc::ServiceEndpoint"/>.</param> /// <param name="settings">Optional <see cref="ConversionAdjustmentUploadServiceSettings"/>.</param> /// <returns>The created <see cref="ConversionAdjustmentUploadServiceClient"/>.</returns> public static ConversionAdjustmentUploadServiceClient Create(gaxgrpc::ServiceEndpoint endpoint = null, ConversionAdjustmentUploadServiceSettings settings = null) { grpccore::Channel channel = s_channelPool.GetChannel(endpoint ?? DefaultEndpoint); return(Create(channel, settings)); }
/// <summary> /// Synchronously creates a <see cref="ExpandedLandingPageViewServiceClient"/>, applying defaults for all unspecified settings, /// and creating a channel connecting to the given endpoint with application default credentials where /// necessary. See the example for how to use custom credentials. /// </summary> /// <example> /// This sample shows how to create a client using default credentials: /// <code> /// using Google.Ads.GoogleAds.V2.Services; /// ... /// // When running on Google Cloud Platform this will use the project Compute Credential. /// // Or set the GOOGLE_APPLICATION_CREDENTIALS environment variable to the path of a JSON /// // credential file to use that credential. /// ExpandedLandingPageViewServiceClient client = ExpandedLandingPageViewServiceClient.Create(); /// </code> /// This sample shows how to create a client using credentials loaded from a JSON file: /// <code> /// using Google.Ads.GoogleAds.V2.Services; /// using Google.Apis.Auth.OAuth2; /// using Grpc.Auth; /// using Grpc.Core; /// ... /// GoogleCredential cred = GoogleCredential.FromFile("/path/to/credentials.json"); /// Channel channel = new Channel( /// ExpandedLandingPageViewServiceClient.DefaultEndpoint.Host, ExpandedLandingPageViewServiceClient.DefaultEndpoint.Port, cred.ToChannelCredentials()); /// ExpandedLandingPageViewServiceClient client = ExpandedLandingPageViewServiceClient.Create(channel); /// ... /// // Shutdown the channel when it is no longer required. /// channel.ShutdownAsync().Wait(); /// </code> /// </example> /// <param name="endpoint">Optional <see cref="gaxgrpc::ServiceEndpoint"/>.</param> /// <param name="settings">Optional <see cref="ExpandedLandingPageViewServiceSettings"/>.</param> /// <returns>The created <see cref="ExpandedLandingPageViewServiceClient"/>.</returns> public static ExpandedLandingPageViewServiceClient Create(gaxgrpc::ServiceEndpoint endpoint = null, ExpandedLandingPageViewServiceSettings settings = null) { grpccore::Channel channel = s_channelPool.GetChannel(endpoint ?? DefaultEndpoint); return(Create(channel, settings)); }
/// <summary> /// Synchronously creates a <see cref="KeywordPlanNegativeKeywordServiceClient"/>, applying defaults for all unspecified settings, /// and creating a channel connecting to the given endpoint with application default credentials where /// necessary. See the example for how to use custom credentials. /// </summary> /// <example> /// This sample shows how to create a client using default credentials: /// <code> /// using Google.Ads.GoogleAds.V0.Services; /// ... /// // When running on Google Cloud Platform this will use the project Compute Credential. /// // Or set the GOOGLE_APPLICATION_CREDENTIALS environment variable to the path of a JSON /// // credential file to use that credential. /// KeywordPlanNegativeKeywordServiceClient client = KeywordPlanNegativeKeywordServiceClient.Create(); /// </code> /// This sample shows how to create a client using credentials loaded from a JSON file: /// <code> /// using Google.Ads.GoogleAds.V0.Services; /// using Google.Apis.Auth.OAuth2; /// using Grpc.Auth; /// using Grpc.Core; /// ... /// GoogleCredential cred = GoogleCredential.FromFile("/path/to/credentials.json"); /// Channel channel = new Channel( /// KeywordPlanNegativeKeywordServiceClient.DefaultEndpoint.Host, KeywordPlanNegativeKeywordServiceClient.DefaultEndpoint.Port, cred.ToChannelCredentials()); /// KeywordPlanNegativeKeywordServiceClient client = KeywordPlanNegativeKeywordServiceClient.Create(channel); /// ... /// // Shutdown the channel when it is no longer required. /// channel.ShutdownAsync().Wait(); /// </code> /// </example> /// <param name="endpoint">Optional <see cref="gaxgrpc::ServiceEndpoint"/>.</param> /// <param name="settings">Optional <see cref="KeywordPlanNegativeKeywordServiceSettings"/>.</param> /// <returns>The created <see cref="KeywordPlanNegativeKeywordServiceClient"/>.</returns> public static KeywordPlanNegativeKeywordServiceClient Create(gaxgrpc::ServiceEndpoint endpoint = null, KeywordPlanNegativeKeywordServiceSettings settings = null) { grpccore::Channel channel = s_channelPool.GetChannel(endpoint ?? DefaultEndpoint); return(Create(channel, settings)); }
/// <summary> /// Synchronously creates a <see cref="FeedPlaceholderViewServiceClient"/>, applying defaults for all unspecified settings, /// and creating a channel connecting to the given endpoint with application default credentials where /// necessary. See the example for how to use custom credentials. /// </summary> /// <example> /// This sample shows how to create a client using default credentials: /// <code> /// using Google.Ads.GoogleAds.V2.Services; /// ... /// // When running on Google Cloud Platform this will use the project Compute Credential. /// // Or set the GOOGLE_APPLICATION_CREDENTIALS environment variable to the path of a JSON /// // credential file to use that credential. /// FeedPlaceholderViewServiceClient client = FeedPlaceholderViewServiceClient.Create(); /// </code> /// This sample shows how to create a client using credentials loaded from a JSON file: /// <code> /// using Google.Ads.GoogleAds.V2.Services; /// using Google.Apis.Auth.OAuth2; /// using Grpc.Auth; /// using Grpc.Core; /// ... /// GoogleCredential cred = GoogleCredential.FromFile("/path/to/credentials.json"); /// Channel channel = new Channel( /// FeedPlaceholderViewServiceClient.DefaultEndpoint.Host, FeedPlaceholderViewServiceClient.DefaultEndpoint.Port, cred.ToChannelCredentials()); /// FeedPlaceholderViewServiceClient client = FeedPlaceholderViewServiceClient.Create(channel); /// ... /// // Shutdown the channel when it is no longer required. /// channel.ShutdownAsync().Wait(); /// </code> /// </example> /// <param name="endpoint">Optional <see cref="gaxgrpc::ServiceEndpoint"/>.</param> /// <param name="settings">Optional <see cref="FeedPlaceholderViewServiceSettings"/>.</param> /// <returns>The created <see cref="FeedPlaceholderViewServiceClient"/>.</returns> public static FeedPlaceholderViewServiceClient Create(gaxgrpc::ServiceEndpoint endpoint = null, FeedPlaceholderViewServiceSettings settings = null) { grpccore::Channel channel = s_channelPool.GetChannel(endpoint ?? DefaultEndpoint); return(Create(channel, settings)); }
/// <summary> /// Synchronously creates a <see cref="CustomerManagerLinkServiceClient"/>, applying defaults for all unspecified settings, /// and creating a channel connecting to the given endpoint with application default credentials where /// necessary. See the example for how to use custom credentials. /// </summary> /// <example> /// This sample shows how to create a client using default credentials: /// <code> /// using Google.Ads.GoogleAds.V2.Services; /// ... /// // When running on Google Cloud Platform this will use the project Compute Credential. /// // Or set the GOOGLE_APPLICATION_CREDENTIALS environment variable to the path of a JSON /// // credential file to use that credential. /// CustomerManagerLinkServiceClient client = CustomerManagerLinkServiceClient.Create(); /// </code> /// This sample shows how to create a client using credentials loaded from a JSON file: /// <code> /// using Google.Ads.GoogleAds.V2.Services; /// using Google.Apis.Auth.OAuth2; /// using Grpc.Auth; /// using Grpc.Core; /// ... /// GoogleCredential cred = GoogleCredential.FromFile("/path/to/credentials.json"); /// Channel channel = new Channel( /// CustomerManagerLinkServiceClient.DefaultEndpoint.Host, CustomerManagerLinkServiceClient.DefaultEndpoint.Port, cred.ToChannelCredentials()); /// CustomerManagerLinkServiceClient client = CustomerManagerLinkServiceClient.Create(channel); /// ... /// // Shutdown the channel when it is no longer required. /// channel.ShutdownAsync().Wait(); /// </code> /// </example> /// <param name="endpoint">Optional <see cref="gaxgrpc::ServiceEndpoint"/>.</param> /// <param name="settings">Optional <see cref="CustomerManagerLinkServiceSettings"/>.</param> /// <returns>The created <see cref="CustomerManagerLinkServiceClient"/>.</returns> public static CustomerManagerLinkServiceClient Create(gaxgrpc::ServiceEndpoint endpoint = null, CustomerManagerLinkServiceSettings settings = null) { grpccore::Channel channel = s_channelPool.GetChannel(endpoint ?? DefaultEndpoint); return Create(channel, settings); }
/// <summary> /// Asynchronously creates a <see cref="CustomerManagerLinkServiceClient"/>, applying defaults for all unspecified settings, /// and creating a channel connecting to the given endpoint with application default credentials where /// necessary. See the example for how to use custom credentials. /// </summary> /// <example> /// This sample shows how to create a client using default credentials: /// <code> /// using Google.Ads.GoogleAds.V2.Services; /// ... /// // When running on Google Cloud Platform this will use the project Compute Credential. /// // Or set the GOOGLE_APPLICATION_CREDENTIALS environment variable to the path of a JSON /// // credential file to use that credential. /// CustomerManagerLinkServiceClient client = await CustomerManagerLinkServiceClient.CreateAsync(); /// </code> /// This sample shows how to create a client using credentials loaded from a JSON file: /// <code> /// using Google.Ads.GoogleAds.V2.Services; /// using Google.Apis.Auth.OAuth2; /// using Grpc.Auth; /// using Grpc.Core; /// ... /// GoogleCredential cred = GoogleCredential.FromFile("/path/to/credentials.json"); /// Channel channel = new Channel( /// CustomerManagerLinkServiceClient.DefaultEndpoint.Host, CustomerManagerLinkServiceClient.DefaultEndpoint.Port, cred.ToChannelCredentials()); /// CustomerManagerLinkServiceClient client = CustomerManagerLinkServiceClient.Create(channel); /// ... /// // Shutdown the channel when it is no longer required. /// await channel.ShutdownAsync(); /// </code> /// </example> /// <param name="endpoint">Optional <see cref="gaxgrpc::ServiceEndpoint"/>.</param> /// <param name="settings">Optional <see cref="CustomerManagerLinkServiceSettings"/>.</param> /// <returns>The task representing the created <see cref="CustomerManagerLinkServiceClient"/>.</returns> public static async stt::Task<CustomerManagerLinkServiceClient> CreateAsync(gaxgrpc::ServiceEndpoint endpoint = null, CustomerManagerLinkServiceSettings settings = null) { grpccore::Channel channel = await s_channelPool.GetChannelAsync(endpoint ?? DefaultEndpoint).ConfigureAwait(false); return Create(channel, settings); }
/// <summary> /// Synchronously creates a <see cref="VideoIntelligenceServiceClient"/>, applying defaults for all unspecified /// settings, and creating a channel connecting to the given endpoint with application default credentials where /// necessary. See the example for how to use custom credentials. /// </summary> /// <example> /// This sample shows how to create a client using default credentials: /// <code> /// using Google.Cloud.Vision.V1; /// ... /// // When running on Google Cloud Platform this will use the project Compute Credential. /// // Or set the GOOGLE_APPLICATION_CREDENTIALS environment variable to the path of a JSON /// // credential file to use that credential. /// ImageAnnotatorClient client = ImageAnnotatorClient.Create(); /// </code> /// This sample shows how to create a client using credentials loaded from a JSON file: /// <code> /// using Google.Cloud.Vision.V1; /// using Google.Apis.Auth.OAuth2; /// using Grpc.Auth; /// using Grpc.Core; /// ... /// GoogleCredential cred = GoogleCredential.FromFile("/path/to/credentials.json"); /// Channel channel = new Channel( /// ImageAnnotatorClient.DefaultEndpoint.Host, ImageAnnotatorClient.DefaultEndpoint.Port, cred.ToChannelCredentials()); /// ImageAnnotatorClient client = ImageAnnotatorClient.Create(channel); /// ... /// // Shutdown the channel when it is no longer required. /// channel.ShutdownAsync().Wait(); /// </code> /// </example> /// <param name="endpoint">Optional <see cref="gaxgrpc::ServiceEndpoint"/>.</param> /// <param name="settings">Optional <see cref="VideoIntelligenceServiceSettings"/>.</param> /// <returns>The created <see cref="VideoIntelligenceServiceClient"/>.</returns> public static VideoIntelligenceServiceClient Create(gaxgrpc::ServiceEndpoint endpoint = null, VideoIntelligenceServiceSettings settings = null) { grpccore::Channel channel = ChannelPool.GetChannel(endpoint ?? DefaultEndpoint); return(Create(channel, settings)); }