Show / Hide Table of Contents

Class DataPointsServiceClient

DataPointsService client wrapper, for convenient use.

Inheritance
object
DataPointsServiceClient
DataPointsServiceClientImpl
Inherited Members
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ToString()
Namespace: Google.DevicesAndServices.Health.V4
Assembly: Google.DevicesAndServices.Health.V4.dll
Syntax
public abstract class DataPointsServiceClient
Remarks

Data Points Service exposing the user's health and fitness measured and derived data.

Properties

BatchDeleteDataPointsOperationsClient

The long-running operations client for BatchDeleteDataPoints.

Declaration
public virtual OperationsClient BatchDeleteDataPointsOperationsClient { get; }
Property Value
Type Description
OperationsClient

CreateDataPointOperationsClient

The long-running operations client for CreateDataPoint.

Declaration
public virtual OperationsClient CreateDataPointOperationsClient { get; }
Property Value
Type Description
OperationsClient

DefaultEndpoint

The default endpoint for the DataPointsService service, which is a host of "health.googleapis.com" and a port of 443.

Declaration
public static string DefaultEndpoint { get; }
Property Value
Type Description
string

DefaultScopes

The default DataPointsService scopes.

Declaration
public static IReadOnlyList<string> DefaultScopes { get; }
Property Value
Type Description
IReadOnlyList<string>
Remarks

The default DataPointsService scopes are:

  • https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly
  • https://www.googleapis.com/auth/googlehealth.health_metrics_and_measurements.readonly
  • https://www.googleapis.com/auth/googlehealth.location.readonly
  • https://www.googleapis.com/auth/googlehealth.sleep.readonly

GrpcClient

The underlying gRPC DataPointsService client

Declaration
public virtual DataPointsService.DataPointsServiceClient GrpcClient { get; }
Property Value
Type Description
DataPointsService.DataPointsServiceClient

ServiceMetadata

The service metadata associated with this client type.

Declaration
public static ServiceMetadata ServiceMetadata { get; }
Property Value
Type Description
ServiceMetadata

UpdateDataPointOperationsClient

The long-running operations client for UpdateDataPoint.

Declaration
public virtual OperationsClient UpdateDataPointOperationsClient { get; }
Property Value
Type Description
OperationsClient

Methods

BatchDeleteDataPoints(BatchDeleteDataPointsRequest, CallSettings)

Delete a batch of identifyable data points.

Declaration
public virtual Operation<BatchDeleteDataPointsResponse, BatchDeleteDataPointsOperationMetadata> BatchDeleteDataPoints(BatchDeleteDataPointsRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
BatchDeleteDataPointsRequest 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
Operation<BatchDeleteDataPointsResponse, BatchDeleteDataPointsOperationMetadata>

The RPC response.

Sample code
// Create client
DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.Create();
// Initialize request argument(s)
BatchDeleteDataPointsRequest request = new BatchDeleteDataPointsRequest
{
    ParentAsDataTypeName = DataTypeName.FromUserDataType("[USER]", "[DATA_TYPE]"),
    DataPointNames =
    {
        DataPointName.FromUserDataTypeDataPoint("[USER]", "[DATA_TYPE]", "[DATA_POINT]"),
    },
};
// Make the request
Operation<BatchDeleteDataPointsResponse, BatchDeleteDataPointsOperationMetadata> response = dataPointsServiceClient.BatchDeleteDataPoints(request);

// Poll until the returned long-running operation is complete
Operation<BatchDeleteDataPointsResponse, BatchDeleteDataPointsOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
BatchDeleteDataPointsResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<BatchDeleteDataPointsResponse, BatchDeleteDataPointsOperationMetadata> retrievedResponse = dataPointsServiceClient.PollOnceBatchDeleteDataPoints(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    BatchDeleteDataPointsResponse retrievedResult = retrievedResponse.Result;
}

BatchDeleteDataPointsAsync(BatchDeleteDataPointsRequest, CallSettings)

Delete a batch of identifyable data points.

Declaration
public virtual Task<Operation<BatchDeleteDataPointsResponse, BatchDeleteDataPointsOperationMetadata>> BatchDeleteDataPointsAsync(BatchDeleteDataPointsRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
BatchDeleteDataPointsRequest 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<Operation<BatchDeleteDataPointsResponse, BatchDeleteDataPointsOperationMetadata>>

A Task containing the RPC response.

Sample code
// Create client
DataPointsServiceClient dataPointsServiceClient = await DataPointsServiceClient.CreateAsync();
// Initialize request argument(s)
BatchDeleteDataPointsRequest request = new BatchDeleteDataPointsRequest
{
    ParentAsDataTypeName = DataTypeName.FromUserDataType("[USER]", "[DATA_TYPE]"),
    DataPointNames =
    {
        DataPointName.FromUserDataTypeDataPoint("[USER]", "[DATA_TYPE]", "[DATA_POINT]"),
    },
};
// Make the request
Operation<BatchDeleteDataPointsResponse, BatchDeleteDataPointsOperationMetadata> response = await dataPointsServiceClient.BatchDeleteDataPointsAsync(request);

// Poll until the returned long-running operation is complete
Operation<BatchDeleteDataPointsResponse, BatchDeleteDataPointsOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
BatchDeleteDataPointsResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<BatchDeleteDataPointsResponse, BatchDeleteDataPointsOperationMetadata> retrievedResponse = await dataPointsServiceClient.PollOnceBatchDeleteDataPointsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    BatchDeleteDataPointsResponse retrievedResult = retrievedResponse.Result;
}

BatchDeleteDataPointsAsync(BatchDeleteDataPointsRequest, CancellationToken)

Delete a batch of identifyable data points.

Declaration
public virtual Task<Operation<BatchDeleteDataPointsResponse, BatchDeleteDataPointsOperationMetadata>> BatchDeleteDataPointsAsync(BatchDeleteDataPointsRequest request, CancellationToken cancellationToken)
Parameters
Type Name Description
BatchDeleteDataPointsRequest 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<Operation<BatchDeleteDataPointsResponse, BatchDeleteDataPointsOperationMetadata>>

A Task containing the RPC response.

Sample code
// Create client
DataPointsServiceClient dataPointsServiceClient = await DataPointsServiceClient.CreateAsync();
// Initialize request argument(s)
BatchDeleteDataPointsRequest request = new BatchDeleteDataPointsRequest
{
    ParentAsDataTypeName = DataTypeName.FromUserDataType("[USER]", "[DATA_TYPE]"),
    DataPointNames =
    {
        DataPointName.FromUserDataTypeDataPoint("[USER]", "[DATA_TYPE]", "[DATA_POINT]"),
    },
};
// Make the request
Operation<BatchDeleteDataPointsResponse, BatchDeleteDataPointsOperationMetadata> response = await dataPointsServiceClient.BatchDeleteDataPointsAsync(request);

// Poll until the returned long-running operation is complete
Operation<BatchDeleteDataPointsResponse, BatchDeleteDataPointsOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
BatchDeleteDataPointsResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<BatchDeleteDataPointsResponse, BatchDeleteDataPointsOperationMetadata> retrievedResponse = await dataPointsServiceClient.PollOnceBatchDeleteDataPointsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    BatchDeleteDataPointsResponse retrievedResult = retrievedResponse.Result;
}

Create()

Synchronously creates a DataPointsServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use DataPointsServiceClientBuilder.

Declaration
public static DataPointsServiceClient Create()
Returns
Type Description
DataPointsServiceClient

The created DataPointsServiceClient.

CreateAsync(CancellationToken)

Asynchronously creates a DataPointsServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use DataPointsServiceClientBuilder.

Declaration
public static Task<DataPointsServiceClient> CreateAsync(CancellationToken cancellationToken = default)
Parameters
Type Name Description
CancellationToken cancellationToken

