Show / Hide Table of Contents

Class ContactServiceClient

ContactService client wrapper, for convenient use.

Inheritance
object
ContactServiceClient
ContactServiceClientImpl
Inherited Members
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ToString()
Namespace: Google.Ads.AdManager.V1
Assembly: Google.Ads.AdManager.V1.dll
Syntax
public abstract class ContactServiceClient
Remarks

Provides methods for handling Contact objects.

Properties

DefaultEndpoint

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

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

DefaultScopes

The default ContactService scopes.

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

The default ContactService scopes are:

  • https://www.googleapis.com/auth/admanager

GrpcClient

The underlying gRPC ContactService client

Declaration
public virtual ContactService.ContactServiceClient GrpcClient { get; }
Property Value
Type Description
ContactService.ContactServiceClient

ServiceMetadata

The service metadata associated with this client type.

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

Methods

BatchCreateContacts(BatchCreateContactsRequest, CallSettings)

API to batch create Contact objects.

Declaration
public virtual BatchCreateContactsResponse BatchCreateContacts(BatchCreateContactsRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
BatchCreateContactsRequest 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
BatchCreateContactsResponse

The RPC response.

Sample code
// Create client
ContactServiceClient contactServiceClient = ContactServiceClient.Create();
// Initialize request argument(s)
BatchCreateContactsRequest request = new BatchCreateContactsRequest
{
    ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
    Requests =
    {
        new CreateContactRequest(),
    },
};
// Make the request
BatchCreateContactsResponse response = contactServiceClient.BatchCreateContacts(request);

BatchCreateContacts(NetworkName, IEnumerable<CreateContactRequest>, CallSettings)

API to batch create Contact objects.

Declaration
public virtual BatchCreateContactsResponse BatchCreateContacts(NetworkName parent, IEnumerable<CreateContactRequest> requests, CallSettings callSettings = null)
Parameters
Type Name Description
NetworkName parent

Required. The parent resource where Contacts will be created. Format: networks/{network_code} The parent field in the CreateContactRequest must match this field.

IEnumerable<CreateContactRequest> requests

Required. The Contact objects to create. A maximum of 100 objects can be created in a batch.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
BatchCreateContactsResponse

The RPC response.

Sample code
// Create client
ContactServiceClient contactServiceClient = ContactServiceClient.Create();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<CreateContactRequest> requests = new CreateContactRequest[]
{
    new CreateContactRequest(),
};
// Make the request
BatchCreateContactsResponse response = contactServiceClient.BatchCreateContacts(parent, requests);

BatchCreateContacts(string, IEnumerable<CreateContactRequest>, CallSettings)

API to batch create Contact objects.

Declaration
public virtual BatchCreateContactsResponse BatchCreateContacts(string parent, IEnumerable<CreateContactRequest> requests, CallSettings callSettings = null)
Parameters
Type Name Description
string parent

Required. The parent resource where Contacts will be created. Format: networks/{network_code} The parent field in the CreateContactRequest must match this field.

IEnumerable<CreateContactRequest> requests

Required. The Contact objects to create. A maximum of 100 objects can be created in a batch.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
BatchCreateContactsResponse

The RPC response.

Sample code
// Create client
ContactServiceClient contactServiceClient = ContactServiceClient.Create();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<CreateContactRequest> requests = new CreateContactRequest[]
{
    new CreateContactRequest(),
};
// Make the request
BatchCreateContactsResponse response = contactServiceClient.BatchCreateContacts(parent, requests);

BatchCreateContactsAsync(BatchCreateContactsRequest, CallSettings)

API to batch create Contact objects.

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

A Task containing the RPC response.

Sample code
// Create client
ContactServiceClient contactServiceClient = await ContactServiceClient.CreateAsync();
// Initialize request argument(s)
BatchCreateContactsRequest request = new BatchCreateContactsRequest
{
    ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
    Requests =
    {
        new CreateContactRequest(),
    },
};
// Make the request
BatchCreateContactsResponse response = await contactServiceClient.BatchCreateContactsAsync(request);

BatchCreateContactsAsync(BatchCreateContactsRequest, CancellationToken)

API to batch create Contact objects.

Declaration
public virtual Task<BatchCreateContactsResponse> BatchCreateContactsAsync(BatchCreateContactsRequest request, CancellationToken cancellationToken)
Parameters
Type Name Description
BatchCreateContactsRequest 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<BatchCreateContactsResponse>

A Task containing the RPC response.

Sample code
// Create client
ContactServiceClient contactServiceClient = await ContactServiceClient.CreateAsync();
// Initialize request argument(s)
BatchCreateContactsRequest request = new BatchCreateContactsRequest
{
    ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
    Requests =
    {
        new CreateContactRequest(),
    },
};
// Make the request
BatchCreateContactsResponse response = await contactServiceClient.BatchCreateContactsAsync(request);

BatchCreateContactsAsync(NetworkName, IEnumerable<CreateContactRequest>, CallSettings)

API to batch create Contact objects.

Declaration
public virtual Task<BatchCreateContactsResponse> BatchCreateContactsAsync(NetworkName parent, IEnumerable<CreateContactRequest> requests, CallSettings callSettings = null)
Parameters
Type Name Description
NetworkName parent

Required. The parent resource where Contacts will be created. Format: networks/{network_code} The parent field in the CreateContactRequest must match this field.

IEnumerable<CreateContactRequest> requests

Required. The Contact objects to create. A maximum of 100 objects can be created in a batch.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<BatchCreateContactsResponse>

A Task containing the RPC response.

Sample code
// Create client
ContactServiceClient contactServiceClient = await ContactServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<CreateContactRequest> requests = new CreateContactRequest[]
{
    new CreateContactRequest(),
};
// Make the request
BatchCreateContactsResponse response = await contactServiceClient.BatchCreateContactsAsync(parent, requests);

BatchCreateContactsAsync(NetworkName, IEnumerable<CreateContactRequest>, CancellationToken)

API to batch create Contact objects.

Declaration
public virtual Task<BatchCreateContactsResponse> BatchCreateContactsAsync(NetworkName parent, IEnumerable<CreateContactRequest> requests, CancellationToken cancellationToken)
Parameters
Type Name Description
NetworkName parent

Required. The parent resource where Contacts will be created. Format: networks/{network_code} The parent field in the CreateContactRequest must match this field.

IEnumerable<CreateContactRequest> requests

Required. The Contact objects to create. A maximum of 100 objects can be created in a batch.

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<BatchCreateContactsResponse>

A Task containing the RPC response.

Sample code
// Create client
ContactServiceClient contactServiceClient = await ContactServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<CreateContactRequest> requests = new CreateContactRequest[]
{
    new CreateContactRequest(),
};
// Make the request
BatchCreateContactsResponse response = await contactServiceClient.BatchCreateContactsAsync(parent, requests);

BatchCreateContactsAsync(string, IEnumerable<CreateContactRequest>, CallSettings)

API to batch create Contact objects.

Declaration
public virtual Task<BatchCreateContactsResponse> BatchCreateContactsAsync(string parent, IEnumerable<CreateContactRequest> requests, CallSettings callSettings = null)
Parameters
Type Name Description
string parent

Required. The parent resource where Contacts will be created. Format: networks/{network_code} The parent field in the CreateContactRequest must match this field.

IEnumerable<CreateContactRequest> requests

Required. The Contact objects to create. A maximum of 100 objects can be created in a batch.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<BatchCreateContactsResponse>

A Task containing the RPC response.

Sample code
// Create client
ContactServiceClient contactServiceClient = await ContactServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<CreateContactRequest> requests = new CreateContactRequest[]
{
    new CreateContactRequest(),
};
// Make the request
BatchCreateContactsResponse response = await contactServiceClient.BatchCreateContactsAsync(parent, requests);

BatchCreateContactsAsync(string, IEnumerable<CreateContactRequest>, CancellationToken)

API to batch create Contact objects.

Declaration
public virtual Task<BatchCreateContactsResponse> BatchCreateContactsAsync(string parent, IEnumerable<CreateContactRequest> requests, CancellationToken cancellationToken)
Parameters
Type Name Description
string parent

Required. The parent resource where Contacts will be created. Format: networks/{network_code} The parent field in the CreateContactRequest must match this field.

IEnumerable<CreateContactRequest> requests

Required. The Contact objects to create. A maximum of 100 objects can be created in a batch.

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<BatchCreateContactsResponse>

A Task containing the RPC response.

Sample code
// Create client
ContactServiceClient contactServiceClient = await ContactServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<CreateContactRequest> requests = new CreateContactRequest[]
{
    new CreateContactRequest(),
};
// Make the request
BatchCreateContactsResponse response = await contactServiceClient.BatchCreateContactsAsync(parent, requests);

BatchUpdateContacts(BatchUpdateContactsRequest, CallSettings)

API to batch update Contact objects.

Declaration
public virtual BatchUpdateContactsResponse BatchUpdateContacts(BatchUpdateContactsRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
BatchUpdateContactsRequest 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
BatchUpdateContactsResponse

The RPC response.

Sample code
// Create client
ContactServiceClient contactServiceClient = ContactServiceClient.Create();
// Initialize request argument(s)
BatchUpdateContactsRequest request = new BatchUpdateContactsRequest
{
    ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
    Requests =
    {
        new UpdateContactRequest(),
    },
};
// Make the request
BatchUpdateContactsResponse response = contactServiceClient.BatchUpdateContacts(request);

BatchUpdateContacts(NetworkName, IEnumerable<UpdateContactRequest>, CallSettings)

API to batch update Contact objects.

Declaration
public virtual BatchUpdateContactsResponse BatchUpdateContacts(NetworkName parent, IEnumerable<UpdateContactRequest> requests, CallSettings callSettings = null)
Parameters
Type Name Description
NetworkName parent

Required. The parent resource where Contacts will be updated. Format: networks/{network_code} The parent field in the UpdateContactRequest must match this field.

IEnumerable<UpdateContactRequest> requests

Required. The Contact objects to update. A maximum of 100 objects can be updated in a batch.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
BatchUpdateContactsResponse

The RPC response.

Sample code
// Create client
ContactServiceClient contactServiceClient = ContactServiceClient.Create();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<UpdateContactRequest> requests = new UpdateContactRequest[]
{
    new UpdateContactRequest(),
};
// Make the request
BatchUpdateContactsResponse response = contactServiceClient.BatchUpdateContacts(parent, requests);

BatchUpdateContacts(string, IEnumerable<UpdateContactRequest>, CallSettings)

API to batch update Contact objects.

Declaration
public virtual BatchUpdateContactsResponse BatchUpdateContacts(string parent, IEnumerable<UpdateContactRequest> requests, CallSettings callSettings = null)
Parameters
Type Name Description
string parent

Required. The parent resource where Contacts will be updated. Format: networks/{network_code} The parent field in the UpdateContactRequest must match this field.

IEnumerable<UpdateContactRequest> requests

Required. The Contact objects to update. A maximum of 100 objects can be updated in a batch.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
BatchUpdateContactsResponse

The RPC response.

Sample code
// Create client
ContactServiceClient contactServiceClient = ContactServiceClient.Create();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<UpdateContactRequest> requests = new UpdateContactRequest[]
{
    new UpdateContactRequest(),
};
// Make the request
BatchUpdateContactsResponse response = contactServiceClient.BatchUpdateContacts(parent, requests);

BatchUpdateContactsAsync(BatchUpdateContactsRequest, CallSettings)

API to batch update Contact objects.

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

A Task containing the RPC response.

Sample code
// Create client
ContactServiceClient contactServiceClient = await ContactServiceClient.CreateAsync();
// Initialize request argument(s)
BatchUpdateContactsRequest request = new BatchUpdateContactsRequest
{
    ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
    Requests =
    {
        new UpdateContactRequest(),
    },
};
// Make the request
BatchUpdateContactsResponse response = await contactServiceClient.BatchUpdateContactsAsync(request);

BatchUpdateContactsAsync(BatchUpdateContactsRequest, CancellationToken)

API to batch update Contact objects.

Declaration
public virtual Task<BatchUpdateContactsResponse> BatchUpdateContactsAsync(BatchUpdateContactsRequest request, CancellationToken cancellationToken)
Parameters
Type Name Description
BatchUpdateContactsRequest 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<BatchUpdateContactsResponse>

A Task containing the RPC response.

Sample code
// Create client
ContactServiceClient contactServiceClient = await ContactServiceClient.CreateAsync();
// Initialize request argument(s)
BatchUpdateContactsRequest request = new BatchUpdateContactsRequest
{
    ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
    Requests =
    {
        new UpdateContactRequest(),
    },
};
// Make the request
BatchUpdateContactsResponse response = await contactServiceClient.BatchUpdateContactsAsync(request);

BatchUpdateContactsAsync(NetworkName, IEnumerable<UpdateContactRequest>, CallSettings)

API to batch update Contact objects.

Declaration
public virtual Task<BatchUpdateContactsResponse> BatchUpdateContactsAsync(NetworkName parent, IEnumerable<UpdateContactRequest> requests, CallSettings callSettings = null)
Parameters
Type Name Description
NetworkName parent

Required. The parent resource where Contacts will be updated. Format: networks/{network_code} The parent field in the UpdateContactRequest must match this field.

IEnumerable<UpdateContactRequest> requests

Required. The Contact objects to update. A maximum of 100 objects can be updated in a batch.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<BatchUpdateContactsResponse>

A Task containing the RPC response.

Sample code
// Create client
ContactServiceClient contactServiceClient = await ContactServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<UpdateContactRequest> requests = new UpdateContactRequest[]
{
    new UpdateContactRequest(),
};
// Make the request
BatchUpdateContactsResponse response = await contactServiceClient.BatchUpdateContactsAsync(parent, requests);

BatchUpdateContactsAsync(NetworkName, IEnumerable<UpdateContactRequest>, CancellationToken)

API to batch update Contact objects.

Declaration
public virtual Task<BatchUpdateContactsResponse> BatchUpdateContactsAsync(NetworkName parent, IEnumerable<UpdateContactRequest> requests, CancellationToken cancellationToken)
Parameters
Type Name Description
NetworkName parent

Required. The parent resource where Contacts will be updated. Format: networks/{network_code} The parent field in the UpdateContactRequest must match this field.

IEnumerable<UpdateContactRequest> requests

Required. The Contact objects to update. A maximum of 100 objects can be updated in a batch.

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<BatchUpdateContactsResponse>

A Task containing the RPC response.

Sample code
// Create client
ContactServiceClient contactServiceClient = await ContactServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<UpdateContactRequest> requests = new UpdateContactRequest[]
{
    new UpdateContactRequest(),
};
// Make the request
BatchUpdateContactsResponse response = await contactServiceClient.BatchUpdateContactsAsync(parent, requests);

BatchUpdateContactsAsync(string, IEnumerable<UpdateContactRequest>, CallSettings)

API to batch update Contact objects.

Declaration
public virtual Task<BatchUpdateContactsResponse> BatchUpdateContactsAsync(string parent, IEnumerable<UpdateContactRequest> requests, CallSettings callSettings = null)
Parameters
Type Name Description
string parent

Required. The parent resource where Contacts will be updated. Format: networks/{network_code} The parent field in the UpdateContactRequest must match this field.

IEnumerable<UpdateContactRequest> requests

Required. The Contact objects to update. A maximum of 100 objects can be updated in a batch.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<BatchUpdateContactsResponse>

A Task containing the RPC response.

Sample code
// Create client
ContactServiceClient contactServiceClient = await ContactServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<UpdateContactRequest> requests = new UpdateContactRequest[]
{
    new UpdateContactRequest(),
};
// Make the request
BatchUpdateContactsResponse response = await contactServiceClient.BatchUpdateContactsAsync(parent, requests);

BatchUpdateContactsAsync(string, IEnumerable<UpdateContactRequest>, CancellationToken)

API to batch update Contact objects.

Declaration
public virtual Task<BatchUpdateContactsResponse> BatchUpdateContactsAsync(string parent, IEnumerable<UpdateContactRequest> requests, CancellationToken cancellationToken)
Parameters
Type Name Description
string parent

Required. The parent resource where Contacts will be updated. Format: networks/{network_code} The parent field in the UpdateContactRequest must match this field.

IEnumerable<UpdateContactRequest> requests

Required. The Contact objects to update. A maximum of 100 objects can be updated in a batch.

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<BatchUpdateContactsResponse>

A Task containing the RPC response.

Sample code
// Create client
ContactServiceClient contactServiceClient = await ContactServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<UpdateContactRequest> requests = new UpdateContactRequest[]
{
    new UpdateContactRequest(),
};
// Make the request
BatchUpdateContactsResponse response = await contactServiceClient.BatchUpdateContactsAsync(parent, requests);

Create()

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

Declaration
public static ContactServiceClient Create()
Returns
Type Description
ContactServiceClient

The created ContactServiceClient.

CreateAsync(CancellationToken)

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

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

The CancellationToken to use while creating the client.

Returns
Type Description
Task<ContactServiceClient>

The task representing the created ContactServiceClient.

CreateContact(CreateContactRequest, CallSettings)

API to create a Contact object.

Declaration
public virtual Contact CreateContact(CreateContactRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
CreateContactRequest 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
Contact

The RPC response.

Sample code
// Create client
ContactServiceClient contactServiceClient = ContactServiceClient.Create();
// Initialize request argument(s)
CreateContactRequest request = new CreateContactRequest
{
    ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
    Contact = new Contact(),
};
// Make the request
Contact response = contactServiceClient.CreateContact(request);

CreateContact(NetworkName, Contact, CallSettings)

API to create a Contact object.

Declaration
public virtual Contact CreateContact(NetworkName parent, Contact contact, CallSettings callSettings = null)
Parameters
Type Name Description
NetworkName parent

Required. The parent resource where this Contact will be created. Format: networks/{network_code}

Contact contact

Required. The Contact to create.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Contact

The RPC response.

Sample code
// Create client
ContactServiceClient contactServiceClient = ContactServiceClient.Create();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
Contact contact = new Contact();
// Make the request
Contact response = contactServiceClient.CreateContact(parent, contact);

CreateContact(string, Contact, CallSettings)

API to create a Contact object.

Declaration
public virtual Contact CreateContact(string parent, Contact contact, CallSettings callSettings = null)
Parameters
Type Name Description
string parent

Required. The parent resource where this Contact will be created. Format: networks/{network_code}

Contact contact

Required. The Contact to create.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Contact

The RPC response.

Sample code
// Create client
ContactServiceClient contactServiceClient = ContactServiceClient.Create();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
Contact contact = new Contact();
// Make the request
Contact response = contactServiceClient.CreateContact(parent, contact);

CreateContactAsync(CreateContactRequest, CallSettings)

API to create a Contact object.

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

A Task containing the RPC response.

Sample code
// Create client
ContactServiceClient contactServiceClient = await ContactServiceClient.CreateAsync();
// Initialize request argument(s)
CreateContactRequest request = new CreateContactRequest
{
    ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
    Contact = new Contact(),
};
// Make the request
Contact response = await contactServiceClient.CreateContactAsync(request);

CreateContactAsync(CreateContactRequest, CancellationToken)

API to create a Contact object.

Declaration
public virtual Task<Contact> CreateContactAsync(CreateContactRequest request, CancellationToken cancellationToken)
Parameters
Type Name Description
CreateContactRequest 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<Contact>

A Task containing the RPC response.

Sample code
// Create client
ContactServiceClient contactServiceClient = await ContactServiceClient.CreateAsync();
// Initialize request argument(s)
CreateContactRequest request = new CreateContactRequest
{
    ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
    Contact = new Contact(),
};
// Make the request
Contact response = await contactServiceClient.CreateContactAsync(request);

CreateContactAsync(NetworkName, Contact, CallSettings)

API to create a Contact object.

Declaration
public virtual Task<Contact> CreateContactAsync(NetworkName parent, Contact contact, CallSettings callSettings = null)
Parameters
Type Name Description
NetworkName parent

Required. The parent resource where this Contact will be created. Format: networks/{network_code}

Contact contact

Required. The Contact to create.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<Contact>

A Task containing the RPC response.

Sample code
// Create client
ContactServiceClient contactServiceClient = await ContactServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
Contact contact = new Contact();
// Make the request
Contact response = await contactServiceClient.CreateContactAsync(parent, contact);

CreateContactAsync(NetworkName, Contact, CancellationToken)

API to create a Contact object.

Declaration
public virtual Task<Contact> CreateContactAsync(NetworkName parent, Contact contact, CancellationToken cancellationToken)
Parameters
Type Name Description
NetworkName parent

Required. The parent resource where this Contact will be created. Format: networks/{network_code}

Contact contact

Required. The Contact to create.

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<Contact>

A Task containing the RPC response.

Sample code
// Create client
ContactServiceClient contactServiceClient = await ContactServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
Contact contact = new Contact();
// Make the request
Contact response = await contactServiceClient.CreateContactAsync(parent, contact);

CreateContactAsync(string, Contact, CallSettings)

API to create a Contact object.

Declaration
public virtual Task<Contact> CreateContactAsync(string parent, Contact contact, CallSettings callSettings = null)
Parameters
Type Name Description
string parent

Required. The parent resource where this Contact will be created. Format: networks/{network_code}

Contact contact

Required. The Contact to create.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<Contact>

A Task containing the RPC response.

Sample code
// Create client
ContactServiceClient contactServiceClient = await ContactServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
Contact contact = new Contact();
// Make the request
Contact response = await contactServiceClient.CreateContactAsync(parent, contact);

CreateContactAsync(string, Contact, CancellationToken)

API to create a Contact object.

Declaration
public virtual Task<Contact> CreateContactAsync(string parent, Contact contact, CancellationToken cancellationToken)
Parameters
Type Name Description
string parent

Required. The parent resource where this Contact will be created. Format: networks/{network_code}

Contact contact

Required. The Contact to create.

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<Contact>

A Task containing the RPC response.

Sample code
// Create client
ContactServiceClient contactServiceClient = await ContactServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
Contact contact = new Contact();
// Make the request
Contact response = await contactServiceClient.CreateContactAsync(parent, contact);

GetContact(ContactName, CallSettings)

API to retrieve a Contact object.

Declaration
public virtual Contact GetContact(ContactName name, CallSettings callSettings = null)
Parameters
Type Name Description
ContactName name

Required. The resource name of the Contact. Format: networks/{network_code}/contacts/{contact_id}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Contact

The RPC response.

Sample code
// Create client
ContactServiceClient contactServiceClient = ContactServiceClient.Create();
// Initialize request argument(s)
ContactName name = ContactName.FromNetworkCodeContact("[NETWORK_CODE]", "[CONTACT]");
// Make the request
Contact response = contactServiceClient.GetContact(name);

GetContact(GetContactRequest, CallSettings)

API to retrieve a Contact object.

Declaration
public virtual Contact GetContact(GetContactRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
GetContactRequest 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
Contact

The RPC response.

Sample code
// Create client
ContactServiceClient contactServiceClient = ContactServiceClient.Create();
// Initialize request argument(s)
GetContactRequest request = new GetContactRequest
{
    ContactName = ContactName.FromNetworkCodeContact("[NETWORK_CODE]", "[CONTACT]"),
};
// Make the request
Contact response = contactServiceClient.GetContact(request);

GetContact(string, CallSettings)

API to retrieve a Contact object.

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

Required. The resource name of the Contact. Format: networks/{network_code}/contacts/{contact_id}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Contact

The RPC response.

Sample code
// Create client
ContactServiceClient contactServiceClient = ContactServiceClient.Create();
// Initialize request argument(s)
string name = "networks/[NETWORK_CODE]/contacts/[CONTACT]";
// Make the request
Contact response = contactServiceClient.GetContact(name);

GetContactAsync(ContactName, CallSettings)

API to retrieve a Contact object.

Declaration
public virtual Task<Contact> GetContactAsync(ContactName name, CallSettings callSettings = null)
Parameters
Type Name Description
ContactName name

Required. The resource name of the Contact. Format: networks/{network_code}/contacts/{contact_id}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<Contact>

A Task containing the RPC response.

Sample code
// Create client
ContactServiceClient contactServiceClient = await ContactServiceClient.CreateAsync();
// Initialize request argument(s)
ContactName name = ContactName.FromNetworkCodeContact("[NETWORK_CODE]", "[CONTACT]");
// Make the request
Contact response = await contactServiceClient.GetContactAsync(name);

GetContactAsync(ContactName, CancellationToken)

API to retrieve a Contact object.

Declaration
public virtual Task<Contact> GetContactAsync(ContactName name, CancellationToken cancellationToken)
Parameters
Type Name Description
ContactName name

Required. The resource name of the Contact. Format: networks/{network_code}/contacts/{contact_id}

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<Contact>

A Task containing the RPC response.

Sample code
// Create client
ContactServiceClient contactServiceClient = await ContactServiceClient.CreateAsync();
// Initialize request argument(s)
ContactName name = ContactName.FromNetworkCodeContact("[NETWORK_CODE]", "[CONTACT]");
// Make the request
Contact response = await contactServiceClient.GetContactAsync(name);

GetContactAsync(GetContactRequest, CallSettings)

API to retrieve a Contact object.

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

A Task containing the RPC response.

Sample code
// Create client
ContactServiceClient contactServiceClient = await ContactServiceClient.CreateAsync();
// Initialize request argument(s)
GetContactRequest request = new GetContactRequest
{
    ContactName = ContactName.FromNetworkCodeContact("[NETWORK_CODE]", "[CONTACT]"),
};
// Make the request
Contact response = await contactServiceClient.GetContactAsync(request);

GetContactAsync(GetContactRequest, CancellationToken)

API to retrieve a Contact object.

Declaration
public virtual Task<Contact> GetContactAsync(GetContactRequest request, CancellationToken cancellationToken)
Parameters
Type Name Description
GetContactRequest 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<Contact>

A Task containing the RPC response.

Sample code
// Create client
ContactServiceClient contactServiceClient = await ContactServiceClient.CreateAsync();
// Initialize request argument(s)
GetContactRequest request = new GetContactRequest
{
    ContactName = ContactName.FromNetworkCodeContact("[NETWORK_CODE]", "[CONTACT]"),
};
// Make the request
Contact response = await contactServiceClient.GetContactAsync(request);

GetContactAsync(string, CallSettings)

API to retrieve a Contact object.

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

Required. The resource name of the Contact. Format: networks/{network_code}/contacts/{contact_id}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<Contact>

A Task containing the RPC response.

Sample code
// Create client
ContactServiceClient contactServiceClient = await ContactServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "networks/[NETWORK_CODE]/contacts/[CONTACT]";
// Make the request
Contact response = await contactServiceClient.GetContactAsync(name);

GetContactAsync(string, CancellationToken)

API to retrieve a Contact object.

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

Required. The resource name of the Contact. Format: networks/{network_code}/contacts/{contact_id}

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<Contact>

A Task containing the RPC response.

Sample code
// Create client
ContactServiceClient contactServiceClient = await ContactServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "networks/[NETWORK_CODE]/contacts/[CONTACT]";
// Make the request
Contact response = await contactServiceClient.GetContactAsync(name);

ListContacts(ListContactsRequest, CallSettings)

API to retrieve a list of Contact objects.

Declaration
public virtual PagedEnumerable<ListContactsResponse, Contact> ListContacts(ListContactsRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
ListContactsRequest 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<ListContactsResponse, Contact>

A pageable sequence of Contact resources.

Sample code
// Create client
ContactServiceClient contactServiceClient = ContactServiceClient.Create();
// Initialize request argument(s)
ListContactsRequest request = new ListContactsRequest
{
    ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
    Filter = "",
    OrderBy = "",
    Skip = 0,
};
// Make the request
PagedEnumerable<ListContactsResponse, Contact> response = contactServiceClient.ListContacts(request);

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

ListContacts(NetworkName, string, int?, CallSettings)

API to retrieve a list of Contact objects.

Declaration
public virtual PagedEnumerable<ListContactsResponse, Contact> ListContacts(NetworkName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
Type Name Description
NetworkName parent

Required. The parent, which owns this collection of Contacts. Format: networks/{network_code}

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<ListContactsResponse, Contact>

A pageable sequence of Contact resources.

Sample code
// Create client
ContactServiceClient contactServiceClient = ContactServiceClient.Create();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
// Make the request
PagedEnumerable<ListContactsResponse, Contact> response = contactServiceClient.ListContacts(parent);

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

ListContacts(string, string, int?, CallSettings)

API to retrieve a list of Contact objects.

Declaration
public virtual PagedEnumerable<ListContactsResponse, Contact> ListContacts(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 Contacts. Format: networks/{network_code}

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<ListContactsResponse, Contact>

A pageable sequence of Contact resources.

Sample code
// Create client
ContactServiceClient contactServiceClient = ContactServiceClient.Create();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
// Make the request
PagedEnumerable<ListContactsResponse, Contact> response = contactServiceClient.ListContacts(parent);

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

ListContactsAsync(ListContactsRequest, CallSettings)

API to retrieve a list of Contact objects.

Declaration
public virtual PagedAsyncEnumerable<ListContactsResponse, Contact> ListContactsAsync(ListContactsRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
ListContactsRequest 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<ListContactsResponse, Contact>

A pageable asynchronous sequence of Contact resources.

Sample code
// Create client
ContactServiceClient contactServiceClient = await ContactServiceClient.CreateAsync();
// Initialize request argument(s)
ListContactsRequest request = new ListContactsRequest
{
    ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
    Filter = "",
    OrderBy = "",
    Skip = 0,
};
// Make the request
PagedAsyncEnumerable<ListContactsResponse, Contact> response = contactServiceClient.ListContactsAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Contact item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

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

ListContactsAsync(NetworkName, string, int?, CallSettings)

API to retrieve a list of Contact objects.

Declaration
public virtual PagedAsyncEnumerable<ListContactsResponse, Contact> ListContactsAsync(NetworkName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
Type Name Description
NetworkName parent

Required. The parent, which owns this collection of Contacts. Format: networks/{network_code}

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<ListContactsResponse, Contact>

A pageable asynchronous sequence of Contact resources.

Sample code
// Create client
ContactServiceClient contactServiceClient = await ContactServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
// Make the request
PagedAsyncEnumerable<ListContactsResponse, Contact> response = contactServiceClient.ListContactsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Contact item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

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

ListContactsAsync(string, string, int?, CallSettings)

API to retrieve a list of Contact objects.

Declaration
public virtual PagedAsyncEnumerable<ListContactsResponse, Contact> ListContactsAsync(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 Contacts. Format: networks/{network_code}

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<ListContactsResponse, Contact>

A pageable asynchronous sequence of Contact resources.

Sample code
// Create client
ContactServiceClient contactServiceClient = await ContactServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
// Make the request
PagedAsyncEnumerable<ListContactsResponse, Contact> response = contactServiceClient.ListContactsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Contact item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

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

UpdateContact(Contact, FieldMask, CallSettings)

API to update a Contact object.

Declaration
public virtual Contact UpdateContact(Contact contact, FieldMask updateMask, CallSettings callSettings = null)
Parameters
Type Name Description
Contact contact

Required. The Contact to update.

The Contact's name is used to identify the Contact to update.

FieldMask updateMask

Required. The list of fields to update.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Contact

The RPC response.

Sample code
// Create client
ContactServiceClient contactServiceClient = ContactServiceClient.Create();
// Initialize request argument(s)
Contact contact = new Contact();
FieldMask updateMask = new FieldMask();
// Make the request
Contact response = contactServiceClient.UpdateContact(contact, updateMask);

UpdateContact(UpdateContactRequest, CallSettings)

API to update a Contact object.

Declaration
public virtual Contact UpdateContact(UpdateContactRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
UpdateContactRequest 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
Contact

The RPC response.

Sample code
// Create client
ContactServiceClient contactServiceClient = ContactServiceClient.Create();
// Initialize request argument(s)
UpdateContactRequest request = new UpdateContactRequest
{
    Contact = new Contact(),
    UpdateMask = new FieldMask(),
};
// Make the request
Contact response = contactServiceClient.UpdateContact(request);

UpdateContactAsync(Contact, FieldMask, CallSettings)

API to update a Contact object.

Declaration
public virtual Task<Contact> UpdateContactAsync(Contact contact, FieldMask updateMask, CallSettings callSettings = null)
Parameters
Type Name Description
Contact contact

Required. The Contact to update.

The Contact's name is used to identify the Contact to update.

FieldMask updateMask

Required. The list of fields to update.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<Contact>

A Task containing the RPC response.

Sample code
// Create client
ContactServiceClient contactServiceClient = await ContactServiceClient.CreateAsync();
// Initialize request argument(s)
Contact contact = new Contact();
FieldMask updateMask = new FieldMask();
// Make the request
Contact response = await contactServiceClient.UpdateContactAsync(contact, updateMask);

UpdateContactAsync(Contact, FieldMask, CancellationToken)

API to update a Contact object.

Declaration
public virtual Task<Contact> UpdateContactAsync(Contact contact, FieldMask updateMask, CancellationToken cancellationToken)
Parameters
Type Name Description
Contact contact

Required. The Contact to update.

The Contact's name is used to identify the Contact to update.

FieldMask updateMask

Required. The list of fields to update.

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<Contact>

A Task containing the RPC response.

Sample code
// Create client
ContactServiceClient contactServiceClient = await ContactServiceClient.CreateAsync();
// Initialize request argument(s)
Contact contact = new Contact();
FieldMask updateMask = new FieldMask();
// Make the request
Contact response = await contactServiceClient.UpdateContactAsync(contact, updateMask);

UpdateContactAsync(UpdateContactRequest, CallSettings)

API to update a Contact object.

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

A Task containing the RPC response.

Sample code
// Create client
ContactServiceClient contactServiceClient = await ContactServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateContactRequest request = new UpdateContactRequest
{
    Contact = new Contact(),
    UpdateMask = new FieldMask(),
};
// Make the request
Contact response = await contactServiceClient.UpdateContactAsync(request);

UpdateContactAsync(UpdateContactRequest, CancellationToken)

API to update a Contact object.

Declaration
public virtual Task<Contact> UpdateContactAsync(UpdateContactRequest request, CancellationToken cancellationToken)
Parameters
Type Name Description
UpdateContactRequest 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<Contact>

A Task containing the RPC response.

Sample code
// Create client
ContactServiceClient contactServiceClient = await ContactServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateContactRequest request = new UpdateContactRequest
{
    Contact = new Contact(),
    UpdateMask = new FieldMask(),
};
// Make the request
Contact response = await contactServiceClient.UpdateContactAsync(request);
In this article
Back to top Generated by DocFX