Show / Hide Table of Contents

Class CustomFieldServiceClient

CustomFieldService client wrapper, for convenient use.

Inheritance
object
CustomFieldServiceClient
CustomFieldServiceClientImpl
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 CustomFieldServiceClient
Remarks

Provides methods for handling CustomField objects.

Properties

DefaultEndpoint

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

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

The default CustomFieldService scopes are:

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

GrpcClient

The underlying gRPC CustomFieldService client

Declaration
public virtual CustomFieldService.CustomFieldServiceClient GrpcClient { get; }
Property Value
Type Description
CustomFieldService.CustomFieldServiceClient

ServiceMetadata

The service metadata associated with this client type.

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

Methods

BatchActivateCustomFields(BatchActivateCustomFieldsRequest, CallSettings)

Activates a list of CustomField objects.

Declaration
public virtual BatchActivateCustomFieldsResponse BatchActivateCustomFields(BatchActivateCustomFieldsRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
BatchActivateCustomFieldsRequest 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
BatchActivateCustomFieldsResponse

The RPC response.

Sample code
// Create client
CustomFieldServiceClient customFieldServiceClient = CustomFieldServiceClient.Create();
// Initialize request argument(s)
BatchActivateCustomFieldsRequest request = new BatchActivateCustomFieldsRequest
{
    ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
    CustomFieldNames =
    {
        CustomFieldName.FromNetworkCodeCustomField("[NETWORK_CODE]", "[CUSTOM_FIELD]"),
    },
};
// Make the request
BatchActivateCustomFieldsResponse response = customFieldServiceClient.BatchActivateCustomFields(request);

BatchActivateCustomFields(NetworkName, IEnumerable<CustomFieldName>, CallSettings)

Activates a list of CustomField objects.

Declaration
public virtual BatchActivateCustomFieldsResponse BatchActivateCustomFields(NetworkName parent, IEnumerable<CustomFieldName> names, CallSettings callSettings = null)
Parameters
Type Name Description
NetworkName parent

Required. Format: networks/{network_code}

IEnumerable<CustomFieldName> names

Required. The resource names of the CustomField objects to activate. Format: networks/{network_code}/customFields/{custom_field_id}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
BatchActivateCustomFieldsResponse

The RPC response.

Sample code
// Create client
CustomFieldServiceClient customFieldServiceClient = CustomFieldServiceClient.Create();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<CustomFieldName> names = new CustomFieldName[]
{
    CustomFieldName.FromNetworkCodeCustomField("[NETWORK_CODE]", "[CUSTOM_FIELD]"),
};
// Make the request
BatchActivateCustomFieldsResponse response = customFieldServiceClient.BatchActivateCustomFields(parent, names);

BatchActivateCustomFields(string, IEnumerable<string>, CallSettings)

Activates a list of CustomField objects.

Declaration
public virtual BatchActivateCustomFieldsResponse BatchActivateCustomFields(string parent, IEnumerable<string> names, CallSettings callSettings = null)
Parameters
Type Name Description
string parent

Required. Format: networks/{network_code}

IEnumerable<string> names

Required. The resource names of the CustomField objects to activate. Format: networks/{network_code}/customFields/{custom_field_id}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
BatchActivateCustomFieldsResponse

The RPC response.

Sample code
// Create client
CustomFieldServiceClient customFieldServiceClient = CustomFieldServiceClient.Create();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<string> names = new string[]
{
    "networks/[NETWORK_CODE]/customFields/[CUSTOM_FIELD]",
};
// Make the request
BatchActivateCustomFieldsResponse response = customFieldServiceClient.BatchActivateCustomFields(parent, names);

BatchActivateCustomFieldsAsync(BatchActivateCustomFieldsRequest, CallSettings)

Activates a list of CustomField objects.

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

A Task containing the RPC response.

Sample code
// Create client
CustomFieldServiceClient customFieldServiceClient = await CustomFieldServiceClient.CreateAsync();
// Initialize request argument(s)
BatchActivateCustomFieldsRequest request = new BatchActivateCustomFieldsRequest
{
    ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
    CustomFieldNames =
    {
        CustomFieldName.FromNetworkCodeCustomField("[NETWORK_CODE]", "[CUSTOM_FIELD]"),
    },
};
// Make the request
BatchActivateCustomFieldsResponse response = await customFieldServiceClient.BatchActivateCustomFieldsAsync(request);

BatchActivateCustomFieldsAsync(BatchActivateCustomFieldsRequest, CancellationToken)

Activates a list of CustomField objects.

Declaration
public virtual Task<BatchActivateCustomFieldsResponse> BatchActivateCustomFieldsAsync(BatchActivateCustomFieldsRequest request, CancellationToken cancellationToken)
Parameters
Type Name Description
BatchActivateCustomFieldsRequest 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<BatchActivateCustomFieldsResponse>

A Task containing the RPC response.

Sample code
// Create client
CustomFieldServiceClient customFieldServiceClient = await CustomFieldServiceClient.CreateAsync();
// Initialize request argument(s)
BatchActivateCustomFieldsRequest request = new BatchActivateCustomFieldsRequest
{
    ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
    CustomFieldNames =
    {
        CustomFieldName.FromNetworkCodeCustomField("[NETWORK_CODE]", "[CUSTOM_FIELD]"),
    },
};
// Make the request
BatchActivateCustomFieldsResponse response = await customFieldServiceClient.BatchActivateCustomFieldsAsync(request);

BatchActivateCustomFieldsAsync(NetworkName, IEnumerable<CustomFieldName>, CallSettings)

Activates a list of CustomField objects.

Declaration
public virtual Task<BatchActivateCustomFieldsResponse> BatchActivateCustomFieldsAsync(NetworkName parent, IEnumerable<CustomFieldName> names, CallSettings callSettings = null)
Parameters
Type Name Description
NetworkName parent

Required. Format: networks/{network_code}

IEnumerable<CustomFieldName> names

Required. The resource names of the CustomField objects to activate. Format: networks/{network_code}/customFields/{custom_field_id}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<BatchActivateCustomFieldsResponse>

A Task containing the RPC response.

Sample code
// Create client
CustomFieldServiceClient customFieldServiceClient = await CustomFieldServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<CustomFieldName> names = new CustomFieldName[]
{
    CustomFieldName.FromNetworkCodeCustomField("[NETWORK_CODE]", "[CUSTOM_FIELD]"),
};
// Make the request
BatchActivateCustomFieldsResponse response = await customFieldServiceClient.BatchActivateCustomFieldsAsync(parent, names);

BatchActivateCustomFieldsAsync(NetworkName, IEnumerable<CustomFieldName>, CancellationToken)

Activates a list of CustomField objects.

Declaration
public virtual Task<BatchActivateCustomFieldsResponse> BatchActivateCustomFieldsAsync(NetworkName parent, IEnumerable<CustomFieldName> names, CancellationToken cancellationToken)
Parameters
Type Name Description
NetworkName parent

Required. Format: networks/{network_code}

IEnumerable<CustomFieldName> names

Required. The resource names of the CustomField objects to activate. Format: networks/{network_code}/customFields/{custom_field_id}

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<BatchActivateCustomFieldsResponse>

A Task containing the RPC response.

Sample code
// Create client
CustomFieldServiceClient customFieldServiceClient = await CustomFieldServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<CustomFieldName> names = new CustomFieldName[]
{
    CustomFieldName.FromNetworkCodeCustomField("[NETWORK_CODE]", "[CUSTOM_FIELD]"),
};
// Make the request
BatchActivateCustomFieldsResponse response = await customFieldServiceClient.BatchActivateCustomFieldsAsync(parent, names);

BatchActivateCustomFieldsAsync(string, IEnumerable<string>, CallSettings)

Activates a list of CustomField objects.

Declaration
public virtual Task<BatchActivateCustomFieldsResponse> BatchActivateCustomFieldsAsync(string parent, IEnumerable<string> names, CallSettings callSettings = null)
Parameters
Type Name Description
string parent

Required. Format: networks/{network_code}

IEnumerable<string> names

Required. The resource names of the CustomField objects to activate. Format: networks/{network_code}/customFields/{custom_field_id}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<BatchActivateCustomFieldsResponse>

A Task containing the RPC response.

Sample code
// Create client
CustomFieldServiceClient customFieldServiceClient = await CustomFieldServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<string> names = new string[]
{
    "networks/[NETWORK_CODE]/customFields/[CUSTOM_FIELD]",
};
// Make the request
BatchActivateCustomFieldsResponse response = await customFieldServiceClient.BatchActivateCustomFieldsAsync(parent, names);

BatchActivateCustomFieldsAsync(string, IEnumerable<string>, CancellationToken)

Activates a list of CustomField objects.

Declaration
public virtual Task<BatchActivateCustomFieldsResponse> BatchActivateCustomFieldsAsync(string parent, IEnumerable<string> names, CancellationToken cancellationToken)
Parameters
Type Name Description
string parent

Required. Format: networks/{network_code}

IEnumerable<string> names

Required. The resource names of the CustomField objects to activate. Format: networks/{network_code}/customFields/{custom_field_id}

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<BatchActivateCustomFieldsResponse>

A Task containing the RPC response.

Sample code
// Create client
CustomFieldServiceClient customFieldServiceClient = await CustomFieldServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<string> names = new string[]
{
    "networks/[NETWORK_CODE]/customFields/[CUSTOM_FIELD]",
};
// Make the request
BatchActivateCustomFieldsResponse response = await customFieldServiceClient.BatchActivateCustomFieldsAsync(parent, names);

BatchCreateCustomFields(BatchCreateCustomFieldsRequest, CallSettings)

API to batch create CustomField objects.

Declaration
public virtual BatchCreateCustomFieldsResponse BatchCreateCustomFields(BatchCreateCustomFieldsRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
BatchCreateCustomFieldsRequest 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
BatchCreateCustomFieldsResponse

The RPC response.

Sample code
// Create client
CustomFieldServiceClient customFieldServiceClient = CustomFieldServiceClient.Create();
// Initialize request argument(s)
BatchCreateCustomFieldsRequest request = new BatchCreateCustomFieldsRequest
{
    ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
    Requests =
    {
        new CreateCustomFieldRequest(),
    },
};
// Make the request
BatchCreateCustomFieldsResponse response = customFieldServiceClient.BatchCreateCustomFields(request);

BatchCreateCustomFields(NetworkName, IEnumerable<CreateCustomFieldRequest>, CallSettings)

API to batch create CustomField objects.

Declaration
public virtual BatchCreateCustomFieldsResponse BatchCreateCustomFields(NetworkName parent, IEnumerable<CreateCustomFieldRequest> requests, CallSettings callSettings = null)
Parameters
Type Name Description
NetworkName parent

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

IEnumerable<CreateCustomFieldRequest> requests

Required. The CustomField 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
BatchCreateCustomFieldsResponse

The RPC response.

Sample code
// Create client
CustomFieldServiceClient customFieldServiceClient = CustomFieldServiceClient.Create();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<CreateCustomFieldRequest> requests = new CreateCustomFieldRequest[]
{
    new CreateCustomFieldRequest(),
};
// Make the request
BatchCreateCustomFieldsResponse response = customFieldServiceClient.BatchCreateCustomFields(parent, requests);

BatchCreateCustomFields(string, IEnumerable<CreateCustomFieldRequest>, CallSettings)

API to batch create CustomField objects.

Declaration
public virtual BatchCreateCustomFieldsResponse BatchCreateCustomFields(string parent, IEnumerable<CreateCustomFieldRequest> requests, CallSettings callSettings = null)
Parameters
Type Name Description
string parent

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

IEnumerable<CreateCustomFieldRequest> requests

Required. The CustomField 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
BatchCreateCustomFieldsResponse

The RPC response.

Sample code
// Create client
CustomFieldServiceClient customFieldServiceClient = CustomFieldServiceClient.Create();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<CreateCustomFieldRequest> requests = new CreateCustomFieldRequest[]
{
    new CreateCustomFieldRequest(),
};
// Make the request
BatchCreateCustomFieldsResponse response = customFieldServiceClient.BatchCreateCustomFields(parent, requests);

BatchCreateCustomFieldsAsync(BatchCreateCustomFieldsRequest, CallSettings)

API to batch create CustomField objects.

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

A Task containing the RPC response.

Sample code
// Create client
CustomFieldServiceClient customFieldServiceClient = await CustomFieldServiceClient.CreateAsync();
// Initialize request argument(s)
BatchCreateCustomFieldsRequest request = new BatchCreateCustomFieldsRequest
{
    ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
    Requests =
    {
        new CreateCustomFieldRequest(),
    },
};
// Make the request
BatchCreateCustomFieldsResponse response = await customFieldServiceClient.BatchCreateCustomFieldsAsync(request);

BatchCreateCustomFieldsAsync(BatchCreateCustomFieldsRequest, CancellationToken)

API to batch create CustomField objects.

Declaration
public virtual Task<BatchCreateCustomFieldsResponse> BatchCreateCustomFieldsAsync(BatchCreateCustomFieldsRequest request, CancellationToken cancellationToken)
Parameters
Type Name Description
BatchCreateCustomFieldsRequest 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<BatchCreateCustomFieldsResponse>

A Task containing the RPC response.

Sample code
// Create client
CustomFieldServiceClient customFieldServiceClient = await CustomFieldServiceClient.CreateAsync();
// Initialize request argument(s)
BatchCreateCustomFieldsRequest request = new BatchCreateCustomFieldsRequest
{
    ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
    Requests =
    {
        new CreateCustomFieldRequest(),
    },
};
// Make the request
BatchCreateCustomFieldsResponse response = await customFieldServiceClient.BatchCreateCustomFieldsAsync(request);

BatchCreateCustomFieldsAsync(NetworkName, IEnumerable<CreateCustomFieldRequest>, CallSettings)

API to batch create CustomField objects.

Declaration
public virtual Task<BatchCreateCustomFieldsResponse> BatchCreateCustomFieldsAsync(NetworkName parent, IEnumerable<CreateCustomFieldRequest> requests, CallSettings callSettings = null)
Parameters
Type Name Description
NetworkName parent

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

IEnumerable<CreateCustomFieldRequest> requests

Required. The CustomField 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<BatchCreateCustomFieldsResponse>

A Task containing the RPC response.

Sample code
// Create client
CustomFieldServiceClient customFieldServiceClient = await CustomFieldServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<CreateCustomFieldRequest> requests = new CreateCustomFieldRequest[]
{
    new CreateCustomFieldRequest(),
};
// Make the request
BatchCreateCustomFieldsResponse response = await customFieldServiceClient.BatchCreateCustomFieldsAsync(parent, requests);

BatchCreateCustomFieldsAsync(NetworkName, IEnumerable<CreateCustomFieldRequest>, CancellationToken)

API to batch create CustomField objects.

Declaration
public virtual Task<BatchCreateCustomFieldsResponse> BatchCreateCustomFieldsAsync(NetworkName parent, IEnumerable<CreateCustomFieldRequest> requests, CancellationToken cancellationToken)
Parameters
Type Name Description
NetworkName parent

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

IEnumerable<CreateCustomFieldRequest> requests

Required. The CustomField 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<BatchCreateCustomFieldsResponse>

A Task containing the RPC response.

Sample code
// Create client
CustomFieldServiceClient customFieldServiceClient = await CustomFieldServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<CreateCustomFieldRequest> requests = new CreateCustomFieldRequest[]
{
    new CreateCustomFieldRequest(),
};
// Make the request
BatchCreateCustomFieldsResponse response = await customFieldServiceClient.BatchCreateCustomFieldsAsync(parent, requests);

BatchCreateCustomFieldsAsync(string, IEnumerable<CreateCustomFieldRequest>, CallSettings)

API to batch create CustomField objects.

Declaration
public virtual Task<BatchCreateCustomFieldsResponse> BatchCreateCustomFieldsAsync(string parent, IEnumerable<CreateCustomFieldRequest> requests, CallSettings callSettings = null)
Parameters
Type Name Description
string parent

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

IEnumerable<CreateCustomFieldRequest> requests

Required. The CustomField 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<BatchCreateCustomFieldsResponse>

A Task containing the RPC response.

Sample code
// Create client
CustomFieldServiceClient customFieldServiceClient = await CustomFieldServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<CreateCustomFieldRequest> requests = new CreateCustomFieldRequest[]
{
    new CreateCustomFieldRequest(),
};
// Make the request
BatchCreateCustomFieldsResponse response = await customFieldServiceClient.BatchCreateCustomFieldsAsync(parent, requests);

BatchCreateCustomFieldsAsync(string, IEnumerable<CreateCustomFieldRequest>, CancellationToken)

API to batch create CustomField objects.

Declaration
public virtual Task<BatchCreateCustomFieldsResponse> BatchCreateCustomFieldsAsync(string parent, IEnumerable<CreateCustomFieldRequest> requests, CancellationToken cancellationToken)
Parameters
Type Name Description
string parent

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

IEnumerable<CreateCustomFieldRequest> requests

Required. The CustomField 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<BatchCreateCustomFieldsResponse>

A Task containing the RPC response.

Sample code
// Create client
CustomFieldServiceClient customFieldServiceClient = await CustomFieldServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<CreateCustomFieldRequest> requests = new CreateCustomFieldRequest[]
{
    new CreateCustomFieldRequest(),
};
// Make the request
BatchCreateCustomFieldsResponse response = await customFieldServiceClient.BatchCreateCustomFieldsAsync(parent, requests);

BatchDeactivateCustomFields(BatchDeactivateCustomFieldsRequest, CallSettings)

Deactivates a list of CustomField objects.

Declaration
public virtual BatchDeactivateCustomFieldsResponse BatchDeactivateCustomFields(BatchDeactivateCustomFieldsRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
BatchDeactivateCustomFieldsRequest 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
BatchDeactivateCustomFieldsResponse

The RPC response.

Sample code
// Create client
CustomFieldServiceClient customFieldServiceClient = CustomFieldServiceClient.Create();
// Initialize request argument(s)
BatchDeactivateCustomFieldsRequest request = new BatchDeactivateCustomFieldsRequest
{
    ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
    CustomFieldNames =
    {
        CustomFieldName.FromNetworkCodeCustomField("[NETWORK_CODE]", "[CUSTOM_FIELD]"),
    },
};
// Make the request
BatchDeactivateCustomFieldsResponse response = customFieldServiceClient.BatchDeactivateCustomFields(request);

BatchDeactivateCustomFields(NetworkName, IEnumerable<CustomFieldName>, CallSettings)

Deactivates a list of CustomField objects.

Declaration
public virtual BatchDeactivateCustomFieldsResponse BatchDeactivateCustomFields(NetworkName parent, IEnumerable<CustomFieldName> names, CallSettings callSettings = null)
Parameters
Type Name Description
NetworkName parent

Required. Format: networks/{network_code}

IEnumerable<CustomFieldName> names

Required. The resource names of the CustomField objects to deactivate. Format: networks/{network_code}/customFields/{custom_field_id}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
BatchDeactivateCustomFieldsResponse

The RPC response.

Sample code
// Create client
CustomFieldServiceClient customFieldServiceClient = CustomFieldServiceClient.Create();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<CustomFieldName> names = new CustomFieldName[]
{
    CustomFieldName.FromNetworkCodeCustomField("[NETWORK_CODE]", "[CUSTOM_FIELD]"),
};
// Make the request
BatchDeactivateCustomFieldsResponse response = customFieldServiceClient.BatchDeactivateCustomFields(parent, names);

BatchDeactivateCustomFields(string, IEnumerable<string>, CallSettings)

Deactivates a list of CustomField objects.

Declaration
public virtual BatchDeactivateCustomFieldsResponse BatchDeactivateCustomFields(string parent, IEnumerable<string> names, CallSettings callSettings = null)
Parameters
Type Name Description
string parent

Required. Format: networks/{network_code}

IEnumerable<string> names

Required. The resource names of the CustomField objects to deactivate. Format: networks/{network_code}/customFields/{custom_field_id}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
BatchDeactivateCustomFieldsResponse

The RPC response.

Sample code
// Create client
CustomFieldServiceClient customFieldServiceClient = CustomFieldServiceClient.Create();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<string> names = new string[]
{
    "networks/[NETWORK_CODE]/customFields/[CUSTOM_FIELD]",
};
// Make the request
BatchDeactivateCustomFieldsResponse response = customFieldServiceClient.BatchDeactivateCustomFields(parent, names);

BatchDeactivateCustomFieldsAsync(BatchDeactivateCustomFieldsRequest, CallSettings)

Deactivates a list of CustomField objects.

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

A Task containing the RPC response.

Sample code
// Create client
CustomFieldServiceClient customFieldServiceClient = await CustomFieldServiceClient.CreateAsync();
// Initialize request argument(s)
BatchDeactivateCustomFieldsRequest request = new BatchDeactivateCustomFieldsRequest
{
    ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
    CustomFieldNames =
    {
        CustomFieldName.FromNetworkCodeCustomField("[NETWORK_CODE]", "[CUSTOM_FIELD]"),
    },
};
// Make the request
BatchDeactivateCustomFieldsResponse response = await customFieldServiceClient.BatchDeactivateCustomFieldsAsync(request);

BatchDeactivateCustomFieldsAsync(BatchDeactivateCustomFieldsRequest, CancellationToken)

Deactivates a list of CustomField objects.

Declaration
public virtual Task<BatchDeactivateCustomFieldsResponse> BatchDeactivateCustomFieldsAsync(BatchDeactivateCustomFieldsRequest request, CancellationToken cancellationToken)
Parameters
Type Name Description
BatchDeactivateCustomFieldsRequest 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<BatchDeactivateCustomFieldsResponse>

A Task containing the RPC response.

Sample code
// Create client
CustomFieldServiceClient customFieldServiceClient = await CustomFieldServiceClient.CreateAsync();
// Initialize request argument(s)
BatchDeactivateCustomFieldsRequest request = new BatchDeactivateCustomFieldsRequest
{
    ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
    CustomFieldNames =
    {
        CustomFieldName.FromNetworkCodeCustomField("[NETWORK_CODE]", "[CUSTOM_FIELD]"),
    },
};
// Make the request
BatchDeactivateCustomFieldsResponse response = await customFieldServiceClient.BatchDeactivateCustomFieldsAsync(request);

BatchDeactivateCustomFieldsAsync(NetworkName, IEnumerable<CustomFieldName>, CallSettings)

Deactivates a list of CustomField objects.

Declaration
public virtual Task<BatchDeactivateCustomFieldsResponse> BatchDeactivateCustomFieldsAsync(NetworkName parent, IEnumerable<CustomFieldName> names, CallSettings callSettings = null)
Parameters
Type Name Description
NetworkName parent

Required. Format: networks/{network_code}

IEnumerable<CustomFieldName> names

Required. The resource names of the CustomField objects to deactivate. Format: networks/{network_code}/customFields/{custom_field_id}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<BatchDeactivateCustomFieldsResponse>

A Task containing the RPC response.

Sample code
// Create client
CustomFieldServiceClient customFieldServiceClient = await CustomFieldServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<CustomFieldName> names = new CustomFieldName[]
{
    CustomFieldName.FromNetworkCodeCustomField("[NETWORK_CODE]", "[CUSTOM_FIELD]"),
};
// Make the request
BatchDeactivateCustomFieldsResponse response = await customFieldServiceClient.BatchDeactivateCustomFieldsAsync(parent, names);

BatchDeactivateCustomFieldsAsync(NetworkName, IEnumerable<CustomFieldName>, CancellationToken)

Deactivates a list of CustomField objects.

Declaration
public virtual Task<BatchDeactivateCustomFieldsResponse> BatchDeactivateCustomFieldsAsync(NetworkName parent, IEnumerable<CustomFieldName> names, CancellationToken cancellationToken)
Parameters
Type Name Description
NetworkName parent

Required. Format: networks/{network_code}

IEnumerable<CustomFieldName> names

Required. The resource names of the CustomField objects to deactivate. Format: networks/{network_code}/customFields/{custom_field_id}

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<BatchDeactivateCustomFieldsResponse>

A Task containing the RPC response.

Sample code
// Create client
CustomFieldServiceClient customFieldServiceClient = await CustomFieldServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<CustomFieldName> names = new CustomFieldName[]
{
    CustomFieldName.FromNetworkCodeCustomField("[NETWORK_CODE]", "[CUSTOM_FIELD]"),
};
// Make the request
BatchDeactivateCustomFieldsResponse response = await customFieldServiceClient.BatchDeactivateCustomFieldsAsync(parent, names);

BatchDeactivateCustomFieldsAsync(string, IEnumerable<string>, CallSettings)

Deactivates a list of CustomField objects.

Declaration
public virtual Task<BatchDeactivateCustomFieldsResponse> BatchDeactivateCustomFieldsAsync(string parent, IEnumerable<string> names, CallSettings callSettings = null)
Parameters
Type Name Description
string parent

Required. Format: networks/{network_code}

IEnumerable<string> names

Required. The resource names of the CustomField objects to deactivate. Format: networks/{network_code}/customFields/{custom_field_id}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<BatchDeactivateCustomFieldsResponse>

A Task containing the RPC response.

Sample code
// Create client
CustomFieldServiceClient customFieldServiceClient = await CustomFieldServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<string> names = new string[]
{
    "networks/[NETWORK_CODE]/customFields/[CUSTOM_FIELD]",
};
// Make the request
BatchDeactivateCustomFieldsResponse response = await customFieldServiceClient.BatchDeactivateCustomFieldsAsync(parent, names);

BatchDeactivateCustomFieldsAsync(string, IEnumerable<string>, CancellationToken)

Deactivates a list of CustomField objects.

Declaration
public virtual Task<BatchDeactivateCustomFieldsResponse> BatchDeactivateCustomFieldsAsync(string parent, IEnumerable<string> names, CancellationToken cancellationToken)
Parameters
Type Name Description
string parent

Required. Format: networks/{network_code}

IEnumerable<string> names

Required. The resource names of the CustomField objects to deactivate. Format: networks/{network_code}/customFields/{custom_field_id}

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<BatchDeactivateCustomFieldsResponse>

A Task containing the RPC response.

Sample code
// Create client
CustomFieldServiceClient customFieldServiceClient = await CustomFieldServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<string> names = new string[]
{
    "networks/[NETWORK_CODE]/customFields/[CUSTOM_FIELD]",
};
// Make the request
BatchDeactivateCustomFieldsResponse response = await customFieldServiceClient.BatchDeactivateCustomFieldsAsync(parent, names);

BatchUpdateCustomFields(BatchUpdateCustomFieldsRequest, CallSettings)

API to batch update CustomField objects.

Declaration
public virtual BatchUpdateCustomFieldsResponse BatchUpdateCustomFields(BatchUpdateCustomFieldsRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
BatchUpdateCustomFieldsRequest 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
BatchUpdateCustomFieldsResponse

The RPC response.

Sample code
// Create client
CustomFieldServiceClient customFieldServiceClient = CustomFieldServiceClient.Create();
// Initialize request argument(s)
BatchUpdateCustomFieldsRequest request = new BatchUpdateCustomFieldsRequest
{
    ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
    Requests =
    {
        new UpdateCustomFieldRequest(),
    },
};
// Make the request
BatchUpdateCustomFieldsResponse response = customFieldServiceClient.BatchUpdateCustomFields(request);

BatchUpdateCustomFields(NetworkName, IEnumerable<UpdateCustomFieldRequest>, CallSettings)

API to batch update CustomField objects.

Declaration
public virtual BatchUpdateCustomFieldsResponse BatchUpdateCustomFields(NetworkName parent, IEnumerable<UpdateCustomFieldRequest> requests, CallSettings callSettings = null)
Parameters
Type Name Description
NetworkName parent

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

IEnumerable<UpdateCustomFieldRequest> requests

Required. The CustomField 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
BatchUpdateCustomFieldsResponse

The RPC response.

Sample code
// Create client
CustomFieldServiceClient customFieldServiceClient = CustomFieldServiceClient.Create();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<UpdateCustomFieldRequest> requests = new UpdateCustomFieldRequest[]
{
    new UpdateCustomFieldRequest(),
};
// Make the request
BatchUpdateCustomFieldsResponse response = customFieldServiceClient.BatchUpdateCustomFields(parent, requests);

BatchUpdateCustomFields(string, IEnumerable<UpdateCustomFieldRequest>, CallSettings)

API to batch update CustomField objects.

Declaration
public virtual BatchUpdateCustomFieldsResponse BatchUpdateCustomFields(string parent, IEnumerable<UpdateCustomFieldRequest> requests, CallSettings callSettings = null)
Parameters
Type Name Description
string parent

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

IEnumerable<UpdateCustomFieldRequest> requests

Required. The CustomField 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
BatchUpdateCustomFieldsResponse

The RPC response.

Sample code
// Create client
CustomFieldServiceClient customFieldServiceClient = CustomFieldServiceClient.Create();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<UpdateCustomFieldRequest> requests = new UpdateCustomFieldRequest[]
{
    new UpdateCustomFieldRequest(),
};
// Make the request
BatchUpdateCustomFieldsResponse response = customFieldServiceClient.BatchUpdateCustomFields(parent, requests);

BatchUpdateCustomFieldsAsync(BatchUpdateCustomFieldsRequest, CallSettings)

API to batch update CustomField objects.

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

A Task containing the RPC response.

Sample code
// Create client
CustomFieldServiceClient customFieldServiceClient = await CustomFieldServiceClient.CreateAsync();
// Initialize request argument(s)
BatchUpdateCustomFieldsRequest request = new BatchUpdateCustomFieldsRequest
{
    ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
    Requests =
    {
        new UpdateCustomFieldRequest(),
    },
};
// Make the request
BatchUpdateCustomFieldsResponse response = await customFieldServiceClient.BatchUpdateCustomFieldsAsync(request);

BatchUpdateCustomFieldsAsync(BatchUpdateCustomFieldsRequest, CancellationToken)

API to batch update CustomField objects.

Declaration
public virtual Task<BatchUpdateCustomFieldsResponse> BatchUpdateCustomFieldsAsync(BatchUpdateCustomFieldsRequest request, CancellationToken cancellationToken)
Parameters
Type Name Description
BatchUpdateCustomFieldsRequest 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<BatchUpdateCustomFieldsResponse>

A Task containing the RPC response.

Sample code
// Create client
CustomFieldServiceClient customFieldServiceClient = await CustomFieldServiceClient.CreateAsync();
// Initialize request argument(s)
BatchUpdateCustomFieldsRequest request = new BatchUpdateCustomFieldsRequest
{
    ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
    Requests =
    {
        new UpdateCustomFieldRequest(),
    },
};
// Make the request
BatchUpdateCustomFieldsResponse response = await customFieldServiceClient.BatchUpdateCustomFieldsAsync(request);

BatchUpdateCustomFieldsAsync(NetworkName, IEnumerable<UpdateCustomFieldRequest>, CallSettings)

API to batch update CustomField objects.

Declaration
public virtual Task<BatchUpdateCustomFieldsResponse> BatchUpdateCustomFieldsAsync(NetworkName parent, IEnumerable<UpdateCustomFieldRequest> requests, CallSettings callSettings = null)
Parameters
Type Name Description
NetworkName parent

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

IEnumerable<UpdateCustomFieldRequest> requests

Required. The CustomField 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<BatchUpdateCustomFieldsResponse>

A Task containing the RPC response.

Sample code
// Create client
CustomFieldServiceClient customFieldServiceClient = await CustomFieldServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<UpdateCustomFieldRequest> requests = new UpdateCustomFieldRequest[]
{
    new UpdateCustomFieldRequest(),
};
// Make the request
BatchUpdateCustomFieldsResponse response = await customFieldServiceClient.BatchUpdateCustomFieldsAsync(parent, requests);

BatchUpdateCustomFieldsAsync(NetworkName, IEnumerable<UpdateCustomFieldRequest>, CancellationToken)

API to batch update CustomField objects.

Declaration
public virtual Task<BatchUpdateCustomFieldsResponse> BatchUpdateCustomFieldsAsync(NetworkName parent, IEnumerable<UpdateCustomFieldRequest> requests, CancellationToken cancellationToken)
Parameters
Type Name Description
NetworkName parent

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

IEnumerable<UpdateCustomFieldRequest> requests

Required. The CustomField 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<BatchUpdateCustomFieldsResponse>

A Task containing the RPC response.

Sample code
// Create client
CustomFieldServiceClient customFieldServiceClient = await CustomFieldServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<UpdateCustomFieldRequest> requests = new UpdateCustomFieldRequest[]
{
    new UpdateCustomFieldRequest(),
};
// Make the request
BatchUpdateCustomFieldsResponse response = await customFieldServiceClient.BatchUpdateCustomFieldsAsync(parent, requests);

BatchUpdateCustomFieldsAsync(string, IEnumerable<UpdateCustomFieldRequest>, CallSettings)

API to batch update CustomField objects.

Declaration
public virtual Task<BatchUpdateCustomFieldsResponse> BatchUpdateCustomFieldsAsync(string parent, IEnumerable<UpdateCustomFieldRequest> requests, CallSettings callSettings = null)
Parameters
Type Name Description
string parent

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

IEnumerable<UpdateCustomFieldRequest> requests

Required. The CustomField 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<BatchUpdateCustomFieldsResponse>

A Task containing the RPC response.

Sample code
// Create client
CustomFieldServiceClient customFieldServiceClient = await CustomFieldServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<UpdateCustomFieldRequest> requests = new UpdateCustomFieldRequest[]
{
    new UpdateCustomFieldRequest(),
};
// Make the request
BatchUpdateCustomFieldsResponse response = await customFieldServiceClient.BatchUpdateCustomFieldsAsync(parent, requests);

BatchUpdateCustomFieldsAsync(string, IEnumerable<UpdateCustomFieldRequest>, CancellationToken)

API to batch update CustomField objects.

Declaration
public virtual Task<BatchUpdateCustomFieldsResponse> BatchUpdateCustomFieldsAsync(string parent, IEnumerable<UpdateCustomFieldRequest> requests, CancellationToken cancellationToken)
Parameters
Type Name Description
string parent

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

IEnumerable<UpdateCustomFieldRequest> requests

Required. The CustomField 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<BatchUpdateCustomFieldsResponse>

A Task containing the RPC response.

Sample code
// Create client
CustomFieldServiceClient customFieldServiceClient = await CustomFieldServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<UpdateCustomFieldRequest> requests = new UpdateCustomFieldRequest[]
{
    new UpdateCustomFieldRequest(),
};
// Make the request
BatchUpdateCustomFieldsResponse response = await customFieldServiceClient.BatchUpdateCustomFieldsAsync(parent, requests);

Create()

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

Declaration
public static CustomFieldServiceClient Create()
Returns
Type Description
CustomFieldServiceClient

The created CustomFieldServiceClient.

CreateAsync(CancellationToken)

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

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

The CancellationToken to use while creating the client.

Returns
Type Description
Task<CustomFieldServiceClient>

The task representing the created CustomFieldServiceClient.

CreateCustomField(CreateCustomFieldRequest, CallSettings)

API to create a CustomField object.

Declaration
public virtual CustomField CreateCustomField(CreateCustomFieldRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
CreateCustomFieldRequest 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
CustomField

The RPC response.

Sample code
// Create client
CustomFieldServiceClient customFieldServiceClient = CustomFieldServiceClient.Create();
// Initialize request argument(s)
CreateCustomFieldRequest request = new CreateCustomFieldRequest
{
    ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
    CustomField = new CustomField(),
};
// Make the request
CustomField response = customFieldServiceClient.CreateCustomField(request);

CreateCustomField(NetworkName, CustomField, CallSettings)

API to create a CustomField object.

Declaration
public virtual CustomField CreateCustomField(NetworkName parent, CustomField customField, CallSettings callSettings = null)
Parameters
Type Name Description
NetworkName parent

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

CustomField customField

Required. The CustomField to create.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
CustomField

The RPC response.

Sample code
// Create client
CustomFieldServiceClient customFieldServiceClient = CustomFieldServiceClient.Create();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
CustomField customField = new CustomField();
// Make the request
CustomField response = customFieldServiceClient.CreateCustomField(parent, customField);

CreateCustomField(string, CustomField, CallSettings)

API to create a CustomField object.

Declaration
public virtual CustomField CreateCustomField(string parent, CustomField customField, CallSettings callSettings = null)
Parameters
Type Name Description
string parent

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

CustomField customField

Required. The CustomField to create.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
CustomField

The RPC response.

Sample code
// Create client
CustomFieldServiceClient customFieldServiceClient = CustomFieldServiceClient.Create();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
CustomField customField = new CustomField();
// Make the request
CustomField response = customFieldServiceClient.CreateCustomField(parent, customField);

CreateCustomFieldAsync(CreateCustomFieldRequest, CallSettings)

API to create a CustomField object.

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

A Task containing the RPC response.

Sample code
// Create client
CustomFieldServiceClient customFieldServiceClient = await CustomFieldServiceClient.CreateAsync();
// Initialize request argument(s)
CreateCustomFieldRequest request = new CreateCustomFieldRequest
{
    ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
    CustomField = new CustomField(),
};
// Make the request
CustomField response = await customFieldServiceClient.CreateCustomFieldAsync(request);

CreateCustomFieldAsync(CreateCustomFieldRequest, CancellationToken)

API to create a CustomField object.

Declaration
public virtual Task<CustomField> CreateCustomFieldAsync(CreateCustomFieldRequest request, CancellationToken cancellationToken)
Parameters
Type Name Description
CreateCustomFieldRequest 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<CustomField>

A Task containing the RPC response.

Sample code
// Create client
CustomFieldServiceClient customFieldServiceClient = await CustomFieldServiceClient.CreateAsync();
// Initialize request argument(s)
CreateCustomFieldRequest request = new CreateCustomFieldRequest
{
    ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
    CustomField = new CustomField(),
};
// Make the request
CustomField response = await customFieldServiceClient.CreateCustomFieldAsync(request);

CreateCustomFieldAsync(NetworkName, CustomField, CallSettings)

API to create a CustomField object.

Declaration
public virtual Task<CustomField> CreateCustomFieldAsync(NetworkName parent, CustomField customField, CallSettings callSettings = null)
Parameters
Type Name Description
NetworkName parent

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

CustomField customField

Required. The CustomField to create.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<CustomField>

A Task containing the RPC response.

Sample code
// Create client
CustomFieldServiceClient customFieldServiceClient = await CustomFieldServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
CustomField customField = new CustomField();
// Make the request
CustomField response = await customFieldServiceClient.CreateCustomFieldAsync(parent, customField);

CreateCustomFieldAsync(NetworkName, CustomField, CancellationToken)

API to create a CustomField object.

Declaration
public virtual Task<CustomField> CreateCustomFieldAsync(NetworkName parent, CustomField customField, CancellationToken cancellationToken)
Parameters
Type Name Description
NetworkName parent

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

CustomField customField

Required. The CustomField to create.

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<CustomField>

A Task containing the RPC response.

Sample code
// Create client
CustomFieldServiceClient customFieldServiceClient = await CustomFieldServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
CustomField customField = new CustomField();
// Make the request
CustomField response = await customFieldServiceClient.CreateCustomFieldAsync(parent, customField);

CreateCustomFieldAsync(string, CustomField, CallSettings)

API to create a CustomField object.

Declaration
public virtual Task<CustomField> CreateCustomFieldAsync(string parent, CustomField customField, CallSettings callSettings = null)
Parameters
Type Name Description
string parent

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

CustomField customField

Required. The CustomField to create.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<CustomField>

A Task containing the RPC response.

Sample code
// Create client
CustomFieldServiceClient customFieldServiceClient = await CustomFieldServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
CustomField customField = new CustomField();
// Make the request
CustomField response = await customFieldServiceClient.CreateCustomFieldAsync(parent, customField);

CreateCustomFieldAsync(string, CustomField, CancellationToken)

API to create a CustomField object.

Declaration
public virtual Task<CustomField> CreateCustomFieldAsync(string parent, CustomField customField, CancellationToken cancellationToken)
Parameters
Type Name Description
string parent

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

CustomField customField

Required. The CustomField to create.

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<CustomField>

A Task containing the RPC response.

Sample code
// Create client
CustomFieldServiceClient customFieldServiceClient = await CustomFieldServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
CustomField customField = new CustomField();
// Make the request
CustomField response = await customFieldServiceClient.CreateCustomFieldAsync(parent, customField);

GetCustomField(CustomFieldName, CallSettings)

API to retrieve a CustomField object.

Declaration
public virtual CustomField GetCustomField(CustomFieldName name, CallSettings callSettings = null)
Parameters
Type Name Description
CustomFieldName name

Required. The resource name of the CustomField. Format: networks/{network_code}/customFields/{custom_field_id}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
CustomField

The RPC response.

Sample code
// Create client
CustomFieldServiceClient customFieldServiceClient = CustomFieldServiceClient.Create();
// Initialize request argument(s)
CustomFieldName name = CustomFieldName.FromNetworkCodeCustomField("[NETWORK_CODE]", "[CUSTOM_FIELD]");
// Make the request
CustomField response = customFieldServiceClient.GetCustomField(name);

GetCustomField(GetCustomFieldRequest, CallSettings)

API to retrieve a CustomField object.

Declaration
public virtual CustomField GetCustomField(GetCustomFieldRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
GetCustomFieldRequest 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
CustomField

The RPC response.

Sample code
// Create client
CustomFieldServiceClient customFieldServiceClient = CustomFieldServiceClient.Create();
// Initialize request argument(s)
GetCustomFieldRequest request = new GetCustomFieldRequest
{
    CustomFieldName = CustomFieldName.FromNetworkCodeCustomField("[NETWORK_CODE]", "[CUSTOM_FIELD]"),
};
// Make the request
CustomField response = customFieldServiceClient.GetCustomField(request);

GetCustomField(string, CallSettings)

API to retrieve a CustomField object.

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

Required. The resource name of the CustomField. Format: networks/{network_code}/customFields/{custom_field_id}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
CustomField

The RPC response.

Sample code
// Create client
CustomFieldServiceClient customFieldServiceClient = CustomFieldServiceClient.Create();
// Initialize request argument(s)
string name = "networks/[NETWORK_CODE]/customFields/[CUSTOM_FIELD]";
// Make the request
CustomField response = customFieldServiceClient.GetCustomField(name);

GetCustomFieldAsync(CustomFieldName, CallSettings)

API to retrieve a CustomField object.

Declaration
public virtual Task<CustomField> GetCustomFieldAsync(CustomFieldName name, CallSettings callSettings = null)
Parameters
Type Name Description
CustomFieldName name

Required. The resource name of the CustomField. Format: networks/{network_code}/customFields/{custom_field_id}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<CustomField>

A Task containing the RPC response.

Sample code
// Create client
CustomFieldServiceClient customFieldServiceClient = await CustomFieldServiceClient.CreateAsync();
// Initialize request argument(s)
CustomFieldName name = CustomFieldName.FromNetworkCodeCustomField("[NETWORK_CODE]", "[CUSTOM_FIELD]");
// Make the request
CustomField response = await customFieldServiceClient.GetCustomFieldAsync(name);

GetCustomFieldAsync(CustomFieldName, CancellationToken)

API to retrieve a CustomField object.

Declaration
public virtual Task<CustomField> GetCustomFieldAsync(CustomFieldName name, CancellationToken cancellationToken)
Parameters
Type Name Description
CustomFieldName name

Required. The resource name of the CustomField. Format: networks/{network_code}/customFields/{custom_field_id}

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<CustomField>

A Task containing the RPC response.

Sample code
// Create client
CustomFieldServiceClient customFieldServiceClient = await CustomFieldServiceClient.CreateAsync();
// Initialize request argument(s)
CustomFieldName name = CustomFieldName.FromNetworkCodeCustomField("[NETWORK_CODE]", "[CUSTOM_FIELD]");
// Make the request
CustomField response = await customFieldServiceClient.GetCustomFieldAsync(name);

GetCustomFieldAsync(GetCustomFieldRequest, CallSettings)

API to retrieve a CustomField object.

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

A Task containing the RPC response.

Sample code
// Create client
CustomFieldServiceClient customFieldServiceClient = await CustomFieldServiceClient.CreateAsync();
// Initialize request argument(s)
GetCustomFieldRequest request = new GetCustomFieldRequest
{
    CustomFieldName = CustomFieldName.FromNetworkCodeCustomField("[NETWORK_CODE]", "[CUSTOM_FIELD]"),
};
// Make the request
CustomField response = await customFieldServiceClient.GetCustomFieldAsync(request);

GetCustomFieldAsync(GetCustomFieldRequest, CancellationToken)

API to retrieve a CustomField object.

Declaration
public virtual Task<CustomField> GetCustomFieldAsync(GetCustomFieldRequest request, CancellationToken cancellationToken)
Parameters
Type Name Description
GetCustomFieldRequest 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<CustomField>

A Task containing the RPC response.

Sample code
// Create client
CustomFieldServiceClient customFieldServiceClient = await CustomFieldServiceClient.CreateAsync();
// Initialize request argument(s)
GetCustomFieldRequest request = new GetCustomFieldRequest
{
    CustomFieldName = CustomFieldName.FromNetworkCodeCustomField("[NETWORK_CODE]", "[CUSTOM_FIELD]"),
};
// Make the request
CustomField response = await customFieldServiceClient.GetCustomFieldAsync(request);

GetCustomFieldAsync(string, CallSettings)

API to retrieve a CustomField object.

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

Required. The resource name of the CustomField. Format: networks/{network_code}/customFields/{custom_field_id}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<CustomField>

A Task containing the RPC response.

Sample code
// Create client
CustomFieldServiceClient customFieldServiceClient = await CustomFieldServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "networks/[NETWORK_CODE]/customFields/[CUSTOM_FIELD]";
// Make the request
CustomField response = await customFieldServiceClient.GetCustomFieldAsync(name);

GetCustomFieldAsync(string, CancellationToken)

API to retrieve a CustomField object.

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

Required. The resource name of the CustomField. Format: networks/{network_code}/customFields/{custom_field_id}

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<CustomField>

A Task containing the RPC response.

Sample code
// Create client
CustomFieldServiceClient customFieldServiceClient = await CustomFieldServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "networks/[NETWORK_CODE]/customFields/[CUSTOM_FIELD]";
// Make the request
CustomField response = await customFieldServiceClient.GetCustomFieldAsync(name);

ListCustomFields(ListCustomFieldsRequest, CallSettings)

API to retrieve a list of CustomField objects.

Declaration
public virtual PagedEnumerable<ListCustomFieldsResponse, CustomField> ListCustomFields(ListCustomFieldsRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
ListCustomFieldsRequest 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<ListCustomFieldsResponse, CustomField>

A pageable sequence of CustomField resources.

Sample code
// Create client
CustomFieldServiceClient customFieldServiceClient = CustomFieldServiceClient.Create();
// Initialize request argument(s)
ListCustomFieldsRequest request = new ListCustomFieldsRequest
{
    ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
    Filter = "",
    OrderBy = "",
    Skip = 0,
};
// Make the request
PagedEnumerable<ListCustomFieldsResponse, CustomField> response = customFieldServiceClient.ListCustomFields(request);

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

ListCustomFields(NetworkName, string, int?, CallSettings)

API to retrieve a list of CustomField objects.

Declaration
public virtual PagedEnumerable<ListCustomFieldsResponse, CustomField> ListCustomFields(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 CustomFields. 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<ListCustomFieldsResponse, CustomField>

A pageable sequence of CustomField resources.

Sample code
// Create client
CustomFieldServiceClient customFieldServiceClient = CustomFieldServiceClient.Create();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
// Make the request
PagedEnumerable<ListCustomFieldsResponse, CustomField> response = customFieldServiceClient.ListCustomFields(parent);

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

ListCustomFields(string, string, int?, CallSettings)

API to retrieve a list of CustomField objects.

Declaration
public virtual PagedEnumerable<ListCustomFieldsResponse, CustomField> ListCustomFields(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 CustomFields. 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<ListCustomFieldsResponse, CustomField>

A pageable sequence of CustomField resources.

Sample code
// Create client
CustomFieldServiceClient customFieldServiceClient = CustomFieldServiceClient.Create();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
// Make the request
PagedEnumerable<ListCustomFieldsResponse, CustomField> response = customFieldServiceClient.ListCustomFields(parent);

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

ListCustomFieldsAsync(ListCustomFieldsRequest, CallSettings)

API to retrieve a list of CustomField objects.

Declaration
public virtual PagedAsyncEnumerable<ListCustomFieldsResponse, CustomField> ListCustomFieldsAsync(ListCustomFieldsRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
ListCustomFieldsRequest 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<ListCustomFieldsResponse, CustomField>

A pageable asynchronous sequence of CustomField resources.

Sample code
// Create client
CustomFieldServiceClient customFieldServiceClient = await CustomFieldServiceClient.CreateAsync();
// Initialize request argument(s)
ListCustomFieldsRequest request = new ListCustomFieldsRequest
{
    ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
    Filter = "",
    OrderBy = "",
    Skip = 0,
};
// Make the request
PagedAsyncEnumerable<ListCustomFieldsResponse, CustomField> response = customFieldServiceClient.ListCustomFieldsAsync(request);

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

ListCustomFieldsAsync(NetworkName, string, int?, CallSettings)

API to retrieve a list of CustomField objects.

Declaration
public virtual PagedAsyncEnumerable<ListCustomFieldsResponse, CustomField> ListCustomFieldsAsync(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 CustomFields. 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<ListCustomFieldsResponse, CustomField>

A pageable asynchronous sequence of CustomField resources.

Sample code
// Create client
CustomFieldServiceClient customFieldServiceClient = await CustomFieldServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
// Make the request
PagedAsyncEnumerable<ListCustomFieldsResponse, CustomField> response = customFieldServiceClient.ListCustomFieldsAsync(parent);

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

ListCustomFieldsAsync(string, string, int?, CallSettings)

API to retrieve a list of CustomField objects.

Declaration
public virtual PagedAsyncEnumerable<ListCustomFieldsResponse, CustomField> ListCustomFieldsAsync(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 CustomFields. 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<ListCustomFieldsResponse, CustomField>

A pageable asynchronous sequence of CustomField resources.

Sample code
// Create client
CustomFieldServiceClient customFieldServiceClient = await CustomFieldServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
// Make the request
PagedAsyncEnumerable<ListCustomFieldsResponse, CustomField> response = customFieldServiceClient.ListCustomFieldsAsync(parent);

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

UpdateCustomField(CustomField, FieldMask, CallSettings)

API to update a CustomField object.

Declaration
public virtual CustomField UpdateCustomField(CustomField customField, FieldMask updateMask, CallSettings callSettings = null)
Parameters
Type Name Description
CustomField customField

Required. The CustomField to update.

The CustomField's name is used to identify the CustomField 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
CustomField

The RPC response.

Sample code
// Create client
CustomFieldServiceClient customFieldServiceClient = CustomFieldServiceClient.Create();
// Initialize request argument(s)
CustomField customField = new CustomField();
FieldMask updateMask = new FieldMask();
// Make the request
CustomField response = customFieldServiceClient.UpdateCustomField(customField, updateMask);

UpdateCustomField(UpdateCustomFieldRequest, CallSettings)

API to update a CustomField object.

Declaration
public virtual CustomField UpdateCustomField(UpdateCustomFieldRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
UpdateCustomFieldRequest 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
CustomField

The RPC response.

Sample code
// Create client
CustomFieldServiceClient customFieldServiceClient = CustomFieldServiceClient.Create();
// Initialize request argument(s)
UpdateCustomFieldRequest request = new UpdateCustomFieldRequest
{
    CustomField = new CustomField(),
    UpdateMask = new FieldMask(),
};
// Make the request
CustomField response = customFieldServiceClient.UpdateCustomField(request);

UpdateCustomFieldAsync(CustomField, FieldMask, CallSettings)

API to update a CustomField object.

Declaration
public virtual Task<CustomField> UpdateCustomFieldAsync(CustomField customField, FieldMask updateMask, CallSettings callSettings = null)
Parameters
Type Name Description
CustomField customField

Required. The CustomField to update.

The CustomField's name is used to identify the CustomField 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<CustomField>

A Task containing the RPC response.

Sample code
// Create client
CustomFieldServiceClient customFieldServiceClient = await CustomFieldServiceClient.CreateAsync();
// Initialize request argument(s)
CustomField customField = new CustomField();
FieldMask updateMask = new FieldMask();
// Make the request
CustomField response = await customFieldServiceClient.UpdateCustomFieldAsync(customField, updateMask);

UpdateCustomFieldAsync(CustomField, FieldMask, CancellationToken)

API to update a CustomField object.

Declaration
public virtual Task<CustomField> UpdateCustomFieldAsync(CustomField customField, FieldMask updateMask, CancellationToken cancellationToken)
Parameters
Type Name Description
CustomField customField

Required. The CustomField to update.

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

FieldMask updateMask

Required. The list of fields to update.

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<CustomField>

A Task containing the RPC response.

Sample code
// Create client
CustomFieldServiceClient customFieldServiceClient = await CustomFieldServiceClient.CreateAsync();
// Initialize request argument(s)
CustomField customField = new CustomField();
FieldMask updateMask = new FieldMask();
// Make the request
CustomField response = await customFieldServiceClient.UpdateCustomFieldAsync(customField, updateMask);

UpdateCustomFieldAsync(UpdateCustomFieldRequest, CallSettings)

API to update a CustomField object.

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

A Task containing the RPC response.

Sample code
// Create client
CustomFieldServiceClient customFieldServiceClient = await CustomFieldServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateCustomFieldRequest request = new UpdateCustomFieldRequest
{
    CustomField = new CustomField(),
    UpdateMask = new FieldMask(),
};
// Make the request
CustomField response = await customFieldServiceClient.UpdateCustomFieldAsync(request);

UpdateCustomFieldAsync(UpdateCustomFieldRequest, CancellationToken)

API to update a CustomField object.

Declaration
public virtual Task<CustomField> UpdateCustomFieldAsync(UpdateCustomFieldRequest request, CancellationToken cancellationToken)
Parameters
Type Name Description
UpdateCustomFieldRequest 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<CustomField>

A Task containing the RPC response.

Sample code
// Create client
CustomFieldServiceClient customFieldServiceClient = await CustomFieldServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateCustomFieldRequest request = new UpdateCustomFieldRequest
{
    CustomField = new CustomField(),
    UpdateMask = new FieldMask(),
};
// Make the request
CustomField response = await customFieldServiceClient.UpdateCustomFieldAsync(request);
In this article
Back to top Generated by DocFX