The CancellationToken to use while creating the client.

Returns
Type Description
Task<DataPointsServiceClient>

The task representing the created DataPointsServiceClient.

CreateDataPoint(CreateDataPointRequest, CallSettings)

Creates a single identifiable data point.

Declaration
public virtual Operation<DataPoint, CreateDataPointOperationMetadata> CreateDataPoint(CreateDataPointRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
CreateDataPointRequest 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
Operation<DataPoint, CreateDataPointOperationMetadata>

The RPC response.

Sample code
// Create client
DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.Create();
// Initialize request argument(s)
CreateDataPointRequest request = new CreateDataPointRequest
{
    ParentAsDataTypeName = DataTypeName.FromUserDataType("[USER]", "[DATA_TYPE]"),
    DataPoint = new DataPoint(),
};
// Make the request
Operation<DataPoint, CreateDataPointOperationMetadata> response = dataPointsServiceClient.CreateDataPoint(request);

// Poll until the returned long-running operation is complete
Operation<DataPoint, CreateDataPointOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
DataPoint result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<DataPoint, CreateDataPointOperationMetadata> retrievedResponse = dataPointsServiceClient.PollOnceCreateDataPoint(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    DataPoint retrievedResult = retrievedResponse.Result;
}

CreateDataPoint(DataTypeName, DataPoint, CallSettings)

Creates a single identifiable data point.

Declaration
public virtual Operation<DataPoint, CreateDataPointOperationMetadata> CreateDataPoint(DataTypeName parent, DataPoint dataPoint, CallSettings callSettings = null)
Parameters
Type Name Description
DataTypeName parent

Required. The parent resource name where the data point will be created. Format: users/{user}/dataTypes/{data_type}

DataPoint dataPoint

Required. The data point to create.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Operation<DataPoint, CreateDataPointOperationMetadata>

The RPC response.

Sample code
// Create client
DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.Create();
// Initialize request argument(s)
DataTypeName parent = DataTypeName.FromUserDataType("[USER]", "[DATA_TYPE]");
DataPoint dataPoint = new DataPoint();
// Make the request
Operation<DataPoint, CreateDataPointOperationMetadata> response = dataPointsServiceClient.CreateDataPoint(parent, dataPoint);

// Poll until the returned long-running operation is complete
Operation<DataPoint, CreateDataPointOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
DataPoint result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<DataPoint, CreateDataPointOperationMetadata> retrievedResponse = dataPointsServiceClient.PollOnceCreateDataPoint(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    DataPoint retrievedResult = retrievedResponse.Result;
}

CreateDataPoint(string, DataPoint, CallSettings)

Creates a single identifiable data point.

Declaration
public virtual Operation<DataPoint, CreateDataPointOperationMetadata> CreateDataPoint(string parent, DataPoint dataPoint, CallSettings callSettings = null)
Parameters
Type Name Description
string parent

Required. The parent resource name where the data point will be created. Format: users/{user}/dataTypes/{data_type}

DataPoint dataPoint

Required. The data point to create.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Operation<DataPoint, CreateDataPointOperationMetadata>

The RPC response.

Sample code
// Create client
DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.Create();
// Initialize request argument(s)
string parent = "users/[USER]/dataTypes/[DATA_TYPE]";
DataPoint dataPoint = new DataPoint();
// Make the request
Operation<DataPoint, CreateDataPointOperationMetadata> response = dataPointsServiceClient.CreateDataPoint(parent, dataPoint);

// Poll until the returned long-running operation is complete
Operation<DataPoint, CreateDataPointOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
DataPoint result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<DataPoint, CreateDataPointOperationMetadata> retrievedResponse = dataPointsServiceClient.PollOnceCreateDataPoint(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    DataPoint retrievedResult = retrievedResponse.Result;
}

CreateDataPointAsync(CreateDataPointRequest, CallSettings)

Creates a single identifiable data point.

Declaration
public virtual Task<Operation<DataPoint, CreateDataPointOperationMetadata>> CreateDataPointAsync(CreateDataPointRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
CreateDataPointRequest 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<Operation<DataPoint, CreateDataPointOperationMetadata>>

A Task containing the RPC response.

Sample code
// Create client
DataPointsServiceClient dataPointsServiceClient = await DataPointsServiceClient.CreateAsync();
// Initialize request argument(s)
CreateDataPointRequest request = new CreateDataPointRequest
{
    ParentAsDataTypeName = DataTypeName.FromUserDataType("[USER]", "[DATA_TYPE]"),
    DataPoint = new DataPoint(),
};
// Make the request
Operation<DataPoint, CreateDataPointOperationMetadata> response = await dataPointsServiceClient.CreateDataPointAsync(request);

// Poll until the returned long-running operation is complete
Operation<DataPoint, CreateDataPointOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
DataPoint result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<DataPoint, CreateDataPointOperationMetadata> retrievedResponse = await dataPointsServiceClient.PollOnceCreateDataPointAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    DataPoint retrievedResult = retrievedResponse.Result;
}

CreateDataPointAsync(CreateDataPointRequest, CancellationToken)

Creates a single identifiable data point.

Declaration
public virtual Task<Operation<DataPoint, CreateDataPointOperationMetadata>> CreateDataPointAsync(CreateDataPointRequest request, CancellationToken cancellationToken)
Parameters
Type Name Description
CreateDataPointRequest 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<Operation<DataPoint, CreateDataPointOperationMetadata>>

A Task containing the RPC response.

Sample code
// Create client
DataPointsServiceClient dataPointsServiceClient = await DataPointsServiceClient.CreateAsync();
// Initialize request argument(s)
CreateDataPointRequest request = new CreateDataPointRequest
{
    ParentAsDataTypeName = DataTypeName.FromUserDataType("[USER]", "[DATA_TYPE]"),
    DataPoint = new DataPoint(),
};
// Make the request
Operation<DataPoint, CreateDataPointOperationMetadata> response = await dataPointsServiceClient.CreateDataPointAsync(request);

// Poll until the returned long-running operation is complete
Operation<DataPoint, CreateDataPointOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
DataPoint result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<DataPoint, CreateDataPointOperationMetadata> retrievedResponse = await dataPointsServiceClient.PollOnceCreateDataPointAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    DataPoint retrievedResult = retrievedResponse.Result;
}

CreateDataPointAsync(DataTypeName, DataPoint, CallSettings)

Creates a single identifiable data point.

Declaration
public virtual Task<Operation<DataPoint, CreateDataPointOperationMetadata>> CreateDataPointAsync(DataTypeName parent, DataPoint dataPoint, CallSettings callSettings = null)
Parameters
Type Name Description
DataTypeName parent

Required. The parent resource name where the data point will be created. Format: users/{user}/dataTypes/{data_type}

DataPoint dataPoint

Required. The data point to create.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<Operation<DataPoint, CreateDataPointOperationMetadata>>

A Task containing the RPC response.

Sample code
// Create client
DataPointsServiceClient dataPointsServiceClient = await DataPointsServiceClient.CreateAsync();
// Initialize request argument(s)
DataTypeName parent = DataTypeName.FromUserDataType("[USER]", "[DATA_TYPE]");
DataPoint dataPoint = new DataPoint();
// Make the request
Operation<DataPoint, CreateDataPointOperationMetadata> response = await dataPointsServiceClient.CreateDataPointAsync(parent, dataPoint);

// Poll until the returned long-running operation is complete
Operation<DataPoint, CreateDataPointOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
DataPoint result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<DataPoint, CreateDataPointOperationMetadata> retrievedResponse = await dataPointsServiceClient.PollOnceCreateDataPointAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    DataPoint retrievedResult = retrievedResponse.Result;
}

CreateDataPointAsync(DataTypeName, DataPoint, CancellationToken)

