Class TeamServiceClient
TeamService client wrapper, for convenient use.
Namespace: Google.Ads.AdManager.V1
Assembly: Google.Ads.AdManager.V1.dll
Syntax
public abstract class TeamServiceClient
Remarks
Provides methods for handling Team objects.
Properties
DefaultEndpoint
The default endpoint for the TeamService 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 TeamService scopes.
Declaration
public static IReadOnlyList<string> DefaultScopes { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<string> |
Remarks
The default TeamService scopes are:
- https://www.googleapis.com/auth/admanager
GrpcClient
The underlying gRPC TeamService client
Declaration
public virtual TeamService.TeamServiceClient GrpcClient { get; }
Property Value
| Type | Description |
|---|---|
| TeamService.TeamServiceClient |
ServiceMetadata
The service metadata associated with this client type.
Declaration
public static ServiceMetadata ServiceMetadata { get; }
Property Value
| Type | Description |
|---|---|
| ServiceMetadata |
Methods
BatchActivateTeams(BatchActivateTeamsRequest, CallSettings)
API to batch activate Team objects.
Declaration
public virtual BatchActivateTeamsResponse BatchActivateTeams(BatchActivateTeamsRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| BatchActivateTeamsRequest | 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 |
|---|---|
| BatchActivateTeamsResponse | The RPC response. |
Sample code
// Create client
TeamServiceClient teamServiceClient = TeamServiceClient.Create();
// Initialize request argument(s)
BatchActivateTeamsRequest request = new BatchActivateTeamsRequest
{
ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
TeamNames =
{
TeamName.FromNetworkCodeTeam("[NETWORK_CODE]", "[TEAM]"),
},
};
// Make the request
BatchActivateTeamsResponse response = teamServiceClient.BatchActivateTeams(request);
BatchActivateTeams(NetworkName, IEnumerable<TeamName>, CallSettings)
API to batch activate Team objects.
Declaration
public virtual BatchActivateTeamsResponse BatchActivateTeams(NetworkName parent, IEnumerable<TeamName> names, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| NetworkName | parent | Required. Format: |
| IEnumerable<TeamName> | names | Required. The resource names of the |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| BatchActivateTeamsResponse | The RPC response. |
Sample code
// Create client
TeamServiceClient teamServiceClient = TeamServiceClient.Create();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<TeamName> names = new TeamName[]
{
TeamName.FromNetworkCodeTeam("[NETWORK_CODE]", "[TEAM]"),
};
// Make the request
BatchActivateTeamsResponse response = teamServiceClient.BatchActivateTeams(parent, names);
BatchActivateTeams(string, IEnumerable<string>, CallSettings)
API to batch activate Team objects.
Declaration
public virtual BatchActivateTeamsResponse BatchActivateTeams(string parent, IEnumerable<string> names, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | parent | Required. Format: |
| IEnumerable<string> | names | Required. The resource names of the |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| BatchActivateTeamsResponse | The RPC response. |
Sample code
// Create client
TeamServiceClient teamServiceClient = TeamServiceClient.Create();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<string> names = new string[]
{
"networks/[NETWORK_CODE]/teams/[TEAM]",
};
// Make the request
BatchActivateTeamsResponse response = teamServiceClient.BatchActivateTeams(parent, names);
BatchActivateTeamsAsync(BatchActivateTeamsRequest, CallSettings)
API to batch activate Team objects.
Declaration
public virtual Task<BatchActivateTeamsResponse> BatchActivateTeamsAsync(BatchActivateTeamsRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| BatchActivateTeamsRequest | 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<BatchActivateTeamsResponse> | A Task containing the RPC response. |
Sample code
// Create client
TeamServiceClient teamServiceClient = await TeamServiceClient.CreateAsync();
// Initialize request argument(s)
BatchActivateTeamsRequest request = new BatchActivateTeamsRequest
{
ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
TeamNames =
{
TeamName.FromNetworkCodeTeam("[NETWORK_CODE]", "[TEAM]"),
},
};
// Make the request
BatchActivateTeamsResponse response = await teamServiceClient.BatchActivateTeamsAsync(request);
BatchActivateTeamsAsync(BatchActivateTeamsRequest, CancellationToken)
API to batch activate Team objects.
Declaration
public virtual Task<BatchActivateTeamsResponse> BatchActivateTeamsAsync(BatchActivateTeamsRequest request, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| BatchActivateTeamsRequest | 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<BatchActivateTeamsResponse> | A Task containing the RPC response. |
Sample code
// Create client
TeamServiceClient teamServiceClient = await TeamServiceClient.CreateAsync();
// Initialize request argument(s)
BatchActivateTeamsRequest request = new BatchActivateTeamsRequest
{
ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
TeamNames =
{
TeamName.FromNetworkCodeTeam("[NETWORK_CODE]", "[TEAM]"),
},
};
// Make the request
BatchActivateTeamsResponse response = await teamServiceClient.BatchActivateTeamsAsync(request);
BatchActivateTeamsAsync(NetworkName, IEnumerable<TeamName>, CallSettings)
API to batch activate Team objects.
Declaration
public virtual Task<BatchActivateTeamsResponse> BatchActivateTeamsAsync(NetworkName parent, IEnumerable<TeamName> names, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| NetworkName | parent | Required. Format: |
| IEnumerable<TeamName> | names | Required. The resource names of the |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Task<BatchActivateTeamsResponse> | A Task containing the RPC response. |
Sample code
// Create client
TeamServiceClient teamServiceClient = await TeamServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<TeamName> names = new TeamName[]
{
TeamName.FromNetworkCodeTeam("[NETWORK_CODE]", "[TEAM]"),
};
// Make the request
BatchActivateTeamsResponse response = await teamServiceClient.BatchActivateTeamsAsync(parent, names);
BatchActivateTeamsAsync(NetworkName, IEnumerable<TeamName>, CancellationToken)
API to batch activate Team objects.
Declaration
public virtual Task<BatchActivateTeamsResponse> BatchActivateTeamsAsync(NetworkName parent, IEnumerable<TeamName> names, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| NetworkName | parent | Required. Format: |
| IEnumerable<TeamName> | names | Required. The resource names of the |
| CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
| Type | Description |
|---|---|
| Task<BatchActivateTeamsResponse> | A Task containing the RPC response. |
Sample code
// Create client
TeamServiceClient teamServiceClient = await TeamServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<TeamName> names = new TeamName[]
{
TeamName.FromNetworkCodeTeam("[NETWORK_CODE]", "[TEAM]"),
};
// Make the request
BatchActivateTeamsResponse response = await teamServiceClient.BatchActivateTeamsAsync(parent, names);
BatchActivateTeamsAsync(string, IEnumerable<string>, CallSettings)
API to batch activate Team objects.
Declaration
public virtual Task<BatchActivateTeamsResponse> BatchActivateTeamsAsync(string parent, IEnumerable<string> names, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | parent | Required. Format: |
| IEnumerable<string> | names | Required. The resource names of the |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Task<BatchActivateTeamsResponse> | A Task containing the RPC response. |
Sample code
// Create client
TeamServiceClient teamServiceClient = await TeamServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<string> names = new string[]
{
"networks/[NETWORK_CODE]/teams/[TEAM]",
};
// Make the request
BatchActivateTeamsResponse response = await teamServiceClient.BatchActivateTeamsAsync(parent, names);
BatchActivateTeamsAsync(string, IEnumerable<string>, CancellationToken)
API to batch activate Team objects.
Declaration
public virtual Task<BatchActivateTeamsResponse> BatchActivateTeamsAsync(string parent, IEnumerable<string> names, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| string | parent | Required. Format: |
| IEnumerable<string> | names | Required. The resource names of the |
| CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
| Type | Description |
|---|---|
| Task<BatchActivateTeamsResponse> | A Task containing the RPC response. |
Sample code
// Create client
TeamServiceClient teamServiceClient = await TeamServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<string> names = new string[]
{
"networks/[NETWORK_CODE]/teams/[TEAM]",
};
// Make the request
BatchActivateTeamsResponse response = await teamServiceClient.BatchActivateTeamsAsync(parent, names);
BatchCreateTeams(BatchCreateTeamsRequest, CallSettings)
API to batch create Team objects.
Declaration
public virtual BatchCreateTeamsResponse BatchCreateTeams(BatchCreateTeamsRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| BatchCreateTeamsRequest | 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 |
|---|---|
| BatchCreateTeamsResponse | The RPC response. |
Sample code
// Create client
TeamServiceClient teamServiceClient = TeamServiceClient.Create();
// Initialize request argument(s)
BatchCreateTeamsRequest request = new BatchCreateTeamsRequest
{
ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
Requests =
{
new CreateTeamRequest(),
},
};
// Make the request
BatchCreateTeamsResponse response = teamServiceClient.BatchCreateTeams(request);
BatchCreateTeams(NetworkName, IEnumerable<CreateTeamRequest>, CallSettings)
API to batch create Team objects.
Declaration
public virtual BatchCreateTeamsResponse BatchCreateTeams(NetworkName parent, IEnumerable<CreateTeamRequest> requests, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| NetworkName | parent | Required. The parent resource where |
| IEnumerable<CreateTeamRequest> | requests | Required. The |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| BatchCreateTeamsResponse | The RPC response. |
Sample code
// Create client
TeamServiceClient teamServiceClient = TeamServiceClient.Create();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<CreateTeamRequest> requests = new CreateTeamRequest[]
{
new CreateTeamRequest(),
};
// Make the request
BatchCreateTeamsResponse response = teamServiceClient.BatchCreateTeams(parent, requests);
BatchCreateTeams(string, IEnumerable<CreateTeamRequest>, CallSettings)
API to batch create Team objects.
Declaration
public virtual BatchCreateTeamsResponse BatchCreateTeams(string parent, IEnumerable<CreateTeamRequest> requests, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | parent | Required. The parent resource where |
| IEnumerable<CreateTeamRequest> | requests | Required. The |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| BatchCreateTeamsResponse | The RPC response. |
Sample code
// Create client
TeamServiceClient teamServiceClient = TeamServiceClient.Create();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<CreateTeamRequest> requests = new CreateTeamRequest[]
{
new CreateTeamRequest(),
};
// Make the request
BatchCreateTeamsResponse response = teamServiceClient.BatchCreateTeams(parent, requests);
BatchCreateTeamsAsync(BatchCreateTeamsRequest, CallSettings)
API to batch create Team objects.
Declaration
public virtual Task<BatchCreateTeamsResponse> BatchCreateTeamsAsync(BatchCreateTeamsRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| BatchCreateTeamsRequest | 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<BatchCreateTeamsResponse> | A Task containing the RPC response. |
Sample code
// Create client
TeamServiceClient teamServiceClient = await TeamServiceClient.CreateAsync();
// Initialize request argument(s)
BatchCreateTeamsRequest request = new BatchCreateTeamsRequest
{
ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
Requests =
{
new CreateTeamRequest(),
},
};
// Make the request
BatchCreateTeamsResponse response = await teamServiceClient.BatchCreateTeamsAsync(request);
BatchCreateTeamsAsync(BatchCreateTeamsRequest, CancellationToken)
API to batch create Team objects.
Declaration
public virtual Task<BatchCreateTeamsResponse> BatchCreateTeamsAsync(BatchCreateTeamsRequest request, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| BatchCreateTeamsRequest | 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<BatchCreateTeamsResponse> | A Task containing the RPC response. |
Sample code
// Create client
TeamServiceClient teamServiceClient = await TeamServiceClient.CreateAsync();
// Initialize request argument(s)
BatchCreateTeamsRequest request = new BatchCreateTeamsRequest
{
ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
Requests =
{
new CreateTeamRequest(),
},
};
// Make the request
BatchCreateTeamsResponse response = await teamServiceClient.BatchCreateTeamsAsync(request);
BatchCreateTeamsAsync(NetworkName, IEnumerable<CreateTeamRequest>, CallSettings)
API to batch create Team objects.
Declaration
public virtual Task<BatchCreateTeamsResponse> BatchCreateTeamsAsync(NetworkName parent, IEnumerable<CreateTeamRequest> requests, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| NetworkName | parent | Required. The parent resource where |
| IEnumerable<CreateTeamRequest> | requests | Required. The |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Task<BatchCreateTeamsResponse> | A Task containing the RPC response. |
Sample code
// Create client
TeamServiceClient teamServiceClient = await TeamServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<CreateTeamRequest> requests = new CreateTeamRequest[]
{
new CreateTeamRequest(),
};
// Make the request
BatchCreateTeamsResponse response = await teamServiceClient.BatchCreateTeamsAsync(parent, requests);
BatchCreateTeamsAsync(NetworkName, IEnumerable<CreateTeamRequest>, CancellationToken)
API to batch create Team objects.
Declaration
public virtual Task<BatchCreateTeamsResponse> BatchCreateTeamsAsync(NetworkName parent, IEnumerable<CreateTeamRequest> requests, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| NetworkName | parent | Required. The parent resource where |
| IEnumerable<CreateTeamRequest> | requests | Required. The |
| CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
| Type | Description |
|---|---|
| Task<BatchCreateTeamsResponse> | A Task containing the RPC response. |
Sample code
// Create client
TeamServiceClient teamServiceClient = await TeamServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<CreateTeamRequest> requests = new CreateTeamRequest[]
{
new CreateTeamRequest(),
};
// Make the request
BatchCreateTeamsResponse response = await teamServiceClient.BatchCreateTeamsAsync(parent, requests);
BatchCreateTeamsAsync(string, IEnumerable<CreateTeamRequest>, CallSettings)
API to batch create Team objects.
Declaration
public virtual Task<BatchCreateTeamsResponse> BatchCreateTeamsAsync(string parent, IEnumerable<CreateTeamRequest> requests, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | parent | Required. The parent resource where |
| IEnumerable<CreateTeamRequest> | requests | Required. The |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Task<BatchCreateTeamsResponse> | A Task containing the RPC response. |
Sample code
// Create client
TeamServiceClient teamServiceClient = await TeamServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<CreateTeamRequest> requests = new CreateTeamRequest[]
{
new CreateTeamRequest(),
};
// Make the request
BatchCreateTeamsResponse response = await teamServiceClient.BatchCreateTeamsAsync(parent, requests);
BatchCreateTeamsAsync(string, IEnumerable<CreateTeamRequest>, CancellationToken)
API to batch create Team objects.
Declaration
public virtual Task<BatchCreateTeamsResponse> BatchCreateTeamsAsync(string parent, IEnumerable<CreateTeamRequest> requests, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| string | parent | Required. The parent resource where |
| IEnumerable<CreateTeamRequest> | requests | Required. The |
| CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
| Type | Description |
|---|---|
| Task<BatchCreateTeamsResponse> | A Task containing the RPC response. |
Sample code
// Create client
TeamServiceClient teamServiceClient = await TeamServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<CreateTeamRequest> requests = new CreateTeamRequest[]
{
new CreateTeamRequest(),
};
// Make the request
BatchCreateTeamsResponse response = await teamServiceClient.BatchCreateTeamsAsync(parent, requests);
BatchDeactivateTeams(BatchDeactivateTeamsRequest, CallSettings)
API to batch deactivate Team objects.
Declaration
public virtual BatchDeactivateTeamsResponse BatchDeactivateTeams(BatchDeactivateTeamsRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| BatchDeactivateTeamsRequest | 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 |
|---|---|
| BatchDeactivateTeamsResponse | The RPC response. |
Sample code
// Create client
TeamServiceClient teamServiceClient = TeamServiceClient.Create();
// Initialize request argument(s)
BatchDeactivateTeamsRequest request = new BatchDeactivateTeamsRequest
{
ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
TeamNames =
{
TeamName.FromNetworkCodeTeam("[NETWORK_CODE]", "[TEAM]"),
},
};
// Make the request
BatchDeactivateTeamsResponse response = teamServiceClient.BatchDeactivateTeams(request);
BatchDeactivateTeams(NetworkName, IEnumerable<TeamName>, CallSettings)
API to batch deactivate Team objects.
Declaration
public virtual BatchDeactivateTeamsResponse BatchDeactivateTeams(NetworkName parent, IEnumerable<TeamName> names, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| NetworkName | parent | Required. Format: |
| IEnumerable<TeamName> | names | Required. The resource names of the |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| BatchDeactivateTeamsResponse | The RPC response. |
Sample code
// Create client
TeamServiceClient teamServiceClient = TeamServiceClient.Create();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<TeamName> names = new TeamName[]
{
TeamName.FromNetworkCodeTeam("[NETWORK_CODE]", "[TEAM]"),
};
// Make the request
BatchDeactivateTeamsResponse response = teamServiceClient.BatchDeactivateTeams(parent, names);
BatchDeactivateTeams(string, IEnumerable<string>, CallSettings)
API to batch deactivate Team objects.
Declaration
public virtual BatchDeactivateTeamsResponse BatchDeactivateTeams(string parent, IEnumerable<string> names, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | parent | Required. Format: |
| IEnumerable<string> | names | Required. The resource names of the |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| BatchDeactivateTeamsResponse | The RPC response. |
Sample code
// Create client
TeamServiceClient teamServiceClient = TeamServiceClient.Create();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<string> names = new string[]
{
"networks/[NETWORK_CODE]/teams/[TEAM]",
};
// Make the request
BatchDeactivateTeamsResponse response = teamServiceClient.BatchDeactivateTeams(parent, names);
BatchDeactivateTeamsAsync(BatchDeactivateTeamsRequest, CallSettings)
API to batch deactivate Team objects.
Declaration
public virtual Task<BatchDeactivateTeamsResponse> BatchDeactivateTeamsAsync(BatchDeactivateTeamsRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| BatchDeactivateTeamsRequest | 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<BatchDeactivateTeamsResponse> | A Task containing the RPC response. |
Sample code
// Create client
TeamServiceClient teamServiceClient = await TeamServiceClient.CreateAsync();
// Initialize request argument(s)
BatchDeactivateTeamsRequest request = new BatchDeactivateTeamsRequest
{
ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
TeamNames =
{
TeamName.FromNetworkCodeTeam("[NETWORK_CODE]", "[TEAM]"),
},
};
// Make the request
BatchDeactivateTeamsResponse response = await teamServiceClient.BatchDeactivateTeamsAsync(request);
BatchDeactivateTeamsAsync(BatchDeactivateTeamsRequest, CancellationToken)
API to batch deactivate Team objects.
Declaration
public virtual Task<BatchDeactivateTeamsResponse> BatchDeactivateTeamsAsync(BatchDeactivateTeamsRequest request, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| BatchDeactivateTeamsRequest | 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<BatchDeactivateTeamsResponse> | A Task containing the RPC response. |
Sample code
// Create client
TeamServiceClient teamServiceClient = await TeamServiceClient.CreateAsync();
// Initialize request argument(s)
BatchDeactivateTeamsRequest request = new BatchDeactivateTeamsRequest
{
ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
TeamNames =
{
TeamName.FromNetworkCodeTeam("[NETWORK_CODE]", "[TEAM]"),
},
};
// Make the request
BatchDeactivateTeamsResponse response = await teamServiceClient.BatchDeactivateTeamsAsync(request);
BatchDeactivateTeamsAsync(NetworkName, IEnumerable<TeamName>, CallSettings)
API to batch deactivate Team objects.
Declaration
public virtual Task<BatchDeactivateTeamsResponse> BatchDeactivateTeamsAsync(NetworkName parent, IEnumerable<TeamName> names, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| NetworkName | parent | Required. Format: |
| IEnumerable<TeamName> | names | Required. The resource names of the |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Task<BatchDeactivateTeamsResponse> | A Task containing the RPC response. |
Sample code
// Create client
TeamServiceClient teamServiceClient = await TeamServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<TeamName> names = new TeamName[]
{
TeamName.FromNetworkCodeTeam("[NETWORK_CODE]", "[TEAM]"),
};
// Make the request
BatchDeactivateTeamsResponse response = await teamServiceClient.BatchDeactivateTeamsAsync(parent, names);
BatchDeactivateTeamsAsync(NetworkName, IEnumerable<TeamName>, CancellationToken)
API to batch deactivate Team objects.
Declaration
public virtual Task<BatchDeactivateTeamsResponse> BatchDeactivateTeamsAsync(NetworkName parent, IEnumerable<TeamName> names, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| NetworkName | parent | Required. Format: |
| IEnumerable<TeamName> | names | Required. The resource names of the |
| CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
| Type | Description |
|---|---|
| Task<BatchDeactivateTeamsResponse> | A Task containing the RPC response. |
Sample code
// Create client
TeamServiceClient teamServiceClient = await TeamServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<TeamName> names = new TeamName[]
{
TeamName.FromNetworkCodeTeam("[NETWORK_CODE]", "[TEAM]"),
};
// Make the request
BatchDeactivateTeamsResponse response = await teamServiceClient.BatchDeactivateTeamsAsync(parent, names);
BatchDeactivateTeamsAsync(string, IEnumerable<string>, CallSettings)
API to batch deactivate Team objects.
Declaration
public virtual Task<BatchDeactivateTeamsResponse> BatchDeactivateTeamsAsync(string parent, IEnumerable<string> names, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | parent | Required. Format: |
| IEnumerable<string> | names | Required. The resource names of the |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Task<BatchDeactivateTeamsResponse> | A Task containing the RPC response. |
Sample code
// Create client
TeamServiceClient teamServiceClient = await TeamServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<string> names = new string[]
{
"networks/[NETWORK_CODE]/teams/[TEAM]",
};
// Make the request
BatchDeactivateTeamsResponse response = await teamServiceClient.BatchDeactivateTeamsAsync(parent, names);
BatchDeactivateTeamsAsync(string, IEnumerable<string>, CancellationToken)
API to batch deactivate Team objects.
Declaration
public virtual Task<BatchDeactivateTeamsResponse> BatchDeactivateTeamsAsync(string parent, IEnumerable<string> names, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| string | parent | Required. Format: |
| IEnumerable<string> | names | Required. The resource names of the |
| CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
| Type | Description |
|---|---|
| Task<BatchDeactivateTeamsResponse> | A Task containing the RPC response. |
Sample code
// Create client
TeamServiceClient teamServiceClient = await TeamServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<string> names = new string[]
{
"networks/[NETWORK_CODE]/teams/[TEAM]",
};
// Make the request
BatchDeactivateTeamsResponse response = await teamServiceClient.BatchDeactivateTeamsAsync(parent, names);
BatchUpdateTeams(BatchUpdateTeamsRequest, CallSettings)
API to batch update Team objects.
Declaration
public virtual BatchUpdateTeamsResponse BatchUpdateTeams(BatchUpdateTeamsRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| BatchUpdateTeamsRequest | 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 |
|---|---|
| BatchUpdateTeamsResponse | The RPC response. |
Sample code
// Create client
TeamServiceClient teamServiceClient = TeamServiceClient.Create();
// Initialize request argument(s)
BatchUpdateTeamsRequest request = new BatchUpdateTeamsRequest
{
ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
Requests =
{
new UpdateTeamRequest(),
},
};
// Make the request
BatchUpdateTeamsResponse response = teamServiceClient.BatchUpdateTeams(request);
BatchUpdateTeams(NetworkName, IEnumerable<UpdateTeamRequest>, CallSettings)
API to batch update Team objects.
Declaration
public virtual BatchUpdateTeamsResponse BatchUpdateTeams(NetworkName parent, IEnumerable<UpdateTeamRequest> requests, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| NetworkName | parent | Required. The parent resource where |
| IEnumerable<UpdateTeamRequest> | requests | Required. The |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| BatchUpdateTeamsResponse | The RPC response. |
Sample code
// Create client
TeamServiceClient teamServiceClient = TeamServiceClient.Create();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<UpdateTeamRequest> requests = new UpdateTeamRequest[]
{
new UpdateTeamRequest(),
};
// Make the request
BatchUpdateTeamsResponse response = teamServiceClient.BatchUpdateTeams(parent, requests);
BatchUpdateTeams(string, IEnumerable<UpdateTeamRequest>, CallSettings)
API to batch update Team objects.
Declaration
public virtual BatchUpdateTeamsResponse BatchUpdateTeams(string parent, IEnumerable<UpdateTeamRequest> requests, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | parent | Required. The parent resource where |
| IEnumerable<UpdateTeamRequest> | requests | Required. The |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| BatchUpdateTeamsResponse | The RPC response. |
Sample code
// Create client
TeamServiceClient teamServiceClient = TeamServiceClient.Create();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<UpdateTeamRequest> requests = new UpdateTeamRequest[]
{
new UpdateTeamRequest(),
};
// Make the request
BatchUpdateTeamsResponse response = teamServiceClient.BatchUpdateTeams(parent, requests);
BatchUpdateTeamsAsync(BatchUpdateTeamsRequest, CallSettings)
API to batch update Team objects.
Declaration
public virtual Task<BatchUpdateTeamsResponse> BatchUpdateTeamsAsync(BatchUpdateTeamsRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| BatchUpdateTeamsRequest | 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<BatchUpdateTeamsResponse> | A Task containing the RPC response. |
Sample code
// Create client
TeamServiceClient teamServiceClient = await TeamServiceClient.CreateAsync();
// Initialize request argument(s)
BatchUpdateTeamsRequest request = new BatchUpdateTeamsRequest
{
ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
Requests =
{
new UpdateTeamRequest(),
},
};
// Make the request
BatchUpdateTeamsResponse response = await teamServiceClient.BatchUpdateTeamsAsync(request);
BatchUpdateTeamsAsync(BatchUpdateTeamsRequest, CancellationToken)
API to batch update Team objects.
Declaration
public virtual Task<BatchUpdateTeamsResponse> BatchUpdateTeamsAsync(BatchUpdateTeamsRequest request, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| BatchUpdateTeamsRequest | 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<BatchUpdateTeamsResponse> | A Task containing the RPC response. |
Sample code
// Create client
TeamServiceClient teamServiceClient = await TeamServiceClient.CreateAsync();
// Initialize request argument(s)
BatchUpdateTeamsRequest request = new BatchUpdateTeamsRequest
{
ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
Requests =
{
new UpdateTeamRequest(),
},
};
// Make the request
BatchUpdateTeamsResponse response = await teamServiceClient.BatchUpdateTeamsAsync(request);
BatchUpdateTeamsAsync(NetworkName, IEnumerable<UpdateTeamRequest>, CallSettings)
API to batch update Team objects.
Declaration
public virtual Task<BatchUpdateTeamsResponse> BatchUpdateTeamsAsync(NetworkName parent, IEnumerable<UpdateTeamRequest> requests, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| NetworkName | parent | Required. The parent resource where |
| IEnumerable<UpdateTeamRequest> | requests | Required. The |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Task<BatchUpdateTeamsResponse> | A Task containing the RPC response. |
Sample code
// Create client
TeamServiceClient teamServiceClient = await TeamServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<UpdateTeamRequest> requests = new UpdateTeamRequest[]
{
new UpdateTeamRequest(),
};
// Make the request
BatchUpdateTeamsResponse response = await teamServiceClient.BatchUpdateTeamsAsync(parent, requests);
BatchUpdateTeamsAsync(NetworkName, IEnumerable<UpdateTeamRequest>, CancellationToken)
API to batch update Team objects.
Declaration
public virtual Task<BatchUpdateTeamsResponse> BatchUpdateTeamsAsync(NetworkName parent, IEnumerable<UpdateTeamRequest> requests, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| NetworkName | parent | Required. The parent resource where |
| IEnumerable<UpdateTeamRequest> | requests | Required. The |
| CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
| Type | Description |
|---|---|
| Task<BatchUpdateTeamsResponse> | A Task containing the RPC response. |
Sample code
// Create client
TeamServiceClient teamServiceClient = await TeamServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<UpdateTeamRequest> requests = new UpdateTeamRequest[]
{
new UpdateTeamRequest(),
};
// Make the request
BatchUpdateTeamsResponse response = await teamServiceClient.BatchUpdateTeamsAsync(parent, requests);
BatchUpdateTeamsAsync(string, IEnumerable<UpdateTeamRequest>, CallSettings)
API to batch update Team objects.
Declaration
public virtual Task<BatchUpdateTeamsResponse> BatchUpdateTeamsAsync(string parent, IEnumerable<UpdateTeamRequest> requests, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | parent | Required. The parent resource where |
| IEnumerable<UpdateTeamRequest> | requests | Required. The |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Task<BatchUpdateTeamsResponse> | A Task containing the RPC response. |
Sample code
// Create client
TeamServiceClient teamServiceClient = await TeamServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<UpdateTeamRequest> requests = new UpdateTeamRequest[]
{
new UpdateTeamRequest(),
};
// Make the request
BatchUpdateTeamsResponse response = await teamServiceClient.BatchUpdateTeamsAsync(parent, requests);
BatchUpdateTeamsAsync(string, IEnumerable<UpdateTeamRequest>, CancellationToken)
API to batch update Team objects.
Declaration
public virtual Task<BatchUpdateTeamsResponse> BatchUpdateTeamsAsync(string parent, IEnumerable<UpdateTeamRequest> requests, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| string | parent | Required. The parent resource where |
| IEnumerable<UpdateTeamRequest> | requests | Required. The |
| CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
| Type | Description |
|---|---|
| Task<BatchUpdateTeamsResponse> | A Task containing the RPC response. |
Sample code
// Create client
TeamServiceClient teamServiceClient = await TeamServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<UpdateTeamRequest> requests = new UpdateTeamRequest[]
{
new UpdateTeamRequest(),
};
// Make the request
BatchUpdateTeamsResponse response = await teamServiceClient.BatchUpdateTeamsAsync(parent, requests);
Create()
Synchronously creates a TeamServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use TeamServiceClientBuilder.
Declaration
public static TeamServiceClient Create()
Returns
| Type | Description |
|---|---|
| TeamServiceClient | The created TeamServiceClient. |
CreateAsync(CancellationToken)
Asynchronously creates a TeamServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use TeamServiceClientBuilder.
Declaration
public static Task<TeamServiceClient> CreateAsync(CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| CancellationToken | cancellationToken | The CancellationToken to use while creating the client. |
Returns
| Type | Description |
|---|---|
| Task<TeamServiceClient> | The task representing the created TeamServiceClient. |
CreateTeam(CreateTeamRequest, CallSettings)
API to create a Team object.
Declaration
public virtual Team CreateTeam(CreateTeamRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| CreateTeamRequest | 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 |
|---|---|
| Team | The RPC response. |
Sample code
// Create client
TeamServiceClient teamServiceClient = TeamServiceClient.Create();
// Initialize request argument(s)
CreateTeamRequest request = new CreateTeamRequest
{
ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
Team = new Team(),
};
// Make the request
Team response = teamServiceClient.CreateTeam(request);
CreateTeam(NetworkName, Team, CallSettings)
API to create a Team object.
Declaration
public virtual Team CreateTeam(NetworkName parent, Team team, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| NetworkName | parent | Required. The parent resource where this |
| Team | team | Required. The |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Team | The RPC response. |
Sample code
// Create client
TeamServiceClient teamServiceClient = TeamServiceClient.Create();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
Team team = new Team();
// Make the request
Team response = teamServiceClient.CreateTeam(parent, team);
CreateTeam(string, Team, CallSettings)
API to create a Team object.
Declaration
public virtual Team CreateTeam(string parent, Team team, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | parent | Required. The parent resource where this |
| Team | team | Required. The |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Team | The RPC response. |
Sample code
// Create client
TeamServiceClient teamServiceClient = TeamServiceClient.Create();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
Team team = new Team();
// Make the request
Team response = teamServiceClient.CreateTeam(parent, team);
CreateTeamAsync(CreateTeamRequest, CallSettings)
API to create a Team object.
Declaration
public virtual Task<Team> CreateTeamAsync(CreateTeamRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| CreateTeamRequest | 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<Team> | A Task containing the RPC response. |
Sample code
// Create client
TeamServiceClient teamServiceClient = await TeamServiceClient.CreateAsync();
// Initialize request argument(s)
CreateTeamRequest request = new CreateTeamRequest
{
ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
Team = new Team(),
};
// Make the request
Team response = await teamServiceClient.CreateTeamAsync(request);
CreateTeamAsync(CreateTeamRequest, CancellationToken)
API to create a Team object.
Declaration
public virtual Task<Team> CreateTeamAsync(CreateTeamRequest request, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| CreateTeamRequest | 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<Team> | A Task containing the RPC response. |
Sample code
// Create client
TeamServiceClient teamServiceClient = await TeamServiceClient.CreateAsync();
// Initialize request argument(s)
CreateTeamRequest request = new CreateTeamRequest
{
ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
Team = new Team(),
};
// Make the request
Team response = await teamServiceClient.CreateTeamAsync(request);
CreateTeamAsync(NetworkName, Team, CallSettings)
API to create a Team object.
Declaration
public virtual Task<Team> CreateTeamAsync(NetworkName parent, Team team, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| NetworkName | parent | Required. The parent resource where this |
| Team | team | Required. The |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Task<Team> | A Task containing the RPC response. |
Sample code
// Create client
TeamServiceClient teamServiceClient = await TeamServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
Team team = new Team();
// Make the request
Team response = await teamServiceClient.CreateTeamAsync(parent, team);
CreateTeamAsync(NetworkName, Team, CancellationToken)
API to create a Team object.
Declaration
public virtual Task<Team> CreateTeamAsync(NetworkName parent, Team team, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| NetworkName | parent | Required. The parent resource where this |
| Team | team | Required. The |
| CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
| Type | Description |
|---|---|
| Task<Team> | A Task containing the RPC response. |
Sample code
// Create client
TeamServiceClient teamServiceClient = await TeamServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
Team team = new Team();
// Make the request
Team response = await teamServiceClient.CreateTeamAsync(parent, team);
CreateTeamAsync(string, Team, CallSettings)
API to create a Team object.
Declaration
public virtual Task<Team> CreateTeamAsync(string parent, Team team, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | parent | Required. The parent resource where this |
| Team | team | Required. The |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Task<Team> | A Task containing the RPC response. |
Sample code
// Create client
TeamServiceClient teamServiceClient = await TeamServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
Team team = new Team();
// Make the request
Team response = await teamServiceClient.CreateTeamAsync(parent, team);
CreateTeamAsync(string, Team, CancellationToken)
API to create a Team object.
Declaration
public virtual Task<Team> CreateTeamAsync(string parent, Team team, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| string | parent | Required. The parent resource where this |
| Team | team | Required. The |
| CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
| Type | Description |
|---|---|
| Task<Team> | A Task containing the RPC response. |
Sample code
// Create client
TeamServiceClient teamServiceClient = await TeamServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
Team team = new Team();
// Make the request
Team response = await teamServiceClient.CreateTeamAsync(parent, team);
GetTeam(GetTeamRequest, CallSettings)
API to retrieve a Team object.
Declaration
public virtual Team GetTeam(GetTeamRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| GetTeamRequest | 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 |
|---|---|
| Team | The RPC response. |
Sample code
// Create client
TeamServiceClient teamServiceClient = TeamServiceClient.Create();
// Initialize request argument(s)
GetTeamRequest request = new GetTeamRequest
{
TeamName = TeamName.FromNetworkCodeTeam("[NETWORK_CODE]", "[TEAM]"),
};
// Make the request
Team response = teamServiceClient.GetTeam(request);
GetTeam(TeamName, CallSettings)
API to retrieve a Team object.
Declaration
public virtual Team GetTeam(TeamName name, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| TeamName | name | Required. The resource name of the Team.
Format: |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Team | The RPC response. |
Sample code
// Create client
TeamServiceClient teamServiceClient = TeamServiceClient.Create();
// Initialize request argument(s)
TeamName name = TeamName.FromNetworkCodeTeam("[NETWORK_CODE]", "[TEAM]");
// Make the request
Team response = teamServiceClient.GetTeam(name);
GetTeam(string, CallSettings)
API to retrieve a Team object.
Declaration
public virtual Team GetTeam(string name, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | Required. The resource name of the Team.
Format: |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Team | The RPC response. |
Sample code
// Create client
TeamServiceClient teamServiceClient = TeamServiceClient.Create();
// Initialize request argument(s)
string name = "networks/[NETWORK_CODE]/teams/[TEAM]";
// Make the request
Team response = teamServiceClient.GetTeam(name);
GetTeamAsync(GetTeamRequest, CallSettings)
API to retrieve a Team object.
Declaration
public virtual Task<Team> GetTeamAsync(GetTeamRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| GetTeamRequest | 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<Team> | A Task containing the RPC response. |
Sample code
// Create client
TeamServiceClient teamServiceClient = await TeamServiceClient.CreateAsync();
// Initialize request argument(s)
GetTeamRequest request = new GetTeamRequest
{
TeamName = TeamName.FromNetworkCodeTeam("[NETWORK_CODE]", "[TEAM]"),
};
// Make the request
Team response = await teamServiceClient.GetTeamAsync(request);
GetTeamAsync(GetTeamRequest, CancellationToken)
API to retrieve a Team object.
Declaration
public virtual Task<Team> GetTeamAsync(GetTeamRequest request, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| GetTeamRequest | 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<Team> | A Task containing the RPC response. |
Sample code
// Create client
TeamServiceClient teamServiceClient = await TeamServiceClient.CreateAsync();
// Initialize request argument(s)
GetTeamRequest request = new GetTeamRequest
{
TeamName = TeamName.FromNetworkCodeTeam("[NETWORK_CODE]", "[TEAM]"),
};
// Make the request
Team response = await teamServiceClient.GetTeamAsync(request);
GetTeamAsync(TeamName, CallSettings)
API to retrieve a Team object.
Declaration
public virtual Task<Team> GetTeamAsync(TeamName name, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| TeamName | name | Required. The resource name of the Team.
Format: |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Task<Team> | A Task containing the RPC response. |
Sample code
// Create client
TeamServiceClient teamServiceClient = await TeamServiceClient.CreateAsync();
// Initialize request argument(s)
TeamName name = TeamName.FromNetworkCodeTeam("[NETWORK_CODE]", "[TEAM]");
// Make the request
Team response = await teamServiceClient.GetTeamAsync(name);
GetTeamAsync(TeamName, CancellationToken)
API to retrieve a Team object.
Declaration
public virtual Task<Team> GetTeamAsync(TeamName name, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| TeamName | name | Required. The resource name of the Team.
Format: |
| CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
| Type | Description |
|---|---|
| Task<Team> | A Task containing the RPC response. |
Sample code
// Create client
TeamServiceClient teamServiceClient = await TeamServiceClient.CreateAsync();
// Initialize request argument(s)
TeamName name = TeamName.FromNetworkCodeTeam("[NETWORK_CODE]", "[TEAM]");
// Make the request
Team response = await teamServiceClient.GetTeamAsync(name);
GetTeamAsync(string, CallSettings)
API to retrieve a Team object.
Declaration
public virtual Task<Team> GetTeamAsync(string name, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | Required. The resource name of the Team.
Format: |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Task<Team> | A Task containing the RPC response. |
Sample code
// Create client
TeamServiceClient teamServiceClient = await TeamServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "networks/[NETWORK_CODE]/teams/[TEAM]";
// Make the request
Team response = await teamServiceClient.GetTeamAsync(name);
GetTeamAsync(string, CancellationToken)
API to retrieve a Team object.
Declaration
public virtual Task<Team> GetTeamAsync(string name, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | Required. The resource name of the Team.
Format: |
| CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
| Type | Description |
|---|---|
| Task<Team> | A Task containing the RPC response. |
Sample code
// Create client
TeamServiceClient teamServiceClient = await TeamServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "networks/[NETWORK_CODE]/teams/[TEAM]";
// Make the request
Team response = await teamServiceClient.GetTeamAsync(name);
ListTeams(ListTeamsRequest, CallSettings)
API to retrieve a list of Team objects.
Declaration
public virtual PagedEnumerable<ListTeamsResponse, Team> ListTeams(ListTeamsRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| ListTeamsRequest | 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<ListTeamsResponse, Team> | A pageable sequence of Team resources. |
Sample code
// Create client
TeamServiceClient teamServiceClient = TeamServiceClient.Create();
// Initialize request argument(s)
ListTeamsRequest request = new ListTeamsRequest
{
ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
Filter = "",
OrderBy = "",
Skip = 0,
};
// Make the request
PagedEnumerable<ListTeamsResponse, Team> response = teamServiceClient.ListTeams(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (Team 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 (ListTeamsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Team 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<Team> 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 (Team 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;
ListTeams(NetworkName, string, int?, CallSettings)
API to retrieve a list of Team objects.
Declaration
public virtual PagedEnumerable<ListTeamsResponse, Team> ListTeams(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 Teams.
Format: |
| string | pageToken | The token returned from the previous request. A value of |
| int? | pageSize | The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| PagedEnumerable<ListTeamsResponse, Team> | A pageable sequence of Team resources. |
Sample code
// Create client
TeamServiceClient teamServiceClient = TeamServiceClient.Create();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
// Make the request
PagedEnumerable<ListTeamsResponse, Team> response = teamServiceClient.ListTeams(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (Team 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 (ListTeamsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Team 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<Team> 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 (Team 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;
ListTeams(string, string, int?, CallSettings)
API to retrieve a list of Team objects.
Declaration
public virtual PagedEnumerable<ListTeamsResponse, Team> ListTeams(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 Teams.
Format: |
| string | pageToken | The token returned from the previous request. A value of |
| int? | pageSize | The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| PagedEnumerable<ListTeamsResponse, Team> | A pageable sequence of Team resources. |
Sample code
// Create client
TeamServiceClient teamServiceClient = TeamServiceClient.Create();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
// Make the request
PagedEnumerable<ListTeamsResponse, Team> response = teamServiceClient.ListTeams(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (Team 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 (ListTeamsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Team 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<Team> 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 (Team 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;
ListTeamsAsync(ListTeamsRequest, CallSettings)
API to retrieve a list of Team objects.
Declaration
public virtual PagedAsyncEnumerable<ListTeamsResponse, Team> ListTeamsAsync(ListTeamsRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| ListTeamsRequest | 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<ListTeamsResponse, Team> | A pageable asynchronous sequence of Team resources. |
Sample code
// Create client
TeamServiceClient teamServiceClient = await TeamServiceClient.CreateAsync();
// Initialize request argument(s)
ListTeamsRequest request = new ListTeamsRequest
{
ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
Filter = "",
OrderBy = "",
Skip = 0,
};
// Make the request
PagedAsyncEnumerable<ListTeamsResponse, Team> response = teamServiceClient.ListTeamsAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Team 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((ListTeamsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Team 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<Team> 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 (Team 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;
ListTeamsAsync(NetworkName, string, int?, CallSettings)
API to retrieve a list of Team objects.
Declaration
public virtual PagedAsyncEnumerable<ListTeamsResponse, Team> ListTeamsAsync(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 Teams.
Format: |
| string | pageToken | The token returned from the previous request. A value of |
| int? | pageSize | The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| PagedAsyncEnumerable<ListTeamsResponse, Team> | A pageable asynchronous sequence of Team resources. |
Sample code
// Create client
TeamServiceClient teamServiceClient = await TeamServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
// Make the request
PagedAsyncEnumerable<ListTeamsResponse, Team> response = teamServiceClient.ListTeamsAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Team 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((ListTeamsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Team 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<Team> 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 (Team 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;
ListTeamsAsync(string, string, int?, CallSettings)
API to retrieve a list of Team objects.
Declaration
public virtual PagedAsyncEnumerable<ListTeamsResponse, Team> ListTeamsAsync(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 Teams.
Format: |
| string | pageToken | The token returned from the previous request. A value of |
| int? | pageSize | The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| PagedAsyncEnumerable<ListTeamsResponse, Team> | A pageable asynchronous sequence of Team resources. |
Sample code
// Create client
TeamServiceClient teamServiceClient = await TeamServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
// Make the request
PagedAsyncEnumerable<ListTeamsResponse, Team> response = teamServiceClient.ListTeamsAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Team 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((ListTeamsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Team 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<Team> 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 (Team 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.
UpdateTeam(Team, FieldMask, CallSettings)
API to update a Team object.
Declaration
public virtual Team UpdateTeam(Team team, FieldMask updateMask, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Team | team | Required. The The |
| FieldMask | updateMask | Required. The list of fields to update. |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Team | The RPC response. |
Sample code
// Create client
TeamServiceClient teamServiceClient = TeamServiceClient.Create();
// Initialize request argument(s)
Team team = new Team();
FieldMask updateMask = new FieldMask();
// Make the request
Team response = teamServiceClient.UpdateTeam(team, updateMask);
UpdateTeam(UpdateTeamRequest, CallSettings)
API to update a Team object.
Declaration
public virtual Team UpdateTeam(UpdateTeamRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| UpdateTeamRequest | 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 |
|---|---|
| Team | The RPC response. |
Sample code
// Create client
TeamServiceClient teamServiceClient = TeamServiceClient.Create();
// Initialize request argument(s)
UpdateTeamRequest request = new UpdateTeamRequest
{
Team = new Team(),
UpdateMask = new FieldMask(),
};
// Make the request
Team response = teamServiceClient.UpdateTeam(request);
UpdateTeamAsync(Team, FieldMask, CallSettings)
API to update a Team object.
Declaration
public virtual Task<Team> UpdateTeamAsync(Team team, FieldMask updateMask, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Team | team | Required. The The |
| FieldMask | updateMask | Required. The list of fields to update. |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Task<Team> | A Task containing the RPC response. |
Sample code
// Create client
TeamServiceClient teamServiceClient = await TeamServiceClient.CreateAsync();
// Initialize request argument(s)
Team team = new Team();
FieldMask updateMask = new FieldMask();
// Make the request
Team response = await teamServiceClient.UpdateTeamAsync(team, updateMask);
UpdateTeamAsync(Team, FieldMask, CancellationToken)
API to update a Team object.
Declaration
public virtual Task<Team> UpdateTeamAsync(Team team, FieldMask updateMask, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| Team | team | Required. The The |
| FieldMask | updateMask | Required. The list of fields to update. |
| CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
| Type | Description |
|---|---|
| Task<Team> | A Task containing the RPC response. |
Sample code
// Create client
TeamServiceClient teamServiceClient = await TeamServiceClient.CreateAsync();
// Initialize request argument(s)
Team team = new Team();
FieldMask updateMask = new FieldMask();
// Make the request
Team response = await teamServiceClient.UpdateTeamAsync(team, updateMask);
UpdateTeamAsync(UpdateTeamRequest, CallSettings)
API to update a Team object.
Declaration
public virtual Task<Team> UpdateTeamAsync(UpdateTeamRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| UpdateTeamRequest | 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<Team> | A Task containing the RPC response. |
Sample code
// Create client
TeamServiceClient teamServiceClient = await TeamServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateTeamRequest request = new UpdateTeamRequest
{
Team = new Team(),
UpdateMask = new FieldMask(),
};
// Make the request
Team response = await teamServiceClient.UpdateTeamAsync(request);
UpdateTeamAsync(UpdateTeamRequest, CancellationToken)
API to update a Team object.
Declaration
public virtual Task<Team> UpdateTeamAsync(UpdateTeamRequest request, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| UpdateTeamRequest | 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<Team> | A Task containing the RPC response. |
Sample code
// Create client
TeamServiceClient teamServiceClient = await TeamServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateTeamRequest request = new UpdateTeamRequest
{
Team = new Team(),
UpdateMask = new FieldMask(),
};
// Make the request
Team response = await teamServiceClient.UpdateTeamAsync(request);