Show / Hide Table of Contents

Class SiteServiceClient

SiteService client wrapper, for convenient use.

Inheritance
object
SiteServiceClient
SiteServiceClientImpl
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 SiteServiceClient
Remarks

Provides methods for handling Site objects.

Properties

DefaultEndpoint

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

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

The default SiteService scopes are:

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

GrpcClient

The underlying gRPC SiteService client

Declaration
public virtual SiteService.SiteServiceClient GrpcClient { get; }
Property Value
Type Description
SiteService.SiteServiceClient

ServiceMetadata

The service metadata associated with this client type.

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

Methods

BatchCreateSites(BatchCreateSitesRequest, CallSettings)

API to batch create Site objects.

Declaration
public virtual BatchCreateSitesResponse BatchCreateSites(BatchCreateSitesRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
BatchCreateSitesRequest 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
BatchCreateSitesResponse

The RPC response.

Sample code
// Create client
SiteServiceClient siteServiceClient = SiteServiceClient.Create();
// Initialize request argument(s)
BatchCreateSitesRequest request = new BatchCreateSitesRequest
{
    ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
    Requests =
    {
        new CreateSiteRequest(),
    },
};
// Make the request
BatchCreateSitesResponse response = siteServiceClient.BatchCreateSites(request);

BatchCreateSites(NetworkName, IEnumerable<CreateSiteRequest>, CallSettings)

API to batch create Site objects.

Declaration
public virtual BatchCreateSitesResponse BatchCreateSites(NetworkName parent, IEnumerable<CreateSiteRequest> requests, CallSettings callSettings = null)
Parameters
Type Name Description
NetworkName parent

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

IEnumerable<CreateSiteRequest> requests

Required. The Site 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
BatchCreateSitesResponse

The RPC response.

Sample code
// Create client
SiteServiceClient siteServiceClient = SiteServiceClient.Create();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<CreateSiteRequest> requests = new CreateSiteRequest[]
{
    new CreateSiteRequest(),
};
// Make the request
BatchCreateSitesResponse response = siteServiceClient.BatchCreateSites(parent, requests);

BatchCreateSites(string, IEnumerable<CreateSiteRequest>, CallSettings)

API to batch create Site objects.

Declaration
public virtual BatchCreateSitesResponse BatchCreateSites(string parent, IEnumerable<CreateSiteRequest> requests, CallSettings callSettings = null)
Parameters
Type Name Description
string parent

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

IEnumerable<CreateSiteRequest> requests

Required. The Site 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
BatchCreateSitesResponse

The RPC response.

Sample code
// Create client
SiteServiceClient siteServiceClient = SiteServiceClient.Create();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<CreateSiteRequest> requests = new CreateSiteRequest[]
{
    new CreateSiteRequest(),
};
// Make the request
BatchCreateSitesResponse response = siteServiceClient.BatchCreateSites(parent, requests);

BatchCreateSitesAsync(BatchCreateSitesRequest, CallSettings)

API to batch create Site objects.

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

A Task containing the RPC response.

Sample code
// Create client
SiteServiceClient siteServiceClient = await SiteServiceClient.CreateAsync();
// Initialize request argument(s)
BatchCreateSitesRequest request = new BatchCreateSitesRequest
{
    ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
    Requests =
    {
        new CreateSiteRequest(),
    },
};
// Make the request
BatchCreateSitesResponse response = await siteServiceClient.BatchCreateSitesAsync(request);

BatchCreateSitesAsync(BatchCreateSitesRequest, CancellationToken)

API to batch create Site objects.

Declaration
public virtual Task<BatchCreateSitesResponse> BatchCreateSitesAsync(BatchCreateSitesRequest request, CancellationToken cancellationToken)
Parameters
Type Name Description
BatchCreateSitesRequest 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<BatchCreateSitesResponse>

A Task containing the RPC response.

Sample code
// Create client
SiteServiceClient siteServiceClient = await SiteServiceClient.CreateAsync();
// Initialize request argument(s)
BatchCreateSitesRequest request = new BatchCreateSitesRequest
{
    ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
    Requests =
    {
        new CreateSiteRequest(),
    },
};
// Make the request
BatchCreateSitesResponse response = await siteServiceClient.BatchCreateSitesAsync(request);

BatchCreateSitesAsync(NetworkName, IEnumerable<CreateSiteRequest>, CallSettings)

API to batch create Site objects.

Declaration
public virtual Task<BatchCreateSitesResponse> BatchCreateSitesAsync(NetworkName parent, IEnumerable<CreateSiteRequest> requests, CallSettings callSettings = null)
Parameters
Type Name Description
NetworkName parent

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

IEnumerable<CreateSiteRequest> requests

Required. The Site 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<BatchCreateSitesResponse>

A Task containing the RPC response.

Sample code
// Create client
SiteServiceClient siteServiceClient = await SiteServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<CreateSiteRequest> requests = new CreateSiteRequest[]
{
    new CreateSiteRequest(),
};
// Make the request
BatchCreateSitesResponse response = await siteServiceClient.BatchCreateSitesAsync(parent, requests);

BatchCreateSitesAsync(NetworkName, IEnumerable<CreateSiteRequest>, CancellationToken)

API to batch create Site objects.

Declaration
public virtual Task<BatchCreateSitesResponse> BatchCreateSitesAsync(NetworkName parent, IEnumerable<CreateSiteRequest> requests, CancellationToken cancellationToken)
Parameters
Type Name Description
NetworkName parent

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

IEnumerable<CreateSiteRequest> requests

Required. The Site 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<BatchCreateSitesResponse>

A Task containing the RPC response.

Sample code
// Create client
SiteServiceClient siteServiceClient = await SiteServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<CreateSiteRequest> requests = new CreateSiteRequest[]
{
    new CreateSiteRequest(),
};
// Make the request
BatchCreateSitesResponse response = await siteServiceClient.BatchCreateSitesAsync(parent, requests);

BatchCreateSitesAsync(string, IEnumerable<CreateSiteRequest>, CallSettings)

API to batch create Site objects.

Declaration
public virtual Task<BatchCreateSitesResponse> BatchCreateSitesAsync(string parent, IEnumerable<CreateSiteRequest> requests, CallSettings callSettings = null)
Parameters
Type Name Description
string parent

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

IEnumerable<CreateSiteRequest> requests

Required. The Site 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<BatchCreateSitesResponse>

A Task containing the RPC response.

Sample code
// Create client
SiteServiceClient siteServiceClient = await SiteServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<CreateSiteRequest> requests = new CreateSiteRequest[]
{
    new CreateSiteRequest(),
};
// Make the request
BatchCreateSitesResponse response = await siteServiceClient.BatchCreateSitesAsync(parent, requests);

BatchCreateSitesAsync(string, IEnumerable<CreateSiteRequest>, CancellationToken)

API to batch create Site objects.

Declaration
public virtual Task<BatchCreateSitesResponse> BatchCreateSitesAsync(string parent, IEnumerable<CreateSiteRequest> requests, CancellationToken cancellationToken)
Parameters
Type Name Description
string parent

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

IEnumerable<CreateSiteRequest> requests

Required. The Site 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<BatchCreateSitesResponse>

A Task containing the RPC response.

Sample code
// Create client
SiteServiceClient siteServiceClient = await SiteServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<CreateSiteRequest> requests = new CreateSiteRequest[]
{
    new CreateSiteRequest(),
};
// Make the request
BatchCreateSitesResponse response = await siteServiceClient.BatchCreateSitesAsync(parent, requests);

BatchDeactivateSites(BatchDeactivateSitesRequest, CallSettings)

Deactivates a list of Site objects.

Declaration
public virtual BatchDeactivateSitesResponse BatchDeactivateSites(BatchDeactivateSitesRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
BatchDeactivateSitesRequest 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
BatchDeactivateSitesResponse

The RPC response.

Sample code
// Create client
SiteServiceClient siteServiceClient = SiteServiceClient.Create();
// Initialize request argument(s)
BatchDeactivateSitesRequest request = new BatchDeactivateSitesRequest
{
    ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
    Names = { "", },
};
// Make the request
BatchDeactivateSitesResponse response = siteServiceClient.BatchDeactivateSites(request);

BatchDeactivateSites(NetworkName, IEnumerable<string>, CallSettings)

Deactivates a list of Site objects.

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

Required. Format: networks/{network_code}

IEnumerable<string> names

Required. The resource names of the Site objects to deactivate.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
BatchDeactivateSitesResponse

The RPC response.

Sample code
// Create client
SiteServiceClient siteServiceClient = SiteServiceClient.Create();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<string> names = new string[] { "", };
// Make the request
BatchDeactivateSitesResponse response = siteServiceClient.BatchDeactivateSites(parent, names);

BatchDeactivateSites(string, IEnumerable<string>, CallSettings)

Deactivates a list of Site objects.

Declaration
public virtual BatchDeactivateSitesResponse BatchDeactivateSites(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 Site objects to deactivate.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
BatchDeactivateSitesResponse

The RPC response.

Sample code
// Create client
SiteServiceClient siteServiceClient = SiteServiceClient.Create();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<string> names = new string[] { "", };
// Make the request
BatchDeactivateSitesResponse response = siteServiceClient.BatchDeactivateSites(parent, names);

BatchDeactivateSitesAsync(BatchDeactivateSitesRequest, CallSettings)

Deactivates a list of Site objects.

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

A Task containing the RPC response.

Sample code
// Create client
SiteServiceClient siteServiceClient = await SiteServiceClient.CreateAsync();
// Initialize request argument(s)
BatchDeactivateSitesRequest request = new BatchDeactivateSitesRequest
{
    ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
    Names = { "", },
};
// Make the request
BatchDeactivateSitesResponse response = await siteServiceClient.BatchDeactivateSitesAsync(request);

BatchDeactivateSitesAsync(BatchDeactivateSitesRequest, CancellationToken)

Deactivates a list of Site objects.

Declaration
public virtual Task<BatchDeactivateSitesResponse> BatchDeactivateSitesAsync(BatchDeactivateSitesRequest request, CancellationToken cancellationToken)
Parameters
Type Name Description
BatchDeactivateSitesRequest 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<BatchDeactivateSitesResponse>

A Task containing the RPC response.

Sample code
// Create client
SiteServiceClient siteServiceClient = await SiteServiceClient.CreateAsync();
// Initialize request argument(s)
BatchDeactivateSitesRequest request = new BatchDeactivateSitesRequest
{
    ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
    Names = { "", },
};
// Make the request
BatchDeactivateSitesResponse response = await siteServiceClient.BatchDeactivateSitesAsync(request);

BatchDeactivateSitesAsync(NetworkName, IEnumerable<string>, CallSettings)

Deactivates a list of Site objects.

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

Required. Format: networks/{network_code}

IEnumerable<string> names

Required. The resource names of the Site objects to deactivate.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<BatchDeactivateSitesResponse>

A Task containing the RPC response.

Sample code
// Create client
SiteServiceClient siteServiceClient = await SiteServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<string> names = new string[] { "", };
// Make the request
BatchDeactivateSitesResponse response = await siteServiceClient.BatchDeactivateSitesAsync(parent, names);

BatchDeactivateSitesAsync(NetworkName, IEnumerable<string>, CancellationToken)

Deactivates a list of Site objects.

Declaration
public virtual Task<BatchDeactivateSitesResponse> BatchDeactivateSitesAsync(NetworkName parent, IEnumerable<string> names, CancellationToken cancellationToken)
Parameters
Type Name Description
NetworkName parent

Required. Format: networks/{network_code}

IEnumerable<string> names

Required. The resource names of the Site objects to deactivate.

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<BatchDeactivateSitesResponse>

A Task containing the RPC response.

Sample code
// Create client
SiteServiceClient siteServiceClient = await SiteServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<string> names = new string[] { "", };
// Make the request
BatchDeactivateSitesResponse response = await siteServiceClient.BatchDeactivateSitesAsync(parent, names);

BatchDeactivateSitesAsync(string, IEnumerable<string>, CallSettings)

Deactivates a list of Site objects.

Declaration
public virtual Task<BatchDeactivateSitesResponse> BatchDeactivateSitesAsync(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 Site objects to deactivate.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<BatchDeactivateSitesResponse>

A Task containing the RPC response.

Sample code
// Create client
SiteServiceClient siteServiceClient = await SiteServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<string> names = new string[] { "", };
// Make the request
BatchDeactivateSitesResponse response = await siteServiceClient.BatchDeactivateSitesAsync(parent, names);

BatchDeactivateSitesAsync(string, IEnumerable<string>, CancellationToken)

Deactivates a list of Site objects.

Declaration
public virtual Task<BatchDeactivateSitesResponse> BatchDeactivateSitesAsync(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 Site objects to deactivate.

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<BatchDeactivateSitesResponse>

A Task containing the RPC response.

Sample code
// Create client
SiteServiceClient siteServiceClient = await SiteServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<string> names = new string[] { "", };
// Make the request
BatchDeactivateSitesResponse response = await siteServiceClient.BatchDeactivateSitesAsync(parent, names);

BatchSubmitSitesForApproval(BatchSubmitSitesForApprovalRequest, CallSettings)

Submits a list of Site objects for approval.

Declaration
public virtual BatchSubmitSitesForApprovalResponse BatchSubmitSitesForApproval(BatchSubmitSitesForApprovalRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
BatchSubmitSitesForApprovalRequest 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
BatchSubmitSitesForApprovalResponse

The RPC response.

Sample code
// Create client
SiteServiceClient siteServiceClient = SiteServiceClient.Create();
// Initialize request argument(s)
BatchSubmitSitesForApprovalRequest request = new BatchSubmitSitesForApprovalRequest
{
    ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
    Names = { "", },
};
// Make the request
BatchSubmitSitesForApprovalResponse response = siteServiceClient.BatchSubmitSitesForApproval(request);

BatchSubmitSitesForApproval(NetworkName, IEnumerable<string>, CallSettings)

Submits a list of Site objects for approval.

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

Required. Format: networks/{network_code}

IEnumerable<string> names

Required. The resource names of the Site objects to submit for approval.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
BatchSubmitSitesForApprovalResponse

The RPC response.

Sample code
// Create client
SiteServiceClient siteServiceClient = SiteServiceClient.Create();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<string> names = new string[] { "", };
// Make the request
BatchSubmitSitesForApprovalResponse response = siteServiceClient.BatchSubmitSitesForApproval(parent, names);

BatchSubmitSitesForApproval(string, IEnumerable<string>, CallSettings)

Submits a list of Site objects for approval.

Declaration
public virtual BatchSubmitSitesForApprovalResponse BatchSubmitSitesForApproval(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 Site objects to submit for approval.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
BatchSubmitSitesForApprovalResponse

The RPC response.

Sample code
// Create client
SiteServiceClient siteServiceClient = SiteServiceClient.Create();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<string> names = new string[] { "", };
// Make the request
BatchSubmitSitesForApprovalResponse response = siteServiceClient.BatchSubmitSitesForApproval(parent, names);

BatchSubmitSitesForApprovalAsync(BatchSubmitSitesForApprovalRequest, CallSettings)

Submits a list of Site objects for approval.

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

A Task containing the RPC response.

Sample code
// Create client
SiteServiceClient siteServiceClient = await SiteServiceClient.CreateAsync();
// Initialize request argument(s)
BatchSubmitSitesForApprovalRequest request = new BatchSubmitSitesForApprovalRequest
{
    ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
    Names = { "", },
};
// Make the request
BatchSubmitSitesForApprovalResponse response = await siteServiceClient.BatchSubmitSitesForApprovalAsync(request);

BatchSubmitSitesForApprovalAsync(BatchSubmitSitesForApprovalRequest, CancellationToken)

Submits a list of Site objects for approval.

Declaration
public virtual Task<BatchSubmitSitesForApprovalResponse> BatchSubmitSitesForApprovalAsync(BatchSubmitSitesForApprovalRequest request, CancellationToken cancellationToken)
Parameters
Type Name Description
BatchSubmitSitesForApprovalRequest 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<BatchSubmitSitesForApprovalResponse>

A Task containing the RPC response.

Sample code
// Create client
SiteServiceClient siteServiceClient = await SiteServiceClient.CreateAsync();
// Initialize request argument(s)
BatchSubmitSitesForApprovalRequest request = new BatchSubmitSitesForApprovalRequest
{
    ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
    Names = { "", },
};
// Make the request
BatchSubmitSitesForApprovalResponse response = await siteServiceClient.BatchSubmitSitesForApprovalAsync(request);

BatchSubmitSitesForApprovalAsync(NetworkName, IEnumerable<string>, CallSettings)

Submits a list of Site objects for approval.

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

Required. Format: networks/{network_code}

IEnumerable<string> names

Required. The resource names of the Site objects to submit for approval.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<BatchSubmitSitesForApprovalResponse>

A Task containing the RPC response.

Sample code
// Create client
SiteServiceClient siteServiceClient = await SiteServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<string> names = new string[] { "", };
// Make the request
BatchSubmitSitesForApprovalResponse response = await siteServiceClient.BatchSubmitSitesForApprovalAsync(parent, names);

BatchSubmitSitesForApprovalAsync(NetworkName, IEnumerable<string>, CancellationToken)

Submits a list of Site objects for approval.

Declaration
public virtual Task<BatchSubmitSitesForApprovalResponse> BatchSubmitSitesForApprovalAsync(NetworkName parent, IEnumerable<string> names, CancellationToken cancellationToken)
Parameters
Type Name Description
NetworkName parent

Required. Format: networks/{network_code}

IEnumerable<string> names

Required. The resource names of the Site objects to submit for approval.

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<BatchSubmitSitesForApprovalResponse>

A Task containing the RPC response.

Sample code
// Create client
SiteServiceClient siteServiceClient = await SiteServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<string> names = new string[] { "", };
// Make the request
BatchSubmitSitesForApprovalResponse response = await siteServiceClient.BatchSubmitSitesForApprovalAsync(parent, names);

BatchSubmitSitesForApprovalAsync(string, IEnumerable<string>, CallSettings)

Submits a list of Site objects for approval.

Declaration
public virtual Task<BatchSubmitSitesForApprovalResponse> BatchSubmitSitesForApprovalAsync(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 Site objects to submit for approval.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<BatchSubmitSitesForApprovalResponse>

A Task containing the RPC response.

Sample code
// Create client
SiteServiceClient siteServiceClient = await SiteServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<string> names = new string[] { "", };
// Make the request
BatchSubmitSitesForApprovalResponse response = await siteServiceClient.BatchSubmitSitesForApprovalAsync(parent, names);

BatchSubmitSitesForApprovalAsync(string, IEnumerable<string>, CancellationToken)

Submits a list of Site objects for approval.

Declaration
public virtual Task<BatchSubmitSitesForApprovalResponse> BatchSubmitSitesForApprovalAsync(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 Site objects to submit for approval.

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<BatchSubmitSitesForApprovalResponse>

A Task containing the RPC response.

Sample code
// Create client
SiteServiceClient siteServiceClient = await SiteServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<string> names = new string[] { "", };
// Make the request
BatchSubmitSitesForApprovalResponse response = await siteServiceClient.BatchSubmitSitesForApprovalAsync(parent, names);

BatchUpdateSites(BatchUpdateSitesRequest, CallSettings)

API to batch update Site objects.

Declaration
public virtual BatchUpdateSitesResponse BatchUpdateSites(BatchUpdateSitesRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
BatchUpdateSitesRequest 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
BatchUpdateSitesResponse

The RPC response.

Sample code
// Create client
SiteServiceClient siteServiceClient = SiteServiceClient.Create();
// Initialize request argument(s)
BatchUpdateSitesRequest request = new BatchUpdateSitesRequest
{
    ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
    Requests =
    {
        new UpdateSiteRequest(),
    },
};
// Make the request
BatchUpdateSitesResponse response = siteServiceClient.BatchUpdateSites(request);

BatchUpdateSites(NetworkName, IEnumerable<UpdateSiteRequest>, CallSettings)

API to batch update Site objects.

Declaration
public virtual BatchUpdateSitesResponse BatchUpdateSites(NetworkName parent, IEnumerable<UpdateSiteRequest> requests, CallSettings callSettings = null)
Parameters
Type Name Description
NetworkName parent

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

IEnumerable<UpdateSiteRequest> requests

Required. The Site 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
BatchUpdateSitesResponse

The RPC response.

Sample code
// Create client
SiteServiceClient siteServiceClient = SiteServiceClient.Create();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<UpdateSiteRequest> requests = new UpdateSiteRequest[]
{
    new UpdateSiteRequest(),
};
// Make the request
BatchUpdateSitesResponse response = siteServiceClient.BatchUpdateSites(parent, requests);

BatchUpdateSites(string, IEnumerable<UpdateSiteRequest>, CallSettings)

API to batch update Site objects.

Declaration
public virtual BatchUpdateSitesResponse BatchUpdateSites(string parent, IEnumerable<UpdateSiteRequest> requests, CallSettings callSettings = null)
Parameters
Type Name Description
string parent

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

IEnumerable<UpdateSiteRequest> requests

Required. The Site 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
BatchUpdateSitesResponse

The RPC response.

Sample code
// Create client
SiteServiceClient siteServiceClient = SiteServiceClient.Create();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<UpdateSiteRequest> requests = new UpdateSiteRequest[]
{
    new UpdateSiteRequest(),
};
// Make the request
BatchUpdateSitesResponse response = siteServiceClient.BatchUpdateSites(parent, requests);

BatchUpdateSitesAsync(BatchUpdateSitesRequest, CallSettings)

API to batch update Site objects.

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

A Task containing the RPC response.

Sample code
// Create client
SiteServiceClient siteServiceClient = await SiteServiceClient.CreateAsync();
// Initialize request argument(s)
BatchUpdateSitesRequest request = new BatchUpdateSitesRequest
{
    ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
    Requests =
    {
        new UpdateSiteRequest(),
    },
};
// Make the request
BatchUpdateSitesResponse response = await siteServiceClient.BatchUpdateSitesAsync(request);

BatchUpdateSitesAsync(BatchUpdateSitesRequest, CancellationToken)

API to batch update Site objects.

Declaration
public virtual Task<BatchUpdateSitesResponse> BatchUpdateSitesAsync(BatchUpdateSitesRequest request, CancellationToken cancellationToken)
Parameters
Type Name Description
BatchUpdateSitesRequest 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<BatchUpdateSitesResponse>

A Task containing the RPC response.

Sample code
// Create client
SiteServiceClient siteServiceClient = await SiteServiceClient.CreateAsync();
// Initialize request argument(s)
BatchUpdateSitesRequest request = new BatchUpdateSitesRequest
{
    ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
    Requests =
    {
        new UpdateSiteRequest(),
    },
};
// Make the request
BatchUpdateSitesResponse response = await siteServiceClient.BatchUpdateSitesAsync(request);

BatchUpdateSitesAsync(NetworkName, IEnumerable<UpdateSiteRequest>, CallSettings)

API to batch update Site objects.

Declaration
public virtual Task<BatchUpdateSitesResponse> BatchUpdateSitesAsync(NetworkName parent, IEnumerable<UpdateSiteRequest> requests, CallSettings callSettings = null)
Parameters
Type Name Description
NetworkName parent

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

IEnumerable<UpdateSiteRequest> requests

Required. The Site 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<BatchUpdateSitesResponse>

A Task containing the RPC response.

Sample code
// Create client
SiteServiceClient siteServiceClient = await SiteServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<UpdateSiteRequest> requests = new UpdateSiteRequest[]
{
    new UpdateSiteRequest(),
};
// Make the request
BatchUpdateSitesResponse response = await siteServiceClient.BatchUpdateSitesAsync(parent, requests);

BatchUpdateSitesAsync(NetworkName, IEnumerable<UpdateSiteRequest>, CancellationToken)

API to batch update Site objects.

Declaration
public virtual Task<BatchUpdateSitesResponse> BatchUpdateSitesAsync(NetworkName parent, IEnumerable<UpdateSiteRequest> requests, CancellationToken cancellationToken)
Parameters
Type Name Description
NetworkName parent

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

IEnumerable<UpdateSiteRequest> requests

Required. The Site 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<BatchUpdateSitesResponse>

A Task containing the RPC response.

Sample code
// Create client
SiteServiceClient siteServiceClient = await SiteServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<UpdateSiteRequest> requests = new UpdateSiteRequest[]
{
    new UpdateSiteRequest(),
};
// Make the request
BatchUpdateSitesResponse response = await siteServiceClient.BatchUpdateSitesAsync(parent, requests);

BatchUpdateSitesAsync(string, IEnumerable<UpdateSiteRequest>, CallSettings)

API to batch update Site objects.

Declaration
public virtual Task<BatchUpdateSitesResponse> BatchUpdateSitesAsync(string parent, IEnumerable<UpdateSiteRequest> requests, CallSettings callSettings = null)
Parameters
Type Name Description
string parent

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

IEnumerable<UpdateSiteRequest> requests

Required. The Site 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<BatchUpdateSitesResponse>

A Task containing the RPC response.

Sample code
// Create client
SiteServiceClient siteServiceClient = await SiteServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<UpdateSiteRequest> requests = new UpdateSiteRequest[]
{
    new UpdateSiteRequest(),
};
// Make the request
BatchUpdateSitesResponse response = await siteServiceClient.BatchUpdateSitesAsync(parent, requests);

BatchUpdateSitesAsync(string, IEnumerable<UpdateSiteRequest>, CancellationToken)

API to batch update Site objects.

Declaration
public virtual Task<BatchUpdateSitesResponse> BatchUpdateSitesAsync(string parent, IEnumerable<UpdateSiteRequest> requests, CancellationToken cancellationToken)
Parameters
Type Name Description
string parent

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

IEnumerable<UpdateSiteRequest> requests

Required. The Site 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<BatchUpdateSitesResponse>

A Task containing the RPC response.

Sample code
// Create client
SiteServiceClient siteServiceClient = await SiteServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<UpdateSiteRequest> requests = new UpdateSiteRequest[]
{
    new UpdateSiteRequest(),
};
// Make the request
BatchUpdateSitesResponse response = await siteServiceClient.BatchUpdateSitesAsync(parent, requests);

Create()

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

Declaration
public static SiteServiceClient Create()
Returns
Type Description
SiteServiceClient

The created SiteServiceClient.

CreateAsync(CancellationToken)

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

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

The CancellationToken to use while creating the client.

Returns
Type Description
Task<SiteServiceClient>

The task representing the created SiteServiceClient.

CreateSite(CreateSiteRequest, CallSettings)

API to create a Site object.

Declaration
public virtual Site CreateSite(CreateSiteRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
CreateSiteRequest 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
Site

The RPC response.

Sample code
// Create client
SiteServiceClient siteServiceClient = SiteServiceClient.Create();
// Initialize request argument(s)
CreateSiteRequest request = new CreateSiteRequest
{
    ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
    Site = new Site(),
};
// Make the request
Site response = siteServiceClient.CreateSite(request);

CreateSite(NetworkName, Site, CallSettings)

API to create a Site object.

Declaration
public virtual Site CreateSite(NetworkName parent, Site site, CallSettings callSettings = null)
Parameters
Type Name Description
NetworkName parent

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

Site site

Required. The Site to create.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Site

The RPC response.

Sample code
// Create client
SiteServiceClient siteServiceClient = SiteServiceClient.Create();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
Site site = new Site();
// Make the request
Site response = siteServiceClient.CreateSite(parent, site);

CreateSite(string, Site, CallSettings)

API to create a Site object.

Declaration
public virtual Site CreateSite(string parent, Site site, CallSettings callSettings = null)
Parameters
Type Name Description
string parent

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

Site site

Required. The Site to create.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Site

The RPC response.

Sample code
// Create client
SiteServiceClient siteServiceClient = SiteServiceClient.Create();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
Site site = new Site();
// Make the request
Site response = siteServiceClient.CreateSite(parent, site);

CreateSiteAsync(CreateSiteRequest, CallSettings)

API to create a Site object.

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

A Task containing the RPC response.

Sample code
// Create client
SiteServiceClient siteServiceClient = await SiteServiceClient.CreateAsync();
// Initialize request argument(s)
CreateSiteRequest request = new CreateSiteRequest
{
    ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
    Site = new Site(),
};
// Make the request
Site response = await siteServiceClient.CreateSiteAsync(request);

CreateSiteAsync(CreateSiteRequest, CancellationToken)

API to create a Site object.

Declaration
public virtual Task<Site> CreateSiteAsync(CreateSiteRequest request, CancellationToken cancellationToken)
Parameters
Type Name Description
CreateSiteRequest 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<Site>

A Task containing the RPC response.

Sample code
// Create client
SiteServiceClient siteServiceClient = await SiteServiceClient.CreateAsync();
// Initialize request argument(s)
CreateSiteRequest request = new CreateSiteRequest
{
    ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
    Site = new Site(),
};
// Make the request
Site response = await siteServiceClient.CreateSiteAsync(request);

CreateSiteAsync(NetworkName, Site, CallSettings)

API to create a Site object.

Declaration
public virtual Task<Site> CreateSiteAsync(NetworkName parent, Site site, CallSettings callSettings = null)
Parameters
Type Name Description
NetworkName parent

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

Site site

Required. The Site to create.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<Site>

A Task containing the RPC response.

Sample code
// Create client
SiteServiceClient siteServiceClient = await SiteServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
Site site = new Site();
// Make the request
Site response = await siteServiceClient.CreateSiteAsync(parent, site);

CreateSiteAsync(NetworkName, Site, CancellationToken)

API to create a Site object.

Declaration
public virtual Task<Site> CreateSiteAsync(NetworkName parent, Site site, CancellationToken cancellationToken)
Parameters
Type Name Description
NetworkName parent

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

Site site

Required. The Site to create.

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<Site>

A Task containing the RPC response.

Sample code
// Create client
SiteServiceClient siteServiceClient = await SiteServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
Site site = new Site();
// Make the request
Site response = await siteServiceClient.CreateSiteAsync(parent, site);

CreateSiteAsync(string, Site, CallSettings)

API to create a Site object.

Declaration
public virtual Task<Site> CreateSiteAsync(string parent, Site site, CallSettings callSettings = null)
Parameters
Type Name Description
string parent

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

Site site

Required. The Site to create.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<Site>

A Task containing the RPC response.

Sample code
// Create client
SiteServiceClient siteServiceClient = await SiteServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
Site site = new Site();
// Make the request
Site response = await siteServiceClient.CreateSiteAsync(parent, site);

CreateSiteAsync(string, Site, CancellationToken)

API to create a Site object.

Declaration
public virtual Task<Site> CreateSiteAsync(string parent, Site site, CancellationToken cancellationToken)
Parameters
Type Name Description
string parent

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

Site site

Required. The Site to create.

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<Site>

A Task containing the RPC response.

Sample code
// Create client
SiteServiceClient siteServiceClient = await SiteServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
Site site = new Site();
// Make the request
Site response = await siteServiceClient.CreateSiteAsync(parent, site);

GetSite(GetSiteRequest, CallSettings)

API to retrieve a Site object.

Declaration
public virtual Site GetSite(GetSiteRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
GetSiteRequest 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
Site

The RPC response.

Sample code
// Create client
SiteServiceClient siteServiceClient = SiteServiceClient.Create();
// Initialize request argument(s)
GetSiteRequest request = new GetSiteRequest
{
    SiteName = SiteName.FromNetworkCodeSite("[NETWORK_CODE]", "[SITE]"),
};
// Make the request
Site response = siteServiceClient.GetSite(request);

GetSite(SiteName, CallSettings)

API to retrieve a Site object.

Declaration
public virtual Site GetSite(SiteName name, CallSettings callSettings = null)
Parameters
Type Name Description
SiteName name

Required. The resource name of the Site. Format: networks/{network_code}/sites/{site_id}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Site

The RPC response.

Sample code
// Create client
SiteServiceClient siteServiceClient = SiteServiceClient.Create();
// Initialize request argument(s)
SiteName name = SiteName.FromNetworkCodeSite("[NETWORK_CODE]", "[SITE]");
// Make the request
Site response = siteServiceClient.GetSite(name);

GetSite(string, CallSettings)

API to retrieve a Site object.

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

Required. The resource name of the Site. Format: networks/{network_code}/sites/{site_id}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Site

The RPC response.

Sample code
// Create client
SiteServiceClient siteServiceClient = SiteServiceClient.Create();
// Initialize request argument(s)
string name = "networks/[NETWORK_CODE]/sites/[SITE]";
// Make the request
Site response = siteServiceClient.GetSite(name);

GetSiteAsync(GetSiteRequest, CallSettings)

API to retrieve a Site object.

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

A Task containing the RPC response.

Sample code
// Create client
SiteServiceClient siteServiceClient = await SiteServiceClient.CreateAsync();
// Initialize request argument(s)
GetSiteRequest request = new GetSiteRequest
{
    SiteName = SiteName.FromNetworkCodeSite("[NETWORK_CODE]", "[SITE]"),
};
// Make the request
Site response = await siteServiceClient.GetSiteAsync(request);

GetSiteAsync(GetSiteRequest, CancellationToken)

API to retrieve a Site object.

Declaration
public virtual Task<Site> GetSiteAsync(GetSiteRequest request, CancellationToken cancellationToken)
Parameters
Type Name Description
GetSiteRequest 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<Site>

A Task containing the RPC response.

Sample code
// Create client
SiteServiceClient siteServiceClient = await SiteServiceClient.CreateAsync();
// Initialize request argument(s)
GetSiteRequest request = new GetSiteRequest
{
    SiteName = SiteName.FromNetworkCodeSite("[NETWORK_CODE]", "[SITE]"),
};
// Make the request
Site response = await siteServiceClient.GetSiteAsync(request);

GetSiteAsync(SiteName, CallSettings)

API to retrieve a Site object.

Declaration
public virtual Task<Site> GetSiteAsync(SiteName name, CallSettings callSettings = null)
Parameters
Type Name Description
SiteName name

Required. The resource name of the Site. Format: networks/{network_code}/sites/{site_id}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<Site>

A Task containing the RPC response.

Sample code
// Create client
SiteServiceClient siteServiceClient = await SiteServiceClient.CreateAsync();
// Initialize request argument(s)
SiteName name = SiteName.FromNetworkCodeSite("[NETWORK_CODE]", "[SITE]");
// Make the request
Site response = await siteServiceClient.GetSiteAsync(name);

GetSiteAsync(SiteName, CancellationToken)

API to retrieve a Site object.

Declaration
public virtual Task<Site> GetSiteAsync(SiteName name, CancellationToken cancellationToken)
Parameters
Type Name Description
SiteName name

Required. The resource name of the Site. Format: networks/{network_code}/sites/{site_id}

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<Site>

A Task containing the RPC response.

Sample code
// Create client
SiteServiceClient siteServiceClient = await SiteServiceClient.CreateAsync();
// Initialize request argument(s)
SiteName name = SiteName.FromNetworkCodeSite("[NETWORK_CODE]", "[SITE]");
// Make the request
Site response = await siteServiceClient.GetSiteAsync(name);

GetSiteAsync(string, CallSettings)

API to retrieve a Site object.

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

Required. The resource name of the Site. Format: networks/{network_code}/sites/{site_id}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<Site>

A Task containing the RPC response.

Sample code
// Create client
SiteServiceClient siteServiceClient = await SiteServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "networks/[NETWORK_CODE]/sites/[SITE]";
// Make the request
Site response = await siteServiceClient.GetSiteAsync(name);

GetSiteAsync(string, CancellationToken)

API to retrieve a Site object.

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

Required. The resource name of the Site. Format: networks/{network_code}/sites/{site_id}

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<Site>

A Task containing the RPC response.

Sample code
// Create client
SiteServiceClient siteServiceClient = await SiteServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "networks/[NETWORK_CODE]/sites/[SITE]";
// Make the request
Site response = await siteServiceClient.GetSiteAsync(name);

ListSites(ListSitesRequest, CallSettings)

API to retrieve a list of Site objects.

Declaration
public virtual PagedEnumerable<ListSitesResponse, Site> ListSites(ListSitesRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
ListSitesRequest 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<ListSitesResponse, Site>

A pageable sequence of Site resources.

Sample code
// Create client
SiteServiceClient siteServiceClient = SiteServiceClient.Create();
// Initialize request argument(s)
ListSitesRequest request = new ListSitesRequest
{
    ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
    Filter = "",
    OrderBy = "",
    Skip = 0,
};
// Make the request
PagedEnumerable<ListSitesResponse, Site> response = siteServiceClient.ListSites(request);

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

ListSites(NetworkName, string, int?, CallSettings)

API to retrieve a list of Site objects.

Declaration
public virtual PagedEnumerable<ListSitesResponse, Site> ListSites(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 Sites. 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<ListSitesResponse, Site>

A pageable sequence of Site resources.

Sample code
// Create client
SiteServiceClient siteServiceClient = SiteServiceClient.Create();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
// Make the request
PagedEnumerable<ListSitesResponse, Site> response = siteServiceClient.ListSites(parent);

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

ListSites(string, string, int?, CallSettings)

API to retrieve a list of Site objects.

Declaration
public virtual PagedEnumerable<ListSitesResponse, Site> ListSites(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 Sites. 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<ListSitesResponse, Site>

A pageable sequence of Site resources.

Sample code
// Create client
SiteServiceClient siteServiceClient = SiteServiceClient.Create();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
// Make the request
PagedEnumerable<ListSitesResponse, Site> response = siteServiceClient.ListSites(parent);

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

ListSitesAsync(ListSitesRequest, CallSettings)

API to retrieve a list of Site objects.

Declaration
public virtual PagedAsyncEnumerable<ListSitesResponse, Site> ListSitesAsync(ListSitesRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
ListSitesRequest 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<ListSitesResponse, Site>

A pageable asynchronous sequence of Site resources.

Sample code
// Create client
SiteServiceClient siteServiceClient = await SiteServiceClient.CreateAsync();
// Initialize request argument(s)
ListSitesRequest request = new ListSitesRequest
{
    ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
    Filter = "",
    OrderBy = "",
    Skip = 0,
};
// Make the request
PagedAsyncEnumerable<ListSitesResponse, Site> response = siteServiceClient.ListSitesAsync(request);

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

ListSitesAsync(NetworkName, string, int?, CallSettings)

API to retrieve a list of Site objects.

Declaration
public virtual PagedAsyncEnumerable<ListSitesResponse, Site> ListSitesAsync(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 Sites. 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<ListSitesResponse, Site>

A pageable asynchronous sequence of Site resources.

Sample code
// Create client
SiteServiceClient siteServiceClient = await SiteServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
// Make the request
PagedAsyncEnumerable<ListSitesResponse, Site> response = siteServiceClient.ListSitesAsync(parent);

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

ListSitesAsync(string, string, int?, CallSettings)

API to retrieve a list of Site objects.

Declaration
public virtual PagedAsyncEnumerable<ListSitesResponse, Site> ListSitesAsync(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 Sites. 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<ListSitesResponse, Site>

A pageable asynchronous sequence of Site resources.

Sample code
// Create client
SiteServiceClient siteServiceClient = await SiteServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
// Make the request
PagedAsyncEnumerable<ListSitesResponse, Site> response = siteServiceClient.ListSitesAsync(parent);

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

UpdateSite(Site, FieldMask, CallSettings)

API to update a Site object.

Declaration
public virtual Site UpdateSite(Site site, FieldMask updateMask, CallSettings callSettings = null)
Parameters
Type Name Description
Site site

Required. The Site to update.

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

The RPC response.

Sample code
// Create client
SiteServiceClient siteServiceClient = SiteServiceClient.Create();
// Initialize request argument(s)
Site site = new Site();
FieldMask updateMask = new FieldMask();
// Make the request
Site response = siteServiceClient.UpdateSite(site, updateMask);

UpdateSite(UpdateSiteRequest, CallSettings)

API to update a Site object.

Declaration
public virtual Site UpdateSite(UpdateSiteRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
UpdateSiteRequest 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
Site

The RPC response.

Sample code
// Create client
SiteServiceClient siteServiceClient = SiteServiceClient.Create();
// Initialize request argument(s)
UpdateSiteRequest request = new UpdateSiteRequest
{
    Site = new Site(),
    UpdateMask = new FieldMask(),
};
// Make the request
Site response = siteServiceClient.UpdateSite(request);

UpdateSiteAsync(Site, FieldMask, CallSettings)

API to update a Site object.

Declaration
public virtual Task<Site> UpdateSiteAsync(Site site, FieldMask updateMask, CallSettings callSettings = null)
Parameters
Type Name Description
Site site

Required. The Site to update.

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

A Task containing the RPC response.

Sample code
// Create client
SiteServiceClient siteServiceClient = await SiteServiceClient.CreateAsync();
// Initialize request argument(s)
Site site = new Site();
FieldMask updateMask = new FieldMask();
// Make the request
Site response = await siteServiceClient.UpdateSiteAsync(site, updateMask);

UpdateSiteAsync(Site, FieldMask, CancellationToken)

API to update a Site object.

Declaration
public virtual Task<Site> UpdateSiteAsync(Site site, FieldMask updateMask, CancellationToken cancellationToken)
Parameters
Type Name Description
Site site

Required. The Site to update.

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

FieldMask updateMask

Required. The list of fields to update.

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<Site>

A Task containing the RPC response.

Sample code
// Create client
SiteServiceClient siteServiceClient = await SiteServiceClient.CreateAsync();
// Initialize request argument(s)
Site site = new Site();
FieldMask updateMask = new FieldMask();
// Make the request
Site response = await siteServiceClient.UpdateSiteAsync(site, updateMask);

UpdateSiteAsync(UpdateSiteRequest, CallSettings)

API to update a Site object.

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

A Task containing the RPC response.

Sample code
// Create client
SiteServiceClient siteServiceClient = await SiteServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateSiteRequest request = new UpdateSiteRequest
{
    Site = new Site(),
    UpdateMask = new FieldMask(),
};
// Make the request
Site response = await siteServiceClient.UpdateSiteAsync(request);

UpdateSiteAsync(UpdateSiteRequest, CancellationToken)

API to update a Site object.

Declaration
public virtual Task<Site> UpdateSiteAsync(UpdateSiteRequest request, CancellationToken cancellationToken)
Parameters
Type Name Description
UpdateSiteRequest 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<Site>

A Task containing the RPC response.

Sample code
// Create client
SiteServiceClient siteServiceClient = await SiteServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateSiteRequest request = new UpdateSiteRequest
{
    Site = new Site(),
    UpdateMask = new FieldMask(),
};
// Make the request
Site response = await siteServiceClient.UpdateSiteAsync(request);
In this article
Back to top Generated by DocFX