Creates a single identifiable data point.

Declaration
public virtual Task<Operation<DataPoint, CreateDataPointOperationMetadata>> CreateDataPointAsync(DataTypeName parent, DataPoint dataPoint, CancellationToken cancellationToken)
Parameters
Type Name Description
DataTypeName parent

Required. The parent resource name where the data point will be created. Format: users/{user}/dataTypes/{data_type}

DataPoint dataPoint

Required. The data point to create.

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<Operation<DataPoint, CreateDataPointOperationMetadata>>

A Task containing the RPC response.

Sample code
// Create client
DataPointsServiceClient dataPointsServiceClient = await DataPointsServiceClient.CreateAsync();
// Initialize request argument(s)
DataTypeName parent = DataTypeName.FromUserDataType("[USER]", "[DATA_TYPE]");
DataPoint dataPoint = new DataPoint();
// Make the request
Operation<DataPoint, CreateDataPointOperationMetadata> response = await dataPointsServiceClient.CreateDataPointAsync(parent, dataPoint);

// Poll until the returned long-running operation is complete
Operation<DataPoint, CreateDataPointOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
DataPoint result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<DataPoint, CreateDataPointOperationMetadata> retrievedResponse = await dataPointsServiceClient.PollOnceCreateDataPointAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    DataPoint retrievedResult = retrievedResponse.Result;
}

CreateDataPointAsync(string, DataPoint, CallSettings)

Creates a single identifiable data point.

Declaration
public virtual Task<Operation<DataPoint, CreateDataPointOperationMetadata>> CreateDataPointAsync(string parent, DataPoint dataPoint, CallSettings callSettings = null)
Parameters
Type Name Description
string parent

Required. The parent resource name where the data point will be created. Format: users/{user}/dataTypes/{data_type}

DataPoint dataPoint

Required. The data point to create.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<Operation<DataPoint, CreateDataPointOperationMetadata>>

A Task containing the RPC response.

Sample code
// Create client
DataPointsServiceClient dataPointsServiceClient = await DataPointsServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "users/[USER]/dataTypes/[DATA_TYPE]";
DataPoint dataPoint = new DataPoint();
// Make the request
Operation<DataPoint, CreateDataPointOperationMetadata> response = await dataPointsServiceClient.CreateDataPointAsync(parent, dataPoint);

// Poll until the returned long-running operation is complete
Operation<DataPoint, CreateDataPointOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
DataPoint result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<DataPoint, CreateDataPointOperationMetadata> retrievedResponse = await dataPointsServiceClient.PollOnceCreateDataPointAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    DataPoint retrievedResult = retrievedResponse.Result;
}

CreateDataPointAsync(string, DataPoint, CancellationToken)

Creates a single identifiable data point.

Declaration
public virtual Task<Operation<DataPoint, CreateDataPointOperationMetadata>> CreateDataPointAsync(string parent, DataPoint dataPoint, CancellationToken cancellationToken)
Parameters
Type Name Description
string parent

Required. The parent resource name where the data point will be created. Format: users/{user}/dataTypes/{data_type}

DataPoint dataPoint

Required. The data point to create.

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<Operation<DataPoint, CreateDataPointOperationMetadata>>

A Task containing the RPC response.

Sample code
// Create client
DataPointsServiceClient dataPointsServiceClient = await DataPointsServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "users/[USER]/dataTypes/[DATA_TYPE]";
DataPoint dataPoint = new DataPoint();
// Make the request
Operation<DataPoint, CreateDataPointOperationMetadata> response = await dataPointsServiceClient.CreateDataPointAsync(parent, dataPoint);

// Poll until the returned long-running operation is complete
Operation<DataPoint, CreateDataPointOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
DataPoint result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<DataPoint, CreateDataPointOperationMetadata> retrievedResponse = await dataPointsServiceClient.PollOnceCreateDataPointAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    DataPoint retrievedResult = retrievedResponse.Result;
}

DailyRollUpDataPoints(DailyRollUpDataPointsRequest, CallSettings)

Roll up data points over civil time intervals for supported data types.

