using UnityEngine;
using System;
using System.Collections.Generic;
using UnityEditor.Localization.Plugins.Google.Columns;
namespace UnityEditor.Localization.Plugins.Google
{
///
/// Provides an editor interface to .
///
///
/// This example adds and configures a to a .
///
///
///
/// This example uses the data that was configured in the to perform a Push.
///
///
///
/// This example shows how to use the data that was configured in a Google Sheets extension to perform a pull.
///
///
///
/// This example shows how to push every that contains a .
///
///
///
/// This example shows how to pull every that contains a .
///
///
[Serializable]
[StringTableCollectionExtension]
public class GoogleSheetsExtension : CollectionExtension
{
[SerializeField]
SheetsServiceProvider m_SheetsServiceProvider;
[SerializeField]
string m_SpreadsheetId;
[SerializeField]
int m_SheetId;
[SerializeReference]
List m_Columns = new List();
[SerializeReference]
bool m_RemoveMissingPulledKeys = true;
///
/// The column mappings. Each represents a column in a Google sheet. The column mappings are responsible for converting to and from cell data.
///
public List Columns { get => m_Columns; }
///
/// The SheetsServiceProvider provides the authorization and connection to the Google Sheets service.
///
public SheetsServiceProvider SheetsServiceProvider { get => m_SheetsServiceProvider; set => m_SheetsServiceProvider = value; }
///
/// The Id of the Google Sheet. This can be found by examining the url:
/// https://docs.google.com/spreadsheets/d/>SpreadsheetId/edit#gid=SheetId
/// Further information can be found here.
///
public string SpreadsheetId { get => m_SpreadsheetId; set => m_SpreadsheetId = value; }
///
/// The id of a sheet inside of a Google Spreadsheet. Each tab is a separate sheet.
/// The sheet id can be found in the url after the gid section:
/// https://docs.google.com/spreadsheets/d/>SpreadsheetId/edit#gid=SheetId
///
public int SheetId { get => m_SheetId; set => m_SheetId = value; }
///
/// If this value is set then after any keys that were not in the sheet will be removed.
/// This is useful if you want to use a single sheet and will be adding and removing keys however if using multiple sheets then this value should be false to prevent accidental loss of data.
///
public bool RemoveMissingPulledKeys { get => m_RemoveMissingPulledKeys; set => m_RemoveMissingPulledKeys = value; }
}
}