Class DeliveryServiceClient
DeliveryService client wrapper, for convenient use.
Namespace: Google.Maps.FleetEngine.Delivery.V1
Assembly: Google.Maps.FleetEngine.Delivery.V1.dll
Syntax
public abstract class DeliveryServiceClient
Remarks
The Last Mile Delivery service.
Properties
DefaultEndpoint
The default endpoint for the DeliveryService service, which is a host of "fleetengine.googleapis.com" and a port of 443.
Declaration
public static string DefaultEndpoint { get; }
Property Value
Type | Description |
---|---|
string |
DefaultScopes
The default DeliveryService scopes.
Declaration
public static IReadOnlyList<string> DefaultScopes { get; }
Property Value
Type | Description |
---|---|
IReadOnlyList<string> |
Remarks
The default DeliveryService scopes are:
- https://www.googleapis.com/auth/cloud-platform
GrpcClient
The underlying gRPC DeliveryService client
Declaration
public virtual DeliveryService.DeliveryServiceClient GrpcClient { get; }
Property Value
Type | Description |
---|---|
DeliveryService.DeliveryServiceClient |
ServiceMetadata
The service metadata associated with this client type.
Declaration
public static ServiceMetadata ServiceMetadata { get; }
Property Value
Type | Description |
---|---|
ServiceMetadata |
Methods
BatchCreateTasks(BatchCreateTasksRequest, CallSettings)
Creates and returns a batch of new Task
objects.
Declaration
public virtual BatchCreateTasksResponse BatchCreateTasks(BatchCreateTasksRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
BatchCreateTasksRequest | request | The request object containing all of the parameters for the API call. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
BatchCreateTasksResponse | The RPC response. |
Sample code
// Create client
gmfdv::DeliveryServiceClient deliveryServiceClient = gmfdv::DeliveryServiceClient.Create();
// Initialize request argument(s)
gmfdv::BatchCreateTasksRequest request = new gmfdv::BatchCreateTasksRequest
{
Header = new gmfdv::DeliveryRequestHeader(),
ParentAsProviderName = gmfdv::ProviderName.FromProvider("[PROVIDER]"),
Requests =
{
new gmfdv::CreateTaskRequest(),
},
};
// Make the request
gmfdv::BatchCreateTasksResponse response = deliveryServiceClient.BatchCreateTasks(request);
BatchCreateTasksAsync(BatchCreateTasksRequest, CallSettings)
Creates and returns a batch of new Task
objects.
Declaration
public virtual Task<BatchCreateTasksResponse> BatchCreateTasksAsync(BatchCreateTasksRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
BatchCreateTasksRequest | request | The request object containing all of the parameters for the API call. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<BatchCreateTasksResponse> | A Task containing the RPC response. |
Sample code
// Create client
gmfdv::DeliveryServiceClient deliveryServiceClient = await gmfdv::DeliveryServiceClient.CreateAsync();
// Initialize request argument(s)
gmfdv::BatchCreateTasksRequest request = new gmfdv::BatchCreateTasksRequest
{
Header = new gmfdv::DeliveryRequestHeader(),
ParentAsProviderName = gmfdv::ProviderName.FromProvider("[PROVIDER]"),
Requests =
{
new gmfdv::CreateTaskRequest(),
},
};
// Make the request
gmfdv::BatchCreateTasksResponse response = await deliveryServiceClient.BatchCreateTasksAsync(request);
BatchCreateTasksAsync(BatchCreateTasksRequest, CancellationToken)
Creates and returns a batch of new Task
objects.
Declaration
public virtual Task<BatchCreateTasksResponse> BatchCreateTasksAsync(BatchCreateTasksRequest request, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
BatchCreateTasksRequest | request | The request object containing all of the parameters for the API call. |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<BatchCreateTasksResponse> | A Task containing the RPC response. |
Sample code
// Create client
gmfdv::DeliveryServiceClient deliveryServiceClient = await gmfdv::DeliveryServiceClient.CreateAsync();
// Initialize request argument(s)
gmfdv::BatchCreateTasksRequest request = new gmfdv::BatchCreateTasksRequest
{
Header = new gmfdv::DeliveryRequestHeader(),
ParentAsProviderName = gmfdv::ProviderName.FromProvider("[PROVIDER]"),
Requests =
{
new gmfdv::CreateTaskRequest(),
},
};
// Make the request
gmfdv::BatchCreateTasksResponse response = await deliveryServiceClient.BatchCreateTasksAsync(request);
Create()
Synchronously creates a DeliveryServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use DeliveryServiceClientBuilder.
Declaration
public static DeliveryServiceClient Create()
Returns
Type | Description |
---|---|
DeliveryServiceClient | The created DeliveryServiceClient. |
CreateAsync(CancellationToken)
Asynchronously creates a DeliveryServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use DeliveryServiceClientBuilder.
Declaration
public static Task<DeliveryServiceClient> CreateAsync(CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken | The CancellationToken to use while creating the client. |
Returns
Type | Description |
---|---|
Task<DeliveryServiceClient> | The task representing the created DeliveryServiceClient. |
CreateDeliveryVehicle(CreateDeliveryVehicleRequest, CallSettings)
Creates and returns a new DeliveryVehicle
.
Declaration
public virtual DeliveryVehicle CreateDeliveryVehicle(CreateDeliveryVehicleRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
CreateDeliveryVehicleRequest | request | The request object containing all of the parameters for the API call. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
DeliveryVehicle | The RPC response. |
Sample code
// Create client
gmfdv::DeliveryServiceClient deliveryServiceClient = gmfdv::DeliveryServiceClient.Create();
// Initialize request argument(s)
gmfdv::CreateDeliveryVehicleRequest request = new gmfdv::CreateDeliveryVehicleRequest
{
Header = new gmfdv::DeliveryRequestHeader(),
Parent = "",
DeliveryVehicleId = "",
DeliveryVehicle = new gmfdv::DeliveryVehicle(),
};
// Make the request
gmfdv::DeliveryVehicle response = deliveryServiceClient.CreateDeliveryVehicle(request);
CreateDeliveryVehicle(string, DeliveryVehicle, string, CallSettings)
Creates and returns a new DeliveryVehicle
.
Declaration
public virtual DeliveryVehicle CreateDeliveryVehicle(string parent, DeliveryVehicle deliveryVehicle, string deliveryVehicleId, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. Must be in the format |
DeliveryVehicle | deliveryVehicle | Required. The
Note: The DeliveryVehicle's |
string | deliveryVehicleId | Required. The Delivery Vehicle ID must be unique and subject to the following restrictions:
|
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
DeliveryVehicle | The RPC response. |
Sample code
// Create client
gmfdv::DeliveryServiceClient deliveryServiceClient = gmfdv::DeliveryServiceClient.Create();
// Initialize request argument(s)
string parent = "";
gmfdv::DeliveryVehicle deliveryVehicle = new gmfdv::DeliveryVehicle();
string deliveryVehicleId = "";
// Make the request
gmfdv::DeliveryVehicle response = deliveryServiceClient.CreateDeliveryVehicle(parent, deliveryVehicle, deliveryVehicleId);
CreateDeliveryVehicleAsync(CreateDeliveryVehicleRequest, CallSettings)
Creates and returns a new DeliveryVehicle
.
Declaration
public virtual Task<DeliveryVehicle> CreateDeliveryVehicleAsync(CreateDeliveryVehicleRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
CreateDeliveryVehicleRequest | request | The request object containing all of the parameters for the API call. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<DeliveryVehicle> | A Task containing the RPC response. |
Sample code
// Create client
gmfdv::DeliveryServiceClient deliveryServiceClient = await gmfdv::DeliveryServiceClient.CreateAsync();
// Initialize request argument(s)
gmfdv::CreateDeliveryVehicleRequest request = new gmfdv::CreateDeliveryVehicleRequest
{
Header = new gmfdv::DeliveryRequestHeader(),
Parent = "",
DeliveryVehicleId = "",
DeliveryVehicle = new gmfdv::DeliveryVehicle(),
};
// Make the request
gmfdv::DeliveryVehicle response = await deliveryServiceClient.CreateDeliveryVehicleAsync(request);
CreateDeliveryVehicleAsync(CreateDeliveryVehicleRequest, CancellationToken)
Creates and returns a new DeliveryVehicle
.
Declaration
public virtual Task<DeliveryVehicle> CreateDeliveryVehicleAsync(CreateDeliveryVehicleRequest request, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
CreateDeliveryVehicleRequest | request | The request object containing all of the parameters for the API call. |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<DeliveryVehicle> | A Task containing the RPC response. |
Sample code
// Create client
gmfdv::DeliveryServiceClient deliveryServiceClient = await gmfdv::DeliveryServiceClient.CreateAsync();
// Initialize request argument(s)
gmfdv::CreateDeliveryVehicleRequest request = new gmfdv::CreateDeliveryVehicleRequest
{
Header = new gmfdv::DeliveryRequestHeader(),
Parent = "",
DeliveryVehicleId = "",
DeliveryVehicle = new gmfdv::DeliveryVehicle(),
};
// Make the request
gmfdv::DeliveryVehicle response = await deliveryServiceClient.CreateDeliveryVehicleAsync(request);
CreateDeliveryVehicleAsync(string, DeliveryVehicle, string, CallSettings)
Creates and returns a new DeliveryVehicle
.
Declaration
public virtual Task<DeliveryVehicle> CreateDeliveryVehicleAsync(string parent, DeliveryVehicle deliveryVehicle, string deliveryVehicleId, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. Must be in the format |
DeliveryVehicle | deliveryVehicle | Required. The
Note: The DeliveryVehicle's |
string | deliveryVehicleId | Required. The Delivery Vehicle ID must be unique and subject to the following restrictions:
|
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<DeliveryVehicle> | A Task containing the RPC response. |
Sample code
// Create client
gmfdv::DeliveryServiceClient deliveryServiceClient = await gmfdv::DeliveryServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "";
gmfdv::DeliveryVehicle deliveryVehicle = new gmfdv::DeliveryVehicle();
string deliveryVehicleId = "";
// Make the request
gmfdv::DeliveryVehicle response = await deliveryServiceClient.CreateDeliveryVehicleAsync(parent, deliveryVehicle, deliveryVehicleId);
CreateDeliveryVehicleAsync(string, DeliveryVehicle, string, CancellationToken)
Creates and returns a new DeliveryVehicle
.
Declaration
public virtual Task<DeliveryVehicle> CreateDeliveryVehicleAsync(string parent, DeliveryVehicle deliveryVehicle, string deliveryVehicleId, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. Must be in the format |
DeliveryVehicle | deliveryVehicle | Required. The
Note: The DeliveryVehicle's |
string | deliveryVehicleId | Required. The Delivery Vehicle ID must be unique and subject to the following restrictions:
|
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<DeliveryVehicle> | A Task containing the RPC response. |
Sample code
// Create client
gmfdv::DeliveryServiceClient deliveryServiceClient = await gmfdv::DeliveryServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "";
gmfdv::DeliveryVehicle deliveryVehicle = new gmfdv::DeliveryVehicle();
string deliveryVehicleId = "";
// Make the request
gmfdv::DeliveryVehicle response = await deliveryServiceClient.CreateDeliveryVehicleAsync(parent, deliveryVehicle, deliveryVehicleId);
CreateTask(CreateTaskRequest, CallSettings)
Creates and returns a new Task
object.
Declaration
public virtual Task CreateTask(CreateTaskRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
CreateTaskRequest | request | The request object containing all of the parameters for the API call. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task | The RPC response. |
Sample code
// Create client
gmfdv::DeliveryServiceClient deliveryServiceClient = gmfdv::DeliveryServiceClient.Create();
// Initialize request argument(s)
gmfdv::CreateTaskRequest request = new gmfdv::CreateTaskRequest
{
Header = new gmfdv::DeliveryRequestHeader(),
Parent = "",
Task = new gmfdv::Task(),
TaskId = "",
};
// Make the request
gmfdv::Task response = deliveryServiceClient.CreateTask(request);
CreateTask(string, Task, string, CallSettings)
Creates and returns a new Task
object.
Declaration
public virtual Task CreateTask(string parent, Task task, string taskId, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. Must be in the format |
Task | task | Required. The Task entity to create. When creating a Task, the following fields are required:
Note: The Task's |
string | taskId | Required. The Task ID must be unique, but it should be not a shipment
tracking ID. To store a shipment tracking ID, use the
|
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task | The RPC response. |
Sample code
// Create client
gmfdv::DeliveryServiceClient deliveryServiceClient = gmfdv::DeliveryServiceClient.Create();
// Initialize request argument(s)
string parent = "";
gmfdv::Task task = new gmfdv::Task();
string taskId = "";
// Make the request
gmfdv::Task response = deliveryServiceClient.CreateTask(parent, task, taskId);
CreateTaskAsync(CreateTaskRequest, CallSettings)
Creates and returns a new Task
object.
Declaration
public virtual Task<Task> CreateTaskAsync(CreateTaskRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
CreateTaskRequest | request | The request object containing all of the parameters for the API call. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<Task> | A Task containing the RPC response. |
Sample code
// Create client
gmfdv::DeliveryServiceClient deliveryServiceClient = await gmfdv::DeliveryServiceClient.CreateAsync();
// Initialize request argument(s)
gmfdv::CreateTaskRequest request = new gmfdv::CreateTaskRequest
{
Header = new gmfdv::DeliveryRequestHeader(),
Parent = "",
Task = new gmfdv::Task(),
TaskId = "",
};
// Make the request
gmfdv::Task response = await deliveryServiceClient.CreateTaskAsync(request);
CreateTaskAsync(CreateTaskRequest, CancellationToken)
Creates and returns a new Task
object.
Declaration
public virtual Task<Task> CreateTaskAsync(CreateTaskRequest request, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
CreateTaskRequest | request | The request object containing all of the parameters for the API call. |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<Task> | A Task containing the RPC response. |
Sample code
// Create client
gmfdv::DeliveryServiceClient deliveryServiceClient = await gmfdv::DeliveryServiceClient.CreateAsync();
// Initialize request argument(s)
gmfdv::CreateTaskRequest request = new gmfdv::CreateTaskRequest
{
Header = new gmfdv::DeliveryRequestHeader(),
Parent = "",
Task = new gmfdv::Task(),
TaskId = "",
};
// Make the request
gmfdv::Task response = await deliveryServiceClient.CreateTaskAsync(request);
CreateTaskAsync(string, Task, string, CallSettings)
Creates and returns a new Task
object.
Declaration
public virtual Task<Task> CreateTaskAsync(string parent, Task task, string taskId, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. Must be in the format |
Task | task | Required. The Task entity to create. When creating a Task, the following fields are required:
Note: The Task's |
string | taskId | Required. The Task ID must be unique, but it should be not a shipment
tracking ID. To store a shipment tracking ID, use the
|
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<Task> | A Task containing the RPC response. |
Sample code
// Create client
gmfdv::DeliveryServiceClient deliveryServiceClient = await gmfdv::DeliveryServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "";
gmfdv::Task task = new gmfdv::Task();
string taskId = "";
// Make the request
gmfdv::Task response = await deliveryServiceClient.CreateTaskAsync(parent, task, taskId);
CreateTaskAsync(string, Task, string, CancellationToken)
Creates and returns a new Task
object.
Declaration
public virtual Task<Task> CreateTaskAsync(string parent, Task task, string taskId, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. Must be in the format |
Task | task | Required. The Task entity to create. When creating a Task, the following fields are required:
Note: The Task's |
string | taskId | Required. The Task ID must be unique, but it should be not a shipment
tracking ID. To store a shipment tracking ID, use the
|
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<Task> | A Task containing the RPC response. |
Sample code
// Create client
gmfdv::DeliveryServiceClient deliveryServiceClient = await gmfdv::DeliveryServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "";
gmfdv::Task task = new gmfdv::Task();
string taskId = "";
// Make the request
gmfdv::Task response = await deliveryServiceClient.CreateTaskAsync(parent, task, taskId);
GetDeliveryVehicle(DeliveryVehicleName, CallSettings)
Returns the specified DeliveryVehicle
instance.
Declaration
public virtual DeliveryVehicle GetDeliveryVehicle(DeliveryVehicleName name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
DeliveryVehicleName | name | Required. Must be in the format
|
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
DeliveryVehicle | The RPC response. |
Sample code
// Create client
gmfdv::DeliveryServiceClient deliveryServiceClient = gmfdv::DeliveryServiceClient.Create();
// Initialize request argument(s)
gmfdv::DeliveryVehicleName name = gmfdv::DeliveryVehicleName.FromProviderVehicle("[PROVIDER]", "[VEHICLE]");
// Make the request
gmfdv::DeliveryVehicle response = deliveryServiceClient.GetDeliveryVehicle(name);
GetDeliveryVehicle(GetDeliveryVehicleRequest, CallSettings)
Returns the specified DeliveryVehicle
instance.
Declaration
public virtual DeliveryVehicle GetDeliveryVehicle(GetDeliveryVehicleRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
GetDeliveryVehicleRequest | request | The request object containing all of the parameters for the API call. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
DeliveryVehicle | The RPC response. |
Sample code
// Create client
gmfdv::DeliveryServiceClient deliveryServiceClient = gmfdv::DeliveryServiceClient.Create();
// Initialize request argument(s)
gmfdv::GetDeliveryVehicleRequest request = new gmfdv::GetDeliveryVehicleRequest
{
Header = new gmfdv::DeliveryRequestHeader(),
DeliveryVehicleName = gmfdv::DeliveryVehicleName.FromProviderVehicle("[PROVIDER]", "[VEHICLE]"),
};
// Make the request
gmfdv::DeliveryVehicle response = deliveryServiceClient.GetDeliveryVehicle(request);
GetDeliveryVehicle(string, CallSettings)
Returns the specified DeliveryVehicle
instance.
Declaration
public virtual DeliveryVehicle GetDeliveryVehicle(string name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | name | Required. Must be in the format
|
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
DeliveryVehicle | The RPC response. |
Sample code
// Create client
gmfdv::DeliveryServiceClient deliveryServiceClient = gmfdv::DeliveryServiceClient.Create();
// Initialize request argument(s)
string name = "providers/[PROVIDER]/deliveryVehicles/[VEHICLE]";
// Make the request
gmfdv::DeliveryVehicle response = deliveryServiceClient.GetDeliveryVehicle(name);
GetDeliveryVehicleAsync(DeliveryVehicleName, CallSettings)
Returns the specified DeliveryVehicle
instance.
Declaration
public virtual Task<DeliveryVehicle> GetDeliveryVehicleAsync(DeliveryVehicleName name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
DeliveryVehicleName | name | Required. Must be in the format
|
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<DeliveryVehicle> | A Task containing the RPC response. |
Sample code
// Create client
gmfdv::DeliveryServiceClient deliveryServiceClient = await gmfdv::DeliveryServiceClient.CreateAsync();
// Initialize request argument(s)
gmfdv::DeliveryVehicleName name = gmfdv::DeliveryVehicleName.FromProviderVehicle("[PROVIDER]", "[VEHICLE]");
// Make the request
gmfdv::DeliveryVehicle response = await deliveryServiceClient.GetDeliveryVehicleAsync(name);
GetDeliveryVehicleAsync(DeliveryVehicleName, CancellationToken)
Returns the specified DeliveryVehicle
instance.
Declaration
public virtual Task<DeliveryVehicle> GetDeliveryVehicleAsync(DeliveryVehicleName name, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
DeliveryVehicleName | name | Required. Must be in the format
|
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<DeliveryVehicle> | A Task containing the RPC response. |
Sample code
// Create client
gmfdv::DeliveryServiceClient deliveryServiceClient = await gmfdv::DeliveryServiceClient.CreateAsync();
// Initialize request argument(s)
gmfdv::DeliveryVehicleName name = gmfdv::DeliveryVehicleName.FromProviderVehicle("[PROVIDER]", "[VEHICLE]");
// Make the request
gmfdv::DeliveryVehicle response = await deliveryServiceClient.GetDeliveryVehicleAsync(name);
GetDeliveryVehicleAsync(GetDeliveryVehicleRequest, CallSettings)
Returns the specified DeliveryVehicle
instance.
Declaration
public virtual Task<DeliveryVehicle> GetDeliveryVehicleAsync(GetDeliveryVehicleRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
GetDeliveryVehicleRequest | request | The request object containing all of the parameters for the API call. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<DeliveryVehicle> | A Task containing the RPC response. |
Sample code
// Create client
gmfdv::DeliveryServiceClient deliveryServiceClient = await gmfdv::DeliveryServiceClient.CreateAsync();
// Initialize request argument(s)
gmfdv::GetDeliveryVehicleRequest request = new gmfdv::GetDeliveryVehicleRequest
{
Header = new gmfdv::DeliveryRequestHeader(),
DeliveryVehicleName = gmfdv::DeliveryVehicleName.FromProviderVehicle("[PROVIDER]", "[VEHICLE]"),
};
// Make the request
gmfdv::DeliveryVehicle response = await deliveryServiceClient.GetDeliveryVehicleAsync(request);
GetDeliveryVehicleAsync(GetDeliveryVehicleRequest, CancellationToken)
Returns the specified DeliveryVehicle
instance.
Declaration
public virtual Task<DeliveryVehicle> GetDeliveryVehicleAsync(GetDeliveryVehicleRequest request, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
GetDeliveryVehicleRequest | request | The request object containing all of the parameters for the API call. |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<DeliveryVehicle> | A Task containing the RPC response. |
Sample code
// Create client
gmfdv::DeliveryServiceClient deliveryServiceClient = await gmfdv::DeliveryServiceClient.CreateAsync();
// Initialize request argument(s)
gmfdv::GetDeliveryVehicleRequest request = new gmfdv::GetDeliveryVehicleRequest
{
Header = new gmfdv::DeliveryRequestHeader(),
DeliveryVehicleName = gmfdv::DeliveryVehicleName.FromProviderVehicle("[PROVIDER]", "[VEHICLE]"),
};
// Make the request
gmfdv::DeliveryVehicle response = await deliveryServiceClient.GetDeliveryVehicleAsync(request);
GetDeliveryVehicleAsync(string, CallSettings)
Returns the specified DeliveryVehicle
instance.
Declaration
public virtual Task<DeliveryVehicle> GetDeliveryVehicleAsync(string name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | name | Required. Must be in the format
|
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<DeliveryVehicle> | A Task containing the RPC response. |
Sample code
// Create client
gmfdv::DeliveryServiceClient deliveryServiceClient = await gmfdv::DeliveryServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "providers/[PROVIDER]/deliveryVehicles/[VEHICLE]";
// Make the request
gmfdv::DeliveryVehicle response = await deliveryServiceClient.GetDeliveryVehicleAsync(name);
GetDeliveryVehicleAsync(string, CancellationToken)
Returns the specified DeliveryVehicle
instance.
Declaration
public virtual Task<DeliveryVehicle> GetDeliveryVehicleAsync(string name, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | name | Required. Must be in the format
|
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<DeliveryVehicle> | A Task containing the RPC response. |
Sample code
// Create client
gmfdv::DeliveryServiceClient deliveryServiceClient = await gmfdv::DeliveryServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "providers/[PROVIDER]/deliveryVehicles/[VEHICLE]";
// Make the request
gmfdv::DeliveryVehicle response = await deliveryServiceClient.GetDeliveryVehicleAsync(name);
GetTask(GetTaskRequest, CallSettings)
Gets information about a Task
.
Declaration
public virtual Task GetTask(GetTaskRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
GetTaskRequest | request | The request object containing all of the parameters for the API call. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task | The RPC response. |
Sample code
// Create client
gmfdv::DeliveryServiceClient deliveryServiceClient = gmfdv::DeliveryServiceClient.Create();
// Initialize request argument(s)
gmfdv::GetTaskRequest request = new gmfdv::GetTaskRequest
{
Header = new gmfdv::DeliveryRequestHeader(),
TaskName = gmfdv::TaskName.FromProviderTask("[PROVIDER]", "[TASK]"),
};
// Make the request
gmfdv::Task response = deliveryServiceClient.GetTask(request);
GetTask(TaskName, CallSettings)
Gets information about a Task
.
Declaration
public virtual Task GetTask(TaskName name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
TaskName | name | Required. Must be in the format |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task | The RPC response. |
Sample code
// Create client
gmfdv::DeliveryServiceClient deliveryServiceClient = gmfdv::DeliveryServiceClient.Create();
// Initialize request argument(s)
gmfdv::TaskName name = gmfdv::TaskName.FromProviderTask("[PROVIDER]", "[TASK]");
// Make the request
gmfdv::Task response = deliveryServiceClient.GetTask(name);
GetTask(string, CallSettings)
Gets information about a Task
.
Declaration
public virtual Task GetTask(string name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | name | Required. Must be in the format |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task | The RPC response. |
Sample code
// Create client
gmfdv::DeliveryServiceClient deliveryServiceClient = gmfdv::DeliveryServiceClient.Create();
// Initialize request argument(s)
string name = "providers/[PROVIDER]/tasks/[TASK]";
// Make the request
gmfdv::Task response = deliveryServiceClient.GetTask(name);
GetTaskAsync(GetTaskRequest, CallSettings)
Gets information about a Task
.
Declaration
public virtual Task<Task> GetTaskAsync(GetTaskRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
GetTaskRequest | request | The request object containing all of the parameters for the API call. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<Task> | A Task containing the RPC response. |
Sample code
// Create client
gmfdv::DeliveryServiceClient deliveryServiceClient = await gmfdv::DeliveryServiceClient.CreateAsync();
// Initialize request argument(s)
gmfdv::GetTaskRequest request = new gmfdv::GetTaskRequest
{
Header = new gmfdv::DeliveryRequestHeader(),
TaskName = gmfdv::TaskName.FromProviderTask("[PROVIDER]", "[TASK]"),
};
// Make the request
gmfdv::Task response = await deliveryServiceClient.GetTaskAsync(request);
GetTaskAsync(GetTaskRequest, CancellationToken)
Gets information about a Task
.
Declaration
public virtual Task<Task> GetTaskAsync(GetTaskRequest request, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
GetTaskRequest | request | The request object containing all of the parameters for the API call. |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<Task> | A Task containing the RPC response. |
Sample code
// Create client
gmfdv::DeliveryServiceClient deliveryServiceClient = await gmfdv::DeliveryServiceClient.CreateAsync();
// Initialize request argument(s)
gmfdv::GetTaskRequest request = new gmfdv::GetTaskRequest
{
Header = new gmfdv::DeliveryRequestHeader(),
TaskName = gmfdv::TaskName.FromProviderTask("[PROVIDER]", "[TASK]"),
};
// Make the request
gmfdv::Task response = await deliveryServiceClient.GetTaskAsync(request);
GetTaskAsync(TaskName, CallSettings)
Gets information about a Task
.
Declaration
public virtual Task<Task> GetTaskAsync(TaskName name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
TaskName | name | Required. Must be in the format |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<Task> | A Task containing the RPC response. |
Sample code
// Create client
gmfdv::DeliveryServiceClient deliveryServiceClient = await gmfdv::DeliveryServiceClient.CreateAsync();
// Initialize request argument(s)
gmfdv::TaskName name = gmfdv::TaskName.FromProviderTask("[PROVIDER]", "[TASK]");
// Make the request
gmfdv::Task response = await deliveryServiceClient.GetTaskAsync(name);
GetTaskAsync(TaskName, CancellationToken)
Gets information about a Task
.
Declaration
public virtual Task<Task> GetTaskAsync(TaskName name, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
TaskName | name | Required. Must be in the format |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<Task> | A Task containing the RPC response. |
Sample code
// Create client
gmfdv::DeliveryServiceClient deliveryServiceClient = await gmfdv::DeliveryServiceClient.CreateAsync();
// Initialize request argument(s)
gmfdv::TaskName name = gmfdv::TaskName.FromProviderTask("[PROVIDER]", "[TASK]");
// Make the request
gmfdv::Task response = await deliveryServiceClient.GetTaskAsync(name);
GetTaskAsync(string, CallSettings)
Gets information about a Task
.
Declaration
public virtual Task<Task> GetTaskAsync(string name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | name | Required. Must be in the format |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<Task> | A Task containing the RPC response. |
Sample code
// Create client
gmfdv::DeliveryServiceClient deliveryServiceClient = await gmfdv::DeliveryServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "providers/[PROVIDER]/tasks/[TASK]";
// Make the request
gmfdv::Task response = await deliveryServiceClient.GetTaskAsync(name);
GetTaskAsync(string, CancellationToken)
Gets information about a Task
.
Declaration
public virtual Task<Task> GetTaskAsync(string name, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | name | Required. Must be in the format |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<Task> | A Task containing the RPC response. |
Sample code
// Create client
gmfdv::DeliveryServiceClient deliveryServiceClient = await gmfdv::DeliveryServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "providers/[PROVIDER]/tasks/[TASK]";
// Make the request
gmfdv::Task response = await deliveryServiceClient.GetTaskAsync(name);
GetTaskTrackingInfo(GetTaskTrackingInfoRequest, CallSettings)
Returns the specified TaskTrackingInfo
instance.
Declaration
public virtual TaskTrackingInfo GetTaskTrackingInfo(GetTaskTrackingInfoRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
GetTaskTrackingInfoRequest | request | The request object containing all of the parameters for the API call. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
TaskTrackingInfo | The RPC response. |
Sample code
// Create client
gmfdv::DeliveryServiceClient deliveryServiceClient = gmfdv::DeliveryServiceClient.Create();
// Initialize request argument(s)
gmfdv::GetTaskTrackingInfoRequest request = new gmfdv::GetTaskTrackingInfoRequest
{
Header = new gmfdv::DeliveryRequestHeader(),
TaskTrackingInfoName = gmfdv::TaskTrackingInfoName.FromProviderTracking("[PROVIDER]", "[TRACKING]"),
};
// Make the request
gmfdv::TaskTrackingInfo response = deliveryServiceClient.GetTaskTrackingInfo(request);
GetTaskTrackingInfo(TaskTrackingInfoName, CallSettings)
Returns the specified TaskTrackingInfo
instance.
Declaration
public virtual TaskTrackingInfo GetTaskTrackingInfo(TaskTrackingInfoName name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
TaskTrackingInfoName | name | Required. Must be in the format
|
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
TaskTrackingInfo | The RPC response. |
Sample code
// Create client
gmfdv::DeliveryServiceClient deliveryServiceClient = gmfdv::DeliveryServiceClient.Create();
// Initialize request argument(s)
gmfdv::TaskTrackingInfoName name = gmfdv::TaskTrackingInfoName.FromProviderTracking("[PROVIDER]", "[TRACKING]");
// Make the request
gmfdv::TaskTrackingInfo response = deliveryServiceClient.GetTaskTrackingInfo(name);
GetTaskTrackingInfo(string, CallSettings)
Returns the specified TaskTrackingInfo
instance.
Declaration
public virtual TaskTrackingInfo GetTaskTrackingInfo(string name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | name | Required. Must be in the format
|
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
TaskTrackingInfo | The RPC response. |
Sample code
// Create client
gmfdv::DeliveryServiceClient deliveryServiceClient = gmfdv::DeliveryServiceClient.Create();
// Initialize request argument(s)
string name = "providers/[PROVIDER]/taskTrackingInfo/[TRACKING]";
// Make the request
gmfdv::TaskTrackingInfo response = deliveryServiceClient.GetTaskTrackingInfo(name);
GetTaskTrackingInfoAsync(GetTaskTrackingInfoRequest, CallSettings)
Returns the specified TaskTrackingInfo
instance.
Declaration
public virtual Task<TaskTrackingInfo> GetTaskTrackingInfoAsync(GetTaskTrackingInfoRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
GetTaskTrackingInfoRequest | request | The request object containing all of the parameters for the API call. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<TaskTrackingInfo> | A Task containing the RPC response. |
Sample code
// Create client
gmfdv::DeliveryServiceClient deliveryServiceClient = await gmfdv::DeliveryServiceClient.CreateAsync();
// Initialize request argument(s)
gmfdv::GetTaskTrackingInfoRequest request = new gmfdv::GetTaskTrackingInfoRequest
{
Header = new gmfdv::DeliveryRequestHeader(),
TaskTrackingInfoName = gmfdv::TaskTrackingInfoName.FromProviderTracking("[PROVIDER]", "[TRACKING]"),
};
// Make the request
gmfdv::TaskTrackingInfo response = await deliveryServiceClient.GetTaskTrackingInfoAsync(request);
GetTaskTrackingInfoAsync(GetTaskTrackingInfoRequest, CancellationToken)
Returns the specified TaskTrackingInfo
instance.
Declaration
public virtual Task<TaskTrackingInfo> GetTaskTrackingInfoAsync(GetTaskTrackingInfoRequest request, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
GetTaskTrackingInfoRequest | request | The request object containing all of the parameters for the API call. |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<TaskTrackingInfo> | A Task containing the RPC response. |
Sample code
// Create client
gmfdv::DeliveryServiceClient deliveryServiceClient = await gmfdv::DeliveryServiceClient.CreateAsync();
// Initialize request argument(s)
gmfdv::GetTaskTrackingInfoRequest request = new gmfdv::GetTaskTrackingInfoRequest
{
Header = new gmfdv::DeliveryRequestHeader(),
TaskTrackingInfoName = gmfdv::TaskTrackingInfoName.FromProviderTracking("[PROVIDER]", "[TRACKING]"),
};
// Make the request
gmfdv::TaskTrackingInfo response = await deliveryServiceClient.GetTaskTrackingInfoAsync(request);
GetTaskTrackingInfoAsync(TaskTrackingInfoName, CallSettings)
Returns the specified TaskTrackingInfo
instance.
Declaration
public virtual Task<TaskTrackingInfo> GetTaskTrackingInfoAsync(TaskTrackingInfoName name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
TaskTrackingInfoName | name | Required. Must be in the format
|
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<TaskTrackingInfo> | A Task containing the RPC response. |
Sample code
// Create client
gmfdv::DeliveryServiceClient deliveryServiceClient = await gmfdv::DeliveryServiceClient.CreateAsync();
// Initialize request argument(s)
gmfdv::TaskTrackingInfoName name = gmfdv::TaskTrackingInfoName.FromProviderTracking("[PROVIDER]", "[TRACKING]");
// Make the request
gmfdv::TaskTrackingInfo response = await deliveryServiceClient.GetTaskTrackingInfoAsync(name);
GetTaskTrackingInfoAsync(TaskTrackingInfoName, CancellationToken)
Returns the specified TaskTrackingInfo
instance.
Declaration
public virtual Task<TaskTrackingInfo> GetTaskTrackingInfoAsync(TaskTrackingInfoName name, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
TaskTrackingInfoName | name | Required. Must be in the format
|
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<TaskTrackingInfo> | A Task containing the RPC response. |
Sample code
// Create client
gmfdv::DeliveryServiceClient deliveryServiceClient = await gmfdv::DeliveryServiceClient.CreateAsync();
// Initialize request argument(s)
gmfdv::TaskTrackingInfoName name = gmfdv::TaskTrackingInfoName.FromProviderTracking("[PROVIDER]", "[TRACKING]");
// Make the request
gmfdv::TaskTrackingInfo response = await deliveryServiceClient.GetTaskTrackingInfoAsync(name);
GetTaskTrackingInfoAsync(string, CallSettings)
Returns the specified TaskTrackingInfo
instance.
Declaration
public virtual Task<TaskTrackingInfo> GetTaskTrackingInfoAsync(string name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | name | Required. Must be in the format
|
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<TaskTrackingInfo> | A Task containing the RPC response. |
Sample code
// Create client
gmfdv::DeliveryServiceClient deliveryServiceClient = await gmfdv::DeliveryServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "providers/[PROVIDER]/taskTrackingInfo/[TRACKING]";
// Make the request
gmfdv::TaskTrackingInfo response = await deliveryServiceClient.GetTaskTrackingInfoAsync(name);
GetTaskTrackingInfoAsync(string, CancellationToken)
Returns the specified TaskTrackingInfo
instance.
Declaration
public virtual Task<TaskTrackingInfo> GetTaskTrackingInfoAsync(string name, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | name | Required. Must be in the format
|
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<TaskTrackingInfo> | A Task containing the RPC response. |
Sample code
// Create client
gmfdv::DeliveryServiceClient deliveryServiceClient = await gmfdv::DeliveryServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "providers/[PROVIDER]/taskTrackingInfo/[TRACKING]";
// Make the request
gmfdv::TaskTrackingInfo response = await deliveryServiceClient.GetTaskTrackingInfoAsync(name);
ListDeliveryVehicles(ListDeliveryVehiclesRequest, CallSettings)
Gets all DeliveryVehicle
s that meet the specified filtering criteria.
Declaration
public virtual PagedEnumerable<ListDeliveryVehiclesResponse, DeliveryVehicle> ListDeliveryVehicles(ListDeliveryVehiclesRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
ListDeliveryVehiclesRequest | request | The request object containing all of the parameters for the API call. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
PagedEnumerable<ListDeliveryVehiclesResponse, DeliveryVehicle> | A pageable sequence of DeliveryVehicle resources. |
Sample code
// Create client
gmfdv::DeliveryServiceClient deliveryServiceClient = gmfdv::DeliveryServiceClient.Create();
// Initialize request argument(s)
gmfdv::ListDeliveryVehiclesRequest request = new gmfdv::ListDeliveryVehiclesRequest
{
Header = new gmfdv::DeliveryRequestHeader(),
ParentAsProviderName = gmfdv::ProviderName.FromProvider("[PROVIDER]"),
Filter = "",
Viewport = new Viewport(),
};
// Make the request
PagedEnumerable<gmfdv::ListDeliveryVehiclesResponse, gmfdv::DeliveryVehicle> response = deliveryServiceClient.ListDeliveryVehicles(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (gmfdv::DeliveryVehicle item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (gmfdv::ListDeliveryVehiclesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (gmfdv::DeliveryVehicle item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<gmfdv::DeliveryVehicle> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (gmfdv::DeliveryVehicle item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListDeliveryVehicles(ProviderName, string, int?, CallSettings)
Gets all DeliveryVehicle
s that meet the specified filtering criteria.
Declaration
public virtual PagedEnumerable<ListDeliveryVehiclesResponse, DeliveryVehicle> ListDeliveryVehicles(ProviderName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
ProviderName | parent | Required. Must be in the format |
string | pageToken | The token returned from the previous request. A value of |
int? | pageSize | The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
PagedEnumerable<ListDeliveryVehiclesResponse, DeliveryVehicle> | A pageable sequence of DeliveryVehicle resources. |
Sample code
// Create client
gmfdv::DeliveryServiceClient deliveryServiceClient = gmfdv::DeliveryServiceClient.Create();
// Initialize request argument(s)
gmfdv::ProviderName parent = gmfdv::ProviderName.FromProvider("[PROVIDER]");
// Make the request
PagedEnumerable<gmfdv::ListDeliveryVehiclesResponse, gmfdv::DeliveryVehicle> response = deliveryServiceClient.ListDeliveryVehicles(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (gmfdv::DeliveryVehicle item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (gmfdv::ListDeliveryVehiclesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (gmfdv::DeliveryVehicle item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<gmfdv::DeliveryVehicle> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (gmfdv::DeliveryVehicle item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListDeliveryVehicles(string, string, int?, CallSettings)
Gets all DeliveryVehicle
s that meet the specified filtering criteria.
Declaration
public virtual PagedEnumerable<ListDeliveryVehiclesResponse, DeliveryVehicle> ListDeliveryVehicles(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. Must be in the format |
string | pageToken | The token returned from the previous request. A value of |
int? | pageSize | The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
PagedEnumerable<ListDeliveryVehiclesResponse, DeliveryVehicle> | A pageable sequence of DeliveryVehicle resources. |
Sample code
// Create client
gmfdv::DeliveryServiceClient deliveryServiceClient = gmfdv::DeliveryServiceClient.Create();
// Initialize request argument(s)
string parent = "providers/[PROVIDER]";
// Make the request
PagedEnumerable<gmfdv::ListDeliveryVehiclesResponse, gmfdv::DeliveryVehicle> response = deliveryServiceClient.ListDeliveryVehicles(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (gmfdv::DeliveryVehicle item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (gmfdv::ListDeliveryVehiclesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (gmfdv::DeliveryVehicle item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<gmfdv::DeliveryVehicle> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (gmfdv::DeliveryVehicle item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListDeliveryVehiclesAsync(ListDeliveryVehiclesRequest, CallSettings)
Gets all DeliveryVehicle
s that meet the specified filtering criteria.
Declaration
public virtual PagedAsyncEnumerable<ListDeliveryVehiclesResponse, DeliveryVehicle> ListDeliveryVehiclesAsync(ListDeliveryVehiclesRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
ListDeliveryVehiclesRequest | request | The request object containing all of the parameters for the API call. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
PagedAsyncEnumerable<ListDeliveryVehiclesResponse, DeliveryVehicle> | A pageable asynchronous sequence of DeliveryVehicle resources. |
Sample code
// Create client
gmfdv::DeliveryServiceClient deliveryServiceClient = await gmfdv::DeliveryServiceClient.CreateAsync();
// Initialize request argument(s)
gmfdv::ListDeliveryVehiclesRequest request = new gmfdv::ListDeliveryVehiclesRequest
{
Header = new gmfdv::DeliveryRequestHeader(),
ParentAsProviderName = gmfdv::ProviderName.FromProvider("[PROVIDER]"),
Filter = "",
Viewport = new Viewport(),
};
// Make the request
PagedAsyncEnumerable<gmfdv::ListDeliveryVehiclesResponse, gmfdv::DeliveryVehicle> response = deliveryServiceClient.ListDeliveryVehiclesAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((gmfdv::DeliveryVehicle item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((gmfdv::ListDeliveryVehiclesResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (gmfdv::DeliveryVehicle item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<gmfdv::DeliveryVehicle> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (gmfdv::DeliveryVehicle item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListDeliveryVehiclesAsync(ProviderName, string, int?, CallSettings)
Gets all DeliveryVehicle
s that meet the specified filtering criteria.
Declaration
public virtual PagedAsyncEnumerable<ListDeliveryVehiclesResponse, DeliveryVehicle> ListDeliveryVehiclesAsync(ProviderName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
ProviderName | parent | Required. Must be in the format |
string | pageToken | The token returned from the previous request. A value of |
int? | pageSize | The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
PagedAsyncEnumerable<ListDeliveryVehiclesResponse, DeliveryVehicle> | A pageable asynchronous sequence of DeliveryVehicle resources. |
Sample code
// Create client
gmfdv::DeliveryServiceClient deliveryServiceClient = await gmfdv::DeliveryServiceClient.CreateAsync();
// Initialize request argument(s)
gmfdv::ProviderName parent = gmfdv::ProviderName.FromProvider("[PROVIDER]");
// Make the request
PagedAsyncEnumerable<gmfdv::ListDeliveryVehiclesResponse, gmfdv::DeliveryVehicle> response = deliveryServiceClient.ListDeliveryVehiclesAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((gmfdv::DeliveryVehicle item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((gmfdv::ListDeliveryVehiclesResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (gmfdv::DeliveryVehicle item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<gmfdv::DeliveryVehicle> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (gmfdv::DeliveryVehicle item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListDeliveryVehiclesAsync(string, string, int?, CallSettings)
Gets all DeliveryVehicle
s that meet the specified filtering criteria.
Declaration
public virtual PagedAsyncEnumerable<ListDeliveryVehiclesResponse, DeliveryVehicle> ListDeliveryVehiclesAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. Must be in the format |
string | pageToken | The token returned from the previous request. A value of |
int? | pageSize | The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
PagedAsyncEnumerable<ListDeliveryVehiclesResponse, DeliveryVehicle> | A pageable asynchronous sequence of DeliveryVehicle resources. |
Sample code
// Create client
gmfdv::DeliveryServiceClient deliveryServiceClient = await gmfdv::DeliveryServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "providers/[PROVIDER]";
// Make the request
PagedAsyncEnumerable<gmfdv::ListDeliveryVehiclesResponse, gmfdv::DeliveryVehicle> response = deliveryServiceClient.ListDeliveryVehiclesAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((gmfdv::DeliveryVehicle item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((gmfdv::ListDeliveryVehiclesResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (gmfdv::DeliveryVehicle item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<gmfdv::DeliveryVehicle> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (gmfdv::DeliveryVehicle item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListTasks(ListTasksRequest, CallSettings)
Gets all Task
s that meet the specified filtering criteria.
Declaration
public virtual PagedEnumerable<ListTasksResponse, Task> ListTasks(ListTasksRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
ListTasksRequest | request | The request object containing all of the parameters for the API call. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
PagedEnumerable<ListTasksResponse, Task> | A pageable sequence of Task resources. |
Sample code
// Create client
gmfdv::DeliveryServiceClient deliveryServiceClient = gmfdv::DeliveryServiceClient.Create();
// Initialize request argument(s)
gmfdv::ListTasksRequest request = new gmfdv::ListTasksRequest
{
Header = new gmfdv::DeliveryRequestHeader(),
ParentAsProviderName = gmfdv::ProviderName.FromProvider("[PROVIDER]"),
Filter = "",
};
// Make the request
PagedEnumerable<gmfdv::ListTasksResponse, gmfdv::Task> response = deliveryServiceClient.ListTasks(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (gmfdv::Task item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (gmfdv::ListTasksResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (gmfdv::Task item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<gmfdv::Task> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (gmfdv::Task item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListTasks(ProviderName, string, int?, CallSettings)
Gets all Task
s that meet the specified filtering criteria.
Declaration
public virtual PagedEnumerable<ListTasksResponse, Task> ListTasks(ProviderName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
ProviderName | parent | Required. Must be in the format |
string | pageToken | The token returned from the previous request. A value of |
int? | pageSize | The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
PagedEnumerable<ListTasksResponse, Task> | A pageable sequence of Task resources. |
Sample code
// Create client
gmfdv::DeliveryServiceClient deliveryServiceClient = gmfdv::DeliveryServiceClient.Create();
// Initialize request argument(s)
gmfdv::ProviderName parent = gmfdv::ProviderName.FromProvider("[PROVIDER]");
// Make the request
PagedEnumerable<gmfdv::ListTasksResponse, gmfdv::Task> response = deliveryServiceClient.ListTasks(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (gmfdv::Task item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (gmfdv::ListTasksResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (gmfdv::Task item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<gmfdv::Task> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (gmfdv::Task item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListTasks(string, string, int?, CallSettings)
Gets all Task
s that meet the specified filtering criteria.
Declaration
public virtual PagedEnumerable<ListTasksResponse, Task> ListTasks(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. Must be in the format |
string | pageToken | The token returned from the previous request. A value of |
int? | pageSize | The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
PagedEnumerable<ListTasksResponse, Task> | A pageable sequence of Task resources. |
Sample code
// Create client
gmfdv::DeliveryServiceClient deliveryServiceClient = gmfdv::DeliveryServiceClient.Create();
// Initialize request argument(s)
string parent = "providers/[PROVIDER]";
// Make the request
PagedEnumerable<gmfdv::ListTasksResponse, gmfdv::Task> response = deliveryServiceClient.ListTasks(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (gmfdv::Task item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (gmfdv::ListTasksResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (gmfdv::Task item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<gmfdv::Task> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (gmfdv::Task item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListTasksAsync(ListTasksRequest, CallSettings)
Gets all Task
s that meet the specified filtering criteria.
Declaration
public virtual PagedAsyncEnumerable<ListTasksResponse, Task> ListTasksAsync(ListTasksRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
ListTasksRequest | request | The request object containing all of the parameters for the API call. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
PagedAsyncEnumerable<ListTasksResponse, Task> | A pageable asynchronous sequence of Task resources. |
Sample code
// Create client
gmfdv::DeliveryServiceClient deliveryServiceClient = await gmfdv::DeliveryServiceClient.CreateAsync();
// Initialize request argument(s)
gmfdv::ListTasksRequest request = new gmfdv::ListTasksRequest
{
Header = new gmfdv::DeliveryRequestHeader(),
ParentAsProviderName = gmfdv::ProviderName.FromProvider("[PROVIDER]"),
Filter = "",
};
// Make the request
PagedAsyncEnumerable<gmfdv::ListTasksResponse, gmfdv::Task> response = deliveryServiceClient.ListTasksAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((gmfdv::Task item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((gmfdv::ListTasksResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (gmfdv::Task item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<gmfdv::Task> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (gmfdv::Task item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListTasksAsync(ProviderName, string, int?, CallSettings)
Gets all Task
s that meet the specified filtering criteria.
Declaration
public virtual PagedAsyncEnumerable<ListTasksResponse, Task> ListTasksAsync(ProviderName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
ProviderName | parent | Required. Must be in the format |
string | pageToken | The token returned from the previous request. A value of |
int? | pageSize | The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
PagedAsyncEnumerable<ListTasksResponse, Task> | A pageable asynchronous sequence of Task resources. |
Sample code
// Create client
gmfdv::DeliveryServiceClient deliveryServiceClient = await gmfdv::DeliveryServiceClient.CreateAsync();
// Initialize request argument(s)
gmfdv::ProviderName parent = gmfdv::ProviderName.FromProvider("[PROVIDER]");
// Make the request
PagedAsyncEnumerable<gmfdv::ListTasksResponse, gmfdv::Task> response = deliveryServiceClient.ListTasksAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((gmfdv::Task item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((gmfdv::ListTasksResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (gmfdv::Task item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<gmfdv::Task> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (gmfdv::Task item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListTasksAsync(string, string, int?, CallSettings)
Gets all Task
s that meet the specified filtering criteria.
Declaration
public virtual PagedAsyncEnumerable<ListTasksResponse, Task> ListTasksAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. Must be in the format |
string | pageToken | The token returned from the previous request. A value of |
int? | pageSize | The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
PagedAsyncEnumerable<ListTasksResponse, Task> | A pageable asynchronous sequence of Task resources. |
Sample code
// Create client
gmfdv::DeliveryServiceClient deliveryServiceClient = await gmfdv::DeliveryServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "providers/[PROVIDER]";
// Make the request
PagedAsyncEnumerable<gmfdv::ListTasksResponse, gmfdv::Task> response = deliveryServiceClient.ListTasksAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((gmfdv::Task item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((gmfdv::ListTasksResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (gmfdv::Task item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<gmfdv::Task> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (gmfdv::Task item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ShutdownDefaultChannelsAsync()
Shuts down any channels automatically created by Create() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.
Declaration
public static Task ShutdownDefaultChannelsAsync()
Returns
Type | Description |
---|---|
Task | A task representing the asynchronous shutdown operation. |
Remarks
After calling this method, further calls to Create() and CreateAsync(CancellationToken) will create new channels, which could in turn be shut down by another call to this method.
UpdateDeliveryVehicle(DeliveryVehicle, FieldMask, CallSettings)
Writes updated DeliveryVehicle
data to Fleet Engine, and assigns
Tasks
to the DeliveryVehicle
. You cannot update the name of the
DeliveryVehicle
. You can update remaining_vehicle_journey_segments
though, but it must contain all of the VehicleJourneySegment
s currently
on the DeliveryVehicle
. The task_id
s are retrieved from
remaining_vehicle_journey_segments
, and their corresponding Tasks
are
assigned to the DeliveryVehicle
if they have not yet been assigned.
Declaration
public virtual DeliveryVehicle UpdateDeliveryVehicle(DeliveryVehicle deliveryVehicle, FieldMask updateMask, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
DeliveryVehicle | deliveryVehicle | Required. The |
FieldMask | updateMask | Required. A field mask that indicates which This is a comma-separated list of fully qualified names of fields. Example:
|
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
DeliveryVehicle | The RPC response. |
Sample code
// Create client
gmfdv::DeliveryServiceClient deliveryServiceClient = gmfdv::DeliveryServiceClient.Create();
// Initialize request argument(s)
gmfdv::DeliveryVehicle deliveryVehicle = new gmfdv::DeliveryVehicle();
FieldMask updateMask = new FieldMask();
// Make the request
gmfdv::DeliveryVehicle response = deliveryServiceClient.UpdateDeliveryVehicle(deliveryVehicle, updateMask);
UpdateDeliveryVehicle(UpdateDeliveryVehicleRequest, CallSettings)
Writes updated DeliveryVehicle
data to Fleet Engine, and assigns
Tasks
to the DeliveryVehicle
. You cannot update the name of the
DeliveryVehicle
. You can update remaining_vehicle_journey_segments
though, but it must contain all of the VehicleJourneySegment
s currently
on the DeliveryVehicle
. The task_id
s are retrieved from
remaining_vehicle_journey_segments
, and their corresponding Tasks
are
assigned to the DeliveryVehicle
if they have not yet been assigned.
Declaration
public virtual DeliveryVehicle UpdateDeliveryVehicle(UpdateDeliveryVehicleRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
UpdateDeliveryVehicleRequest | request | The request object containing all of the parameters for the API call. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
DeliveryVehicle | The RPC response. |
Sample code
// Create client
gmfdv::DeliveryServiceClient deliveryServiceClient = gmfdv::DeliveryServiceClient.Create();
// Initialize request argument(s)
gmfdv::UpdateDeliveryVehicleRequest request = new gmfdv::UpdateDeliveryVehicleRequest
{
Header = new gmfdv::DeliveryRequestHeader(),
DeliveryVehicle = new gmfdv::DeliveryVehicle(),
UpdateMask = new FieldMask(),
};
// Make the request
gmfdv::DeliveryVehicle response = deliveryServiceClient.UpdateDeliveryVehicle(request);
UpdateDeliveryVehicleAsync(DeliveryVehicle, FieldMask, CallSettings)
Writes updated DeliveryVehicle
data to Fleet Engine, and assigns
Tasks
to the DeliveryVehicle
. You cannot update the name of the
DeliveryVehicle
. You can update remaining_vehicle_journey_segments
though, but it must contain all of the VehicleJourneySegment
s currently
on the DeliveryVehicle
. The task_id
s are retrieved from
remaining_vehicle_journey_segments
, and their corresponding Tasks
are
assigned to the DeliveryVehicle
if they have not yet been assigned.
Declaration
public virtual Task<DeliveryVehicle> UpdateDeliveryVehicleAsync(DeliveryVehicle deliveryVehicle, FieldMask updateMask, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
DeliveryVehicle | deliveryVehicle | Required. The |
FieldMask | updateMask | Required. A field mask that indicates which This is a comma-separated list of fully qualified names of fields. Example:
|
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<DeliveryVehicle> | A Task containing the RPC response. |
Sample code
// Create client
gmfdv::DeliveryServiceClient deliveryServiceClient = await gmfdv::DeliveryServiceClient.CreateAsync();
// Initialize request argument(s)
gmfdv::DeliveryVehicle deliveryVehicle = new gmfdv::DeliveryVehicle();
FieldMask updateMask = new FieldMask();
// Make the request
gmfdv::DeliveryVehicle response = await deliveryServiceClient.UpdateDeliveryVehicleAsync(deliveryVehicle, updateMask);
UpdateDeliveryVehicleAsync(DeliveryVehicle, FieldMask, CancellationToken)
Writes updated DeliveryVehicle
data to Fleet Engine, and assigns
Tasks
to the DeliveryVehicle
. You cannot update the name of the
DeliveryVehicle
. You can update remaining_vehicle_journey_segments
though, but it must contain all of the VehicleJourneySegment
s currently
on the DeliveryVehicle
. The task_id
s are retrieved from
remaining_vehicle_journey_segments
, and their corresponding Tasks
are
assigned to the DeliveryVehicle
if they have not yet been assigned.
Declaration
public virtual Task<DeliveryVehicle> UpdateDeliveryVehicleAsync(DeliveryVehicle deliveryVehicle, FieldMask updateMask, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
DeliveryVehicle | deliveryVehicle | Required. The |
FieldMask | updateMask | Required. A field mask that indicates which This is a comma-separated list of fully qualified names of fields. Example:
|
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<DeliveryVehicle> | A Task containing the RPC response. |
Sample code
// Create client
gmfdv::DeliveryServiceClient deliveryServiceClient = await gmfdv::DeliveryServiceClient.CreateAsync();
// Initialize request argument(s)
gmfdv::DeliveryVehicle deliveryVehicle = new gmfdv::DeliveryVehicle();
FieldMask updateMask = new FieldMask();
// Make the request
gmfdv::DeliveryVehicle response = await deliveryServiceClient.UpdateDeliveryVehicleAsync(deliveryVehicle, updateMask);
UpdateDeliveryVehicleAsync(UpdateDeliveryVehicleRequest, CallSettings)
Writes updated DeliveryVehicle
data to Fleet Engine, and assigns
Tasks
to the DeliveryVehicle
. You cannot update the name of the
DeliveryVehicle
. You can update remaining_vehicle_journey_segments
though, but it must contain all of the VehicleJourneySegment
s currently
on the DeliveryVehicle
. The task_id
s are retrieved from
remaining_vehicle_journey_segments
, and their corresponding Tasks
are
assigned to the DeliveryVehicle
if they have not yet been assigned.
Declaration
public virtual Task<DeliveryVehicle> UpdateDeliveryVehicleAsync(UpdateDeliveryVehicleRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
UpdateDeliveryVehicleRequest | request | The request object containing all of the parameters for the API call. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<DeliveryVehicle> | A Task containing the RPC response. |
Sample code
// Create client
gmfdv::DeliveryServiceClient deliveryServiceClient = await gmfdv::DeliveryServiceClient.CreateAsync();
// Initialize request argument(s)
gmfdv::UpdateDeliveryVehicleRequest request = new gmfdv::UpdateDeliveryVehicleRequest
{
Header = new gmfdv::DeliveryRequestHeader(),
DeliveryVehicle = new gmfdv::DeliveryVehicle(),
UpdateMask = new FieldMask(),
};
// Make the request
gmfdv::DeliveryVehicle response = await deliveryServiceClient.UpdateDeliveryVehicleAsync(request);
UpdateDeliveryVehicleAsync(UpdateDeliveryVehicleRequest, CancellationToken)
Writes updated DeliveryVehicle
data to Fleet Engine, and assigns
Tasks
to the DeliveryVehicle
. You cannot update the name of the
DeliveryVehicle
. You can update remaining_vehicle_journey_segments
though, but it must contain all of the VehicleJourneySegment
s currently
on the DeliveryVehicle
. The task_id
s are retrieved from
remaining_vehicle_journey_segments
, and their corresponding Tasks
are
assigned to the DeliveryVehicle
if they have not yet been assigned.
Declaration
public virtual Task<DeliveryVehicle> UpdateDeliveryVehicleAsync(UpdateDeliveryVehicleRequest request, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
UpdateDeliveryVehicleRequest | request | The request object containing all of the parameters for the API call. |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<DeliveryVehicle> | A Task containing the RPC response. |
Sample code
// Create client
gmfdv::DeliveryServiceClient deliveryServiceClient = await gmfdv::DeliveryServiceClient.CreateAsync();
// Initialize request argument(s)
gmfdv::UpdateDeliveryVehicleRequest request = new gmfdv::UpdateDeliveryVehicleRequest
{
Header = new gmfdv::DeliveryRequestHeader(),
DeliveryVehicle = new gmfdv::DeliveryVehicle(),
UpdateMask = new FieldMask(),
};
// Make the request
gmfdv::DeliveryVehicle response = await deliveryServiceClient.UpdateDeliveryVehicleAsync(request);
UpdateTask(Task, FieldMask, CallSettings)
Updates Task
data.
Declaration
public virtual Task UpdateTask(Task task, FieldMask updateMask, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
Task | task | Required. The Task associated with the update.
The following fields are maintained by Fleet Engine. Do not update
them using
Note: You cannot change the value of If the Task has been assigned to a delivery vehicle, then don't set the
Task state to CLOSED using |
FieldMask | updateMask | Required. The field mask that indicates which Task fields to update.
Note: The This is a comma-separated list of fully qualified names of fields. Example:
|
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task | The RPC response. |
Sample code
// Create client
gmfdv::DeliveryServiceClient deliveryServiceClient = gmfdv::DeliveryServiceClient.Create();
// Initialize request argument(s)
gmfdv::Task task = new gmfdv::Task();
FieldMask updateMask = new FieldMask();
// Make the request
gmfdv::Task response = deliveryServiceClient.UpdateTask(task, updateMask);
UpdateTask(UpdateTaskRequest, CallSettings)
Updates Task
data.
Declaration
public virtual Task UpdateTask(UpdateTaskRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
UpdateTaskRequest | request | The request object containing all of the parameters for the API call. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task | The RPC response. |
Sample code
// Create client
gmfdv::DeliveryServiceClient deliveryServiceClient = gmfdv::DeliveryServiceClient.Create();
// Initialize request argument(s)
gmfdv::UpdateTaskRequest request = new gmfdv::UpdateTaskRequest
{
Header = new gmfdv::DeliveryRequestHeader(),
Task = new gmfdv::Task(),
UpdateMask = new FieldMask(),
};
// Make the request
gmfdv::Task response = deliveryServiceClient.UpdateTask(request);
UpdateTaskAsync(Task, FieldMask, CallSettings)
Updates Task
data.
Declaration
public virtual Task<Task> UpdateTaskAsync(Task task, FieldMask updateMask, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
Task | task | Required. The Task associated with the update.
The following fields are maintained by Fleet Engine. Do not update
them using
Note: You cannot change the value of If the Task has been assigned to a delivery vehicle, then don't set the
Task state to CLOSED using |
FieldMask | updateMask | Required. The field mask that indicates which Task fields to update.
Note: The This is a comma-separated list of fully qualified names of fields. Example:
|
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<Task> | A Task containing the RPC response. |
Sample code
// Create client
gmfdv::DeliveryServiceClient deliveryServiceClient = await gmfdv::DeliveryServiceClient.CreateAsync();
// Initialize request argument(s)
gmfdv::Task task = new gmfdv::Task();
FieldMask updateMask = new FieldMask();
// Make the request
gmfdv::Task response = await deliveryServiceClient.UpdateTaskAsync(task, updateMask);
UpdateTaskAsync(Task, FieldMask, CancellationToken)
Updates Task
data.
Declaration
public virtual Task<Task> UpdateTaskAsync(Task task, FieldMask updateMask, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
Task | task | Required. The Task associated with the update.
The following fields are maintained by Fleet Engine. Do not update
them using
Note: You cannot change the value of If the Task has been assigned to a delivery vehicle, then don't set the
Task state to CLOSED using |
FieldMask | updateMask | Required. The field mask that indicates which Task fields to update.
Note: The This is a comma-separated list of fully qualified names of fields. Example:
|
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<Task> | A Task containing the RPC response. |
Sample code
// Create client
gmfdv::DeliveryServiceClient deliveryServiceClient = await gmfdv::DeliveryServiceClient.CreateAsync();
// Initialize request argument(s)
gmfdv::Task task = new gmfdv::Task();
FieldMask updateMask = new FieldMask();
// Make the request
gmfdv::Task response = await deliveryServiceClient.UpdateTaskAsync(task, updateMask);
UpdateTaskAsync(UpdateTaskRequest, CallSettings)
Updates Task
data.
Declaration
public virtual Task<Task> UpdateTaskAsync(UpdateTaskRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
UpdateTaskRequest | request | The request object containing all of the parameters for the API call. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<Task> | A Task containing the RPC response. |
Sample code
// Create client
gmfdv::DeliveryServiceClient deliveryServiceClient = await gmfdv::DeliveryServiceClient.CreateAsync();
// Initialize request argument(s)
gmfdv::UpdateTaskRequest request = new gmfdv::UpdateTaskRequest
{
Header = new gmfdv::DeliveryRequestHeader(),
Task = new gmfdv::Task(),
UpdateMask = new FieldMask(),
};
// Make the request
gmfdv::Task response = await deliveryServiceClient.UpdateTaskAsync(request);
UpdateTaskAsync(UpdateTaskRequest, CancellationToken)
Updates Task
data.
Declaration
public virtual Task<Task> UpdateTaskAsync(UpdateTaskRequest request, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
UpdateTaskRequest | request | The request object containing all of the parameters for the API call. |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<Task> | A Task containing the RPC response. |
Sample code
// Create client
gmfdv::DeliveryServiceClient deliveryServiceClient = await gmfdv::DeliveryServiceClient.CreateAsync();
// Initialize request argument(s)
gmfdv::UpdateTaskRequest request = new gmfdv::UpdateTaskRequest
{
Header = new gmfdv::DeliveryRequestHeader(),
Task = new gmfdv::Task(),
UpdateMask = new FieldMask(),
};
// Make the request
gmfdv::Task response = await deliveryServiceClient.UpdateTaskAsync(request);