Show / Hide Table of Contents

Class HealthProfileServiceClient

HealthProfileService client wrapper, for convenient use.

Inheritance
object
HealthProfileServiceClient
HealthProfileServiceClientImpl
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 HealthProfileServiceClient
Remarks

Health Profile Service

Properties

DefaultEndpoint

The default endpoint for the HealthProfileService 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 HealthProfileService scopes.

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

The default HealthProfileService scopes are:

  • https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly
  • https://www.googleapis.com/auth/googlehealth.ecg.readonly
  • https://www.googleapis.com/auth/googlehealth.health_metrics_and_measurements.readonly
  • https://www.googleapis.com/auth/googlehealth.irn.readonly
  • https://www.googleapis.com/auth/googlehealth.profile.readonly
  • https://www.googleapis.com/auth/googlehealth.settings.readonly
  • https://www.googleapis.com/auth/googlehealth.sleep.readonly

GrpcClient

The underlying gRPC HealthProfileService client

Declaration
public virtual HealthProfileService.HealthProfileServiceClient GrpcClient { get; }
Property Value
Type Description
HealthProfileService.HealthProfileServiceClient

ServiceMetadata

The service metadata associated with this client type.

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

Methods

Create()

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

Declaration
public static HealthProfileServiceClient Create()
Returns
Type Description
HealthProfileServiceClient

The created HealthProfileServiceClient.

CreateAsync(CancellationToken)

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

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

The CancellationToken to use while creating the client.

Returns
Type Description
Task<HealthProfileServiceClient>

The task representing the created HealthProfileServiceClient.

GetIdentity(GetIdentityRequest, CallSettings)

Gets the user's identity.

It includes the legacy Fitbit user ID and the Google user ID and it can be used by migrating clients to map identifiers between the two systems.

