Class FileUploadsServiceClient
FileUploadsService client wrapper, for convenient use.
Namespace: Google.Shopping.Merchant.DataSources.V1Beta
Assembly: Google.Shopping.Merchant.DataSources.V1Beta.dll
Syntax
public abstract class FileUploadsServiceClient
Remarks
Service to manage data source file uploads.
Properties
DefaultEndpoint
The default endpoint for the FileUploadsService service, which is a host of "merchantapi.googleapis.com" and a port of 443.
Declaration
public static string DefaultEndpoint { get; }
Property Value
Type | Description |
---|---|
string |
DefaultScopes
The default FileUploadsService scopes.
Declaration
public static IReadOnlyList<string> DefaultScopes { get; }
Property Value
Type | Description |
---|---|
IReadOnlyList<string> |
Remarks
The default FileUploadsService scopes are:
- https://www.googleapis.com/auth/content
GrpcClient
The underlying gRPC FileUploadsService client
Declaration
public virtual FileUploadsService.FileUploadsServiceClient GrpcClient { get; }
Property Value
Type | Description |
---|---|
FileUploadsService.FileUploadsServiceClient |
ServiceMetadata
The service metadata associated with this client type.
Declaration
public static ServiceMetadata ServiceMetadata { get; }
Property Value
Type | Description |
---|---|
ServiceMetadata |
Methods
Create()
Synchronously creates a FileUploadsServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use FileUploadsServiceClientBuilder .
Declaration
public static FileUploadsServiceClient Create()
Returns
Type | Description |
---|---|
FileUploadsServiceClient | The created FileUploadsServiceClient. |
CreateAsync(CancellationToken)
Asynchronously creates a FileUploadsServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use FileUploadsServiceClientBuilder .
Declaration
public static Task<FileUploadsServiceClient> CreateAsync(CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken | The CancellationToken to use while creating the client. |
Returns
Type | Description |
---|---|
Task<FileUploadsServiceClient> | The task representing the created FileUploadsServiceClient. |
GetFileUpload(FileUploadName, CallSettings)
Gets the latest data source file upload. Only the latest
alias is
accepted for a file upload.
Declaration
public virtual FileUpload GetFileUpload(FileUploadName name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
FileUploadName | name | Required. The name of the data source file upload to retrieve.
Format:
|
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
FileUpload | The RPC response. |
Sample code
// Create client
FileUploadsServiceClient fileUploadsServiceClient = FileUploadsServiceClient.Create();
// Initialize request argument(s)
FileUploadName name = FileUploadName.FromAccountDatasourceFileupload("[ACCOUNT]", "[DATASOURCE]", "[FILEUPLOAD]");
// Make the request
FileUpload response = fileUploadsServiceClient.GetFileUpload(name);
GetFileUpload(GetFileUploadRequest, CallSettings)
Gets the latest data source file upload. Only the latest
alias is
accepted for a file upload.
Declaration
public virtual FileUpload GetFileUpload(GetFileUploadRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
GetFileUploadRequest | 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 |
---|---|
FileUpload | The RPC response. |
Sample code
// Create client
FileUploadsServiceClient fileUploadsServiceClient = FileUploadsServiceClient.Create();
// Initialize request argument(s)
GetFileUploadRequest request = new GetFileUploadRequest
{
FileUploadName = FileUploadName.FromAccountDatasourceFileupload("[ACCOUNT]", "[DATASOURCE]", "[FILEUPLOAD]"),
};
// Make the request
FileUpload response = fileUploadsServiceClient.GetFileUpload(request);
GetFileUpload(string, CallSettings)
Gets the latest data source file upload. Only the latest
alias is
accepted for a file upload.
Declaration
public virtual FileUpload GetFileUpload(string name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | name | Required. The name of the data source file upload to retrieve.
Format:
|
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
FileUpload | The RPC response. |
Sample code
// Create client
FileUploadsServiceClient fileUploadsServiceClient = FileUploadsServiceClient.Create();
// Initialize request argument(s)
string name = "accounts/[ACCOUNT]/dataSources/[DATASOURCE]/fileUploads/[FILEUPLOAD]";
// Make the request
FileUpload response = fileUploadsServiceClient.GetFileUpload(name);
GetFileUploadAsync(FileUploadName, CallSettings)
Gets the latest data source file upload. Only the latest
alias is
accepted for a file upload.
Declaration
public virtual Task<FileUpload> GetFileUploadAsync(FileUploadName name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
FileUploadName | name | Required. The name of the data source file upload to retrieve.
Format:
|
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<FileUpload> | A Task containing the RPC response. |
Sample code
// Create client
FileUploadsServiceClient fileUploadsServiceClient = await FileUploadsServiceClient.CreateAsync();
// Initialize request argument(s)
FileUploadName name = FileUploadName.FromAccountDatasourceFileupload("[ACCOUNT]", "[DATASOURCE]", "[FILEUPLOAD]");
// Make the request
FileUpload response = await fileUploadsServiceClient.GetFileUploadAsync(name);
GetFileUploadAsync(FileUploadName, CancellationToken)
Gets the latest data source file upload. Only the latest
alias is
accepted for a file upload.
Declaration
public virtual Task<FileUpload> GetFileUploadAsync(FileUploadName name, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
FileUploadName | name | Required. The name of the data source file upload to retrieve.
Format:
|
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<FileUpload> | A Task containing the RPC response. |
Sample code
// Create client
FileUploadsServiceClient fileUploadsServiceClient = await FileUploadsServiceClient.CreateAsync();
// Initialize request argument(s)
FileUploadName name = FileUploadName.FromAccountDatasourceFileupload("[ACCOUNT]", "[DATASOURCE]", "[FILEUPLOAD]");
// Make the request
FileUpload response = await fileUploadsServiceClient.GetFileUploadAsync(name);
GetFileUploadAsync(GetFileUploadRequest, CallSettings)
Gets the latest data source file upload. Only the latest
alias is
accepted for a file upload.
Declaration
public virtual Task<FileUpload> GetFileUploadAsync(GetFileUploadRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
GetFileUploadRequest | 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<FileUpload> | A Task containing the RPC response. |
Sample code
// Create client
FileUploadsServiceClient fileUploadsServiceClient = await FileUploadsServiceClient.CreateAsync();
// Initialize request argument(s)
GetFileUploadRequest request = new GetFileUploadRequest
{
FileUploadName = FileUploadName.FromAccountDatasourceFileupload("[ACCOUNT]", "[DATASOURCE]", "[FILEUPLOAD]"),
};
// Make the request
FileUpload response = await fileUploadsServiceClient.GetFileUploadAsync(request);
GetFileUploadAsync(GetFileUploadRequest, CancellationToken)
Gets the latest data source file upload. Only the latest
alias is
accepted for a file upload.
Declaration
public virtual Task<FileUpload> GetFileUploadAsync(GetFileUploadRequest request, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
GetFileUploadRequest | 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<FileUpload> | A Task containing the RPC response. |
Sample code
// Create client
FileUploadsServiceClient fileUploadsServiceClient = await FileUploadsServiceClient.CreateAsync();
// Initialize request argument(s)
GetFileUploadRequest request = new GetFileUploadRequest
{
FileUploadName = FileUploadName.FromAccountDatasourceFileupload("[ACCOUNT]", "[DATASOURCE]", "[FILEUPLOAD]"),
};
// Make the request
FileUpload response = await fileUploadsServiceClient.GetFileUploadAsync(request);
GetFileUploadAsync(string, CallSettings)
Gets the latest data source file upload. Only the latest
alias is
accepted for a file upload.
Declaration
public virtual Task<FileUpload> GetFileUploadAsync(string name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | name | Required. The name of the data source file upload to retrieve.
Format:
|
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<FileUpload> | A Task containing the RPC response. |
Sample code
// Create client
FileUploadsServiceClient fileUploadsServiceClient = await FileUploadsServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "accounts/[ACCOUNT]/dataSources/[DATASOURCE]/fileUploads/[FILEUPLOAD]";
// Make the request
FileUpload response = await fileUploadsServiceClient.GetFileUploadAsync(name);
GetFileUploadAsync(string, CancellationToken)
Gets the latest data source file upload. Only the latest
alias is
accepted for a file upload.
Declaration
public virtual Task<FileUpload> GetFileUploadAsync(string name, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | name | Required. The name of the data source file upload to retrieve.
Format:
|
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<FileUpload> | A Task containing the RPC response. |
Sample code
// Create client
FileUploadsServiceClient fileUploadsServiceClient = await FileUploadsServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "accounts/[ACCOUNT]/dataSources/[DATASOURCE]/fileUploads/[FILEUPLOAD]";
// Make the request
FileUpload response = await fileUploadsServiceClient.GetFileUploadAsync(name);
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.