Services
CampaignDraftServiceGrpc.g.cs
//
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/ads/googleads/v7/services/campaign_draft_service.proto
//
// Original file comments:
// Copyright 2021 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
#pragma warning disable 0414, 1591
#region Designer generated code
using grpc = global::Grpc.Core;
namespace Google.Ads.GoogleAds.V7.Services {
///
/// Service to manage campaign drafts.
///
public static partial clast CampaignDraftService
{
static readonly string __ServiceName = "google.ads.googleads.v7.services.CampaignDraftService";
[global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
static void __Helper_SerializeMessage(global::Google.Protobuf.IMessage message, grpc::SerializationContext context)
{
#if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION
if (message is global::Google.Protobuf.IBufferMessage)
{
context.SetPayloadLength(message.CalculateSize());
global::Google.Protobuf.MessageExtensions.WriteTo(message, context.GetBufferWriter());
context.Complete();
return;
}
#endif
context.Complete(global::Google.Protobuf.MessageExtensions.ToByteArray(message));
}
[global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
static clast __Helper_MessageCache
{
public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsastignableFrom(typeof(T));
}
[global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
static T __Helper_DeserializeMessage(grpc::DeserializationContext context, global::Google.Protobuf.MessageParser parser) where T : global::Google.Protobuf.IMessage
{
#if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION
if (__Helper_MessageCache.IsBufferMessage)
{
return parser.ParseFrom(context.PayloadAsReadOnlySequence());
}
#endif
return parser.ParseFrom(context.PayloadAsNewBuffer());
}
[global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
static readonly grpc::Marshaller __Marshaller_google_ads_googleads_v7_services_GetCampaignDraftRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Ads.GoogleAds.V7.Services.GetCampaignDraftRequest.Parser));
[global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
static readonly grpc::Marshaller __Marshaller_google_ads_googleads_v7_resources_CampaignDraft = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Ads.GoogleAds.V7.Resources.CampaignDraft.Parser));
[global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
static readonly grpc::Marshaller __Marshaller_google_ads_googleads_v7_services_MutateCampaignDraftsRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Ads.GoogleAds.V7.Services.MutateCampaignDraftsRequest.Parser));
[global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
static readonly grpc::Marshaller __Marshaller_google_ads_googleads_v7_services_MutateCampaignDraftsResponse = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Ads.GoogleAds.V7.Services.MutateCampaignDraftsResponse.Parser));
[global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
static readonly grpc::Marshaller __Marshaller_google_ads_googleads_v7_services_PromoteCampaignDraftRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Ads.GoogleAds.V7.Services.PromoteCampaignDraftRequest.Parser));
[global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
static readonly grpc::Marshaller __Marshaller_google_longrunning_Operation = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.LongRunning.Operation.Parser));
[global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
static readonly grpc::Marshaller __Marshaller_google_ads_googleads_v7_services_ListCampaignDraftAsyncErrorsRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Ads.GoogleAds.V7.Services.ListCampaignDraftAsyncErrorsRequest.Parser));
[global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
static readonly grpc::Marshaller __Marshaller_google_ads_googleads_v7_services_ListCampaignDraftAsyncErrorsResponse = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Ads.GoogleAds.V7.Services.ListCampaignDraftAsyncErrorsResponse.Parser));
[global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
static readonly grpc::Method __Method_GetCampaignDraft = new grpc::Method(
grpc::MethodType.Unary,
__ServiceName,
"GetCampaignDraft",
__Marshaller_google_ads_googleads_v7_services_GetCampaignDraftRequest,
__Marshaller_google_ads_googleads_v7_resources_CampaignDraft);
[global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
static readonly grpc::Method __Method_MutateCampaignDrafts = new grpc::Method(
grpc::MethodType.Unary,
__ServiceName,
"MutateCampaignDrafts",
__Marshaller_google_ads_googleads_v7_services_MutateCampaignDraftsRequest,
__Marshaller_google_ads_googleads_v7_services_MutateCampaignDraftsResponse);
[global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
static readonly grpc::Method __Method_PromoteCampaignDraft = new grpc::Method(
grpc::MethodType.Unary,
__ServiceName,
"PromoteCampaignDraft",
__Marshaller_google_ads_googleads_v7_services_PromoteCampaignDraftRequest,
__Marshaller_google_longrunning_Operation);
[global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
static readonly grpc::Method __Method_ListCampaignDraftAsyncErrors = new grpc::Method(
grpc::MethodType.Unary,
__ServiceName,
"ListCampaignDraftAsyncErrors",
__Marshaller_google_ads_googleads_v7_services_ListCampaignDraftAsyncErrorsRequest,
__Marshaller_google_ads_googleads_v7_services_ListCampaignDraftAsyncErrorsResponse);
/// Service descriptor
public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor
{
get { return global::Google.Ads.GoogleAds.V7.Services.CampaignDraftServiceReflection.Descriptor.Services[0]; }
}
/// Base clast for server-side implementations of CampaignDraftService
[grpc::BindServiceMethod(typeof(CampaignDraftService), "BindService")]
public abstract partial clast CampaignDraftServiceBase
{
///
/// Returns the requested campaign draft in full detail.
///
/// List of thrown errors:
/// [AuthenticationError]()
/// [AuthorizationError]()
/// [HeaderError]()
/// [InternalError]()
/// [QuotaError]()
/// [RequestError]()
///
/// The request received from the client.
/// The context of the server-side call handler being invoked.
/// The response to send back to the client (wrapped by a task).
[global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
public virtual global::System.Threading.Tasks.Task GetCampaignDraft(global::Google.Ads.GoogleAds.V7.Services.GetCampaignDraftRequest request, grpc::ServerCallContext context)
{
throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
}
///
/// Creates, updates, or removes campaign drafts. Operation statuses are
/// returned.
///
/// List of thrown errors:
/// [AuthenticationError]()
/// [AuthorizationError]()
/// [CampaignDraftError]()
/// [DatabaseError]()
/// [FieldError]()
/// [HeaderError]()
/// [InternalError]()
/// [MutateError]()
/// [QuotaError]()
/// [RequestError]()
///
/// The request received from the client.
/// The context of the server-side call handler being invoked.
/// The response to send back to the client (wrapped by a task).
[global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
public virtual global::System.Threading.Tasks.Task MutateCampaignDrafts(global::Google.Ads.GoogleAds.V7.Services.MutateCampaignDraftsRequest request, grpc::ServerCallContext context)
{
throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
}
///
/// Promotes the changes in a draft back to the base campaign.
///
/// This method returns a Long Running Operation (LRO) indicating if the
/// Promote is done. Use [Operations.GetOperation] to poll the LRO until it
/// is done. Only a done status is returned in the response. See the status
/// in the Campaign Draft resource to determine if the promotion was
/// successful. If the LRO failed, use
/// [CampaignDraftService.ListCampaignDraftAsyncErrors][google.ads.googleads.v7.services.CampaignDraftService.ListCampaignDraftAsyncErrors] to view the list of
/// error reasons.
///
/// List of thrown errors:
/// [AuthenticationError]()
/// [AuthorizationError]()
/// [CampaignDraftError]()
/// [HeaderError]()
/// [InternalError]()
/// [QuotaError]()
/// [RequestError]()
///
/// The request received from the client.
/// The context of the server-side call handler being invoked.
/// The response to send back to the client (wrapped by a task).
[global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
public virtual global::System.Threading.Tasks.Task PromoteCampaignDraft(global::Google.Ads.GoogleAds.V7.Services.PromoteCampaignDraftRequest request, grpc::ServerCallContext context)
{
throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
}
///
/// Returns all errors that occurred during CampaignDraft promote. Throws an
/// error if called before campaign draft is promoted.
/// Supports standard list paging.
///
/// List of thrown errors:
/// [AuthenticationError]()
/// [AuthorizationError]()
/// [HeaderError]()
/// [InternalError]()
/// [QuotaError]()
/// [RequestError]()
///
/// The request received from the client.
/// The context of the server-side call handler being invoked.
/// The response to send back to the client (wrapped by a task).
[global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
public virtual global::System.Threading.Tasks.Task ListCampaignDraftAsyncErrors(global::Google.Ads.GoogleAds.V7.Services.ListCampaignDraftAsyncErrorsRequest request, grpc::ServerCallContext context)
{
throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
}
}
/// Client for CampaignDraftService
public partial clast CampaignDraftServiceClient : grpc::ClientBase
{
/// Creates a new client for CampaignDraftService
/// The channel to use to make remote calls.
[global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
public CampaignDraftServiceClient(grpc::ChannelBase channel) : base(channel)
{
}
/// Creates a new client for CampaignDraftService that uses a custom CallInvoker.
/// The callInvoker to use to make remote calls.
[global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
public CampaignDraftServiceClient(grpc::CallInvoker callInvoker) : base(callInvoker)
{
}
/// Protected parameterless constructor to allow creation of test doubles.
[global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
protected CampaignDraftServiceClient() : base()
{
}
/// Protected constructor to allow creation of configured clients.
/// The client configuration.
[global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
protected CampaignDraftServiceClient(ClientBaseConfiguration configuration) : base(configuration)
{
}
///
/// Returns the requested campaign draft in full detail.
///
/// List of thrown errors:
/// [AuthenticationError]()
/// [AuthorizationError]()
/// [HeaderError]()
/// [InternalError]()
/// [QuotaError]()
/// [RequestError]()
///
/// The request to send to the server.
/// The initial metadata to send with the call. This parameter is optional.
/// An optional deadline for the call. The call will be cancelled if deadline is hit.
/// An optional token for canceling the call.
/// The response received from the server.
[global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
public virtual global::Google.Ads.GoogleAds.V7.Resources.CampaignDraft GetCampaignDraft(global::Google.Ads.GoogleAds.V7.Services.GetCampaignDraftRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
{
return GetCampaignDraft(request, new grpc::CallOptions(headers, deadline, cancellationToken));
}
///
/// Returns the requested campaign draft in full detail.
///
/// List of thrown errors:
/// [AuthenticationError]()
/// [AuthorizationError]()
/// [HeaderError]()
/// [InternalError]()
/// [QuotaError]()
/// [RequestError]()
///
/// The request to send to the server.
/// The options for the call.
/// The response received from the server.
[global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
public virtual global::Google.Ads.GoogleAds.V7.Resources.CampaignDraft GetCampaignDraft(global::Google.Ads.GoogleAds.V7.Services.GetCampaignDraftRequest request, grpc::CallOptions options)
{
return CallInvoker.BlockingUnaryCall(__Method_GetCampaignDraft, null, options, request);
}
///
/// Returns the requested campaign draft in full detail.
///
/// List of thrown errors:
/// [AuthenticationError]()
/// [AuthorizationError]()
/// [HeaderError]()
/// [InternalError]()
/// [QuotaError]()
/// [RequestError]()
///
/// The request to send to the server.
/// The initial metadata to send with the call. This parameter is optional.
/// An optional deadline for the call. The call will be cancelled if deadline is hit.
/// An optional token for canceling the call.
/// The call object.
[global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
public virtual grpc::AsyncUnaryCall GetCampaignDraftAsync(global::Google.Ads.GoogleAds.V7.Services.GetCampaignDraftRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
{
return GetCampaignDraftAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
}
///
/// Returns the requested campaign draft in full detail.
///
/// List of thrown errors:
/// [AuthenticationError]()
/// [AuthorizationError]()
/// [HeaderError]()
/// [InternalError]()
/// [QuotaError]()
/// [RequestError]()
///
/// The request to send to the server.
/// The options for the call.
/// The call object.
[global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
public virtual grpc::AsyncUnaryCall GetCampaignDraftAsync(global::Google.Ads.GoogleAds.V7.Services.GetCampaignDraftRequest request, grpc::CallOptions options)
{
return CallInvoker.AsyncUnaryCall(__Method_GetCampaignDraft, null, options, request);
}
///
/// Creates, updates, or removes campaign drafts. Operation statuses are
/// returned.
///
/// List of thrown errors:
/// [AuthenticationError]()
/// [AuthorizationError]()
/// [CampaignDraftError]()
/// [DatabaseError]()
/// [FieldError]()
/// [HeaderError]()
/// [InternalError]()
/// [MutateError]()
/// [QuotaError]()
/// [RequestError]()
///
/// The request to send to the server.
/// The initial metadata to send with the call. This parameter is optional.
/// An optional deadline for the call. The call will be cancelled if deadline is hit.
/// An optional token for canceling the call.
/// The response received from the server.
[global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
public virtual global::Google.Ads.GoogleAds.V7.Services.MutateCampaignDraftsResponse MutateCampaignDrafts(global::Google.Ads.GoogleAds.V7.Services.MutateCampaignDraftsRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
{
return MutateCampaignDrafts(request, new grpc::CallOptions(headers, deadline, cancellationToken));
}
///
/// Creates, updates, or removes campaign drafts. Operation statuses are
/// returned.
///
/// List of thrown errors:
/// [AuthenticationError]()
/// [AuthorizationError]()
/// [CampaignDraftError]()
/// [DatabaseError]()
/// [FieldError]()
/// [HeaderError]()
/// [InternalError]()
/// [MutateError]()
/// [QuotaError]()
/// [RequestError]()
///
/// The request to send to the server.
/// The options for the call.
/// The response received from the server.
[global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
public virtual global::Google.Ads.GoogleAds.V7.Services.MutateCampaignDraftsResponse MutateCampaignDrafts(global::Google.Ads.GoogleAds.V7.Services.MutateCampaignDraftsRequest request, grpc::CallOptions options)
{
return CallInvoker.BlockingUnaryCall(__Method_MutateCampaignDrafts, null, options, request);
}
///
/// Creates, updates, or removes campaign drafts. Operation statuses are
/// returned.
///
/// List of thrown errors:
/// [AuthenticationError]()
/// [AuthorizationError]()
/// [CampaignDraftError]()
/// [DatabaseError]()
/// [FieldError]()
/// [HeaderError]()
/// [InternalError]()
/// [MutateError]()
/// [QuotaError]()
/// [RequestError]()
///
/// The request to send to the server.
/// The initial metadata to send with the call. This parameter is optional.
/// An optional deadline for the call. The call will be cancelled if deadline is hit.
/// An optional token for canceling the call.
/// The call object.
[global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
public virtual grpc::AsyncUnaryCall MutateCampaignDraftsAsync(global::Google.Ads.GoogleAds.V7.Services.MutateCampaignDraftsRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
{
return MutateCampaignDraftsAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
}
///
/// Creates, updates, or removes campaign drafts. Operation statuses are
/// returned.
///
/// List of thrown errors:
/// [AuthenticationError]()
/// [AuthorizationError]()
/// [CampaignDraftError]()
/// [DatabaseError]()
/// [FieldError]()
/// [HeaderError]()
/// [InternalError]()
/// [MutateError]()
/// [QuotaError]()
/// [RequestError]()
///
/// The request to send to the server.
/// The options for the call.
/// The call object.
[global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
public virtual grpc::AsyncUnaryCall MutateCampaignDraftsAsync(global::Google.Ads.GoogleAds.V7.Services.MutateCampaignDraftsRequest request, grpc::CallOptions options)
{
return CallInvoker.AsyncUnaryCall(__Method_MutateCampaignDrafts, null, options, request);
}
///
/// Promotes the changes in a draft back to the base campaign.
///
/// This method returns a Long Running Operation (LRO) indicating if the
/// Promote is done. Use [Operations.GetOperation] to poll the LRO until it
/// is done. Only a done status is returned in the response. See the status
/// in the Campaign Draft resource to determine if the promotion was
/// successful. If the LRO failed, use
/// [CampaignDraftService.ListCampaignDraftAsyncErrors][google.ads.googleads.v7.services.CampaignDraftService.ListCampaignDraftAsyncErrors] to view the list of
/// error reasons.
///
/// List of thrown errors:
/// [AuthenticationError]()
/// [AuthorizationError]()
/// [CampaignDraftError]()
/// [HeaderError]()
/// [InternalError]()
/// [QuotaError]()
/// [RequestError]()
///
/// The request to send to the server.
/// The initial metadata to send with the call. This parameter is optional.
/// An optional deadline for the call. The call will be cancelled if deadline is hit.
/// An optional token for canceling the call.
/// The response received from the server.
[global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
public virtual global::Google.LongRunning.Operation PromoteCampaignDraft(global::Google.Ads.GoogleAds.V7.Services.PromoteCampaignDraftRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
{
return PromoteCampaignDraft(request, new grpc::CallOptions(headers, deadline, cancellationToken));
}
///
/// Promotes the changes in a draft back to the base campaign.
///
/// This method returns a Long Running Operation (LRO) indicating if the
/// Promote is done. Use [Operations.GetOperation] to poll the LRO until it
/// is done. Only a done status is returned in the response. See the status
/// in the Campaign Draft resource to determine if the promotion was
/// successful. If the LRO failed, use
/// [CampaignDraftService.ListCampaignDraftAsyncErrors][google.ads.googleads.v7.services.CampaignDraftService.ListCampaignDraftAsyncErrors] to view the list of
/// error reasons.
///
/// List of thrown errors:
/// [AuthenticationError]()
/// [AuthorizationError]()
/// [CampaignDraftError]()
/// [HeaderError]()
/// [InternalError]()
/// [QuotaError]()
/// [RequestError]()
///
/// The request to send to the server.
/// The options for the call.
/// The response received from the server.
[global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
public virtual global::Google.LongRunning.Operation PromoteCampaignDraft(global::Google.Ads.GoogleAds.V7.Services.PromoteCampaignDraftRequest request, grpc::CallOptions options)
{
return CallInvoker.BlockingUnaryCall(__Method_PromoteCampaignDraft, null, options, request);
}
///
/// Promotes the changes in a draft back to the base campaign.
///
/// This method returns a Long Running Operation (LRO) indicating if the
/// Promote is done. Use [Operations.GetOperation] to poll the LRO until it
/// is done. Only a done status is returned in the response. See the status
/// in the Campaign Draft resource to determine if the promotion was
/// successful. If the LRO failed, use
/// [CampaignDraftService.ListCampaignDraftAsyncErrors][google.ads.googleads.v7.services.CampaignDraftService.ListCampaignDraftAsyncErrors] to view the list of
/// error reasons.
///
/// List of thrown errors:
/// [AuthenticationError]()
/// [AuthorizationError]()
/// [CampaignDraftError]()
/// [HeaderError]()
/// [InternalError]()
/// [QuotaError]()
/// [RequestError]()
///
/// The request to send to the server.
/// The initial metadata to send with the call. This parameter is optional.
/// An optional deadline for the call. The call will be cancelled if deadline is hit.
/// An optional token for canceling the call.
/// The call object.
[global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
public virtual grpc::AsyncUnaryCall PromoteCampaignDraftAsync(global::Google.Ads.GoogleAds.V7.Services.PromoteCampaignDraftRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
{
return PromoteCampaignDraftAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
}
///
/// Promotes the changes in a draft back to the base campaign.
///
/// This method returns a Long Running Operation (LRO) indicating if the
/// Promote is done. Use [Operations.GetOperation] to poll the LRO until it
/// is done. Only a done status is returned in the response. See the status
/// in the Campaign Draft resource to determine if the promotion was
/// successful. If the LRO failed, use
/// [CampaignDraftService.ListCampaignDraftAsyncErrors][google.ads.googleads.v7.services.CampaignDraftService.ListCampaignDraftAsyncErrors] to view the list of
/// error reasons.
///
/// List of thrown errors:
/// [AuthenticationError]()
/// [AuthorizationError]()
/// [CampaignDraftError]()
/// [HeaderError]()
/// [InternalError]()
/// [QuotaError]()
/// [RequestError]()
///
/// The request to send to the server.
/// The options for the call.
/// The call object.
[global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
public virtual grpc::AsyncUnaryCall PromoteCampaignDraftAsync(global::Google.Ads.GoogleAds.V7.Services.PromoteCampaignDraftRequest request, grpc::CallOptions options)
{
return CallInvoker.AsyncUnaryCall(__Method_PromoteCampaignDraft, null, options, request);
}
///
/// Returns all errors that occurred during CampaignDraft promote. Throws an
/// error if called before campaign draft is promoted.
/// Supports standard list paging.
///
/// List of thrown errors:
/// [AuthenticationError]()
/// [AuthorizationError]()
/// [HeaderError]()
/// [InternalError]()
/// [QuotaError]()
/// [RequestError]()
///
/// The request to send to the server.
/// The initial metadata to send with the call. This parameter is optional.
/// An optional deadline for the call. The call will be cancelled if deadline is hit.
/// An optional token for canceling the call.
/// The response received from the server.
[global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
public virtual global::Google.Ads.GoogleAds.V7.Services.ListCampaignDraftAsyncErrorsResponse ListCampaignDraftAsyncErrors(global::Google.Ads.GoogleAds.V7.Services.ListCampaignDraftAsyncErrorsRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
{
return ListCampaignDraftAsyncErrors(request, new grpc::CallOptions(headers, deadline, cancellationToken));
}
///
/// Returns all errors that occurred during CampaignDraft promote. Throws an
/// error if called before campaign draft is promoted.
/// Supports standard list paging.
///
/// List of thrown errors:
/// [AuthenticationError]()
/// [AuthorizationError]()
/// [HeaderError]()
/// [InternalError]()
/// [QuotaError]()
/// [RequestError]()
///
/// The request to send to the server.
/// The options for the call.
/// The response received from the server.
[global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
public virtual global::Google.Ads.GoogleAds.V7.Services.ListCampaignDraftAsyncErrorsResponse ListCampaignDraftAsyncErrors(global::Google.Ads.GoogleAds.V7.Services.ListCampaignDraftAsyncErrorsRequest request, grpc::CallOptions options)
{
return CallInvoker.BlockingUnaryCall(__Method_ListCampaignDraftAsyncErrors, null, options, request);
}
///
/// Returns all errors that occurred during CampaignDraft promote. Throws an
/// error if called before campaign draft is promoted.
/// Supports standard list paging.
///
/// List of thrown errors:
/// [AuthenticationError]()
/// [AuthorizationError]()
/// [HeaderError]()
/// [InternalError]()
/// [QuotaError]()
/// [RequestError]()
///
/// The request to send to the server.
/// The initial metadata to send with the call. This parameter is optional.
/// An optional deadline for the call. The call will be cancelled if deadline is hit.
/// An optional token for canceling the call.
/// The call object.
[global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
public virtual grpc::AsyncUnaryCall ListCampaignDraftAsyncErrorsAsync(global::Google.Ads.GoogleAds.V7.Services.ListCampaignDraftAsyncErrorsRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
{
return ListCampaignDraftAsyncErrorsAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
}
///
/// Returns all errors that occurred during CampaignDraft promote. Throws an
/// error if called before campaign draft is promoted.
/// Supports standard list paging.
///
/// List of thrown errors:
/// [AuthenticationError]()
/// [AuthorizationError]()
/// [HeaderError]()
/// [InternalError]()
/// [QuotaError]()
/// [RequestError]()
///
/// The request to send to the server.
/// The options for the call.
/// The call object.
[global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
public virtual grpc::AsyncUnaryCall ListCampaignDraftAsyncErrorsAsync(global::Google.Ads.GoogleAds.V7.Services.ListCampaignDraftAsyncErrorsRequest request, grpc::CallOptions options)
{
return CallInvoker.AsyncUnaryCall(__Method_ListCampaignDraftAsyncErrors, null, options, request);
}
/// Creates a new instance of client from given ClientBaseConfiguration.
[global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
protected override CampaignDraftServiceClient NewInstance(ClientBaseConfiguration configuration)
{
return new CampaignDraftServiceClient(configuration);
}
}
/// Creates service definition that can be registered with a server
/// An object implementing the server-side handling logic.
[global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
public static grpc::ServerServiceDefinition BindService(CampaignDraftServiceBase serviceImpl)
{
return grpc::ServerServiceDefinition.CreateBuilder()
.AddMethod(__Method_GetCampaignDraft, serviceImpl.GetCampaignDraft)
.AddMethod(__Method_MutateCampaignDrafts, serviceImpl.MutateCampaignDrafts)
.AddMethod(__Method_PromoteCampaignDraft, serviceImpl.PromoteCampaignDraft)
.AddMethod(__Method_ListCampaignDraftAsyncErrors, serviceImpl.ListCampaignDraftAsyncErrors).Build();
}
/// Register service method with a service binder with or without implementation. Useful when customizing the service binding logic.
/// Note: this method is part of an experimental API that can change or be removed without any prior notice.
/// Service methods will be bound by calling AddMethod on this object.
/// An object implementing the server-side handling logic.
[global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
public static void BindService(grpc::ServiceBinderBase serviceBinder, CampaignDraftServiceBase serviceImpl)
{
serviceBinder.AddMethod(__Method_GetCampaignDraft, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.GetCampaignDraft));
serviceBinder.AddMethod(__Method_MutateCampaignDrafts, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.MutateCampaignDrafts));
serviceBinder.AddMethod(__Method_PromoteCampaignDraft, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.PromoteCampaignDraft));
serviceBinder.AddMethod(__Method_ListCampaignDraftAsyncErrors, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.ListCampaignDraftAsyncErrors));
}
}
}
#endregion