/// <summary>
        /// Asynchronously creates a <see cref="PhishingProtectionServiceV1Beta1Client"/>, 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.PhishingProtection.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.
        /// PhishingProtectionServiceV1Beta1Client client = await PhishingProtectionServiceV1Beta1Client.CreateAsync();
        /// </code>
        /// This sample shows how to create a client using credentials loaded from a JSON file:
        /// <code>
        /// using Google.Cloud.PhishingProtection.V1Beta1;
        /// using Google.Apis.Auth.OAuth2;
        /// using Grpc.Auth;
        /// using Grpc.Core;
        /// ...
        /// GoogleCredential cred = GoogleCredential.FromFile("/path/to/credentials.json");
        /// Channel channel = new Channel(
        ///     PhishingProtectionServiceV1Beta1Client.DefaultEndpoint.Host, PhishingProtectionServiceV1Beta1Client.DefaultEndpoint.Port, cred.ToChannelCredentials());
        /// PhishingProtectionServiceV1Beta1Client client = PhishingProtectionServiceV1Beta1Client.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="PhishingProtectionServiceV1Beta1Settings"/>.</param>
        /// <returns>The task representing the created <see cref="PhishingProtectionServiceV1Beta1Client"/>.</returns>
        public static async stt::Task <PhishingProtectionServiceV1Beta1Client> CreateAsync(gaxgrpc::ServiceEndpoint endpoint = null, PhishingProtectionServiceV1Beta1Settings settings = null)
        {
            grpccore::Channel channel = await s_channelPool.GetChannelAsync(endpoint ?? DefaultEndpoint).ConfigureAwait(false);

            return(Create(channel, settings));
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Creates a <see cref="AdGroupAudienceViewServiceClient"/> which uses the specified channel for remote operations.
 /// </summary>
 /// <param name="channel">The <see cref="grpccore::Channel"/> for remote operations. Must not be null.</param>
 /// <param name="settings">Optional <see cref="AdGroupAudienceViewServiceSettings"/>.</param>
 /// <returns>The created <see cref="AdGroupAudienceViewServiceClient"/>.</returns>
 public static AdGroupAudienceViewServiceClient Create(grpccore::Channel channel, AdGroupAudienceViewServiceSettings settings = null)
 {
     gax::GaxPreconditions.CheckNotNull(channel, nameof(channel));
     return Create(new grpccore::DefaultCallInvoker(channel), settings);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Creates a <see cref="SharedCriterionServiceClient"/> which uses the specified channel for remote operations.
 /// </summary>
 /// <param name="channel">The <see cref="grpccore::Channel"/> for remote operations. Must not be null.</param>
 /// <param name="settings">Optional <see cref="SharedCriterionServiceSettings"/>.</param>
 /// <returns>The created <see cref="SharedCriterionServiceClient"/>.</returns>
 public static SharedCriterionServiceClient Create(grpccore::Channel channel, SharedCriterionServiceSettings settings = null)
 {
     gax::GaxPreconditions.CheckNotNull(channel, nameof(channel));
     return(Create(new grpccore::DefaultCallInvoker(channel), settings));
 }
 /// <summary>
 /// Creates a <see cref="TraceServiceClient"/> which uses the specified channel for remote operations.
 /// </summary>
 /// <param name="channel">The <see cref="grpccore::Channel"/> for remote operations. Must not be null.</param>
 /// <param name="settings">Optional <see cref="TraceServiceSettings"/>.</param>
 /// <returns>The created <see cref="TraceServiceClient"/>.</returns>
 public static TraceServiceClient Create(grpccore::Channel channel, TraceServiceSettings settings = null)
 {
     gax::GaxPreconditions.CheckNotNull(channel, nameof(channel));
     TraceService.TraceServiceClient grpcClient = new TraceService.TraceServiceClient(channel);
     return(new TraceServiceClientImpl(grpcClient, settings));
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Asynchronously 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 = await AdGroupAudienceViewServiceClient.CreateAsync();
 /// </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.
 /// await channel.ShutdownAsync();
 /// </code>
 /// </example>
 /// <param name="endpoint">Optional <see cref="gaxgrpc::ServiceEndpoint"/>.</param>
 /// <param name="settings">Optional <see cref="AdGroupAudienceViewServiceSettings"/>.</param>
 /// <returns>The task representing the created <see cref="AdGroupAudienceViewServiceClient"/>.</returns>
 public static async stt::Task<AdGroupAudienceViewServiceClient> CreateAsync(gaxgrpc::ServiceEndpoint endpoint = null, AdGroupAudienceViewServiceSettings settings = null)
 {
     grpccore::Channel channel = await s_channelPool.GetChannelAsync(endpoint ?? DefaultEndpoint).ConfigureAwait(false);
     return Create(channel, settings);
 }
Ejemplo n.º 6
0
 /// <summary>
 /// Creates a <see cref="SpeechClient"/> which uses the specified channel for remote operations.
 /// </summary>
 /// <param name="channel">The <see cref="grpccore::Channel"/> for remote operations. Must not be null.</param>
 /// <param name="settings">Optional <see cref="SpeechSettings"/>.</param>
 /// <returns>The created <see cref="SpeechClient"/>.</returns>
 public static SpeechClient Create(grpccore::Channel channel, SpeechSettings settings = null)
 {
     gax::GaxPreconditions.CheckNotNull(channel, nameof(channel));
     Speech.SpeechClient grpcClient = new Speech.SpeechClient(channel);
     return(new SpeechClientImpl(grpcClient, settings));
 }
Ejemplo n.º 7
0
        /// <summary>
        /// Asynchronously creates a <see cref="FeedItemTargetServiceClient"/>, 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.
        /// FeedItemTargetServiceClient client = await FeedItemTargetServiceClient.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(
        ///     FeedItemTargetServiceClient.DefaultEndpoint.Host, FeedItemTargetServiceClient.DefaultEndpoint.Port, cred.ToChannelCredentials());
        /// FeedItemTargetServiceClient client = FeedItemTargetServiceClient.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="FeedItemTargetServiceSettings"/>.</param>
        /// <returns>The task representing the created <see cref="FeedItemTargetServiceClient"/>.</returns>
        public static async stt::Task <FeedItemTargetServiceClient> CreateAsync(gaxgrpc::ServiceEndpoint endpoint = null, FeedItemTargetServiceSettings settings = null)
        {
            grpccore::Channel channel = await s_channelPool.GetChannelAsync(endpoint ?? DefaultEndpoint).ConfigureAwait(false);

            return(Create(channel, settings));
        }
 /// <summary>
 /// Creates a <see cref="ImageAnnotatorClient"/> which uses the specified channel for remote operations.
 /// </summary>
 /// <param name="channel">The <see cref="grpccore::Channel"/> for remote operations. Must not be null.</param>
 /// <param name="settings">Optional <see cref="ImageAnnotatorSettings"/>.</param>
 /// <returns>The created <see cref="ImageAnnotatorClient"/>.</returns>
 public static ImageAnnotatorClient Create(grpccore::Channel channel, ImageAnnotatorSettings settings = null)
 {
     gax::GaxPreconditions.CheckNotNull(channel, nameof(channel));
     return(Create(new grpccore::DefaultCallInvoker(channel), settings));
 }
 /// <summary>
 /// Creates a <see cref="MobileAppCategoryConstantServiceClient"/> which uses the specified channel for remote operations.
 /// </summary>
 /// <param name="channel">The <see cref="grpccore::Channel"/> for remote operations. Must not be null.</param>
 /// <param name="settings">Optional <see cref="MobileAppCategoryConstantServiceSettings"/>.</param>
 /// <returns>The created <see cref="MobileAppCategoryConstantServiceClient"/>.</returns>
 public static MobileAppCategoryConstantServiceClient Create(grpccore::Channel channel, MobileAppCategoryConstantServiceSettings settings = null)
 {
     gax::GaxPreconditions.CheckNotNull(channel, nameof(channel));
     return(Create(new grpccore::DefaultCallInvoker(channel), settings));
 }
        /// <summary>
        /// Asynchronously 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.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.
        /// CustomerNegativeCriterionServiceClient client = await CustomerNegativeCriterionServiceClient.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(
        ///     CustomerNegativeCriterionServiceClient.DefaultEndpoint.Host, CustomerNegativeCriterionServiceClient.DefaultEndpoint.Port, cred.ToChannelCredentials());
        /// CustomerNegativeCriterionServiceClient client = CustomerNegativeCriterionServiceClient.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="CustomerNegativeCriterionServiceSettings"/>.</param>
        /// <returns>The task representing the created <see cref="CustomerNegativeCriterionServiceClient"/>.</returns>
        public static async stt::Task <CustomerNegativeCriterionServiceClient> CreateAsync(gaxgrpc::ServiceEndpoint endpoint = null, CustomerNegativeCriterionServiceSettings settings = null)
        {
            grpccore::Channel channel = await s_channelPool.GetChannelAsync(endpoint ?? DefaultEndpoint).ConfigureAwait(false);

            return(Create(channel, settings));
        }
        /// <summary>
        /// Synchronously creates a <see cref="ConversionUploadServiceClient"/>, 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.
        /// ConversionUploadServiceClient client = ConversionUploadServiceClient.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(
        ///     ConversionUploadServiceClient.DefaultEndpoint.Host, ConversionUploadServiceClient.DefaultEndpoint.Port, cred.ToChannelCredentials());
        /// ConversionUploadServiceClient client = ConversionUploadServiceClient.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="ConversionUploadServiceSettings"/>.</param>
        /// <returns>The created <see cref="ConversionUploadServiceClient"/>.</returns>
        public static ConversionUploadServiceClient Create(gaxgrpc::ServiceEndpoint endpoint = null, ConversionUploadServiceSettings settings = null)
        {
            grpccore::Channel channel = s_channelPool.GetChannel(endpoint ?? DefaultEndpoint);

            return(Create(channel, settings));
        }
        /// <summary>
        /// Asynchronously creates a <see cref="TextToSpeechClient"/>, 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 = await ImageAnnotatorClient.CreateAsync();
        /// </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.
        /// await channel.ShutdownAsync();
        /// </code>
        /// </example>
        /// <param name="endpoint">Optional <see cref="gaxgrpc::ServiceEndpoint"/>.</param>
        /// <param name="settings">Optional <see cref="TextToSpeechSettings"/>.</param>
        /// <returns>The task representing the created <see cref="TextToSpeechClient"/>.</returns>
        public static async stt::Task <TextToSpeechClient> CreateAsync(gaxgrpc::ServiceEndpoint endpoint = null, TextToSpeechSettings settings = null)
        {
            grpccore::Channel channel = await ChannelPool.GetChannelAsync(endpoint ?? DefaultEndpoint).ConfigureAwait(false);

            return(Create(channel, settings));
        }
 /// <summary>
 /// Creates a <see cref="PhishingProtectionServiceV1Beta1Client"/> which uses the specified channel for remote operations.
 /// </summary>
 /// <param name="channel">The <see cref="grpccore::Channel"/> for remote operations. Must not be null.</param>
 /// <param name="settings">Optional <see cref="PhishingProtectionServiceV1Beta1Settings"/>.</param>
 /// <returns>The created <see cref="PhishingProtectionServiceV1Beta1Client"/>.</returns>
 public static PhishingProtectionServiceV1Beta1Client Create(grpccore::Channel channel, PhishingProtectionServiceV1Beta1Settings settings = null)
 {
     gax::GaxPreconditions.CheckNotNull(channel, nameof(channel));
     return(Create(new grpccore::DefaultCallInvoker(channel), settings));
 }
        /// <summary>
        /// Synchronously creates a <see cref="PhishingProtectionServiceV1Beta1Client"/>, 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.PhishingProtection.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.
        /// PhishingProtectionServiceV1Beta1Client client = PhishingProtectionServiceV1Beta1Client.Create();
        /// </code>
        /// This sample shows how to create a client using credentials loaded from a JSON file:
        /// <code>
        /// using Google.Cloud.PhishingProtection.V1Beta1;
        /// using Google.Apis.Auth.OAuth2;
        /// using Grpc.Auth;
        /// using Grpc.Core;
        /// ...
        /// GoogleCredential cred = GoogleCredential.FromFile("/path/to/credentials.json");
        /// Channel channel = new Channel(
        ///     PhishingProtectionServiceV1Beta1Client.DefaultEndpoint.Host, PhishingProtectionServiceV1Beta1Client.DefaultEndpoint.Port, cred.ToChannelCredentials());
        /// PhishingProtectionServiceV1Beta1Client client = PhishingProtectionServiceV1Beta1Client.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="PhishingProtectionServiceV1Beta1Settings"/>.</param>
        /// <returns>The created <see cref="PhishingProtectionServiceV1Beta1Client"/>.</returns>
        public static PhishingProtectionServiceV1Beta1Client Create(gaxgrpc::ServiceEndpoint endpoint = null, PhishingProtectionServiceV1Beta1Settings settings = null)
        {
            grpccore::Channel channel = s_channelPool.GetChannel(endpoint ?? DefaultEndpoint);

            return(Create(channel, settings));
        }
Ejemplo n.º 15
0
        /// <summary>
        /// Synchronously creates a <see cref="TextToSpeechClient"/>, 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.TextToSpeech.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.
        /// TextToSpeechClient client = TextToSpeechClient.Create();
        /// </code>
        /// This sample shows how to create a client using credentials loaded from a JSON file:
        /// <code>
        /// using Google.Cloud.TextToSpeech.V1;
        /// using Google.Apis.Auth.OAuth2;
        /// using Grpc.Auth;
        /// using Grpc.Core;
        /// ...
        /// GoogleCredential cred = GoogleCredential.FromFile("/path/to/credentials.json");
        /// Channel channel = new Channel(
        ///     TextToSpeechClient.DefaultEndpoint.Host, TextToSpeechClient.DefaultEndpoint.Port, cred.ToChannelCredentials());
        /// TextToSpeechClient client = TextToSpeechClient.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="TextToSpeechSettings"/>.</param>
        /// <returns>The created <see cref="TextToSpeechClient"/>.</returns>
        public static TextToSpeechClient Create(gaxgrpc::ServiceEndpoint endpoint = null, TextToSpeechSettings settings = null)
        {
            grpccore::Channel channel = s_channelPool.GetChannel(endpoint ?? DefaultEndpoint);

            return(Create(channel, settings));
        }
        /// <summary>
        /// Synchronously creates a <see cref="ErrorGroupServiceClient"/>, 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="ErrorGroupServiceSettings"/>.</param>
        /// <returns>The created <see cref="ErrorGroupServiceClient"/>.</returns>
        public static ErrorGroupServiceClient Create(gaxgrpc::ServiceEndpoint endpoint = null, ErrorGroupServiceSettings settings = null)
        {
            grpccore::Channel channel = ChannelPool.GetChannel(endpoint ?? DefaultEndpoint);

            return(Create(channel, settings));
        }
Ejemplo n.º 17
0
 /// <summary>
 /// Creates a <see cref="TextToSpeechClient"/> which uses the specified channel for remote operations.
 /// </summary>
 /// <param name="channel">The <see cref="grpccore::Channel"/> for remote operations. Must not be null.</param>
 /// <param name="settings">Optional <see cref="TextToSpeechSettings"/>.</param>
 /// <returns>The created <see cref="TextToSpeechClient"/>.</returns>
 public static TextToSpeechClient Create(grpccore::Channel channel, TextToSpeechSettings settings = null)
 {
     gax::GaxPreconditions.CheckNotNull(channel, nameof(channel));
     return(Create(new grpccore::DefaultCallInvoker(channel), settings));
 }
Ejemplo n.º 18
0
        /// <summary>
        /// Synchronously creates a <see cref="ImageAnnotatorClient"/>, 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.V1P1Beta1;
        /// ...
        /// // 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.V1P1Beta1;
        /// 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="ImageAnnotatorSettings"/>.</param>
        /// <returns>The created <see cref="ImageAnnotatorClient"/>.</returns>
        public static ImageAnnotatorClient Create(gaxgrpc::ServiceEndpoint endpoint = null, ImageAnnotatorSettings settings = null)
        {
            grpccore::Channel channel = s_channelPool.GetChannel(endpoint ?? DefaultEndpoint);

            return(Create(channel, settings));
        }
 /// <summary>
 /// Creates a <see cref="FeedPlaceholderViewServiceClient"/> which uses the specified channel for remote operations.
 /// </summary>
 /// <param name="channel">The <see cref="grpccore::Channel"/> for remote operations. Must not be null.</param>
 /// <param name="settings">Optional <see cref="FeedPlaceholderViewServiceSettings"/>.</param>
 /// <returns>The created <see cref="FeedPlaceholderViewServiceClient"/>.</returns>
 public static FeedPlaceholderViewServiceClient Create(grpccore::Channel channel, FeedPlaceholderViewServiceSettings settings = null)
 {
     gax::GaxPreconditions.CheckNotNull(channel, nameof(channel));
     return(Create(new grpccore::DefaultCallInvoker(channel), settings));
 }
Ejemplo n.º 20
0
 /// <summary>
 /// Creates a <see cref="ImageAnnotatorClient"/> which uses the specified channel for remote operations.
 /// </summary>
 /// <param name="channel">The <see cref="grpccore::Channel"/> for remote operations. Must not be null.</param>
 /// <param name="settings">Optional <see cref="ImageAnnotatorSettings"/>.</param>
 /// <returns>The created <see cref="ImageAnnotatorClient"/>.</returns>
 public static ImageAnnotatorClient Create(grpccore::Channel channel, ImageAnnotatorSettings settings = null)
 {
     gax::GaxPreconditions.CheckNotNull(channel, nameof(channel));
     ImageAnnotator.ImageAnnotatorClient grpcClient = new ImageAnnotator.ImageAnnotatorClient(channel);
     return(new ImageAnnotatorClientImpl(grpcClient, settings));
 }
Ejemplo n.º 21
0
        /// <summary>
        /// Synchronously creates a <see cref="FeedItemTargetServiceClient"/>, 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.
        /// FeedItemTargetServiceClient client = FeedItemTargetServiceClient.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(
        ///     FeedItemTargetServiceClient.DefaultEndpoint.Host, FeedItemTargetServiceClient.DefaultEndpoint.Port, cred.ToChannelCredentials());
        /// FeedItemTargetServiceClient client = FeedItemTargetServiceClient.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="FeedItemTargetServiceSettings"/>.</param>
        /// <returns>The created <see cref="FeedItemTargetServiceClient"/>.</returns>
        public static FeedItemTargetServiceClient Create(gaxgrpc::ServiceEndpoint endpoint = null, FeedItemTargetServiceSettings settings = null)
        {
            grpccore::Channel channel = s_channelPool.GetChannel(endpoint ?? DefaultEndpoint);

            return(Create(channel, settings));
        }
        /// <summary>
        /// Synchronously creates a <see cref="AccountBudgetProposalServiceClient"/>, 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.
        /// AccountBudgetProposalServiceClient client = AccountBudgetProposalServiceClient.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(
        ///     AccountBudgetProposalServiceClient.DefaultEndpoint.Host, AccountBudgetProposalServiceClient.DefaultEndpoint.Port, cred.ToChannelCredentials());
        /// AccountBudgetProposalServiceClient client = AccountBudgetProposalServiceClient.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="AccountBudgetProposalServiceSettings"/>.</param>
        /// <returns>The created <see cref="AccountBudgetProposalServiceClient"/>.</returns>
        public static AccountBudgetProposalServiceClient Create(gaxgrpc::ServiceEndpoint endpoint = null, AccountBudgetProposalServiceSettings 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.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.
        /// 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.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(
        ///     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>
 /// Creates a <see cref="AccountBudgetProposalServiceClient"/> which uses the specified channel for remote operations.
 /// </summary>
 /// <param name="channel">The <see cref="grpccore::Channel"/> for remote operations. Must not be null.</param>
 /// <param name="settings">Optional <see cref="AccountBudgetProposalServiceSettings"/>.</param>
 /// <returns>The created <see cref="AccountBudgetProposalServiceClient"/>.</returns>
 public static AccountBudgetProposalServiceClient Create(grpccore::Channel channel, AccountBudgetProposalServiceSettings settings = null)
 {
     gax::GaxPreconditions.CheckNotNull(channel, nameof(channel));
     return(Create(new grpccore::DefaultCallInvoker(channel), settings));
 }
Ejemplo n.º 25
0
 /// <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="VideoIntelligenceServiceClient"/>, applying defaults for all unspecified settings,
        /// and creating a channel connecting to the given endpoint with application default credentials where
        /// necessary.
        /// </summary>
        /// <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 = s_channelPool.GetChannel(endpoint ?? DefaultEndpoint);

            return(Create(channel, settings));
        }
Ejemplo n.º 27
0
        /// <summary>
        /// Synchronously creates a <see cref="SharedCriterionServiceClient"/>, 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.
        /// SharedCriterionServiceClient client = SharedCriterionServiceClient.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(
        ///     SharedCriterionServiceClient.DefaultEndpoint.Host, SharedCriterionServiceClient.DefaultEndpoint.Port, cred.ToChannelCredentials());
        /// SharedCriterionServiceClient client = SharedCriterionServiceClient.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="SharedCriterionServiceSettings"/>.</param>
        /// <returns>The created <see cref="SharedCriterionServiceClient"/>.</returns>
        public static SharedCriterionServiceClient Create(gaxgrpc::ServiceEndpoint endpoint = null, SharedCriterionServiceSettings settings = null)
        {
            grpccore::Channel channel = s_channelPool.GetChannel(endpoint ?? DefaultEndpoint);

            return(Create(channel, settings));
        }
 /// <summary>
 /// Creates a <see cref="VideoIntelligenceServiceClient"/> which uses the specified channel for remote operations.
 /// </summary>
 /// <param name="channel">The <see cref="grpccore::Channel"/> for remote operations. Must not be null.</param>
 /// <param name="settings">Optional <see cref="VideoIntelligenceServiceSettings"/>.</param>
 /// <returns>The created <see cref="VideoIntelligenceServiceClient"/>.</returns>
 public static VideoIntelligenceServiceClient Create(grpccore::Channel channel, VideoIntelligenceServiceSettings settings = null)
 {
     gax::GaxPreconditions.CheckNotNull(channel, nameof(channel));
     VideoIntelligenceService.VideoIntelligenceServiceClient grpcClient = new VideoIntelligenceService.VideoIntelligenceServiceClient(channel);
     return(new VideoIntelligenceServiceClientImpl(grpcClient, settings));
 }
        /// <summary>
        /// Asynchronously 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.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.
        /// ConversionAdjustmentUploadServiceClient client = await ConversionAdjustmentUploadServiceClient.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(
        ///     ConversionAdjustmentUploadServiceClient.DefaultEndpoint.Host, ConversionAdjustmentUploadServiceClient.DefaultEndpoint.Port, cred.ToChannelCredentials());
        /// ConversionAdjustmentUploadServiceClient client = ConversionAdjustmentUploadServiceClient.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="ConversionAdjustmentUploadServiceSettings"/>.</param>
        /// <returns>The task representing the created <see cref="ConversionAdjustmentUploadServiceClient"/>.</returns>
        public static async stt::Task <ConversionAdjustmentUploadServiceClient> CreateAsync(gaxgrpc::ServiceEndpoint endpoint = null, ConversionAdjustmentUploadServiceSettings settings = null)
        {
            grpccore::Channel channel = await s_channelPool.GetChannelAsync(endpoint ?? DefaultEndpoint).ConfigureAwait(false);

            return(Create(channel, settings));
        }
Ejemplo n.º 30
0
 /// <summary>
 /// Creates a <see cref="KeywordPlanCampaignServiceClient"/> which uses the specified channel for remote operations.
 /// </summary>
 /// <param name="channel">The <see cref="grpccore::Channel"/> for remote operations. Must not be null.</param>
 /// <param name="settings">Optional <see cref="KeywordPlanCampaignServiceSettings"/>.</param>
 /// <returns>The created <see cref="KeywordPlanCampaignServiceClient"/>.</returns>
 public static KeywordPlanCampaignServiceClient Create(grpccore::Channel channel, KeywordPlanCampaignServiceSettings settings = null)
 {
     gax::GaxPreconditions.CheckNotNull(channel, nameof(channel));
     return(Create(new grpccore::DefaultCallInvoker(channel), settings));
 }