Declaration
public virtual DailyRollUpDataPointsResponse DailyRollUpDataPoints(DailyRollUpDataPointsRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
DailyRollUpDataPointsRequest 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
DailyRollUpDataPointsResponse

The RPC response.

Sample code
// Create client
DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.Create();
// Initialize request argument(s)
DailyRollUpDataPointsRequest request = new DailyRollUpDataPointsRequest
{
    ParentAsDataTypeName = DataTypeName.FromUserDataType("[USER]", "[DATA_TYPE]"),
    Range = new CivilTimeInterval(),
    WindowSizeDays = 0,
    PageSize = 0,
    PageToken = "",
    DataSourceFamily = "",
};
// Make the request
DailyRollUpDataPointsResponse response = dataPointsServiceClient.DailyRollUpDataPoints(request);

DailyRollUpDataPointsAsync(DailyRollUpDataPointsRequest, CallSettings)

Roll up data points over civil time intervals for supported data types.

Declaration
public virtual Task<DailyRollUpDataPointsResponse> DailyRollUpDataPointsAsync(DailyRollUpDataPointsRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
DailyRollUpDataPointsRequest 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<DailyRollUpDataPointsResponse>

A Task containing the RPC response.

Sample code
// Create client
DataPointsServiceClient dataPointsServiceClient = await DataPointsServiceClient.CreateAsync();
// Initialize request argument(s)
DailyRollUpDataPointsRequest request = new DailyRollUpDataPointsRequest
{
    ParentAsDataTypeName = DataTypeName.FromUserDataType("[USER]", "[DATA_TYPE]"),
    Range = new CivilTimeInterval(),
    WindowSizeDays = 0,
    PageSize = 0,
    PageToken = "",
    DataSourceFamily = "",
};
// Make the request
DailyRollUpDataPointsResponse response = await dataPointsServiceClient.DailyRollUpDataPointsAsync(request);

DailyRollUpDataPointsAsync(DailyRollUpDataPointsRequest, CancellationToken)

Roll up data points over civil time intervals for supported data types.

Declaration
public virtual Task<DailyRollUpDataPointsResponse> DailyRollUpDataPointsAsync(DailyRollUpDataPointsRequest request, CancellationToken cancellationToken)
Parameters
Type Name Description
DailyRollUpDataPointsRequest 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<DailyRollUpDataPointsResponse>

A Task containing the RPC response.

Sample code
// Create client
DataPointsServiceClient dataPointsServiceClient = await DataPointsServiceClient.CreateAsync();
// Initialize request argument(s)
DailyRollUpDataPointsRequest request = new DailyRollUpDataPointsRequest
{
    ParentAsDataTypeName = DataTypeName.FromUserDataType("[USER]", "[DATA_TYPE]"),
    Range = new CivilTimeInterval(),
    WindowSizeDays = 0,
    PageSize = 0,
    PageToken = "",
    DataSourceFamily = "",
};
// Make the request
DailyRollUpDataPointsResponse response = await dataPointsServiceClient.DailyRollUpDataPointsAsync(request);

ExportExerciseTcx(DataPointName, CallSettings)

Exports exercise data in TCX format.

Note: While the Authorization section below states that any one of the listed scopes is accepted, this specific method requires the user to provide both one of the activity_and_fitness scopes (normal or readonly) AND one of the location scopes (normal or readonly) in their access token to succeed.

Declaration
public virtual ExportExerciseTcxResponse ExportExerciseTcx(DataPointName name, CallSettings callSettings = null)
Parameters
Type Name Description
DataPointName name

Required. The resource name of the exercise data point to export.

Format: users/{user}/dataTypes/exercise/dataPoints/{data_point} Example: users/me/dataTypes/exercise/dataPoints/2026443605080188808

The {user} is the alias "me" currently. Future versions may support user IDs. The {data_point} ID maps to the exercise ID, which is a long integer.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
ExportExerciseTcxResponse

The RPC response.

Sample code
// Create client
DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.Create();
// Initialize request argument(s)
DataPointName name = DataPointName.FromUserDataTypeDataPoint("[USER]", "[DATA_TYPE]", "[DATA_POINT]");
// Make the request
ExportExerciseTcxResponse response = dataPointsServiceClient.ExportExerciseTcx(name);

ExportExerciseTcx(ExportExerciseTcxRequest, CallSettings)

Exports exercise data in TCX format.

Note: While the Authorization section below states that any one of the listed scopes is accepted, this specific method requires the user to provide both one of the activity_and_fitness scopes (normal or readonly) AND one of the location scopes (normal or readonly) in their access token to succeed.

Declaration
public virtual ExportExerciseTcxResponse ExportExerciseTcx(ExportExerciseTcxRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
ExportExerciseTcxRequest 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
ExportExerciseTcxResponse

The RPC response.

Sample code
// Create client
DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.Create();
// Initialize request argument(s)
ExportExerciseTcxRequest request = new ExportExerciseTcxRequest
{
    DataPointName = DataPointName.FromUserDataTypeDataPoint("[USER]", "[DATA_TYPE]", "[DATA_POINT]"),
    PartialData = false,
};
// Make the request
ExportExerciseTcxResponse response = dataPointsServiceClient.ExportExerciseTcx(request);

ExportExerciseTcx(string, CallSettings)

Exports exercise data in TCX format.

Note: While the Authorization section below states that any one of the listed scopes is accepted, this specific method requires the user to provide both one of the activity_and_fitness scopes (normal or readonly) AND one of the location scopes (normal or readonly) in their access token to succeed.

Declaration
public virtual ExportExerciseTcxResponse ExportExerciseTcx(string name, CallSettings callSettings = null)
Parameters
Type Name Description
string name

Required. The resource name of the exercise data point to export.

Format: users/{user}/dataTypes/exercise/dataPoints/{data_point} Example: users/me/dataTypes/exercise/dataPoints/2026443605080188808

The {user} is the alias "me" currently. Future versions may support user IDs. The {data_point} ID maps to the exercise ID, which is a long integer.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
ExportExerciseTcxResponse

The RPC response.

Sample code
// Create client
DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.Create();
// Initialize request argument(s)
string name = "users/[USER]/dataTypes/[DATA_TYPE]/dataPoints/[DATA_POINT]";
// Make the request
ExportExerciseTcxResponse response = dataPointsServiceClient.ExportExerciseTcx(name);

ExportExerciseTcxAsync(DataPointName, CallSettings)

Exports exercise data in TCX format.

Note: While the Authorization section below states that any one of the listed scopes is accepted, this specific method requires the user to provide both one of the activity_and_fitness scopes (normal or readonly) AND one of the location scopes (normal or readonly) in their access token to succeed.

Declaration
public virtual Task<ExportExerciseTcxResponse> ExportExerciseTcxAsync(DataPointName name, CallSettings callSettings = null)
Parameters
Type Name Description
DataPointName name

Required. The resource name of the exercise data point to export.

Format: users/{user}/dataTypes/exercise/dataPoints/{data_point} Example: users/me/dataTypes/exercise/dataPoints/2026443605080188808

The {user} is the alias "me" currently. Future versions may support user IDs. The {data_point} ID maps to the exercise ID, which is a long integer.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<ExportExerciseTcxResponse>

A Task containing the RPC response.

Sample code
// Create client
DataPointsServiceClient dataPointsServiceClient = await DataPointsServiceClient.CreateAsync();
// Initialize request argument(s)
DataPointName name = DataPointName.FromUserDataTypeDataPoint("[USER]", "[DATA_TYPE]", "[DATA_POINT]");
// Make the request
ExportExerciseTcxResponse response = await dataPointsServiceClient.ExportExerciseTcxAsync(name);

ExportExerciseTcxAsync(DataPointName, CancellationToken)

Exports exercise data in TCX format.

Note: While the Authorization section below states that any one of the listed scopes is accepted, this specific method requires the user to provide both one of the activity_and_fitness scopes (normal or readonly) AND one of the location scopes (normal or readonly) in their access token to succeed.

Declaration
public virtual Task<ExportExerciseTcxResponse> ExportExerciseTcxAsync(DataPointName name, CancellationToken cancellationToken)
Parameters
Type Name Description
DataPointName name

Required. The resource name of the exercise data point to export.

Format: users/{user}/dataTypes/exercise/dataPoints/{data_point} Example: users/me/dataTypes/exercise/dataPoints/2026443605080188808

The {user} is the alias "me" currently. Future versions may support user IDs. The {data_point} ID maps to the exercise ID, which is a long integer.

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<ExportExerciseTcxResponse>

A Task containing the RPC response.

Sample code
// Create client
DataPointsServiceClient dataPointsServiceClient = await DataPointsServiceClient.CreateAsync();
// Initialize request argument(s)
DataPointName name = DataPointName.FromUserDataTypeDataPoint("[USER]", "[DATA_TYPE]", "[DATA_POINT]");
// Make the request
ExportExerciseTcxResponse response = await dataPointsServiceClient.ExportExerciseTcxAsync(name);

ExportExerciseTcxAsync(ExportExerciseTcxRequest, CallSettings)

Exports exercise data in TCX format.

Note: While the Authorization section below states that any one of the listed scopes is accepted, this specific method requires the user to provide both one of the activity_and_fitness scopes (normal or readonly) AND one of the location scopes (normal or readonly) in their access token to succeed.

Declaration
public virtual Task<ExportExerciseTcxResponse> ExportExerciseTcxAsync(ExportExerciseTcxRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
ExportExerciseTcxRequest 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<ExportExerciseTcxResponse>

A Task containing the RPC response.

Sample code
// Create client
DataPointsServiceClient dataPointsServiceClient = await DataPointsServiceClient.CreateAsync();
// Initialize request argument(s)
ExportExerciseTcxRequest request = new ExportExerciseTcxRequest
{
    DataPointName = DataPointName.FromUserDataTypeDataPoint("[USER]", "[DATA_TYPE]", "[DATA_POINT]"),
    PartialData = false,
};
// Make the request
ExportExerciseTcxResponse response = await dataPointsServiceClient.ExportExerciseTcxAsync(request);

ExportExerciseTcxAsync(ExportExerciseTcxRequest, CancellationToken)

Exports exercise data in TCX format.

Note: While the Authorization section below states that any one of the listed scopes is accepted, this specific method requires the user to provide both one of the activity_and_fitness scopes (normal or readonly) AND one of the location scopes (normal or readonly) in their access token to succeed.

Declaration
public virtual Task<ExportExerciseTcxResponse> ExportExerciseTcxAsync(ExportExerciseTcxRequest request, CancellationToken cancellationToken)
Parameters
Type Name Description
ExportExerciseTcxRequest 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<ExportExerciseTcxResponse>

A Task containing the RPC response.

Sample code
// Create client
DataPointsServiceClient dataPointsServiceClient = await DataPointsServiceClient.CreateAsync();
// Initialize request argument(s)
ExportExerciseTcxRequest request = new ExportExerciseTcxRequest
{
    DataPointName = DataPointName.FromUserDataTypeDataPoint("[USER]", "[DATA_TYPE]", "[DATA_POINT]"),
    PartialData = false,
};
// Make the request
ExportExerciseTcxResponse response = await dataPointsServiceClient.ExportExerciseTcxAsync(request);

ExportExerciseTcxAsync(string, CallSettings)

Exports exercise data in TCX format.

Note: While the Authorization section below states that any one of the listed scopes is accepted, this specific method requires the user to provide both one of the activity_and_fitness scopes (normal or readonly) AND one of the location scopes (normal or readonly) in their access token to succeed.

Declaration
public virtual Task<ExportExerciseTcxResponse> ExportExerciseTcxAsync(string name, CallSettings callSettings = null)
Parameters
Type Name Description
string name

Required. The resource name of the exercise data point to export.

Format: users/{user}/dataTypes/exercise/dataPoints/{data_point} Example: users/me/dataTypes/exercise/dataPoints/2026443605080188808

The {user} is the alias "me" currently. Future versions may support user IDs. The {data_point} ID maps to the exercise ID, which is a long integer.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<ExportExerciseTcxResponse>

A Task containing the RPC response.

Sample code
// Create client
DataPointsServiceClient dataPointsServiceClient = await DataPointsServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "users/[USER]/dataTypes/[DATA_TYPE]/dataPoints/[DATA_POINT]";
// Make the request
ExportExerciseTcxResponse response = await dataPointsServiceClient.ExportExerciseTcxAsync(name);

ExportExerciseTcxAsync(string, CancellationToken)

Exports exercise data in TCX format.

Note: While the Authorization section below states that any one of the listed scopes is accepted, this specific method requires the user to provide both one of the activity_and_fitness scopes (normal or readonly) AND one of the location scopes (normal or readonly) in their access token to succeed.

Declaration
public virtual Task<ExportExerciseTcxResponse> ExportExerciseTcxAsync(string name, CancellationToken cancellationToken)
Parameters
Type Name Description
string name

Required. The resource name of the exercise data point to export.

Format: users/{user}/dataTypes/exercise/dataPoints/{data_point} Example: users/me/dataTypes/exercise/dataPoints/2026443605080188808

The {user} is the alias "me" currently. Future versions may support user IDs. The {data_point} ID maps to the exercise ID, which is a long integer.

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<ExportExerciseTcxResponse>

A Task containing the RPC response.

Sample code
// Create client
DataPointsServiceClient dataPointsServiceClient = await DataPointsServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "users/[USER]/dataTypes/[DATA_TYPE]/dataPoints/[DATA_POINT]";
// Make the request
ExportExerciseTcxResponse response = await dataPointsServiceClient.ExportExerciseTcxAsync(name);

GetDataPoint(DataPointName, CallSettings)

Get a single identifyable data point.

Declaration
public virtual DataPoint GetDataPoint(DataPointName name, CallSettings callSettings = null)
Parameters
Type Name Description
DataPointName name

Required. The name of the data point to retrieve.

Format: users/{user}/dataTypes/{data_type}/dataPoints/{data_point}

See [DataPoint.name][google.devicesandservices.health.v4.DataPoint.name] for examples and possible values.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
DataPoint

The RPC response.

Sample code
// Create client
DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.Create();
// Initialize request argument(s)
DataPointName name = DataPointName.FromUserDataTypeDataPoint("[USER]", "[DATA_TYPE]", "[DATA_POINT]");
// Make the request
DataPoint response = dataPointsServiceClient.GetDataPoint(name);

GetDataPoint(GetDataPointRequest, CallSettings)

Get a single identifyable data point.

Declaration
public virtual DataPoint GetDataPoint(GetDataPointRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
GetDataPointRequest 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
DataPoint

The RPC response.

Sample code
// Create client
DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.Create();
// Initialize request argument(s)
GetDataPointRequest request = new GetDataPointRequest
{
    DataPointName = DataPointName.FromUserDataTypeDataPoint("[USER]", "[DATA_TYPE]", "[DATA_POINT]"),
};
// Make the request
DataPoint response = dataPointsServiceClient.GetDataPoint(request);

GetDataPoint(string, CallSettings)

Get a single identifyable data point.

Declaration
public virtual DataPoint GetDataPoint(string name, CallSettings callSettings = null)
Parameters
Type Name Description
string name

Required. The name of the data point to retrieve.

Format: users/{user}/dataTypes/{data_type}/dataPoints/{data_point}

See [DataPoint.name][google.devicesandservices.health.v4.DataPoint.name] for examples and possible values.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
DataPoint

The RPC response.

Sample code
// Create client
DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.Create();
// Initialize request argument(s)
string name = "users/[USER]/dataTypes/[DATA_TYPE]/dataPoints/[DATA_POINT]";
// Make the request
DataPoint response = dataPointsServiceClient.GetDataPoint(name);

GetDataPointAsync(DataPointName, CallSettings)

Get a single identifyable data point.

Declaration
public virtual Task<DataPoint> GetDataPointAsync(DataPointName name, CallSettings callSettings = null)
Parameters
Type Name Description
DataPointName name

Required. The name of the data point to retrieve.

Format: users/{user}/dataTypes/{data_type}/dataPoints/{data_point}

See [DataPoint.name][google.devicesandservices.health.v4.DataPoint.name] for examples and possible values.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<DataPoint>

A Task containing the RPC response.

Sample code
// Create client
DataPointsServiceClient dataPointsServiceClient = await DataPointsServiceClient.CreateAsync();
// Initialize request argument(s)
DataPointName name = DataPointName.FromUserDataTypeDataPoint("[USER]", "[DATA_TYPE]", "[DATA_POINT]");
// Make the request
DataPoint response = await dataPointsServiceClient.GetDataPointAsync(name);

GetDataPointAsync(DataPointName, CancellationToken)

Get a single identifyable data point.

Declaration
public virtual Task<DataPoint> GetDataPointAsync(DataPointName name, CancellationToken cancellationToken)
Parameters
Type Name Description
DataPointName name

Required. The name of the data point to retrieve.

Format: users/{user}/dataTypes/{data_type}/dataPoints/{data_point}

See [DataPoint.name][google.devicesandservices.health.v4.DataPoint.name] for examples and possible values.

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<DataPoint>

A Task containing the RPC response.

Sample code
// Create client
DataPointsServiceClient dataPointsServiceClient = await DataPointsServiceClient.CreateAsync();
// Initialize request argument(s)
DataPointName name = DataPointName.FromUserDataTypeDataPoint("[USER]", "[DATA_TYPE]", "[DATA_POINT]");
// Make the request
DataPoint response = await dataPointsServiceClient.GetDataPointAsync(name);

GetDataPointAsync(GetDataPointRequest, CallSettings)

Get a single identifyable data point.

Declaration
public virtual Task<DataPoint> GetDataPointAsync(GetDataPointRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
GetDataPointRequest 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<DataPoint>

A Task containing the RPC response.

Sample code
// Create client
DataPointsServiceClient dataPointsServiceClient = await DataPointsServiceClient.CreateAsync();
// Initialize request argument(s)
GetDataPointRequest request = new GetDataPointRequest
{
    DataPointName = DataPointName.FromUserDataTypeDataPoint("[USER]", "[DATA_TYPE]", "[DATA_POINT]"),
};
// Make the request
DataPoint response = await dataPointsServiceClient.GetDataPointAsync(request);

GetDataPointAsync(GetDataPointRequest, CancellationToken)

Get a single identifyable data point.

Declaration
public virtual Task<DataPoint> GetDataPointAsync(GetDataPointRequest request, CancellationToken cancellationToken)
Parameters
Type Name Description
GetDataPointRequest 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<DataPoint>

A Task containing the RPC response.

Sample code
// Create client
DataPointsServiceClient dataPointsServiceClient = await DataPointsServiceClient.CreateAsync();
// Initialize request argument(s)
GetDataPointRequest request = new GetDataPointRequest
{
    DataPointName = DataPointName.FromUserDataTypeDataPoint("[USER]", "[DATA_TYPE]", "[DATA_POINT]"),
};
// Make the request
DataPoint response = await dataPointsServiceClient.GetDataPointAsync(request);

GetDataPointAsync(string, CallSettings)

Get a single identifyable data point.

Declaration
public virtual Task<DataPoint> GetDataPointAsync(string name, CallSettings callSettings = null)
Parameters
Type Name Description
string name

Required. The name of the data point to retrieve.

Format: users/{user}/dataTypes/{data_type}/dataPoints/{data_point}

See [DataPoint.name][google.devicesandservices.health.v4.DataPoint.name] for examples and possible values.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<DataPoint>

A Task containing the RPC response.

Sample code
// Create client
DataPointsServiceClient dataPointsServiceClient = await DataPointsServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "users/[USER]/dataTypes/[DATA_TYPE]/dataPoints/[DATA_POINT]";
// Make the request
DataPoint response = await dataPointsServiceClient.GetDataPointAsync(name);

GetDataPointAsync(string, CancellationToken)

Get a single identifyable data point.

Declaration
public virtual Task<DataPoint> GetDataPointAsync(string name, CancellationToken cancellationToken)
Parameters
Type Name Description
string name

Required. The name of the data point to retrieve.

Format: users/{user}/dataTypes/{data_type}/dataPoints/{data_point}

See [DataPoint.name][google.devicesandservices.health.v4.DataPoint.name] for examples and possible values.

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<DataPoint>

A Task containing the RPC response.

Sample code
// Create client
DataPointsServiceClient dataPointsServiceClient = await DataPointsServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "users/[USER]/dataTypes/[DATA_TYPE]/dataPoints/[DATA_POINT]";
// Make the request
DataPoint response = await dataPointsServiceClient.GetDataPointAsync(name);

ListDataPoints(DataTypeName, string, int?, CallSettings)

Query user health and fitness data points.

Declaration
public virtual PagedEnumerable<ListDataPointsResponse, DataPoint> ListDataPoints(DataTypeName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
Type Name Description
DataTypeName parent

Required. Parent data type of the Data Point collection.

Format: users/me/dataTypes/{data_type}, e.g.:

  • users/me/dataTypes/steps
  • users/me/dataTypes/weight

For a list of the supported data types see the [DataPoint data][google.devicesandservices.health.v4.DataPoint] union field.

string pageToken

The token returned from the previous request. A value of null or an empty string retrieves the first page.

int? pageSize

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerable<ListDataPointsResponse, DataPoint>

A pageable sequence of DataPoint resources.

Sample code
// Create client
DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.Create();
// Initialize request argument(s)
DataTypeName parent = DataTypeName.FromUserDataType("[USER]", "[DATA_TYPE]");
// Make the request
PagedEnumerable<ListDataPointsResponse, DataPoint> response = dataPointsServiceClient.ListDataPoints(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (DataPoint 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 (ListDataPointsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (DataPoint 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<DataPoint> 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 (DataPoint 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;

ListDataPoints(ListDataPointsRequest, CallSettings)

Query user health and fitness data points.

Declaration
public virtual PagedEnumerable<ListDataPointsResponse, DataPoint> ListDataPoints(ListDataPointsRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
ListDataPointsRequest 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<ListDataPointsResponse, DataPoint>

A pageable sequence of DataPoint resources.

Sample code
// Create client
DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.Create();
// Initialize request argument(s)
ListDataPointsRequest request = new ListDataPointsRequest
{
    ParentAsDataTypeName = DataTypeName.FromUserDataType("[USER]", "[DATA_TYPE]"),
    Filter = "",
};
// Make the request
PagedEnumerable<ListDataPointsResponse, DataPoint> response = dataPointsServiceClient.ListDataPoints(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (DataPoint 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 (ListDataPointsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (DataPoint 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<DataPoint> 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 (DataPoint 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;

ListDataPoints(string, string, int?, CallSettings)

Query user health and fitness data points.

Declaration
public virtual PagedEnumerable<ListDataPointsResponse, DataPoint> ListDataPoints(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
Type Name Description
string parent

Required. Parent data type of the Data Point collection.

Format: users/me/dataTypes/{data_type}, e.g.:

  • users/me/dataTypes/steps
  • users/me/dataTypes/weight

For a list of the supported data types see the [DataPoint data][google.devicesandservices.health.v4.DataPoint] union field.

string pageToken

The token returned from the previous request. A value of null or an empty string retrieves the first page.

int? pageSize

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerable<ListDataPointsResponse, DataPoint>

A pageable sequence of DataPoint resources.

Sample code
// Create client
DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.Create();
// Initialize request argument(s)
string parent = "users/[USER]/dataTypes/[DATA_TYPE]";
// Make the request
PagedEnumerable<ListDataPointsResponse, DataPoint> response = dataPointsServiceClient.ListDataPoints(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (DataPoint 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 (ListDataPointsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (DataPoint 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<DataPoint> 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 (DataPoint 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;

ListDataPointsAsync(DataTypeName, string, int?, CallSettings)

Query user health and fitness data points.

Declaration
public virtual PagedAsyncEnumerable<ListDataPointsResponse, DataPoint> ListDataPointsAsync(DataTypeName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
Type Name Description
DataTypeName parent

Required. Parent data type of the Data Point collection.

Format: users/me/dataTypes/{data_type}, e.g.:

  • users/me/dataTypes/steps
  • users/me/dataTypes/weight

For a list of the supported data types see the [DataPoint data][google.devicesandservices.health.v4.DataPoint] union field.

string pageToken

The token returned from the previous request. A value of null or an empty string retrieves the first page.

int? pageSize

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerable<ListDataPointsResponse, DataPoint>

A pageable asynchronous sequence of DataPoint resources.

Sample code
// Create client
DataPointsServiceClient dataPointsServiceClient = await DataPointsServiceClient.CreateAsync();
// Initialize request argument(s)
DataTypeName parent = DataTypeName.FromUserDataType("[USER]", "[DATA_TYPE]");
// Make the request
PagedAsyncEnumerable<ListDataPointsResponse, DataPoint> response = dataPointsServiceClient.ListDataPointsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await foreach (DataPoint item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (ListDataPointsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (DataPoint 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<DataPoint> 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 (DataPoint 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;

ListDataPointsAsync(ListDataPointsRequest, CallSettings)

Query user health and fitness data points.

Declaration
public virtual PagedAsyncEnumerable<ListDataPointsResponse, DataPoint> ListDataPointsAsync(ListDataPointsRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
ListDataPointsRequest 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<ListDataPointsResponse, DataPoint>

A pageable asynchronous sequence of DataPoint resources.

Sample code
// Create client
DataPointsServiceClient dataPointsServiceClient = await DataPointsServiceClient.CreateAsync();
// Initialize request argument(s)
ListDataPointsRequest request = new ListDataPointsRequest
{
    ParentAsDataTypeName = DataTypeName.FromUserDataType("[USER]", "[DATA_TYPE]"),
    Filter = "",
};
// Make the request
PagedAsyncEnumerable<ListDataPointsResponse, DataPoint> response = dataPointsServiceClient.ListDataPointsAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await foreach (DataPoint item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (ListDataPointsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (DataPoint 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<DataPoint> 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 (DataPoint 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;

ListDataPointsAsync(string, string, int?, CallSettings)

Query user health and fitness data points.

Declaration
public virtual PagedAsyncEnumerable<ListDataPointsResponse, DataPoint> ListDataPointsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
Type Name Description
string parent

Required. Parent data type of the Data Point collection.

Format: users/me/dataTypes/{data_type}, e.g.:

  • users/me/dataTypes/steps
  • users/me/dataTypes/weight

For a list of the supported data types see the [DataPoint data][google.devicesandservices.health.v4.DataPoint] union field.

string pageToken

The token returned from the previous request. A value of null or an empty string retrieves the first page.

int? pageSize

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerable<ListDataPointsResponse, DataPoint>

A pageable asynchronous sequence of DataPoint resources.

Sample code
// Create client
DataPointsServiceClient dataPointsServiceClient = await DataPointsServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "users/[USER]/dataTypes/[DATA_TYPE]";
// Make the request
PagedAsyncEnumerable<ListDataPointsResponse, DataPoint> response = dataPointsServiceClient.ListDataPointsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await foreach (DataPoint item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (ListDataPointsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (DataPoint 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<DataPoint> 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 (DataPoint 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;

PollOnceBatchDeleteDataPoints(string, CallSettings)

Poll an operation once, using an operationName from a previous invocation of BatchDeleteDataPoints .

Declaration
public virtual Operation<BatchDeleteDataPointsResponse, BatchDeleteDataPointsOperationMetadata> PollOnceBatchDeleteDataPoints(string operationName, CallSettings callSettings = null)
Parameters
Type Name Description
string operationName

The name of a previously invoked operation. Must not be null or empty.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Operation<BatchDeleteDataPointsResponse, BatchDeleteDataPointsOperationMetadata>

The result of polling the operation.

PollOnceBatchDeleteDataPointsAsync(string, CallSettings)

Asynchronously poll an operation once, using an operationName from a previous invocation of BatchDeleteDataPoints.

Declaration
public virtual Task<Operation<BatchDeleteDataPointsResponse, BatchDeleteDataPointsOperationMetadata>> PollOnceBatchDeleteDataPointsAsync(string operationName, CallSettings callSettings = null)
Parameters
Type Name Description
string operationName

The name of a previously invoked operation. Must not be null or empty.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<Operation<BatchDeleteDataPointsResponse, BatchDeleteDataPointsOperationMetadata>>

A task representing the result of polling the operation.

PollOnceCreateDataPoint(string, CallSettings)

Poll an operation once, using an operationName from a previous invocation of CreateDataPoint.

Declaration
public virtual Operation<DataPoint, CreateDataPointOperationMetadata> PollOnceCreateDataPoint(string operationName, CallSettings callSettings = null)
Parameters
Type Name Description
string operationName

The name of a previously invoked operation. Must not be null or empty.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Operation<DataPoint, CreateDataPointOperationMetadata>

The result of polling the operation.

PollOnceCreateDataPointAsync(string, CallSettings)

Asynchronously poll an operation once, using an operationName from a previous invocation of CreateDataPoint.

Declaration
public virtual Task<Operation<DataPoint, CreateDataPointOperationMetadata>> PollOnceCreateDataPointAsync(string operationName, CallSettings callSettings = null)
Parameters
Type Name Description
string operationName

The name of a previously invoked operation. Must not be null or empty.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<Operation<DataPoint, CreateDataPointOperationMetadata>>

A task representing the result of polling the operation.

PollOnceUpdateDataPoint(string, CallSettings)

Poll an operation once, using an operationName from a previous invocation of UpdateDataPoint.

Declaration
public virtual Operation<DataPoint, UpdateDataPointOperationMetadata> PollOnceUpdateDataPoint(string operationName, CallSettings callSettings = null)
Parameters
Type Name Description
string operationName

The name of a previously invoked operation. Must not be null or empty.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Operation<DataPoint, UpdateDataPointOperationMetadata>

The result of polling the operation.

PollOnceUpdateDataPointAsync(string, CallSettings)

Asynchronously poll an operation once, using an operationName from a previous invocation of UpdateDataPoint.

Declaration
public virtual Task<Operation<DataPoint, UpdateDataPointOperationMetadata>> PollOnceUpdateDataPointAsync(string operationName, CallSettings callSettings = null)
Parameters
Type Name Description
string operationName

The name of a previously invoked operation. Must not be null or empty.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<Operation<DataPoint, UpdateDataPointOperationMetadata>>

A task representing the result of polling the operation.

ReconcileDataPoints(ReconcileDataPointsRequest, CallSettings)

Reconcile data points from multiple data sources into a single data stream.

Declaration
public virtual PagedEnumerable<ReconcileDataPointsResponse, ReconciledDataPoint> ReconcileDataPoints(ReconcileDataPointsRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
ReconcileDataPointsRequest 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<ReconcileDataPointsResponse, ReconciledDataPoint>

A pageable sequence of ReconciledDataPoint resources.

Sample code
// Create client
DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.Create();
// Initialize request argument(s)
ReconcileDataPointsRequest request = new ReconcileDataPointsRequest
{
    Parent = "",
    Filter = "",
    DataSourceFamily = "",
};
// Make the request
PagedEnumerable<ReconcileDataPointsResponse, ReconciledDataPoint> response = dataPointsServiceClient.ReconcileDataPoints(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (ReconciledDataPoint 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 (ReconcileDataPointsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (ReconciledDataPoint 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<ReconciledDataPoint> 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 (ReconciledDataPoint 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;

ReconcileDataPointsAsync(ReconcileDataPointsRequest, CallSettings)

Reconcile data points from multiple data sources into a single data stream.

Declaration
public virtual PagedAsyncEnumerable<ReconcileDataPointsResponse, ReconciledDataPoint> ReconcileDataPointsAsync(ReconcileDataPointsRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
ReconcileDataPointsRequest 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<ReconcileDataPointsResponse, ReconciledDataPoint>

A pageable asynchronous sequence of ReconciledDataPoint resources.

Sample code
// Create client
DataPointsServiceClient dataPointsServiceClient = await DataPointsServiceClient.CreateAsync();
// Initialize request argument(s)
ReconcileDataPointsRequest request = new ReconcileDataPointsRequest
{
    Parent = "",
    Filter = "",
    DataSourceFamily = "",
};
// Make the request
PagedAsyncEnumerable<ReconcileDataPointsResponse, ReconciledDataPoint> response = dataPointsServiceClient.ReconcileDataPointsAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await foreach (ReconciledDataPoint item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (ReconcileDataPointsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (ReconciledDataPoint 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<ReconciledDataPoint> 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 (ReconciledDataPoint 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;

RollUpDataPoints(RollUpDataPointsRequest, CallSettings)

Roll up data points over physical time intervals for supported data types.

Declaration
public virtual PagedEnumerable<RollUpDataPointsResponse, RollupDataPoint> RollUpDataPoints(RollUpDataPointsRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
RollUpDataPointsRequest 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<RollUpDataPointsResponse, RollupDataPoint>

A pageable sequence of RollupDataPoint resources.

Sample code
// Create client
DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.Create();
// Initialize request argument(s)
RollUpDataPointsRequest request = new RollUpDataPointsRequest
{
    ParentAsDataTypeName = DataTypeName.FromUserDataType("[USER]", "[DATA_TYPE]"),
    Range = new Interval(),
    WindowSize = new Duration(),
    DataSourceFamily = "",
};
// Make the request
PagedEnumerable<RollUpDataPointsResponse, RollupDataPoint> response = dataPointsServiceClient.RollUpDataPoints(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (RollupDataPoint 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 (RollUpDataPointsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (RollupDataPoint 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<RollupDataPoint> 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 (RollupDataPoint 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;

RollUpDataPointsAsync(RollUpDataPointsRequest, CallSettings)

Roll up data points over physical time intervals for supported data types.

Declaration
public virtual PagedAsyncEnumerable<RollUpDataPointsResponse, RollupDataPoint> RollUpDataPointsAsync(RollUpDataPointsRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
RollUpDataPointsRequest 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<RollUpDataPointsResponse, RollupDataPoint>

A pageable asynchronous sequence of RollupDataPoint resources.

Sample code
// Create client
DataPointsServiceClient dataPointsServiceClient = await DataPointsServiceClient.CreateAsync();
// Initialize request argument(s)
RollUpDataPointsRequest request = new RollUpDataPointsRequest
{
    ParentAsDataTypeName = DataTypeName.FromUserDataType("[USER]", "[DATA_TYPE]"),
    Range = new Interval(),
    WindowSize = new Duration(),
    DataSourceFamily = "",
};
// Make the request
PagedAsyncEnumerable<RollUpDataPointsResponse, RollupDataPoint> response = dataPointsServiceClient.RollUpDataPointsAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await foreach (RollupDataPoint item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (RollUpDataPointsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (RollupDataPoint 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<RollupDataPoint> 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 (RollupDataPoint 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.

UpdateDataPoint(DataPoint, CallSettings)

Updates a single identifiable data point. If a data point with the specified name is not found, the request will fail.

Declaration
public virtual Operation<DataPoint, UpdateDataPointOperationMetadata> UpdateDataPoint(DataPoint dataPoint, CallSettings callSettings = null)
Parameters
Type Name Description
DataPoint dataPoint

Required. The data point to update

The data point's name field is used to identify the data point to update.

Format: users/{user}/dataTypes/{data_type}/dataPoints/{data_point}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Operation<DataPoint, UpdateDataPointOperationMetadata>

The RPC response.

Sample code
// Create client
DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.Create();
// Initialize request argument(s)
DataPoint dataPoint = new DataPoint();
// Make the request
Operation<DataPoint, UpdateDataPointOperationMetadata> response = dataPointsServiceClient.UpdateDataPoint(dataPoint);

// Poll until the returned long-running operation is complete
Operation<DataPoint, UpdateDataPointOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
DataPoint result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<DataPoint, UpdateDataPointOperationMetadata> retrievedResponse = dataPointsServiceClient.PollOnceUpdateDataPoint(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    DataPoint retrievedResult = retrievedResponse.Result;
}

UpdateDataPoint(UpdateDataPointRequest, CallSettings)

Updates a single identifiable data point. If a data point with the specified name is not found, the request will fail.

Declaration
public virtual Operation<DataPoint, UpdateDataPointOperationMetadata> UpdateDataPoint(UpdateDataPointRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
UpdateDataPointRequest 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
Operation<DataPoint, UpdateDataPointOperationMetadata>

The RPC response.

Sample code
// Create client
DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.Create();
// Initialize request argument(s)
UpdateDataPointRequest request = new UpdateDataPointRequest
{
    DataPoint = new DataPoint(),
};
// Make the request
Operation<DataPoint, UpdateDataPointOperationMetadata> response = dataPointsServiceClient.UpdateDataPoint(request);

// Poll until the returned long-running operation is complete
Operation<DataPoint, UpdateDataPointOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
DataPoint result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<DataPoint, UpdateDataPointOperationMetadata> retrievedResponse = dataPointsServiceClient.PollOnceUpdateDataPoint(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    DataPoint retrievedResult = retrievedResponse.Result;
}

UpdateDataPointAsync(DataPoint, CallSettings)

Updates a single identifiable data point. If a data point with the specified name is not found, the request will fail.

Declaration
public virtual Task<Operation<DataPoint, UpdateDataPointOperationMetadata>> UpdateDataPointAsync(DataPoint dataPoint, CallSettings callSettings = null)
Parameters
Type Name Description
DataPoint dataPoint

Required. The data point to update

The data point's name field is used to identify the data point to update.

Format: users/{user}/dataTypes/{data_type}/dataPoints/{data_point}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<Operation<DataPoint, UpdateDataPointOperationMetadata>>

A Task containing the RPC response.

Sample code
// Create client
DataPointsServiceClient dataPointsServiceClient = await DataPointsServiceClient.CreateAsync();
// Initialize request argument(s)
DataPoint dataPoint = new DataPoint();
// Make the request
Operation<DataPoint, UpdateDataPointOperationMetadata> response = await dataPointsServiceClient.UpdateDataPointAsync(dataPoint);

// Poll until the returned long-running operation is complete
Operation<DataPoint, UpdateDataPointOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
DataPoint result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<DataPoint, UpdateDataPointOperationMetadata> retrievedResponse = await dataPointsServiceClient.PollOnceUpdateDataPointAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    DataPoint retrievedResult = retrievedResponse.Result;
}

UpdateDataPointAsync(DataPoint, CancellationToken)

Updates a single identifiable data point. If a data point with the specified name is not found, the request will fail.

Declaration
public virtual Task<Operation<DataPoint, UpdateDataPointOperationMetadata>> UpdateDataPointAsync(DataPoint dataPoint, CancellationToken cancellationToken)
Parameters
Type Name Description
DataPoint dataPoint

Required. The data point to update

The data point's name field is used to identify the data point to update.

Format: users/{user}/dataTypes/{data_type}/dataPoints/{data_point}

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<Operation<DataPoint, UpdateDataPointOperationMetadata>>

A Task containing the RPC response.

Sample code
// Create client
DataPointsServiceClient dataPointsServiceClient = await DataPointsServiceClient.CreateAsync();
// Initialize request argument(s)
DataPoint dataPoint = new DataPoint();
// Make the request
Operation<DataPoint, UpdateDataPointOperationMetadata> response = await dataPointsServiceClient.UpdateDataPointAsync(dataPoint);

// Poll until the returned long-running operation is complete
Operation<DataPoint, UpdateDataPointOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
DataPoint result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<DataPoint, UpdateDataPointOperationMetadata> retrievedResponse = await dataPointsServiceClient.PollOnceUpdateDataPointAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    DataPoint retrievedResult = retrievedResponse.Result;
}

UpdateDataPointAsync(UpdateDataPointRequest, CallSettings)

Updates a single identifiable data point. If a data point with the specified name is not found, the request will fail.

Declaration
public virtual Task<Operation<DataPoint, UpdateDataPointOperationMetadata>> UpdateDataPointAsync(UpdateDataPointRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
UpdateDataPointRequest 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<Operation<DataPoint, UpdateDataPointOperationMetadata>>

A Task containing the RPC response.

Sample code
// Create client
DataPointsServiceClient dataPointsServiceClient = await DataPointsServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateDataPointRequest request = new UpdateDataPointRequest
{
    DataPoint = new DataPoint(),
};
// Make the request
Operation<DataPoint, UpdateDataPointOperationMetadata> response = await dataPointsServiceClient.UpdateDataPointAsync(request);

// Poll until the returned long-running operation is complete
Operation<DataPoint, UpdateDataPointOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
DataPoint result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<DataPoint, UpdateDataPointOperationMetadata> retrievedResponse = await dataPointsServiceClient.PollOnceUpdateDataPointAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    DataPoint retrievedResult = retrievedResponse.Result;
}

UpdateDataPointAsync(UpdateDataPointRequest, CancellationToken)

Updates a single identifiable data point. If a data point with the specified name is not found, the request will fail.

Declaration
public virtual Task<Operation<DataPoint, UpdateDataPointOperationMetadata>> UpdateDataPointAsync(UpdateDataPointRequest request, CancellationToken cancellationToken)
Parameters
Type Name Description
UpdateDataPointRequest 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<Operation<DataPoint, UpdateDataPointOperationMetadata>>

A Task containing the RPC response.

Sample code
// Create client
DataPointsServiceClient dataPointsServiceClient = await DataPointsServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateDataPointRequest request = new UpdateDataPointRequest
{
    DataPoint = new DataPoint(),
};
// Make the request
Operation<DataPoint, UpdateDataPointOperationMetadata> response = await dataPointsServiceClient.UpdateDataPointAsync(request);

// Poll until the returned long-running operation is complete
Operation<DataPoint, UpdateDataPointOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
DataPoint result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<DataPoint, UpdateDataPointOperationMetadata> retrievedResponse = await dataPointsServiceClient.PollOnceUpdateDataPointAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    DataPoint retrievedResult = retrievedResponse.Result;
}
In this article
Back to top Generated by DocFX