Identifier. The name of the data source. Format:{datasource.name=accounts/{account}/dataSources/{datasource}}
↳ data_source_id
int|string
Output only. The data source id.
↳ display_name
string
Required. The displayed data source name in the Merchant Center UI.
↳ input
int
Output only. Determines the type of input to the data source. Based on the input some settings might not work. Only generic data sources can be created through the API.
Required. The displayed data source name in the Merchant Center UI.
Returns
Type
Description
string
setDisplayName
Required. The displayed data source name in the Merchant Center UI.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getInput
Output only. Determines the type of input to the data source. Based on the
input some settings might not work. Only generic data sources can be
created through the API.
Returns
Type
Description
int
setInput
Output only. Determines the type of input to the data source. Based on the
input some settings might not work. Only generic data sources can be
created through the API.
Parameter
Name
Description
var
int
Returns
Type
Description
$this
getFileInput
Optional. The field is used only when data is managed through a file.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Google Shopping Merchant DataSources V1beta Client - Class DataSource (1.0.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.0.0 (latest)](/php/docs/reference/shopping-merchant-datasources/latest/V1beta.DataSource)\n- [0.6.0](/php/docs/reference/shopping-merchant-datasources/0.6.0/V1beta.DataSource)\n- [0.5.1](/php/docs/reference/shopping-merchant-datasources/0.5.1/V1beta.DataSource)\n- [0.4.0](/php/docs/reference/shopping-merchant-datasources/0.4.0/V1beta.DataSource)\n- [0.3.1](/php/docs/reference/shopping-merchant-datasources/0.3.1/V1beta.DataSource)\n- [0.2.3](/php/docs/reference/shopping-merchant-datasources/0.2.3/V1beta.DataSource)\n- [0.1.0](/php/docs/reference/shopping-merchant-datasources/0.1.0/V1beta.DataSource) \n| **Beta**\n|\n|\n| This library is covered by the [Pre-GA Offerings Terms](/terms/service-terms#1)\n| of the Terms of Service. Pre-GA libraries might have limited support,\n| and changes to pre-GA libraries might not be compatible with other pre-GA versions.\n| For more information, see the\n[launch stage descriptions](/products#product-launch-stages). \nReference documentation and code samples for the Google Shopping Merchant DataSources V1beta Client class DataSource.\n\nThe [data source](https://support.google.com/merchants/answer/7439058) for\nthe Merchant Center account.\n\nGenerated from protobuf message `google.shopping.merchant.datasources.v1beta.DataSource`\n\nNamespace\n---------\n\nGoogle \\\\ Shopping \\\\ Merchant \\\\ DataSources \\\\ V1beta\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getPrimaryProductDataSource\n\nThe [primary data\nsource](https://support.google.com/merchants/answer/7439058) for local\nand online products.\n\n### hasPrimaryProductDataSource\n\n### setPrimaryProductDataSource\n\nThe [primary data\nsource](https://support.google.com/merchants/answer/7439058) for local\nand online products.\n\n### getSupplementalProductDataSource\n\nThe [supplemental data\nsource](https://support.google.com/merchants/answer/7439058) for local\nand online products.\n\n### hasSupplementalProductDataSource\n\n### setSupplementalProductDataSource\n\nThe [supplemental data\nsource](https://support.google.com/merchants/answer/7439058) for local\nand online products.\n\n### getLocalInventoryDataSource\n\nThe [local\ninventory](https://support.google.com/merchants/answer/7023001) data\nsource.\n\n### hasLocalInventoryDataSource\n\n### setLocalInventoryDataSource\n\nThe [local\ninventory](https://support.google.com/merchants/answer/7023001) data\nsource.\n\n### getRegionalInventoryDataSource\n\nThe [regional\ninventory](https://support.google.com/merchants/answer/7439058) data\nsource.\n\n### hasRegionalInventoryDataSource\n\n### setRegionalInventoryDataSource\n\nThe [regional\ninventory](https://support.google.com/merchants/answer/7439058) data\nsource.\n\n### getPromotionDataSource\n\nThe [promotion](https://support.google.com/merchants/answer/2906014)\ndata source.\n\n### hasPromotionDataSource\n\n### setPromotionDataSource\n\nThe [promotion](https://support.google.com/merchants/answer/2906014)\ndata source.\n\n### getProductReviewDataSource\n\nThe [product\nreview](https://support.google.com/merchants/answer/7045996)\ndata source.\n\n### hasProductReviewDataSource\n\n### setProductReviewDataSource\n\nThe [product\nreview](https://support.google.com/merchants/answer/7045996)\ndata source.\n\n### getMerchantReviewDataSource\n\nThe [merchant\nreview](https://support.google.com/merchants/answer/7045996)\ndata source.\n\n### hasMerchantReviewDataSource\n\n### setMerchantReviewDataSource\n\nThe [merchant\nreview](https://support.google.com/merchants/answer/7045996)\ndata source.\n\n### getName\n\nIdentifier. The name of the data source.\n\nFormat:\n`{datasource.name=accounts/{account}/dataSources/{datasource}}`\n\n### setName\n\nIdentifier. The name of the data source.\n\nFormat:\n`{datasource.name=accounts/{account}/dataSources/{datasource}}`\n\n### getDataSourceId\n\nOutput only. The data source id.\n\n### setDataSourceId\n\nOutput only. The data source id.\n\n### getDisplayName\n\nRequired. The displayed data source name in the Merchant Center UI.\n\n### setDisplayName\n\nRequired. The displayed data source name in the Merchant Center UI.\n\n### getInput\n\nOutput only. Determines the type of input to the data source. Based on the\ninput some settings might not work. Only generic data sources can be\ncreated through the API.\n\n### setInput\n\nOutput only. Determines the type of input to the data source. Based on the\ninput some settings might not work. Only generic data sources can be\ncreated through the API.\n\n### getFileInput\n\nOptional. The field is used only when data is managed through a file.\n\n### hasFileInput\n\n### clearFileInput\n\n### setFileInput\n\nOptional. The field is used only when data is managed through a file.\n\n### getType"]]