Declaration
public virtual Identity GetIdentity(GetIdentityRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
GetIdentityRequest 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
Identity

The RPC response.

Sample code
// Create client
HealthProfileServiceClient healthProfileServiceClient = HealthProfileServiceClient.Create();
// Initialize request argument(s)
GetIdentityRequest request = new GetIdentityRequest
{
    IdentityName = IdentityName.FromUser("[USER]"),
};
// Make the request
Identity response = healthProfileServiceClient.GetIdentity(request);

GetIdentity(IdentityName, CallSettings)

Gets the user's identity.

It includes the legacy Fitbit user ID and the Google user ID and it can be used by migrating clients to map identifiers between the two systems.

Declaration
public virtual Identity GetIdentity(IdentityName name, CallSettings callSettings = null)
Parameters
Type Name Description
IdentityName name

Required. The resource name of the Identity. Format: users/me/identity

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Identity

The RPC response.

Sample code
// Create client
HealthProfileServiceClient healthProfileServiceClient = HealthProfileServiceClient.Create();
// Initialize request argument(s)
IdentityName name = IdentityName.FromUser("[USER]");
// Make the request
Identity response = healthProfileServiceClient.GetIdentity(name);

GetIdentity(string, CallSettings)

Gets the user's identity.

It includes the legacy Fitbit user ID and the Google user ID and it can be used by migrating clients to map identifiers between the two systems.

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

Required. The resource name of the Identity. Format: users/me/identity

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Identity

The RPC response.

Sample code
// Create client
HealthProfileServiceClient healthProfileServiceClient = HealthProfileServiceClient.Create();
// Initialize request argument(s)
string name = "users/[USER]/identity";
// Make the request
Identity response = healthProfileServiceClient.GetIdentity(name);

GetIdentityAsync(GetIdentityRequest, CallSettings)

Gets the user's identity.

It includes the legacy Fitbit user ID and the Google user ID and it can be used by migrating clients to map identifiers between the two systems.

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

A Task containing the RPC response.

Sample code
// Create client
HealthProfileServiceClient healthProfileServiceClient = await HealthProfileServiceClient.CreateAsync();
// Initialize request argument(s)
GetIdentityRequest request = new GetIdentityRequest
{
    IdentityName = IdentityName.FromUser("[USER]"),
};
// Make the request
Identity response = await healthProfileServiceClient.GetIdentityAsync(request);

GetIdentityAsync(GetIdentityRequest, CancellationToken)

Gets the user's identity.

It includes the legacy Fitbit user ID and the Google user ID and it can be used by migrating clients to map identifiers between the two systems.

Declaration
public virtual Task<Identity> GetIdentityAsync(GetIdentityRequest request, CancellationToken cancellationToken)
Parameters
Type Name Description
GetIdentityRequest 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<Identity>

A Task containing the RPC response.

Sample code
// Create client
HealthProfileServiceClient healthProfileServiceClient = await HealthProfileServiceClient.CreateAsync();
// Initialize request argument(s)
GetIdentityRequest request = new GetIdentityRequest
{
    IdentityName = IdentityName.FromUser("[USER]"),
};
// Make the request
Identity response = await healthProfileServiceClient.GetIdentityAsync(request);

GetIdentityAsync(IdentityName, CallSettings)

Gets the user's identity.

It includes the legacy Fitbit user ID and the Google user ID and it can be used by migrating clients to map identifiers between the two systems.

Declaration
public virtual Task<Identity> GetIdentityAsync(IdentityName name, CallSettings callSettings = null)
Parameters
Type Name Description
IdentityName name

Required. The resource name of the Identity. Format: users/me/identity

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<Identity>

A Task containing the RPC response.

Sample code
// Create client
HealthProfileServiceClient healthProfileServiceClient = await HealthProfileServiceClient.CreateAsync();
// Initialize request argument(s)
IdentityName name = IdentityName.FromUser("[USER]");
// Make the request
Identity response = await healthProfileServiceClient.GetIdentityAsync(name);

GetIdentityAsync(IdentityName, CancellationToken)

Gets the user's identity.

It includes the legacy Fitbit user ID and the Google user ID and it can be used by migrating clients to map identifiers between the two systems.

Declaration
public virtual Task<Identity> GetIdentityAsync(IdentityName name, CancellationToken cancellationToken)
Parameters
Type Name Description
IdentityName name

Required. The resource name of the Identity. Format: users/me/identity

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<Identity>

A Task containing the RPC response.

Sample code
// Create client
HealthProfileServiceClient healthProfileServiceClient = await HealthProfileServiceClient.CreateAsync();
// Initialize request argument(s)
IdentityName name = IdentityName.FromUser("[USER]");
// Make the request
Identity response = await healthProfileServiceClient.GetIdentityAsync(name);

GetIdentityAsync(string, CallSettings)

Gets the user's identity.

It includes the legacy Fitbit user ID and the Google user ID and it can be used by migrating clients to map identifiers between the two systems.

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

Required. The resource name of the Identity. Format: users/me/identity

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<Identity>

A Task containing the RPC response.

Sample code
// Create client
HealthProfileServiceClient healthProfileServiceClient = await HealthProfileServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "users/[USER]/identity";
// Make the request
Identity response = await healthProfileServiceClient.GetIdentityAsync(name);

GetIdentityAsync(string, CancellationToken)

Gets the user's identity.

It includes the legacy Fitbit user ID and the Google user ID and it can be used by migrating clients to map identifiers between the two systems.

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

Required. The resource name of the Identity. Format: users/me/identity

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<Identity>

A Task containing the RPC response.

Sample code
// Create client
HealthProfileServiceClient healthProfileServiceClient = await HealthProfileServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "users/[USER]/identity";
// Make the request
Identity response = await healthProfileServiceClient.GetIdentityAsync(name);

GetIrnProfile(GetIrnProfileRequest, CallSettings)

Returns user's IRN Profile details.

Declaration
public virtual IrnProfile GetIrnProfile(GetIrnProfileRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
GetIrnProfileRequest 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
IrnProfile

The RPC response.

Sample code
// Create client
HealthProfileServiceClient healthProfileServiceClient = HealthProfileServiceClient.Create();
// Initialize request argument(s)
GetIrnProfileRequest request = new GetIrnProfileRequest
{
    IrnProfileName = IrnProfileName.FromUser("[USER]"),
};
// Make the request
IrnProfile response = healthProfileServiceClient.GetIrnProfile(request);

GetIrnProfile(IrnProfileName, CallSettings)

Returns user's IRN Profile details.

Declaration
public virtual IrnProfile GetIrnProfile(IrnProfileName name, CallSettings callSettings = null)
Parameters
Type Name Description
IrnProfileName name

Required. The resource name of the IRN Profile. Format: users/{user}/irnProfile Example: users/1234567890/irnProfile or users/me/irnProfile The {user} ID is a system-generated Google Health API user ID, a string of 1-63 characters consisting of lowercase and uppercase letters, numbers, and hyphens. The literal me can also be used to refer to the authenticated user.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
IrnProfile

The RPC response.

Sample code
// Create client
HealthProfileServiceClient healthProfileServiceClient = HealthProfileServiceClient.Create();
// Initialize request argument(s)
IrnProfileName name = IrnProfileName.FromUser("[USER]");
// Make the request
IrnProfile response = healthProfileServiceClient.GetIrnProfile(name);

GetIrnProfile(string, CallSettings)

Returns user's IRN Profile details.

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

Required. The resource name of the IRN Profile. Format: users/{user}/irnProfile Example: users/1234567890/irnProfile or users/me/irnProfile The {user} ID is a system-generated Google Health API user ID, a string of 1-63 characters consisting of lowercase and uppercase letters, numbers, and hyphens. The literal me can also be used to refer to the authenticated user.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
IrnProfile

The RPC response.

Sample code
// Create client
HealthProfileServiceClient healthProfileServiceClient = HealthProfileServiceClient.Create();
// Initialize request argument(s)
string name = "users/[USER]/irnProfile";
// Make the request
IrnProfile response = healthProfileServiceClient.GetIrnProfile(name);

GetIrnProfileAsync(GetIrnProfileRequest, CallSettings)

Returns user's IRN Profile details.

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

A Task containing the RPC response.

Sample code
// Create client
HealthProfileServiceClient healthProfileServiceClient = await HealthProfileServiceClient.CreateAsync();
// Initialize request argument(s)
GetIrnProfileRequest request = new GetIrnProfileRequest
{
    IrnProfileName = IrnProfileName.FromUser("[USER]"),
};
// Make the request
IrnProfile response = await healthProfileServiceClient.GetIrnProfileAsync(request);

GetIrnProfileAsync(GetIrnProfileRequest, CancellationToken)

Returns user's IRN Profile details.

Declaration
public virtual Task<IrnProfile> GetIrnProfileAsync(GetIrnProfileRequest request, CancellationToken cancellationToken)
Parameters
Type Name Description
GetIrnProfileRequest 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<IrnProfile>

A Task containing the RPC response.

Sample code
// Create client
HealthProfileServiceClient healthProfileServiceClient = await HealthProfileServiceClient.CreateAsync();
// Initialize request argument(s)
GetIrnProfileRequest request = new GetIrnProfileRequest
{
    IrnProfileName = IrnProfileName.FromUser("[USER]"),
};
// Make the request
IrnProfile response = await healthProfileServiceClient.GetIrnProfileAsync(request);

GetIrnProfileAsync(IrnProfileName, CallSettings)

Returns user's IRN Profile details.

Declaration
public virtual Task<IrnProfile> GetIrnProfileAsync(IrnProfileName name, CallSettings callSettings = null)
Parameters
Type Name Description
IrnProfileName name

Required. The resource name of the IRN Profile. Format: users/{user}/irnProfile Example: users/1234567890/irnProfile or users/me/irnProfile The {user} ID is a system-generated Google Health API user ID, a string of 1-63 characters consisting of lowercase and uppercase letters, numbers, and hyphens. The literal me can also be used to refer to the authenticated user.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<IrnProfile>

A Task containing the RPC response.

Sample code
// Create client
HealthProfileServiceClient healthProfileServiceClient = await HealthProfileServiceClient.CreateAsync();
// Initialize request argument(s)
IrnProfileName name = IrnProfileName.FromUser("[USER]");
// Make the request
IrnProfile response = await healthProfileServiceClient.GetIrnProfileAsync(name);

GetIrnProfileAsync(IrnProfileName, CancellationToken)

Returns user's IRN Profile details.

Declaration
public virtual Task<IrnProfile> GetIrnProfileAsync(IrnProfileName name, CancellationToken cancellationToken)
Parameters
Type Name Description
IrnProfileName name

Required. The resource name of the IRN Profile. Format: users/{user}/irnProfile Example: users/1234567890/irnProfile or users/me/irnProfile The {user} ID is a system-generated Google Health API user ID, a string of 1-63 characters consisting of lowercase and uppercase letters, numbers, and hyphens. The literal me can also be used to refer to the authenticated user.

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<IrnProfile>

A Task containing the RPC response.

Sample code
// Create client
HealthProfileServiceClient healthProfileServiceClient = await HealthProfileServiceClient.CreateAsync();
// Initialize request argument(s)
IrnProfileName name = IrnProfileName.FromUser("[USER]");
// Make the request
IrnProfile response = await healthProfileServiceClient.GetIrnProfileAsync(name);

GetIrnProfileAsync(string, CallSettings)

Returns user's IRN Profile details.

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

Required. The resource name of the IRN Profile. Format: users/{user}/irnProfile Example: users/1234567890/irnProfile or users/me/irnProfile The {user} ID is a system-generated Google Health API user ID, a string of 1-63 characters consisting of lowercase and uppercase letters, numbers, and hyphens. The literal me can also be used to refer to the authenticated user.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<IrnProfile>

A Task containing the RPC response.

Sample code
// Create client
HealthProfileServiceClient healthProfileServiceClient = await HealthProfileServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "users/[USER]/irnProfile";
// Make the request
IrnProfile response = await healthProfileServiceClient.GetIrnProfileAsync(name);

GetIrnProfileAsync(string, CancellationToken)

Returns user's IRN Profile details.

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

Required. The resource name of the IRN Profile. Format: users/{user}/irnProfile Example: users/1234567890/irnProfile or users/me/irnProfile The {user} ID is a system-generated Google Health API user ID, a string of 1-63 characters consisting of lowercase and uppercase letters, numbers, and hyphens. The literal me can also be used to refer to the authenticated user.

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<IrnProfile>

A Task containing the RPC response.

Sample code
// Create client
HealthProfileServiceClient healthProfileServiceClient = await HealthProfileServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "users/[USER]/irnProfile";
// Make the request
IrnProfile response = await healthProfileServiceClient.GetIrnProfileAsync(name);

GetPairedDevice(GetPairedDeviceRequest, CallSettings)

Returns user's Device.

Declaration
public virtual PairedDevice GetPairedDevice(GetPairedDeviceRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
GetPairedDeviceRequest 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
PairedDevice

The RPC response.

Sample code
// Create client
HealthProfileServiceClient healthProfileServiceClient = HealthProfileServiceClient.Create();
// Initialize request argument(s)
GetPairedDeviceRequest request = new GetPairedDeviceRequest
{
    PairedDeviceName = PairedDeviceName.FromUserPairedDevice("[USER]", "[PAIRED_DEVICE]"),
};
// Make the request
PairedDevice response = healthProfileServiceClient.GetPairedDevice(request);

GetPairedDevice(PairedDeviceName, CallSettings)

Returns user's Device.

Declaration
public virtual PairedDevice GetPairedDevice(PairedDeviceName name, CallSettings callSettings = null)
Parameters
Type Name Description
PairedDeviceName name

Required. The name of the device to retrieve. Format: users/{user}/devices/{device}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PairedDevice

The RPC response.

Sample code
// Create client
HealthProfileServiceClient healthProfileServiceClient = HealthProfileServiceClient.Create();
// Initialize request argument(s)
PairedDeviceName name = PairedDeviceName.FromUserPairedDevice("[USER]", "[PAIRED_DEVICE]");
// Make the request
PairedDevice response = healthProfileServiceClient.GetPairedDevice(name);

GetPairedDevice(string, CallSettings)

Returns user's Device.

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

Required. The name of the device to retrieve. Format: users/{user}/devices/{device}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PairedDevice

The RPC response.

Sample code
// Create client
HealthProfileServiceClient healthProfileServiceClient = HealthProfileServiceClient.Create();
// Initialize request argument(s)
string name = "users/[USER]/pairedDevices/[PAIRED_DEVICE]";
// Make the request
PairedDevice response = healthProfileServiceClient.GetPairedDevice(name);

GetPairedDeviceAsync(GetPairedDeviceRequest, CallSettings)

Returns user's Device.

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

A Task containing the RPC response.

Sample code
// Create client
HealthProfileServiceClient healthProfileServiceClient = await HealthProfileServiceClient.CreateAsync();
// Initialize request argument(s)
GetPairedDeviceRequest request = new GetPairedDeviceRequest
{
    PairedDeviceName = PairedDeviceName.FromUserPairedDevice("[USER]", "[PAIRED_DEVICE]"),
};
// Make the request
PairedDevice response = await healthProfileServiceClient.GetPairedDeviceAsync(request);

GetPairedDeviceAsync(GetPairedDeviceRequest, CancellationToken)

Returns user's Device.

Declaration
public virtual Task<PairedDevice> GetPairedDeviceAsync(GetPairedDeviceRequest request, CancellationToken cancellationToken)
Parameters
Type Name Description
GetPairedDeviceRequest 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<PairedDevice>

A Task containing the RPC response.

Sample code
// Create client
HealthProfileServiceClient healthProfileServiceClient = await HealthProfileServiceClient.CreateAsync();
// Initialize request argument(s)
GetPairedDeviceRequest request = new GetPairedDeviceRequest
{
    PairedDeviceName = PairedDeviceName.FromUserPairedDevice("[USER]", "[PAIRED_DEVICE]"),
};
// Make the request
PairedDevice response = await healthProfileServiceClient.GetPairedDeviceAsync(request);

GetPairedDeviceAsync(PairedDeviceName, CallSettings)

Returns user's Device.

Declaration
public virtual Task<PairedDevice> GetPairedDeviceAsync(PairedDeviceName name, CallSettings callSettings = null)
Parameters
Type Name Description
PairedDeviceName name

Required. The name of the device to retrieve. Format: users/{user}/devices/{device}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<PairedDevice>

A Task containing the RPC response.

Sample code
// Create client
HealthProfileServiceClient healthProfileServiceClient = await HealthProfileServiceClient.CreateAsync();
// Initialize request argument(s)
PairedDeviceName name = PairedDeviceName.FromUserPairedDevice("[USER]", "[PAIRED_DEVICE]");
// Make the request
PairedDevice response = await healthProfileServiceClient.GetPairedDeviceAsync(name);

GetPairedDeviceAsync(PairedDeviceName, CancellationToken)

Returns user's Device.

Declaration
public virtual Task<PairedDevice> GetPairedDeviceAsync(PairedDeviceName name, CancellationToken cancellationToken)
Parameters
Type Name Description
PairedDeviceName name

Required. The name of the device to retrieve. Format: users/{user}/devices/{device}

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<PairedDevice>

A Task containing the RPC response.

Sample code
// Create client
HealthProfileServiceClient healthProfileServiceClient = await HealthProfileServiceClient.CreateAsync();
// Initialize request argument(s)
PairedDeviceName name = PairedDeviceName.FromUserPairedDevice("[USER]", "[PAIRED_DEVICE]");
// Make the request
PairedDevice response = await healthProfileServiceClient.GetPairedDeviceAsync(name);

GetPairedDeviceAsync(string, CallSettings)

Returns user's Device.

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

Required. The name of the device to retrieve. Format: users/{user}/devices/{device}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<PairedDevice>

A Task containing the RPC response.

Sample code
// Create client
HealthProfileServiceClient healthProfileServiceClient = await HealthProfileServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "users/[USER]/pairedDevices/[PAIRED_DEVICE]";
// Make the request
PairedDevice response = await healthProfileServiceClient.GetPairedDeviceAsync(name);

GetPairedDeviceAsync(string, CancellationToken)

Returns user's Device.

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

Required. The name of the device to retrieve. Format: users/{user}/devices/{device}

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<PairedDevice>

A Task containing the RPC response.

Sample code
// Create client
HealthProfileServiceClient healthProfileServiceClient = await HealthProfileServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "users/[USER]/pairedDevices/[PAIRED_DEVICE]";
// Make the request
PairedDevice response = await healthProfileServiceClient.GetPairedDeviceAsync(name);

GetProfile(GetProfileRequest, CallSettings)

Returns user Profile details.

Declaration
public virtual Profile GetProfile(GetProfileRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
GetProfileRequest 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
Profile

The RPC response.

Sample code
// Create client
HealthProfileServiceClient healthProfileServiceClient = HealthProfileServiceClient.Create();
// Initialize request argument(s)
GetProfileRequest request = new GetProfileRequest
{
    ProfileName = ProfileName.FromUser("[USER]"),
};
// Make the request
Profile response = healthProfileServiceClient.GetProfile(request);

GetProfile(ProfileName, CallSettings)

Returns user Profile details.

Declaration
public virtual Profile GetProfile(ProfileName name, CallSettings callSettings = null)
Parameters
Type Name Description
ProfileName name

Required. The name of the Profile. Format: users/me/profile.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Profile

The RPC response.

Sample code
// Create client
HealthProfileServiceClient healthProfileServiceClient = HealthProfileServiceClient.Create();
// Initialize request argument(s)
ProfileName name = ProfileName.FromUser("[USER]");
// Make the request
Profile response = healthProfileServiceClient.GetProfile(name);

GetProfile(string, CallSettings)

Returns user Profile details.

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

Required. The name of the Profile. Format: users/me/profile.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Profile

The RPC response.

Sample code
// Create client
HealthProfileServiceClient healthProfileServiceClient = HealthProfileServiceClient.Create();
// Initialize request argument(s)
string name = "users/[USER]/profile";
// Make the request
Profile response = healthProfileServiceClient.GetProfile(name);

GetProfileAsync(GetProfileRequest, CallSettings)

Returns user Profile details.

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

A Task containing the RPC response.

Sample code
// Create client
HealthProfileServiceClient healthProfileServiceClient = await HealthProfileServiceClient.CreateAsync();
// Initialize request argument(s)
GetProfileRequest request = new GetProfileRequest
{
    ProfileName = ProfileName.FromUser("[USER]"),
};
// Make the request
Profile response = await healthProfileServiceClient.GetProfileAsync(request);

GetProfileAsync(GetProfileRequest, CancellationToken)

Returns user Profile details.

Declaration
public virtual Task<Profile> GetProfileAsync(GetProfileRequest request, CancellationToken cancellationToken)
Parameters
Type Name Description
GetProfileRequest 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<Profile>

A Task containing the RPC response.

Sample code
// Create client
HealthProfileServiceClient healthProfileServiceClient = await HealthProfileServiceClient.CreateAsync();
// Initialize request argument(s)
GetProfileRequest request = new GetProfileRequest
{
    ProfileName = ProfileName.FromUser("[USER]"),
};
// Make the request
Profile response = await healthProfileServiceClient.GetProfileAsync(request);

GetProfileAsync(ProfileName, CallSettings)

Returns user Profile details.

Declaration
public virtual Task<Profile> GetProfileAsync(ProfileName name, CallSettings callSettings = null)
Parameters
Type Name Description
ProfileName name

Required. The name of the Profile. Format: users/me/profile.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<Profile>

A Task containing the RPC response.

Sample code
// Create client
HealthProfileServiceClient healthProfileServiceClient = await HealthProfileServiceClient.CreateAsync();
// Initialize request argument(s)
ProfileName name = ProfileName.FromUser("[USER]");
// Make the request
Profile response = await healthProfileServiceClient.GetProfileAsync(name);

GetProfileAsync(ProfileName, CancellationToken)

Returns user Profile details.

Declaration
public virtual Task<Profile> GetProfileAsync(ProfileName name, CancellationToken cancellationToken)
Parameters
Type Name Description
ProfileName name

Required. The name of the Profile. Format: users/me/profile.

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<Profile>

A Task containing the RPC response.

Sample code
// Create client
HealthProfileServiceClient healthProfileServiceClient = await HealthProfileServiceClient.CreateAsync();
// Initialize request argument(s)
ProfileName name = ProfileName.FromUser("[USER]");
// Make the request
Profile response = await healthProfileServiceClient.GetProfileAsync(name);

GetProfileAsync(string, CallSettings)

Returns user Profile details.

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

Required. The name of the Profile. Format: users/me/profile.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<Profile>

A Task containing the RPC response.

Sample code
// Create client
HealthProfileServiceClient healthProfileServiceClient = await HealthProfileServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "users/[USER]/profile";
// Make the request
Profile response = await healthProfileServiceClient.GetProfileAsync(name);

GetProfileAsync(string, CancellationToken)

Returns user Profile details.

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

Required. The name of the Profile. Format: users/me/profile.

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<Profile>

A Task containing the RPC response.

Sample code
// Create client
HealthProfileServiceClient healthProfileServiceClient = await HealthProfileServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "users/[USER]/profile";
// Make the request
Profile response = await healthProfileServiceClient.GetProfileAsync(name);

GetSettings(GetSettingsRequest, CallSettings)

Returns user settings details.

Declaration
public virtual Settings GetSettings(GetSettingsRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
GetSettingsRequest 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
Settings

The RPC response.

Sample code
// Create client
HealthProfileServiceClient healthProfileServiceClient = HealthProfileServiceClient.Create();
// Initialize request argument(s)
GetSettingsRequest request = new GetSettingsRequest
{
    SettingsName = SettingsName.FromUser("[USER]"),
};
// Make the request
Settings response = healthProfileServiceClient.GetSettings(request);

GetSettings(SettingsName, CallSettings)

Returns user settings details.

Declaration
public virtual Settings GetSettings(SettingsName name, CallSettings callSettings = null)
Parameters
Type Name Description
SettingsName name

Required. The name of the Settings. Format: users/me/settings.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Settings

The RPC response.

Sample code
// Create client
HealthProfileServiceClient healthProfileServiceClient = HealthProfileServiceClient.Create();
// Initialize request argument(s)
SettingsName name = SettingsName.FromUser("[USER]");
// Make the request
Settings response = healthProfileServiceClient.GetSettings(name);

GetSettings(string, CallSettings)

Returns user settings details.

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

Required. The name of the Settings. Format: users/me/settings.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Settings

The RPC response.

Sample code
// Create client
HealthProfileServiceClient healthProfileServiceClient = HealthProfileServiceClient.Create();
// Initialize request argument(s)
string name = "users/[USER]/settings";
// Make the request
Settings response = healthProfileServiceClient.GetSettings(name);

GetSettingsAsync(GetSettingsRequest, CallSettings)

Returns user settings details.

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

A Task containing the RPC response.

Sample code
// Create client
HealthProfileServiceClient healthProfileServiceClient = await HealthProfileServiceClient.CreateAsync();
// Initialize request argument(s)
GetSettingsRequest request = new GetSettingsRequest
{
    SettingsName = SettingsName.FromUser("[USER]"),
};
// Make the request
Settings response = await healthProfileServiceClient.GetSettingsAsync(request);

GetSettingsAsync(GetSettingsRequest, CancellationToken)

Returns user settings details.

Declaration
public virtual Task<Settings> GetSettingsAsync(GetSettingsRequest request, CancellationToken cancellationToken)
Parameters
Type Name Description
GetSettingsRequest 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<Settings>

A Task containing the RPC response.

Sample code
// Create client
HealthProfileServiceClient healthProfileServiceClient = await HealthProfileServiceClient.CreateAsync();
// Initialize request argument(s)
GetSettingsRequest request = new GetSettingsRequest
{
    SettingsName = SettingsName.FromUser("[USER]"),
};
// Make the request
Settings response = await healthProfileServiceClient.GetSettingsAsync(request);

GetSettingsAsync(SettingsName, CallSettings)

Returns user settings details.

Declaration
public virtual Task<Settings> GetSettingsAsync(SettingsName name, CallSettings callSettings = null)
Parameters
Type Name Description
SettingsName name

Required. The name of the Settings. Format: users/me/settings.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<Settings>

A Task containing the RPC response.

Sample code
// Create client
HealthProfileServiceClient healthProfileServiceClient = await HealthProfileServiceClient.CreateAsync();
// Initialize request argument(s)
SettingsName name = SettingsName.FromUser("[USER]");
// Make the request
Settings response = await healthProfileServiceClient.GetSettingsAsync(name);

GetSettingsAsync(SettingsName, CancellationToken)

Returns user settings details.

Declaration
public virtual Task<Settings> GetSettingsAsync(SettingsName name, CancellationToken cancellationToken)
Parameters
Type Name Description
SettingsName name

Required. The name of the Settings. Format: users/me/settings.

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<Settings>

A Task containing the RPC response.

Sample code
// Create client
HealthProfileServiceClient healthProfileServiceClient = await HealthProfileServiceClient.CreateAsync();
// Initialize request argument(s)
SettingsName name = SettingsName.FromUser("[USER]");
// Make the request
Settings response = await healthProfileServiceClient.GetSettingsAsync(name);

GetSettingsAsync(string, CallSettings)

Returns user settings details.

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

Required. The name of the Settings. Format: users/me/settings.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<Settings>

A Task containing the RPC response.

Sample code
// Create client
HealthProfileServiceClient healthProfileServiceClient = await HealthProfileServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "users/[USER]/settings";
// Make the request
Settings response = await healthProfileServiceClient.GetSettingsAsync(name);

GetSettingsAsync(string, CancellationToken)

Returns user settings details.

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

Required. The name of the Settings. Format: users/me/settings.

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<Settings>

A Task containing the RPC response.

Sample code
// Create client
HealthProfileServiceClient healthProfileServiceClient = await HealthProfileServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "users/[USER]/settings";
// Make the request
Settings response = await healthProfileServiceClient.GetSettingsAsync(name);

ListPairedDevices(ListPairedDevicesRequest, CallSettings)

Returns the user's list of paired 1P trackers and smartwatches.

Declaration
public virtual PagedEnumerable<ListPairedDevicesResponse, PairedDevice> ListPairedDevices(ListPairedDevicesRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
ListPairedDevicesRequest 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<ListPairedDevicesResponse, PairedDevice>

A pageable sequence of PairedDevice resources.

Sample code
// Create client
HealthProfileServiceClient healthProfileServiceClient = HealthProfileServiceClient.Create();
// Initialize request argument(s)
ListPairedDevicesRequest request = new ListPairedDevicesRequest
{
    ParentAsUserName = UserName.FromUser("[USER]"),
};
// Make the request
PagedEnumerable<ListPairedDevicesResponse, PairedDevice> response = healthProfileServiceClient.ListPairedDevices(request);

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

ListPairedDevices(UserName, string, int?, CallSettings)

Returns the user's list of paired 1P trackers and smartwatches.

Declaration
public virtual PagedEnumerable<ListPairedDevicesResponse, PairedDevice> ListPairedDevices(UserName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
Type Name Description
UserName parent

Required. The parent, which owns this collection of devices. Format: users/{user}

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<ListPairedDevicesResponse, PairedDevice>

A pageable sequence of PairedDevice resources.

Sample code
// Create client
HealthProfileServiceClient healthProfileServiceClient = HealthProfileServiceClient.Create();
// Initialize request argument(s)
UserName parent = UserName.FromUser("[USER]");
// Make the request
PagedEnumerable<ListPairedDevicesResponse, PairedDevice> response = healthProfileServiceClient.ListPairedDevices(parent);

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

ListPairedDevices(string, string, int?, CallSettings)

Returns the user's list of paired 1P trackers and smartwatches.

Declaration
public virtual PagedEnumerable<ListPairedDevicesResponse, PairedDevice> ListPairedDevices(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
Type Name Description
string parent

Required. The parent, which owns this collection of devices. Format: users/{user}

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<ListPairedDevicesResponse, PairedDevice>

A pageable sequence of PairedDevice resources.

Sample code
// Create client
HealthProfileServiceClient healthProfileServiceClient = HealthProfileServiceClient.Create();
// Initialize request argument(s)
string parent = "users/[USER]";
// Make the request
PagedEnumerable<ListPairedDevicesResponse, PairedDevice> response = healthProfileServiceClient.ListPairedDevices(parent);

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

ListPairedDevicesAsync(ListPairedDevicesRequest, CallSettings)

Returns the user's list of paired 1P trackers and smartwatches.

Declaration
public virtual PagedAsyncEnumerable<ListPairedDevicesResponse, PairedDevice> ListPairedDevicesAsync(ListPairedDevicesRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
ListPairedDevicesRequest 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<ListPairedDevicesResponse, PairedDevice>

A pageable asynchronous sequence of PairedDevice resources.

Sample code
// Create client
HealthProfileServiceClient healthProfileServiceClient = await HealthProfileServiceClient.CreateAsync();
// Initialize request argument(s)
ListPairedDevicesRequest request = new ListPairedDevicesRequest
{
    ParentAsUserName = UserName.FromUser("[USER]"),
};
// Make the request
PagedAsyncEnumerable<ListPairedDevicesResponse, PairedDevice> response = healthProfileServiceClient.ListPairedDevicesAsync(request);

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

ListPairedDevicesAsync(UserName, string, int?, CallSettings)

Returns the user's list of paired 1P trackers and smartwatches.

Declaration
public virtual PagedAsyncEnumerable<ListPairedDevicesResponse, PairedDevice> ListPairedDevicesAsync(UserName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
Type Name Description
UserName parent

Required. The parent, which owns this collection of devices. Format: users/{user}

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<ListPairedDevicesResponse, PairedDevice>

A pageable asynchronous sequence of PairedDevice resources.

Sample code
// Create client
HealthProfileServiceClient healthProfileServiceClient = await HealthProfileServiceClient.CreateAsync();
// Initialize request argument(s)
UserName parent = UserName.FromUser("[USER]");
// Make the request
PagedAsyncEnumerable<ListPairedDevicesResponse, PairedDevice> response = healthProfileServiceClient.ListPairedDevicesAsync(parent);

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

ListPairedDevicesAsync(string, string, int?, CallSettings)

Returns the user's list of paired 1P trackers and smartwatches.

Declaration
public virtual PagedAsyncEnumerable<ListPairedDevicesResponse, PairedDevice> ListPairedDevicesAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
Type Name Description
string parent

Required. The parent, which owns this collection of devices. Format: users/{user}

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<ListPairedDevicesResponse, PairedDevice>

A pageable asynchronous sequence of PairedDevice resources.

Sample code
// Create client
HealthProfileServiceClient healthProfileServiceClient = await HealthProfileServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "users/[USER]";
// Make the request
PagedAsyncEnumerable<ListPairedDevicesResponse, PairedDevice> response = healthProfileServiceClient.ListPairedDevicesAsync(parent);

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

UpdateProfile(Profile, FieldMask, CallSettings)

Updates the user's profile details.

Declaration
public virtual Profile UpdateProfile(Profile profile, FieldMask updateMask, CallSettings callSettings = null)
Parameters
Type Name Description
Profile profile

Required. Profile details.

FieldMask updateMask

Optional. The list of fields to be updated.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Profile

The RPC response.

Sample code
// Create client
HealthProfileServiceClient healthProfileServiceClient = HealthProfileServiceClient.Create();
// Initialize request argument(s)
Profile profile = new Profile();
FieldMask updateMask = new FieldMask();
// Make the request
Profile response = healthProfileServiceClient.UpdateProfile(profile, updateMask);

UpdateProfile(UpdateProfileRequest, CallSettings)

Updates the user's profile details.

Declaration
public virtual Profile UpdateProfile(UpdateProfileRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
UpdateProfileRequest 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
Profile

The RPC response.

Sample code
// Create client
HealthProfileServiceClient healthProfileServiceClient = HealthProfileServiceClient.Create();
// Initialize request argument(s)
UpdateProfileRequest request = new UpdateProfileRequest
{
    Profile = new Profile(),
    UpdateMask = new FieldMask(),
};
// Make the request
Profile response = healthProfileServiceClient.UpdateProfile(request);

UpdateProfileAsync(Profile, FieldMask, CallSettings)

Updates the user's profile details.

Declaration
public virtual Task<Profile> UpdateProfileAsync(Profile profile, FieldMask updateMask, CallSettings callSettings = null)
Parameters
Type Name Description
Profile profile

Required. Profile details.

FieldMask updateMask

Optional. The list of fields to be updated.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<Profile>

A Task containing the RPC response.

Sample code
// Create client
HealthProfileServiceClient healthProfileServiceClient = await HealthProfileServiceClient.CreateAsync();
// Initialize request argument(s)
Profile profile = new Profile();
FieldMask updateMask = new FieldMask();
// Make the request
Profile response = await healthProfileServiceClient.UpdateProfileAsync(profile, updateMask);

UpdateProfileAsync(Profile, FieldMask, CancellationToken)

Updates the user's profile details.

Declaration
public virtual Task<Profile> UpdateProfileAsync(Profile profile, FieldMask updateMask, CancellationToken cancellationToken)
Parameters
Type Name Description
Profile profile

Required. Profile details.

FieldMask updateMask

Optional. The list of fields to be updated.

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<Profile>

A Task containing the RPC response.

Sample code
// Create client
HealthProfileServiceClient healthProfileServiceClient = await HealthProfileServiceClient.CreateAsync();
// Initialize request argument(s)
Profile profile = new Profile();
FieldMask updateMask = new FieldMask();
// Make the request
Profile response = await healthProfileServiceClient.UpdateProfileAsync(profile, updateMask);

UpdateProfileAsync(UpdateProfileRequest, CallSettings)

Updates the user's profile details.

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

A Task containing the RPC response.

Sample code
// Create client
HealthProfileServiceClient healthProfileServiceClient = await HealthProfileServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateProfileRequest request = new UpdateProfileRequest
{
    Profile = new Profile(),
    UpdateMask = new FieldMask(),
};
// Make the request
Profile response = await healthProfileServiceClient.UpdateProfileAsync(request);

UpdateProfileAsync(UpdateProfileRequest, CancellationToken)

Updates the user's profile details.

Declaration
public virtual Task<Profile> UpdateProfileAsync(UpdateProfileRequest request, CancellationToken cancellationToken)
Parameters
Type Name Description
UpdateProfileRequest 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<Profile>

A Task containing the RPC response.

Sample code
// Create client
HealthProfileServiceClient healthProfileServiceClient = await HealthProfileServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateProfileRequest request = new UpdateProfileRequest
{
    Profile = new Profile(),
    UpdateMask = new FieldMask(),
};
// Make the request
Profile response = await healthProfileServiceClient.UpdateProfileAsync(request);

UpdateSettings(Settings, FieldMask, CallSettings)

Updates the user's settings details.

Declaration
public virtual Settings UpdateSettings(Settings settings, FieldMask updateMask, CallSettings callSettings = null)
Parameters
Type Name Description
Settings settings

Required. Settings details

FieldMask updateMask

Optional. The list of fields to be updated.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Settings

The RPC response.

Sample code
// Create client
HealthProfileServiceClient healthProfileServiceClient = HealthProfileServiceClient.Create();
// Initialize request argument(s)
Settings settings = new Settings();
FieldMask updateMask = new FieldMask();
// Make the request
Settings response = healthProfileServiceClient.UpdateSettings(settings, updateMask);

UpdateSettings(UpdateSettingsRequest, CallSettings)

Updates the user's settings details.

Declaration
public virtual Settings UpdateSettings(UpdateSettingsRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
UpdateSettingsRequest 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
Settings

The RPC response.

Sample code
// Create client
HealthProfileServiceClient healthProfileServiceClient = HealthProfileServiceClient.Create();
// Initialize request argument(s)
UpdateSettingsRequest request = new UpdateSettingsRequest
{
    Settings = new Settings(),
    UpdateMask = new FieldMask(),
};
// Make the request
Settings response = healthProfileServiceClient.UpdateSettings(request);

UpdateSettingsAsync(Settings, FieldMask, CallSettings)

Updates the user's settings details.

Declaration
public virtual Task<Settings> UpdateSettingsAsync(Settings settings, FieldMask updateMask, CallSettings callSettings = null)
Parameters
Type Name Description
Settings settings

Required. Settings details

FieldMask updateMask

Optional. The list of fields to be updated.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<Settings>

A Task containing the RPC response.

Sample code
// Create client
HealthProfileServiceClient healthProfileServiceClient = await HealthProfileServiceClient.CreateAsync();
// Initialize request argument(s)
Settings settings = new Settings();
FieldMask updateMask = new FieldMask();
// Make the request
Settings response = await healthProfileServiceClient.UpdateSettingsAsync(settings, updateMask);

UpdateSettingsAsync(Settings, FieldMask, CancellationToken)

Updates the user's settings details.

Declaration
public virtual Task<Settings> UpdateSettingsAsync(Settings settings, FieldMask updateMask, CancellationToken cancellationToken)
Parameters
Type Name Description
Settings settings

Required. Settings details

FieldMask updateMask

Optional. The list of fields to be updated.

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<Settings>

A Task containing the RPC response.

Sample code
// Create client
HealthProfileServiceClient healthProfileServiceClient = await HealthProfileServiceClient.CreateAsync();
// Initialize request argument(s)
Settings settings = new Settings();
FieldMask updateMask = new FieldMask();
// Make the request
Settings response = await healthProfileServiceClient.UpdateSettingsAsync(settings, updateMask);

UpdateSettingsAsync(UpdateSettingsRequest, CallSettings)

Updates the user's settings details.

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

A Task containing the RPC response.

Sample code
// Create client
HealthProfileServiceClient healthProfileServiceClient = await HealthProfileServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateSettingsRequest request = new UpdateSettingsRequest
{
    Settings = new Settings(),
    UpdateMask = new FieldMask(),
};
// Make the request
Settings response = await healthProfileServiceClient.UpdateSettingsAsync(request);

UpdateSettingsAsync(UpdateSettingsRequest, CancellationToken)

Updates the user's settings details.

Declaration
public virtual Task<Settings> UpdateSettingsAsync(UpdateSettingsRequest request, CancellationToken cancellationToken)
Parameters
Type Name Description
UpdateSettingsRequest 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<Settings>

A Task containing the RPC response.

Sample code
// Create client
HealthProfileServiceClient healthProfileServiceClient = await HealthProfileServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateSettingsRequest request = new UpdateSettingsRequest
{
    Settings = new Settings(),
    UpdateMask = new FieldMask(),
};
// Make the request
Settings response = await healthProfileServiceClient.UpdateSettingsAsync(request);
In this article
Back to top Generated by DocFX