internal static SquareLinkedService DeserializeSquareLinkedService(JsonElement element) { string type = default; Optional <IntegrationRuntimeReference> connectVia = default; Optional <string> description = default; Optional <IDictionary <string, ParameterSpecification> > parameters = default; Optional <IList <object> > annotations = default; Optional <object> connectionProperties = default; object host = default; object clientId = default; Optional <SecretBase> clientSecret = default; object redirectUri = default; Optional <object> useEncryptedEndpoints = default; Optional <object> useHostVerification = default; Optional <object> usePeerVerification = default; Optional <object> encryptedCredential = default; IDictionary <string, object> additionalProperties = default; Dictionary <string, object> additionalPropertiesDictionary = new Dictionary <string, object>(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("type")) { type = property.Value.GetString(); continue; } if (property.NameEquals("connectVia")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); continue; } if (property.NameEquals("description")) { description = property.Value.GetString(); continue; } if (property.NameEquals("parameters")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } Dictionary <string, ParameterSpecification> dictionary = new Dictionary <string, ParameterSpecification>(); foreach (var property0 in property.Value.EnumerateObject()) { dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); } parameters = dictionary; continue; } if (property.NameEquals("annotations")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } List <object> array = new List <object>(); foreach (var item in property.Value.EnumerateArray()) { array.Add(item.GetObject()); } annotations = array; continue; } if (property.NameEquals("typeProperties")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } foreach (var property0 in property.Value.EnumerateObject()) { if (property0.NameEquals("connectionProperties")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } connectionProperties = property0.Value.GetObject(); continue; } if (property0.NameEquals("host")) { host = property0.Value.GetObject(); continue; } if (property0.NameEquals("clientId")) { clientId = property0.Value.GetObject(); continue; } if (property0.NameEquals("clientSecret")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } clientSecret = SecretBase.DeserializeSecretBase(property0.Value); continue; } if (property0.NameEquals("redirectUri")) { redirectUri = property0.Value.GetObject(); continue; } if (property0.NameEquals("useEncryptedEndpoints")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } useEncryptedEndpoints = property0.Value.GetObject(); continue; } if (property0.NameEquals("useHostVerification")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } useHostVerification = property0.Value.GetObject(); continue; } if (property0.NameEquals("usePeerVerification")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } usePeerVerification = property0.Value.GetObject(); continue; } if (property0.NameEquals("encryptedCredential")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } encryptedCredential = property0.Value.GetObject(); continue; } } continue; } additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; return(new SquareLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, connectionProperties.Value, host, clientId, clientSecret.Value, redirectUri, useEncryptedEndpoints.Value, useHostVerification.Value, usePeerVerification.Value, encryptedCredential.Value)); }
internal static SalesforceLinkedService DeserializeSalesforceLinkedService(JsonElement element) { string type = default; IntegrationRuntimeReference connectVia = default; string description = default; IDictionary <string, ParameterSpecification> parameters = default; IList <object> annotations = default; object environmentUrl = default; object username = default; SecretBase password = default; SecretBase securityToken = default; object encryptedCredential = default; IDictionary <string, object> additionalProperties = default; Dictionary <string, object> additionalPropertiesDictionary = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("type")) { type = property.Value.GetString(); continue; } if (property.NameEquals("connectVia")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); continue; } if (property.NameEquals("description")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } description = property.Value.GetString(); continue; } if (property.NameEquals("parameters")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } Dictionary <string, ParameterSpecification> dictionary = new Dictionary <string, ParameterSpecification>(); foreach (var property0 in property.Value.EnumerateObject()) { if (property0.Value.ValueKind == JsonValueKind.Null) { dictionary.Add(property0.Name, null); } else { dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); } } parameters = dictionary; continue; } if (property.NameEquals("annotations")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } List <object> array = new List <object>(); foreach (var item in property.Value.EnumerateArray()) { if (item.ValueKind == JsonValueKind.Null) { array.Add(null); } else { array.Add(item.GetObject()); } } annotations = array; continue; } if (property.NameEquals("typeProperties")) { foreach (var property0 in property.Value.EnumerateObject()) { if (property0.NameEquals("environmentUrl")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } environmentUrl = property0.Value.GetObject(); continue; } if (property0.NameEquals("username")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } username = property0.Value.GetObject(); continue; } if (property0.NameEquals("password")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } password = SecretBase.DeserializeSecretBase(property0.Value); continue; } if (property0.NameEquals("securityToken")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } securityToken = SecretBase.DeserializeSecretBase(property0.Value); continue; } if (property0.NameEquals("encryptedCredential")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } encryptedCredential = property0.Value.GetObject(); continue; } } continue; } additionalPropertiesDictionary ??= new Dictionary <string, object>(); if (property.Value.ValueKind == JsonValueKind.Null) { additionalPropertiesDictionary.Add(property.Name, null); } else { additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } } additionalProperties = additionalPropertiesDictionary; return(new SalesforceLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, environmentUrl, username, password, securityToken, encryptedCredential)); }
internal static LinkedService DeserializeLinkedService(JsonElement element) { if (element.TryGetProperty("type", out JsonElement discriminator)) { switch (discriminator.GetString()) { case "AmazonMWS": return(AmazonMWSLinkedService.DeserializeAmazonMWSLinkedService(element)); case "AmazonRedshift": return(AmazonRedshiftLinkedService.DeserializeAmazonRedshiftLinkedService(element)); case "AmazonS3": return(AmazonS3LinkedService.DeserializeAmazonS3LinkedService(element)); case "AzureBatch": return(AzureBatchLinkedService.DeserializeAzureBatchLinkedService(element)); case "AzureBlobFS": return(AzureBlobFSLinkedService.DeserializeAzureBlobFSLinkedService(element)); case "AzureBlobStorage": return(AzureBlobStorageLinkedService.DeserializeAzureBlobStorageLinkedService(element)); case "AzureDataExplorer": return(AzureDataExplorerLinkedService.DeserializeAzureDataExplorerLinkedService(element)); case "AzureDataLakeAnalytics": return(AzureDataLakeAnalyticsLinkedService.DeserializeAzureDataLakeAnalyticsLinkedService(element)); case "AzureDataLakeStore": return(AzureDataLakeStoreLinkedService.DeserializeAzureDataLakeStoreLinkedService(element)); case "AzureDatabricks": return(AzureDatabricksLinkedService.DeserializeAzureDatabricksLinkedService(element)); case "AzureFileStorage": return(AzureFileStorageLinkedService.DeserializeAzureFileStorageLinkedService(element)); case "AzureFunction": return(AzureFunctionLinkedService.DeserializeAzureFunctionLinkedService(element)); case "AzureKeyVault": return(AzureKeyVaultLinkedService.DeserializeAzureKeyVaultLinkedService(element)); case "AzureML": return(AzureMLLinkedService.DeserializeAzureMLLinkedService(element)); case "AzureMLService": return(AzureMLServiceLinkedService.DeserializeAzureMLServiceLinkedService(element)); case "AzureMariaDB": return(AzureMariaDBLinkedService.DeserializeAzureMariaDBLinkedService(element)); case "AzureMySql": return(AzureMySqlLinkedService.DeserializeAzureMySqlLinkedService(element)); case "AzurePostgreSql": return(AzurePostgreSqlLinkedService.DeserializeAzurePostgreSqlLinkedService(element)); case "AzureSearch": return(AzureSearchLinkedService.DeserializeAzureSearchLinkedService(element)); case "AzureSqlDW": return(AzureSqlDWLinkedService.DeserializeAzureSqlDWLinkedService(element)); case "AzureSqlDatabase": return(AzureSqlDatabaseLinkedService.DeserializeAzureSqlDatabaseLinkedService(element)); case "AzureSqlMI": return(AzureSqlMILinkedService.DeserializeAzureSqlMILinkedService(element)); case "AzureStorage": return(AzureStorageLinkedService.DeserializeAzureStorageLinkedService(element)); case "AzureTableStorage": return(AzureTableStorageLinkedService.DeserializeAzureTableStorageLinkedService(element)); case "Cassandra": return(CassandraLinkedService.DeserializeCassandraLinkedService(element)); case "CommonDataServiceForApps": return(CommonDataServiceForAppsLinkedService.DeserializeCommonDataServiceForAppsLinkedService(element)); case "Concur": return(ConcurLinkedService.DeserializeConcurLinkedService(element)); case "CosmosDb": return(CosmosDbLinkedService.DeserializeCosmosDbLinkedService(element)); case "CosmosDbMongoDbApi": return(CosmosDbMongoDbApiLinkedService.DeserializeCosmosDbMongoDbApiLinkedService(element)); case "Couchbase": return(CouchbaseLinkedService.DeserializeCouchbaseLinkedService(element)); case "CustomDataSource": return(CustomDataSourceLinkedService.DeserializeCustomDataSourceLinkedService(element)); case "Db2": return(Db2LinkedService.DeserializeDb2LinkedService(element)); case "Drill": return(DrillLinkedService.DeserializeDrillLinkedService(element)); case "Dynamics": return(DynamicsLinkedService.DeserializeDynamicsLinkedService(element)); case "DynamicsAX": return(DynamicsAXLinkedService.DeserializeDynamicsAXLinkedService(element)); case "DynamicsCrm": return(DynamicsCrmLinkedService.DeserializeDynamicsCrmLinkedService(element)); case "Eloqua": return(EloquaLinkedService.DeserializeEloquaLinkedService(element)); case "FileServer": return(FileServerLinkedService.DeserializeFileServerLinkedService(element)); case "FtpServer": return(FtpServerLinkedService.DeserializeFtpServerLinkedService(element)); case "GoogleAdWords": return(GoogleAdWordsLinkedService.DeserializeGoogleAdWordsLinkedService(element)); case "GoogleBigQuery": return(GoogleBigQueryLinkedService.DeserializeGoogleBigQueryLinkedService(element)); case "GoogleCloudStorage": return(GoogleCloudStorageLinkedService.DeserializeGoogleCloudStorageLinkedService(element)); case "Greenplum": return(GreenplumLinkedService.DeserializeGreenplumLinkedService(element)); case "HBase": return(HBaseLinkedService.DeserializeHBaseLinkedService(element)); case "HDInsight": return(HDInsightLinkedService.DeserializeHDInsightLinkedService(element)); case "HDInsightOnDemand": return(HDInsightOnDemandLinkedService.DeserializeHDInsightOnDemandLinkedService(element)); case "Hdfs": return(HdfsLinkedService.DeserializeHdfsLinkedService(element)); case "Hive": return(HiveLinkedService.DeserializeHiveLinkedService(element)); case "HttpServer": return(HttpLinkedService.DeserializeHttpLinkedService(element)); case "Hubspot": return(HubspotLinkedService.DeserializeHubspotLinkedService(element)); case "Impala": return(ImpalaLinkedService.DeserializeImpalaLinkedService(element)); case "Informix": return(InformixLinkedService.DeserializeInformixLinkedService(element)); case "Jira": return(JiraLinkedService.DeserializeJiraLinkedService(element)); case "Magento": return(MagentoLinkedService.DeserializeMagentoLinkedService(element)); case "MariaDB": return(MariaDBLinkedService.DeserializeMariaDBLinkedService(element)); case "Marketo": return(MarketoLinkedService.DeserializeMarketoLinkedService(element)); case "MicrosoftAccess": return(MicrosoftAccessLinkedService.DeserializeMicrosoftAccessLinkedService(element)); case "MongoDb": return(MongoDbLinkedService.DeserializeMongoDbLinkedService(element)); case "MongoDbV2": return(MongoDbV2LinkedService.DeserializeMongoDbV2LinkedService(element)); case "MySql": return(MySqlLinkedService.DeserializeMySqlLinkedService(element)); case "Netezza": return(NetezzaLinkedService.DeserializeNetezzaLinkedService(element)); case "OData": return(ODataLinkedService.DeserializeODataLinkedService(element)); case "Odbc": return(OdbcLinkedService.DeserializeOdbcLinkedService(element)); case "Office365": return(Office365LinkedService.DeserializeOffice365LinkedService(element)); case "Oracle": return(OracleLinkedService.DeserializeOracleLinkedService(element)); case "OracleServiceCloud": return(OracleServiceCloudLinkedService.DeserializeOracleServiceCloudLinkedService(element)); case "Paypal": return(PaypalLinkedService.DeserializePaypalLinkedService(element)); case "Phoenix": return(PhoenixLinkedService.DeserializePhoenixLinkedService(element)); case "PostgreSql": return(PostgreSqlLinkedService.DeserializePostgreSqlLinkedService(element)); case "Presto": return(PrestoLinkedService.DeserializePrestoLinkedService(element)); case "QuickBooks": return(QuickBooksLinkedService.DeserializeQuickBooksLinkedService(element)); case "Responsys": return(ResponsysLinkedService.DeserializeResponsysLinkedService(element)); case "RestService": return(RestServiceLinkedService.DeserializeRestServiceLinkedService(element)); case "Salesforce": return(SalesforceLinkedService.DeserializeSalesforceLinkedService(element)); case "SalesforceMarketingCloud": return(SalesforceMarketingCloudLinkedService.DeserializeSalesforceMarketingCloudLinkedService(element)); case "SalesforceServiceCloud": return(SalesforceServiceCloudLinkedService.DeserializeSalesforceServiceCloudLinkedService(element)); case "SapBW": return(SapBWLinkedService.DeserializeSapBWLinkedService(element)); case "SapCloudForCustomer": return(SapCloudForCustomerLinkedService.DeserializeSapCloudForCustomerLinkedService(element)); case "SapEcc": return(SapEccLinkedService.DeserializeSapEccLinkedService(element)); case "SapHana": return(SapHanaLinkedService.DeserializeSapHanaLinkedService(element)); case "SapOpenHub": return(SapOpenHubLinkedService.DeserializeSapOpenHubLinkedService(element)); case "SapTable": return(SapTableLinkedService.DeserializeSapTableLinkedService(element)); case "ServiceNow": return(ServiceNowLinkedService.DeserializeServiceNowLinkedService(element)); case "Sftp": return(SftpServerLinkedService.DeserializeSftpServerLinkedService(element)); case "Shopify": return(ShopifyLinkedService.DeserializeShopifyLinkedService(element)); case "Spark": return(SparkLinkedService.DeserializeSparkLinkedService(element)); case "SqlServer": return(SqlServerLinkedService.DeserializeSqlServerLinkedService(element)); case "Square": return(SquareLinkedService.DeserializeSquareLinkedService(element)); case "Sybase": return(SybaseLinkedService.DeserializeSybaseLinkedService(element)); case "Teradata": return(TeradataLinkedService.DeserializeTeradataLinkedService(element)); case "Vertica": return(VerticaLinkedService.DeserializeVerticaLinkedService(element)); case "Web": return(WebLinkedService.DeserializeWebLinkedService(element)); case "Xero": return(XeroLinkedService.DeserializeXeroLinkedService(element)); case "Zoho": return(ZohoLinkedService.DeserializeZohoLinkedService(element)); } } string type = default; Optional <IntegrationRuntimeReference> connectVia = default; Optional <string> description = default; Optional <IDictionary <string, ParameterSpecification> > parameters = default; Optional <IList <object> > annotations = default; IDictionary <string, object> additionalProperties = default; Dictionary <string, object> additionalPropertiesDictionary = new Dictionary <string, object>(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("type")) { type = property.Value.GetString(); continue; } if (property.NameEquals("connectVia")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); continue; } if (property.NameEquals("description")) { description = property.Value.GetString(); continue; } if (property.NameEquals("parameters")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } Dictionary <string, ParameterSpecification> dictionary = new Dictionary <string, ParameterSpecification>(); foreach (var property0 in property.Value.EnumerateObject()) { dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); } parameters = dictionary; continue; } if (property.NameEquals("annotations")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } List <object> array = new List <object>(); foreach (var item in property.Value.EnumerateArray()) { array.Add(item.GetObject()); } annotations = array; continue; } additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; return(new LinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties)); }
internal static InformixTableDataset DeserializeInformixTableDataset(JsonElement element) { string type = default; string description = default; object structure = default; object schema = default; LinkedServiceReference linkedServiceName = default; IDictionary <string, ParameterSpecification> parameters = default; IList <object> annotations = default; DatasetFolder folder = default; object tableName = default; IDictionary <string, object> additionalProperties = default; Dictionary <string, object> additionalPropertiesDictionary = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("type")) { type = property.Value.GetString(); continue; } if (property.NameEquals("description")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } description = property.Value.GetString(); continue; } if (property.NameEquals("structure")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } structure = property.Value.GetObject(); continue; } if (property.NameEquals("schema")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } schema = property.Value.GetObject(); continue; } if (property.NameEquals("linkedServiceName")) { linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); continue; } if (property.NameEquals("parameters")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } Dictionary <string, ParameterSpecification> dictionary = new Dictionary <string, ParameterSpecification>(); foreach (var property0 in property.Value.EnumerateObject()) { if (property0.Value.ValueKind == JsonValueKind.Null) { dictionary.Add(property0.Name, null); } else { dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); } } parameters = dictionary; continue; } if (property.NameEquals("annotations")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } List <object> array = new List <object>(); foreach (var item in property.Value.EnumerateArray()) { if (item.ValueKind == JsonValueKind.Null) { array.Add(null); } else { array.Add(item.GetObject()); } } annotations = array; continue; } if (property.NameEquals("folder")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } folder = DatasetFolder.DeserializeDatasetFolder(property.Value); continue; } if (property.NameEquals("typeProperties")) { foreach (var property0 in property.Value.EnumerateObject()) { if (property0.NameEquals("tableName")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } tableName = property0.Value.GetObject(); continue; } } continue; } additionalPropertiesDictionary ??= new Dictionary <string, object>(); if (property.Value.ValueKind == JsonValueKind.Null) { additionalPropertiesDictionary.Add(property.Name, null); } else { additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } } additionalProperties = additionalPropertiesDictionary; return(new InformixTableDataset(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties, tableName)); }
internal static CommonDataServiceForAppsLinkedService DeserializeCommonDataServiceForAppsLinkedService(JsonElement element) { string type = default; Optional <IntegrationRuntimeReference> connectVia = default; Optional <string> description = default; Optional <IDictionary <string, ParameterSpecification> > parameters = default; Optional <IList <object> > annotations = default; object deploymentType = default; Optional <object> hostName = default; Optional <object> port = default; Optional <object> serviceUri = default; Optional <object> organizationName = default; object authenticationType = default; Optional <object> username = default; Optional <SecretBase> password = default; Optional <object> servicePrincipalId = default; Optional <object> servicePrincipalCredentialType = default; Optional <SecretBase> servicePrincipalCredential = default; Optional <object> encryptedCredential = default; IDictionary <string, object> additionalProperties = default; Dictionary <string, object> additionalPropertiesDictionary = new Dictionary <string, object>(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("type")) { type = property.Value.GetString(); continue; } if (property.NameEquals("connectVia")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); continue; } if (property.NameEquals("description")) { description = property.Value.GetString(); continue; } if (property.NameEquals("parameters")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } Dictionary <string, ParameterSpecification> dictionary = new Dictionary <string, ParameterSpecification>(); foreach (var property0 in property.Value.EnumerateObject()) { dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); } parameters = dictionary; continue; } if (property.NameEquals("annotations")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } List <object> array = new List <object>(); foreach (var item in property.Value.EnumerateArray()) { array.Add(item.GetObject()); } annotations = array; continue; } if (property.NameEquals("typeProperties")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } foreach (var property0 in property.Value.EnumerateObject()) { if (property0.NameEquals("deploymentType")) { deploymentType = property0.Value.GetObject(); continue; } if (property0.NameEquals("hostName")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } hostName = property0.Value.GetObject(); continue; } if (property0.NameEquals("port")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } port = property0.Value.GetObject(); continue; } if (property0.NameEquals("serviceUri")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } serviceUri = property0.Value.GetObject(); continue; } if (property0.NameEquals("organizationName")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } organizationName = property0.Value.GetObject(); continue; } if (property0.NameEquals("authenticationType")) { authenticationType = property0.Value.GetObject(); continue; } if (property0.NameEquals("username")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } username = property0.Value.GetObject(); continue; } if (property0.NameEquals("password")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } password = SecretBase.DeserializeSecretBase(property0.Value); continue; } if (property0.NameEquals("servicePrincipalId")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } servicePrincipalId = property0.Value.GetObject(); continue; } if (property0.NameEquals("servicePrincipalCredentialType")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } servicePrincipalCredentialType = property0.Value.GetObject(); continue; } if (property0.NameEquals("servicePrincipalCredential")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } servicePrincipalCredential = SecretBase.DeserializeSecretBase(property0.Value); continue; } if (property0.NameEquals("encryptedCredential")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } encryptedCredential = property0.Value.GetObject(); continue; } } continue; } additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; return(new CommonDataServiceForAppsLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, deploymentType, hostName.Value, port.Value, serviceUri.Value, organizationName.Value, authenticationType, username.Value, password.Value, servicePrincipalId.Value, servicePrincipalCredentialType.Value, servicePrincipalCredential.Value, encryptedCredential.Value)); }
internal static SapBWLinkedService DeserializeSapBWLinkedService(JsonElement element) { string type = default; Optional <IntegrationRuntimeReference> connectVia = default; Optional <string> description = default; Optional <IDictionary <string, ParameterSpecification> > parameters = default; Optional <IList <object> > annotations = default; object server = default; object systemNumber = default; object clientId = default; Optional <object> userName = default; Optional <SecretBase> password = default; Optional <object> encryptedCredential = default; IDictionary <string, object> additionalProperties = default; Dictionary <string, object> additionalPropertiesDictionary = new Dictionary <string, object>(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("type")) { type = property.Value.GetString(); continue; } if (property.NameEquals("connectVia")) { connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); continue; } if (property.NameEquals("description")) { description = property.Value.GetString(); continue; } if (property.NameEquals("parameters")) { Dictionary <string, ParameterSpecification> dictionary = new Dictionary <string, ParameterSpecification>(); foreach (var property0 in property.Value.EnumerateObject()) { dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); } parameters = dictionary; continue; } if (property.NameEquals("annotations")) { List <object> array = new List <object>(); foreach (var item in property.Value.EnumerateArray()) { array.Add(item.GetObject()); } annotations = array; continue; } if (property.NameEquals("typeProperties")) { foreach (var property0 in property.Value.EnumerateObject()) { if (property0.NameEquals("server")) { server = property0.Value.GetObject(); continue; } if (property0.NameEquals("systemNumber")) { systemNumber = property0.Value.GetObject(); continue; } if (property0.NameEquals("clientId")) { clientId = property0.Value.GetObject(); continue; } if (property0.NameEquals("userName")) { userName = property0.Value.GetObject(); continue; } if (property0.NameEquals("password")) { password = SecretBase.DeserializeSecretBase(property0.Value); continue; } if (property0.NameEquals("encryptedCredential")) { encryptedCredential = property0.Value.GetObject(); continue; } } continue; } additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; return(new SapBWLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, server, systemNumber, clientId, userName.Value, password.Value, encryptedCredential.Value)); }
internal static AzureKeyVaultLinkedService DeserializeAzureKeyVaultLinkedService(JsonElement element) { string type = default; IntegrationRuntimeReference connectVia = default; string description = default; IDictionary <string, ParameterSpecification> parameters = default; IList <object> annotations = default; object baseUrl = default; IDictionary <string, object> additionalProperties = default; Dictionary <string, object> additionalPropertiesDictionary = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("type")) { type = property.Value.GetString(); continue; } if (property.NameEquals("connectVia")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); continue; } if (property.NameEquals("description")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } description = property.Value.GetString(); continue; } if (property.NameEquals("parameters")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } Dictionary <string, ParameterSpecification> dictionary = new Dictionary <string, ParameterSpecification>(); foreach (var property0 in property.Value.EnumerateObject()) { if (property0.Value.ValueKind == JsonValueKind.Null) { dictionary.Add(property0.Name, null); } else { dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); } } parameters = dictionary; continue; } if (property.NameEquals("annotations")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } List <object> array = new List <object>(); foreach (var item in property.Value.EnumerateArray()) { if (item.ValueKind == JsonValueKind.Null) { array.Add(null); } else { array.Add(item.GetObject()); } } annotations = array; continue; } if (property.NameEquals("typeProperties")) { foreach (var property0 in property.Value.EnumerateObject()) { if (property0.NameEquals("baseUrl")) { baseUrl = property0.Value.GetObject(); continue; } } continue; } additionalPropertiesDictionary ??= new Dictionary <string, object>(); if (property.Value.ValueKind == JsonValueKind.Null) { additionalPropertiesDictionary.Add(property.Name, null); } else { additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } } additionalProperties = additionalPropertiesDictionary; return(new AzureKeyVaultLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, baseUrl)); }
internal static DynamicsLinkedService DeserializeDynamicsLinkedService(JsonElement element) { string type = default; IntegrationRuntimeReference connectVia = default; string description = default; IDictionary <string, ParameterSpecification> parameters = default; IList <object> annotations = default; DynamicsDeploymentType deploymentType = default; string hostName = default; string port = default; string serviceUri = default; string organizationName = default; DynamicsAuthenticationType authenticationType = default; object username = default; SecretBase password = default; object servicePrincipalId = default; DynamicsServicePrincipalCredentialType?servicePrincipalCredentialType = default; SecretBase servicePrincipalCredential = default; object encryptedCredential = default; IDictionary <string, object> additionalProperties = default; Dictionary <string, object> additionalPropertiesDictionary = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("type")) { type = property.Value.GetString(); continue; } if (property.NameEquals("connectVia")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); continue; } if (property.NameEquals("description")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } description = property.Value.GetString(); continue; } if (property.NameEquals("parameters")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } Dictionary <string, ParameterSpecification> dictionary = new Dictionary <string, ParameterSpecification>(); foreach (var property0 in property.Value.EnumerateObject()) { if (property0.Value.ValueKind == JsonValueKind.Null) { dictionary.Add(property0.Name, null); } else { dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); } } parameters = dictionary; continue; } if (property.NameEquals("annotations")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } List <object> array = new List <object>(); foreach (var item in property.Value.EnumerateArray()) { if (item.ValueKind == JsonValueKind.Null) { array.Add(null); } else { array.Add(item.GetObject()); } } annotations = array; continue; } if (property.NameEquals("typeProperties")) { foreach (var property0 in property.Value.EnumerateObject()) { if (property0.NameEquals("deploymentType")) { deploymentType = new DynamicsDeploymentType(property0.Value.GetString()); continue; } if (property0.NameEquals("hostName")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } hostName = property0.Value.GetString(); continue; } if (property0.NameEquals("port")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } port = property0.Value.GetString(); continue; } if (property0.NameEquals("serviceUri")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } serviceUri = property0.Value.GetString(); continue; } if (property0.NameEquals("organizationName")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } organizationName = property0.Value.GetString(); continue; } if (property0.NameEquals("authenticationType")) { authenticationType = new DynamicsAuthenticationType(property0.Value.GetString()); continue; } if (property0.NameEquals("username")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } username = property0.Value.GetObject(); continue; } if (property0.NameEquals("password")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } password = SecretBase.DeserializeSecretBase(property0.Value); continue; } if (property0.NameEquals("servicePrincipalId")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } servicePrincipalId = property0.Value.GetObject(); continue; } if (property0.NameEquals("servicePrincipalCredentialType")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } servicePrincipalCredentialType = new DynamicsServicePrincipalCredentialType(property0.Value.GetString()); continue; } if (property0.NameEquals("servicePrincipalCredential")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } servicePrincipalCredential = SecretBase.DeserializeSecretBase(property0.Value); continue; } if (property0.NameEquals("encryptedCredential")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } encryptedCredential = property0.Value.GetObject(); continue; } } continue; } additionalPropertiesDictionary ??= new Dictionary <string, object>(); if (property.Value.ValueKind == JsonValueKind.Null) { additionalPropertiesDictionary.Add(property.Name, null); } else { additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } } additionalProperties = additionalPropertiesDictionary; return(new DynamicsLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, deploymentType, hostName, port, serviceUri, organizationName, authenticationType, username, password, servicePrincipalId, servicePrincipalCredentialType, servicePrincipalCredential, encryptedCredential)); }
internal static GoogleAdWordsLinkedService DeserializeGoogleAdWordsLinkedService(JsonElement element) { string type = default; Optional <IntegrationRuntimeReference> connectVia = default; Optional <string> description = default; Optional <IDictionary <string, ParameterSpecification> > parameters = default; Optional <IList <object> > annotations = default; object clientCustomerID = default; SecretBase developerToken = default; GoogleAdWordsAuthenticationType authenticationType = default; Optional <SecretBase> refreshToken = default; Optional <object> clientId = default; Optional <SecretBase> clientSecret = default; Optional <object> email = default; Optional <object> keyFilePath = default; Optional <object> trustedCertPath = default; Optional <object> useSystemTrustStore = default; Optional <object> encryptedCredential = default; IDictionary <string, object> additionalProperties = default; Dictionary <string, object> additionalPropertiesDictionary = new Dictionary <string, object>(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("type")) { type = property.Value.GetString(); continue; } if (property.NameEquals("connectVia")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); continue; } if (property.NameEquals("description")) { description = property.Value.GetString(); continue; } if (property.NameEquals("parameters")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } Dictionary <string, ParameterSpecification> dictionary = new Dictionary <string, ParameterSpecification>(); foreach (var property0 in property.Value.EnumerateObject()) { dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); } parameters = dictionary; continue; } if (property.NameEquals("annotations")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } List <object> array = new List <object>(); foreach (var item in property.Value.EnumerateArray()) { array.Add(item.GetObject()); } annotations = array; continue; } if (property.NameEquals("typeProperties")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } foreach (var property0 in property.Value.EnumerateObject()) { if (property0.NameEquals("clientCustomerID")) { clientCustomerID = property0.Value.GetObject(); continue; } if (property0.NameEquals("developerToken")) { developerToken = SecretBase.DeserializeSecretBase(property0.Value); continue; } if (property0.NameEquals("authenticationType")) { authenticationType = new GoogleAdWordsAuthenticationType(property0.Value.GetString()); continue; } if (property0.NameEquals("refreshToken")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } refreshToken = SecretBase.DeserializeSecretBase(property0.Value); continue; } if (property0.NameEquals("clientId")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } clientId = property0.Value.GetObject(); continue; } if (property0.NameEquals("clientSecret")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } clientSecret = SecretBase.DeserializeSecretBase(property0.Value); continue; } if (property0.NameEquals("email")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } email = property0.Value.GetObject(); continue; } if (property0.NameEquals("keyFilePath")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } keyFilePath = property0.Value.GetObject(); continue; } if (property0.NameEquals("trustedCertPath")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } trustedCertPath = property0.Value.GetObject(); continue; } if (property0.NameEquals("useSystemTrustStore")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } useSystemTrustStore = property0.Value.GetObject(); continue; } if (property0.NameEquals("encryptedCredential")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } encryptedCredential = property0.Value.GetObject(); continue; } } continue; } additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; return(new GoogleAdWordsLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, clientCustomerID, developerToken, authenticationType, refreshToken.Value, clientId.Value, clientSecret.Value, email.Value, keyFilePath.Value, trustedCertPath.Value, useSystemTrustStore.Value, encryptedCredential.Value)); }
internal static QuickBooksLinkedService DeserializeQuickBooksLinkedService(JsonElement element) { string type = default; Optional <IntegrationRuntimeReference> connectVia = default; Optional <string> description = default; Optional <IDictionary <string, ParameterSpecification> > parameters = default; Optional <IList <object> > annotations = default; Optional <object> connectionProperties = default; object endpoint = default; object companyId = default; object consumerKey = default; SecretBase consumerSecret = default; SecretBase accessToken = default; SecretBase accessTokenSecret = default; Optional <object> useEncryptedEndpoints = default; Optional <object> encryptedCredential = default; IDictionary <string, object> additionalProperties = default; Dictionary <string, object> additionalPropertiesDictionary = new Dictionary <string, object>(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("type")) { type = property.Value.GetString(); continue; } if (property.NameEquals("connectVia")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); continue; } if (property.NameEquals("description")) { description = property.Value.GetString(); continue; } if (property.NameEquals("parameters")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } Dictionary <string, ParameterSpecification> dictionary = new Dictionary <string, ParameterSpecification>(); foreach (var property0 in property.Value.EnumerateObject()) { dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); } parameters = dictionary; continue; } if (property.NameEquals("annotations")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } List <object> array = new List <object>(); foreach (var item in property.Value.EnumerateArray()) { array.Add(item.GetObject()); } annotations = array; continue; } if (property.NameEquals("typeProperties")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } foreach (var property0 in property.Value.EnumerateObject()) { if (property0.NameEquals("connectionProperties")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } connectionProperties = property0.Value.GetObject(); continue; } if (property0.NameEquals("endpoint")) { endpoint = property0.Value.GetObject(); continue; } if (property0.NameEquals("companyId")) { companyId = property0.Value.GetObject(); continue; } if (property0.NameEquals("consumerKey")) { consumerKey = property0.Value.GetObject(); continue; } if (property0.NameEquals("consumerSecret")) { consumerSecret = SecretBase.DeserializeSecretBase(property0.Value); continue; } if (property0.NameEquals("accessToken")) { accessToken = SecretBase.DeserializeSecretBase(property0.Value); continue; } if (property0.NameEquals("accessTokenSecret")) { accessTokenSecret = SecretBase.DeserializeSecretBase(property0.Value); continue; } if (property0.NameEquals("useEncryptedEndpoints")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } useEncryptedEndpoints = property0.Value.GetObject(); continue; } if (property0.NameEquals("encryptedCredential")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } encryptedCredential = property0.Value.GetObject(); continue; } } continue; } additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; return(new QuickBooksLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, connectionProperties.Value, endpoint, companyId, consumerKey, consumerSecret, accessToken, accessTokenSecret, useEncryptedEndpoints.Value, encryptedCredential.Value)); }
internal static SalesforceServiceCloudLinkedService DeserializeSalesforceServiceCloudLinkedService(JsonElement element) { string type = default; Optional <IntegrationRuntimeReference> connectVia = default; Optional <string> description = default; Optional <IDictionary <string, ParameterSpecification> > parameters = default; Optional <IList <object> > annotations = default; Optional <object> environmentUrl = default; Optional <object> username = default; Optional <SecretBase> password = default; Optional <SecretBase> securityToken = default; Optional <object> extendedProperties = default; Optional <object> encryptedCredential = default; IDictionary <string, object> additionalProperties = default; Dictionary <string, object> additionalPropertiesDictionary = new Dictionary <string, object>(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("type")) { type = property.Value.GetString(); continue; } if (property.NameEquals("connectVia")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); continue; } if (property.NameEquals("description")) { description = property.Value.GetString(); continue; } if (property.NameEquals("parameters")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } Dictionary <string, ParameterSpecification> dictionary = new Dictionary <string, ParameterSpecification>(); foreach (var property0 in property.Value.EnumerateObject()) { dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); } parameters = dictionary; continue; } if (property.NameEquals("annotations")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } List <object> array = new List <object>(); foreach (var item in property.Value.EnumerateArray()) { array.Add(item.GetObject()); } annotations = array; continue; } if (property.NameEquals("typeProperties")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } foreach (var property0 in property.Value.EnumerateObject()) { if (property0.NameEquals("environmentUrl")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } environmentUrl = property0.Value.GetObject(); continue; } if (property0.NameEquals("username")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } username = property0.Value.GetObject(); continue; } if (property0.NameEquals("password")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } password = SecretBase.DeserializeSecretBase(property0.Value); continue; } if (property0.NameEquals("securityToken")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } securityToken = SecretBase.DeserializeSecretBase(property0.Value); continue; } if (property0.NameEquals("extendedProperties")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } extendedProperties = property0.Value.GetObject(); continue; } if (property0.NameEquals("encryptedCredential")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } encryptedCredential = property0.Value.GetObject(); continue; } } continue; } additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; return(new SalesforceServiceCloudLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, environmentUrl.Value, username.Value, password.Value, securityToken.Value, extendedProperties.Value, encryptedCredential.Value)); }
internal static RestServiceLinkedService DeserializeRestServiceLinkedService(JsonElement element) { string type = default; Optional <IntegrationRuntimeReference> connectVia = default; Optional <string> description = default; Optional <IDictionary <string, ParameterSpecification> > parameters = default; Optional <IList <object> > annotations = default; object url = default; Optional <object> enableServerCertificateValidation = default; RestServiceAuthenticationType authenticationType = default; Optional <object> userName = default; Optional <SecretBase> password = default; Optional <object> servicePrincipalId = default; Optional <SecretBase> servicePrincipalKey = default; Optional <object> tenant = default; Optional <object> aadResourceId = default; Optional <object> encryptedCredential = default; IDictionary <string, object> additionalProperties = default; Dictionary <string, object> additionalPropertiesDictionary = new Dictionary <string, object>(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("type")) { type = property.Value.GetString(); continue; } if (property.NameEquals("connectVia")) { connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); continue; } if (property.NameEquals("description")) { description = property.Value.GetString(); continue; } if (property.NameEquals("parameters")) { Dictionary <string, ParameterSpecification> dictionary = new Dictionary <string, ParameterSpecification>(); foreach (var property0 in property.Value.EnumerateObject()) { dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); } parameters = dictionary; continue; } if (property.NameEquals("annotations")) { List <object> array = new List <object>(); foreach (var item in property.Value.EnumerateArray()) { array.Add(item.GetObject()); } annotations = array; continue; } if (property.NameEquals("typeProperties")) { foreach (var property0 in property.Value.EnumerateObject()) { if (property0.NameEquals("url")) { url = property0.Value.GetObject(); continue; } if (property0.NameEquals("enableServerCertificateValidation")) { enableServerCertificateValidation = property0.Value.GetObject(); continue; } if (property0.NameEquals("authenticationType")) { authenticationType = new RestServiceAuthenticationType(property0.Value.GetString()); continue; } if (property0.NameEquals("userName")) { userName = property0.Value.GetObject(); continue; } if (property0.NameEquals("password")) { password = SecretBase.DeserializeSecretBase(property0.Value); continue; } if (property0.NameEquals("servicePrincipalId")) { servicePrincipalId = property0.Value.GetObject(); continue; } if (property0.NameEquals("servicePrincipalKey")) { servicePrincipalKey = SecretBase.DeserializeSecretBase(property0.Value); continue; } if (property0.NameEquals("tenant")) { tenant = property0.Value.GetObject(); continue; } if (property0.NameEquals("aadResourceId")) { aadResourceId = property0.Value.GetObject(); continue; } if (property0.NameEquals("encryptedCredential")) { encryptedCredential = property0.Value.GetObject(); continue; } } continue; } additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; return(new RestServiceLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, url, enableServerCertificateValidation.Value, authenticationType, userName.Value, password.Value, servicePrincipalId.Value, servicePrincipalKey.Value, tenant.Value, aadResourceId.Value, encryptedCredential.Value)); }
internal static RestServiceLinkedService DeserializeRestServiceLinkedService(JsonElement element) { string type = default; IntegrationRuntimeReference connectVia = default; string description = default; IDictionary <string, ParameterSpecification> parameters = default; IList <object> annotations = default; object url = default; object enableServerCertificateValidation = default; RestServiceAuthenticationType authenticationType = default; object userName = default; SecretBase password = default; object servicePrincipalId = default; SecretBase servicePrincipalKey = default; object tenant = default; object aadResourceId = default; object encryptedCredential = default; IDictionary <string, object> additionalProperties = default; Dictionary <string, object> additionalPropertiesDictionary = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("type")) { type = property.Value.GetString(); continue; } if (property.NameEquals("connectVia")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); continue; } if (property.NameEquals("description")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } description = property.Value.GetString(); continue; } if (property.NameEquals("parameters")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } Dictionary <string, ParameterSpecification> dictionary = new Dictionary <string, ParameterSpecification>(); foreach (var property0 in property.Value.EnumerateObject()) { if (property0.Value.ValueKind == JsonValueKind.Null) { dictionary.Add(property0.Name, null); } else { dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); } } parameters = dictionary; continue; } if (property.NameEquals("annotations")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } List <object> array = new List <object>(); foreach (var item in property.Value.EnumerateArray()) { if (item.ValueKind == JsonValueKind.Null) { array.Add(null); } else { array.Add(item.GetObject()); } } annotations = array; continue; } if (property.NameEquals("typeProperties")) { foreach (var property0 in property.Value.EnumerateObject()) { if (property0.NameEquals("url")) { url = property0.Value.GetObject(); continue; } if (property0.NameEquals("enableServerCertificateValidation")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } enableServerCertificateValidation = property0.Value.GetObject(); continue; } if (property0.NameEquals("authenticationType")) { authenticationType = new RestServiceAuthenticationType(property0.Value.GetString()); continue; } if (property0.NameEquals("userName")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } userName = property0.Value.GetObject(); continue; } if (property0.NameEquals("password")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } password = SecretBase.DeserializeSecretBase(property0.Value); continue; } if (property0.NameEquals("servicePrincipalId")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } servicePrincipalId = property0.Value.GetObject(); continue; } if (property0.NameEquals("servicePrincipalKey")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } servicePrincipalKey = SecretBase.DeserializeSecretBase(property0.Value); continue; } if (property0.NameEquals("tenant")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } tenant = property0.Value.GetObject(); continue; } if (property0.NameEquals("aadResourceId")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } aadResourceId = property0.Value.GetObject(); continue; } if (property0.NameEquals("encryptedCredential")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } encryptedCredential = property0.Value.GetObject(); continue; } } continue; } additionalPropertiesDictionary ??= new Dictionary <string, object>(); if (property.Value.ValueKind == JsonValueKind.Null) { additionalPropertiesDictionary.Add(property.Name, null); } else { additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } } additionalProperties = additionalPropertiesDictionary; return(new RestServiceLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, url, enableServerCertificateValidation, authenticationType, userName, password, servicePrincipalId, servicePrincipalKey, tenant, aadResourceId, encryptedCredential)); }
internal static AzureDatabricksLinkedService DeserializeAzureDatabricksLinkedService(JsonElement element) { string type = default; Optional <IntegrationRuntimeReference> connectVia = default; Optional <string> description = default; Optional <IDictionary <string, ParameterSpecification> > parameters = default; Optional <IList <object> > annotations = default; object domain = default; Optional <SecretBase> accessToken = default; Optional <object> authentication = default; Optional <object> workspaceResourceId = default; Optional <object> existingClusterId = default; Optional <object> instancePoolId = default; Optional <object> newClusterVersion = default; Optional <object> newClusterNumOfWorker = default; Optional <object> newClusterNodeType = default; Optional <IDictionary <string, object> > newClusterSparkConf = default; Optional <IDictionary <string, object> > newClusterSparkEnvVars = default; Optional <IDictionary <string, object> > newClusterCustomTags = default; Optional <object> newClusterLogDestination = default; Optional <object> newClusterDriverNodeType = default; Optional <object> newClusterInitScripts = default; Optional <object> newClusterEnableElasticDisk = default; Optional <object> encryptedCredential = default; Optional <object> policyId = default; IDictionary <string, object> additionalProperties = default; Dictionary <string, object> additionalPropertiesDictionary = new Dictionary <string, object>(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("type")) { type = property.Value.GetString(); continue; } if (property.NameEquals("connectVia")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); continue; } if (property.NameEquals("description")) { description = property.Value.GetString(); continue; } if (property.NameEquals("parameters")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } Dictionary <string, ParameterSpecification> dictionary = new Dictionary <string, ParameterSpecification>(); foreach (var property0 in property.Value.EnumerateObject()) { dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); } parameters = dictionary; continue; } if (property.NameEquals("annotations")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } List <object> array = new List <object>(); foreach (var item in property.Value.EnumerateArray()) { array.Add(item.GetObject()); } annotations = array; continue; } if (property.NameEquals("typeProperties")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } foreach (var property0 in property.Value.EnumerateObject()) { if (property0.NameEquals("domain")) { domain = property0.Value.GetObject(); continue; } if (property0.NameEquals("accessToken")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } accessToken = SecretBase.DeserializeSecretBase(property0.Value); continue; } if (property0.NameEquals("authentication")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } authentication = property0.Value.GetObject(); continue; } if (property0.NameEquals("workspaceResourceId")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } workspaceResourceId = property0.Value.GetObject(); continue; } if (property0.NameEquals("existingClusterId")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } existingClusterId = property0.Value.GetObject(); continue; } if (property0.NameEquals("instancePoolId")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } instancePoolId = property0.Value.GetObject(); continue; } if (property0.NameEquals("newClusterVersion")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } newClusterVersion = property0.Value.GetObject(); continue; } if (property0.NameEquals("newClusterNumOfWorker")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } newClusterNumOfWorker = property0.Value.GetObject(); continue; } if (property0.NameEquals("newClusterNodeType")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } newClusterNodeType = property0.Value.GetObject(); continue; } if (property0.NameEquals("newClusterSparkConf")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } Dictionary <string, object> dictionary = new Dictionary <string, object>(); foreach (var property1 in property0.Value.EnumerateObject()) { dictionary.Add(property1.Name, property1.Value.GetObject()); } newClusterSparkConf = dictionary; continue; } if (property0.NameEquals("newClusterSparkEnvVars")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } Dictionary <string, object> dictionary = new Dictionary <string, object>(); foreach (var property1 in property0.Value.EnumerateObject()) { dictionary.Add(property1.Name, property1.Value.GetObject()); } newClusterSparkEnvVars = dictionary; continue; } if (property0.NameEquals("newClusterCustomTags")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } Dictionary <string, object> dictionary = new Dictionary <string, object>(); foreach (var property1 in property0.Value.EnumerateObject()) { dictionary.Add(property1.Name, property1.Value.GetObject()); } newClusterCustomTags = dictionary; continue; } if (property0.NameEquals("newClusterLogDestination")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } newClusterLogDestination = property0.Value.GetObject(); continue; } if (property0.NameEquals("newClusterDriverNodeType")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } newClusterDriverNodeType = property0.Value.GetObject(); continue; } if (property0.NameEquals("newClusterInitScripts")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } newClusterInitScripts = property0.Value.GetObject(); continue; } if (property0.NameEquals("newClusterEnableElasticDisk")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } newClusterEnableElasticDisk = property0.Value.GetObject(); continue; } if (property0.NameEquals("encryptedCredential")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } encryptedCredential = property0.Value.GetObject(); continue; } if (property0.NameEquals("policyId")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } policyId = property0.Value.GetObject(); continue; } } continue; } additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; return(new AzureDatabricksLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, domain, accessToken.Value, authentication.Value, workspaceResourceId.Value, existingClusterId.Value, instancePoolId.Value, newClusterVersion.Value, newClusterNumOfWorker.Value, newClusterNodeType.Value, Optional.ToDictionary(newClusterSparkConf), Optional.ToDictionary(newClusterSparkEnvVars), Optional.ToDictionary(newClusterCustomTags), newClusterLogDestination.Value, newClusterDriverNodeType.Value, newClusterInitScripts.Value, newClusterEnableElasticDisk.Value, encryptedCredential.Value, policyId.Value)); }
internal static DelimitedTextDataset DeserializeDelimitedTextDataset(JsonElement element) { string type = default; Optional <string> description = default; Optional <object> structure = default; Optional <object> schema = default; LinkedServiceReference linkedServiceName = default; Optional <IDictionary <string, ParameterSpecification> > parameters = default; Optional <IList <object> > annotations = default; Optional <DatasetFolder> folder = default; Optional <DatasetLocation> location = default; Optional <object> columnDelimiter = default; Optional <object> rowDelimiter = default; Optional <object> encodingName = default; Optional <DelimitedTextCompressionCodec> compressionCodec = default; Optional <DatasetCompressionLevel> compressionLevel = default; Optional <object> quoteChar = default; Optional <object> escapeChar = default; Optional <object> firstRowAsHeader = default; Optional <object> nullValue = default; IDictionary <string, object> additionalProperties = default; Dictionary <string, object> additionalPropertiesDictionary = new Dictionary <string, object>(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("type")) { type = property.Value.GetString(); continue; } if (property.NameEquals("description")) { description = property.Value.GetString(); continue; } if (property.NameEquals("structure")) { structure = property.Value.GetObject(); continue; } if (property.NameEquals("schema")) { schema = property.Value.GetObject(); continue; } if (property.NameEquals("linkedServiceName")) { linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); continue; } if (property.NameEquals("parameters")) { Dictionary <string, ParameterSpecification> dictionary = new Dictionary <string, ParameterSpecification>(); foreach (var property0 in property.Value.EnumerateObject()) { dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); } parameters = dictionary; continue; } if (property.NameEquals("annotations")) { List <object> array = new List <object>(); foreach (var item in property.Value.EnumerateArray()) { array.Add(item.GetObject()); } annotations = array; continue; } if (property.NameEquals("folder")) { folder = DatasetFolder.DeserializeDatasetFolder(property.Value); continue; } if (property.NameEquals("typeProperties")) { foreach (var property0 in property.Value.EnumerateObject()) { if (property0.NameEquals("location")) { location = DatasetLocation.DeserializeDatasetLocation(property0.Value); continue; } if (property0.NameEquals("columnDelimiter")) { columnDelimiter = property0.Value.GetObject(); continue; } if (property0.NameEquals("rowDelimiter")) { rowDelimiter = property0.Value.GetObject(); continue; } if (property0.NameEquals("encodingName")) { encodingName = property0.Value.GetObject(); continue; } if (property0.NameEquals("compressionCodec")) { compressionCodec = new DelimitedTextCompressionCodec(property0.Value.GetString()); continue; } if (property0.NameEquals("compressionLevel")) { compressionLevel = new DatasetCompressionLevel(property0.Value.GetString()); continue; } if (property0.NameEquals("quoteChar")) { quoteChar = property0.Value.GetObject(); continue; } if (property0.NameEquals("escapeChar")) { escapeChar = property0.Value.GetObject(); continue; } if (property0.NameEquals("firstRowAsHeader")) { firstRowAsHeader = property0.Value.GetObject(); continue; } if (property0.NameEquals("nullValue")) { nullValue = property0.Value.GetObject(); continue; } } continue; } additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; return(new DelimitedTextDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, location.Value, columnDelimiter.Value, rowDelimiter.Value, encodingName.Value, Optional.ToNullable(compressionCodec), Optional.ToNullable(compressionLevel), quoteChar.Value, escapeChar.Value, firstRowAsHeader.Value, nullValue.Value)); }
internal static PipelineResource DeserializePipelineResource(JsonElement element) { string id = default; string name = default; string type = default; string etag = default; string description = default; IList <Activity> activities = default; IDictionary <string, ParameterSpecification> parameters = default; IDictionary <string, VariableSpecification> variables = default; int? concurrency = default; IList <object> annotations = default; IDictionary <string, object> runDimensions = default; PipelineFolder folder = default; IDictionary <string, object> additionalProperties = default; Dictionary <string, object> additionalPropertiesDictionary = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("id")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } id = property.Value.GetString(); continue; } if (property.NameEquals("name")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } name = property.Value.GetString(); continue; } if (property.NameEquals("type")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } type = property.Value.GetString(); continue; } if (property.NameEquals("etag")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } etag = property.Value.GetString(); continue; } if (property.NameEquals("properties")) { foreach (var property0 in property.Value.EnumerateObject()) { if (property0.NameEquals("description")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } description = property0.Value.GetString(); continue; } if (property0.NameEquals("activities")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } List <Activity> array = new List <Activity>(); foreach (var item in property0.Value.EnumerateArray()) { if (item.ValueKind == JsonValueKind.Null) { array.Add(null); } else { array.Add(Activity.DeserializeActivity(item)); } } activities = array; continue; } if (property0.NameEquals("parameters")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } Dictionary <string, ParameterSpecification> dictionary = new Dictionary <string, ParameterSpecification>(); foreach (var property1 in property0.Value.EnumerateObject()) { if (property1.Value.ValueKind == JsonValueKind.Null) { dictionary.Add(property1.Name, null); } else { dictionary.Add(property1.Name, ParameterSpecification.DeserializeParameterSpecification(property1.Value)); } } parameters = dictionary; continue; } if (property0.NameEquals("variables")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } Dictionary <string, VariableSpecification> dictionary = new Dictionary <string, VariableSpecification>(); foreach (var property1 in property0.Value.EnumerateObject()) { if (property1.Value.ValueKind == JsonValueKind.Null) { dictionary.Add(property1.Name, null); } else { dictionary.Add(property1.Name, VariableSpecification.DeserializeVariableSpecification(property1.Value)); } } variables = dictionary; continue; } if (property0.NameEquals("concurrency")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } concurrency = property0.Value.GetInt32(); continue; } if (property0.NameEquals("annotations")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } List <object> array = new List <object>(); foreach (var item in property0.Value.EnumerateArray()) { if (item.ValueKind == JsonValueKind.Null) { array.Add(null); } else { array.Add(item.GetObject()); } } annotations = array; continue; } if (property0.NameEquals("runDimensions")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } Dictionary <string, object> dictionary = new Dictionary <string, object>(); foreach (var property1 in property0.Value.EnumerateObject()) { if (property1.Value.ValueKind == JsonValueKind.Null) { dictionary.Add(property1.Name, null); } else { dictionary.Add(property1.Name, property1.Value.GetObject()); } } runDimensions = dictionary; continue; } if (property0.NameEquals("folder")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } folder = PipelineFolder.DeserializePipelineFolder(property0.Value); continue; } } continue; } additionalPropertiesDictionary ??= new Dictionary <string, object>(); if (property.Value.ValueKind == JsonValueKind.Null) { additionalPropertiesDictionary.Add(property.Name, null); } else { additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } } additionalProperties = additionalPropertiesDictionary; return(new PipelineResource(id, name, type, etag, description, activities, parameters, variables, concurrency, annotations, runDimensions, folder, additionalProperties)); }
internal static Db2LinkedService DeserializeDb2LinkedService(JsonElement element) { string type = default; Optional <IntegrationRuntimeReference> connectVia = default; Optional <string> description = default; Optional <IDictionary <string, ParameterSpecification> > parameters = default; Optional <IList <object> > annotations = default; object server = default; object database = default; Optional <Db2AuthenticationType> authenticationType = default; Optional <object> username = default; Optional <SecretBase> password = default; Optional <object> packageCollection = default; Optional <object> certificateCommonName = default; Optional <object> encryptedCredential = default; IDictionary <string, object> additionalProperties = default; Dictionary <string, object> additionalPropertiesDictionary = new Dictionary <string, object>(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("type")) { type = property.Value.GetString(); continue; } if (property.NameEquals("connectVia")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); continue; } if (property.NameEquals("description")) { description = property.Value.GetString(); continue; } if (property.NameEquals("parameters")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } Dictionary <string, ParameterSpecification> dictionary = new Dictionary <string, ParameterSpecification>(); foreach (var property0 in property.Value.EnumerateObject()) { dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); } parameters = dictionary; continue; } if (property.NameEquals("annotations")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } List <object> array = new List <object>(); foreach (var item in property.Value.EnumerateArray()) { array.Add(item.GetObject()); } annotations = array; continue; } if (property.NameEquals("typeProperties")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } foreach (var property0 in property.Value.EnumerateObject()) { if (property0.NameEquals("server")) { server = property0.Value.GetObject(); continue; } if (property0.NameEquals("database")) { database = property0.Value.GetObject(); continue; } if (property0.NameEquals("authenticationType")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } authenticationType = new Db2AuthenticationType(property0.Value.GetString()); continue; } if (property0.NameEquals("username")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } username = property0.Value.GetObject(); continue; } if (property0.NameEquals("password")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } password = SecretBase.DeserializeSecretBase(property0.Value); continue; } if (property0.NameEquals("packageCollection")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } packageCollection = property0.Value.GetObject(); continue; } if (property0.NameEquals("certificateCommonName")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } certificateCommonName = property0.Value.GetObject(); continue; } if (property0.NameEquals("encryptedCredential")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } encryptedCredential = property0.Value.GetObject(); continue; } } continue; } additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; return(new Db2LinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, server, database, Optional.ToNullable(authenticationType), username.Value, password.Value, packageCollection.Value, certificateCommonName.Value, encryptedCredential.Value)); }
internal static MongoDbLinkedService DeserializeMongoDbLinkedService(JsonElement element) { string type = default; IntegrationRuntimeReference connectVia = default; string description = default; IDictionary <string, ParameterSpecification> parameters = default; IList <object> annotations = default; object server = default; MongoDbAuthenticationType? authenticationType = default; object databaseName = default; object username = default; SecretBase password = default; object authSource = default; object port = default; object enableSsl = default; object allowSelfSignedServerCert = default; object encryptedCredential = default; IDictionary <string, object> additionalProperties = default; Dictionary <string, object> additionalPropertiesDictionary = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("type")) { type = property.Value.GetString(); continue; } if (property.NameEquals("connectVia")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); continue; } if (property.NameEquals("description")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } description = property.Value.GetString(); continue; } if (property.NameEquals("parameters")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } Dictionary <string, ParameterSpecification> dictionary = new Dictionary <string, ParameterSpecification>(); foreach (var property0 in property.Value.EnumerateObject()) { if (property0.Value.ValueKind == JsonValueKind.Null) { dictionary.Add(property0.Name, null); } else { dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); } } parameters = dictionary; continue; } if (property.NameEquals("annotations")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } List <object> array = new List <object>(); foreach (var item in property.Value.EnumerateArray()) { if (item.ValueKind == JsonValueKind.Null) { array.Add(null); } else { array.Add(item.GetObject()); } } annotations = array; continue; } if (property.NameEquals("typeProperties")) { foreach (var property0 in property.Value.EnumerateObject()) { if (property0.NameEquals("server")) { server = property0.Value.GetObject(); continue; } if (property0.NameEquals("authenticationType")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } authenticationType = new MongoDbAuthenticationType(property0.Value.GetString()); continue; } if (property0.NameEquals("databaseName")) { databaseName = property0.Value.GetObject(); continue; } if (property0.NameEquals("username")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } username = property0.Value.GetObject(); continue; } if (property0.NameEquals("password")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } password = SecretBase.DeserializeSecretBase(property0.Value); continue; } if (property0.NameEquals("authSource")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } authSource = property0.Value.GetObject(); continue; } if (property0.NameEquals("port")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } port = property0.Value.GetObject(); continue; } if (property0.NameEquals("enableSsl")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } enableSsl = property0.Value.GetObject(); continue; } if (property0.NameEquals("allowSelfSignedServerCert")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } allowSelfSignedServerCert = property0.Value.GetObject(); continue; } if (property0.NameEquals("encryptedCredential")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } encryptedCredential = property0.Value.GetObject(); continue; } } continue; } additionalPropertiesDictionary ??= new Dictionary <string, object>(); if (property.Value.ValueKind == JsonValueKind.Null) { additionalPropertiesDictionary.Add(property.Name, null); } else { additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } } additionalProperties = additionalPropertiesDictionary; return(new MongoDbLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, server, authenticationType, databaseName, username, password, authSource, port, enableSsl, allowSelfSignedServerCert, encryptedCredential)); }
internal static CosmosDbLinkedService DeserializeCosmosDbLinkedService(JsonElement element) { string type = default; Optional <IntegrationRuntimeReference> connectVia = default; Optional <string> description = default; Optional <IDictionary <string, ParameterSpecification> > parameters = default; Optional <IList <object> > annotations = default; Optional <object> connectionString = default; Optional <object> accountEndpoint = default; Optional <object> database = default; Optional <SecretBase> accountKey = default; Optional <object> encryptedCredential = default; IDictionary <string, object> additionalProperties = default; Dictionary <string, object> additionalPropertiesDictionary = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("type")) { type = property.Value.GetString(); continue; } if (property.NameEquals("connectVia")) { connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); continue; } if (property.NameEquals("description")) { description = property.Value.GetString(); continue; } if (property.NameEquals("parameters")) { Dictionary <string, ParameterSpecification> dictionary = new Dictionary <string, ParameterSpecification>(); foreach (var property0 in property.Value.EnumerateObject()) { dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); } parameters = dictionary; continue; } if (property.NameEquals("annotations")) { List <object> array = new List <object>(); foreach (var item in property.Value.EnumerateArray()) { array.Add(item.GetObject()); } annotations = array; continue; } if (property.NameEquals("typeProperties")) { foreach (var property0 in property.Value.EnumerateObject()) { if (property0.NameEquals("connectionString")) { connectionString = property0.Value.GetObject(); continue; } if (property0.NameEquals("accountEndpoint")) { accountEndpoint = property0.Value.GetObject(); continue; } if (property0.NameEquals("database")) { database = property0.Value.GetObject(); continue; } if (property0.NameEquals("accountKey")) { accountKey = SecretBase.DeserializeSecretBase(property0.Value); continue; } if (property0.NameEquals("encryptedCredential")) { encryptedCredential = property0.Value.GetObject(); continue; } } continue; } additionalPropertiesDictionary ??= new Dictionary <string, object>(); additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; return(new CosmosDbLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, connectionString.Value, accountEndpoint.Value, database.Value, accountKey.Value, encryptedCredential.Value)); }
internal static AzureSqlDatabaseLinkedService DeserializeAzureSqlDatabaseLinkedService(JsonElement element) { string type = default; Optional <IntegrationRuntimeReference> connectVia = default; Optional <string> description = default; Optional <IDictionary <string, ParameterSpecification> > parameters = default; Optional <IList <object> > annotations = default; object connectionString = default; Optional <AzureKeyVaultSecretReference> password = default; Optional <object> servicePrincipalId = default; Optional <SecretBase> servicePrincipalKey = default; Optional <object> tenant = default; Optional <object> encryptedCredential = default; IDictionary <string, object> additionalProperties = default; Dictionary <string, object> additionalPropertiesDictionary = new Dictionary <string, object>(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("type")) { type = property.Value.GetString(); continue; } if (property.NameEquals("connectVia")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); continue; } if (property.NameEquals("description")) { description = property.Value.GetString(); continue; } if (property.NameEquals("parameters")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } Dictionary <string, ParameterSpecification> dictionary = new Dictionary <string, ParameterSpecification>(); foreach (var property0 in property.Value.EnumerateObject()) { dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); } parameters = dictionary; continue; } if (property.NameEquals("annotations")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } List <object> array = new List <object>(); foreach (var item in property.Value.EnumerateArray()) { array.Add(item.GetObject()); } annotations = array; continue; } if (property.NameEquals("typeProperties")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } foreach (var property0 in property.Value.EnumerateObject()) { if (property0.NameEquals("connectionString")) { connectionString = property0.Value.GetObject(); continue; } if (property0.NameEquals("password")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } password = AzureKeyVaultSecretReference.DeserializeAzureKeyVaultSecretReference(property0.Value); continue; } if (property0.NameEquals("servicePrincipalId")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } servicePrincipalId = property0.Value.GetObject(); continue; } if (property0.NameEquals("servicePrincipalKey")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } servicePrincipalKey = SecretBase.DeserializeSecretBase(property0.Value); continue; } if (property0.NameEquals("tenant")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } tenant = property0.Value.GetObject(); continue; } if (property0.NameEquals("encryptedCredential")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } encryptedCredential = property0.Value.GetObject(); continue; } } continue; } additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; return(new AzureSqlDatabaseLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, connectionString, password.Value, servicePrincipalId.Value, servicePrincipalKey.Value, tenant.Value, encryptedCredential.Value)); }
internal static XeroObjectDataset DeserializeXeroObjectDataset(JsonElement element) { string type = default; Optional <string> description = default; Optional <object> structure = default; Optional <object> schema = default; LinkedServiceReference linkedServiceName = default; Optional <IDictionary <string, ParameterSpecification> > parameters = default; Optional <IList <object> > annotations = default; Optional <DatasetFolder> folder = default; Optional <object> tableName = default; IDictionary <string, object> additionalProperties = default; Dictionary <string, object> additionalPropertiesDictionary = new Dictionary <string, object>(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("type")) { type = property.Value.GetString(); continue; } if (property.NameEquals("description")) { description = property.Value.GetString(); continue; } if (property.NameEquals("structure")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } structure = property.Value.GetObject(); continue; } if (property.NameEquals("schema")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } schema = property.Value.GetObject(); continue; } if (property.NameEquals("linkedServiceName")) { linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); continue; } if (property.NameEquals("parameters")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } Dictionary <string, ParameterSpecification> dictionary = new Dictionary <string, ParameterSpecification>(); foreach (var property0 in property.Value.EnumerateObject()) { dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); } parameters = dictionary; continue; } if (property.NameEquals("annotations")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } List <object> array = new List <object>(); foreach (var item in property.Value.EnumerateArray()) { array.Add(item.GetObject()); } annotations = array; continue; } if (property.NameEquals("folder")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } folder = DatasetFolder.DeserializeDatasetFolder(property.Value); continue; } if (property.NameEquals("typeProperties")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } foreach (var property0 in property.Value.EnumerateObject()) { if (property0.NameEquals("tableName")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } tableName = property0.Value.GetObject(); continue; } } continue; } additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; return(new XeroObjectDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, tableName.Value)); }
internal static SparkLinkedService DeserializeSparkLinkedService(JsonElement element) { string type = default; Optional <IntegrationRuntimeReference> connectVia = default; Optional <string> description = default; Optional <IDictionary <string, ParameterSpecification> > parameters = default; Optional <IList <object> > annotations = default; object host = default; object port = default; Optional <SparkServerType> serverType = default; Optional <SparkThriftTransportProtocol> thriftTransportProtocol = default; SparkAuthenticationType authenticationType = default; Optional <object> username = default; Optional <SecretBase> password = default; Optional <object> httpPath = default; Optional <object> enableSsl = default; Optional <object> trustedCertPath = default; Optional <object> useSystemTrustStore = default; Optional <object> allowHostNameCNMismatch = default; Optional <object> allowSelfSignedServerCert = default; Optional <object> encryptedCredential = default; IDictionary <string, object> additionalProperties = default; Dictionary <string, object> additionalPropertiesDictionary = new Dictionary <string, object>(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("type")) { type = property.Value.GetString(); continue; } if (property.NameEquals("connectVia")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); continue; } if (property.NameEquals("description")) { description = property.Value.GetString(); continue; } if (property.NameEquals("parameters")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } Dictionary <string, ParameterSpecification> dictionary = new Dictionary <string, ParameterSpecification>(); foreach (var property0 in property.Value.EnumerateObject()) { dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); } parameters = dictionary; continue; } if (property.NameEquals("annotations")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } List <object> array = new List <object>(); foreach (var item in property.Value.EnumerateArray()) { array.Add(item.GetObject()); } annotations = array; continue; } if (property.NameEquals("typeProperties")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } foreach (var property0 in property.Value.EnumerateObject()) { if (property0.NameEquals("host")) { host = property0.Value.GetObject(); continue; } if (property0.NameEquals("port")) { port = property0.Value.GetObject(); continue; } if (property0.NameEquals("serverType")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } serverType = new SparkServerType(property0.Value.GetString()); continue; } if (property0.NameEquals("thriftTransportProtocol")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } thriftTransportProtocol = new SparkThriftTransportProtocol(property0.Value.GetString()); continue; } if (property0.NameEquals("authenticationType")) { authenticationType = new SparkAuthenticationType(property0.Value.GetString()); continue; } if (property0.NameEquals("username")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } username = property0.Value.GetObject(); continue; } if (property0.NameEquals("password")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } password = SecretBase.DeserializeSecretBase(property0.Value); continue; } if (property0.NameEquals("httpPath")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } httpPath = property0.Value.GetObject(); continue; } if (property0.NameEquals("enableSsl")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } enableSsl = property0.Value.GetObject(); continue; } if (property0.NameEquals("trustedCertPath")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } trustedCertPath = property0.Value.GetObject(); continue; } if (property0.NameEquals("useSystemTrustStore")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } useSystemTrustStore = property0.Value.GetObject(); continue; } if (property0.NameEquals("allowHostNameCNMismatch")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } allowHostNameCNMismatch = property0.Value.GetObject(); continue; } if (property0.NameEquals("allowSelfSignedServerCert")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } allowSelfSignedServerCert = property0.Value.GetObject(); continue; } if (property0.NameEquals("encryptedCredential")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } encryptedCredential = property0.Value.GetObject(); continue; } } continue; } additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; return(new SparkLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, host, port, Optional.ToNullable(serverType), Optional.ToNullable(thriftTransportProtocol), authenticationType, username.Value, password.Value, httpPath.Value, enableSsl.Value, trustedCertPath.Value, useSystemTrustStore.Value, allowHostNameCNMismatch.Value, allowSelfSignedServerCert.Value, encryptedCredential.Value)); }
internal static SapOpenHubTableDataset DeserializeSapOpenHubTableDataset(JsonElement element) { string type = default; Optional <string> description = default; Optional <object> structure = default; Optional <object> schema = default; LinkedServiceReference linkedServiceName = default; Optional <IDictionary <string, ParameterSpecification> > parameters = default; Optional <IList <object> > annotations = default; Optional <DatasetFolder> folder = default; object openHubDestinationName = default; Optional <object> excludeLastRequest = default; Optional <object> baseRequestId = default; IDictionary <string, object> additionalProperties = default; Dictionary <string, object> additionalPropertiesDictionary = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("type")) { type = property.Value.GetString(); continue; } if (property.NameEquals("description")) { description = property.Value.GetString(); continue; } if (property.NameEquals("structure")) { structure = property.Value.GetObject(); continue; } if (property.NameEquals("schema")) { schema = property.Value.GetObject(); continue; } if (property.NameEquals("linkedServiceName")) { linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); continue; } if (property.NameEquals("parameters")) { Dictionary <string, ParameterSpecification> dictionary = new Dictionary <string, ParameterSpecification>(); foreach (var property0 in property.Value.EnumerateObject()) { dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); } parameters = dictionary; continue; } if (property.NameEquals("annotations")) { List <object> array = new List <object>(); foreach (var item in property.Value.EnumerateArray()) { array.Add(item.GetObject()); } annotations = array; continue; } if (property.NameEquals("folder")) { folder = DatasetFolder.DeserializeDatasetFolder(property.Value); continue; } if (property.NameEquals("typeProperties")) { foreach (var property0 in property.Value.EnumerateObject()) { if (property0.NameEquals("openHubDestinationName")) { openHubDestinationName = property0.Value.GetObject(); continue; } if (property0.NameEquals("excludeLastRequest")) { excludeLastRequest = property0.Value.GetObject(); continue; } if (property0.NameEquals("baseRequestId")) { baseRequestId = property0.Value.GetObject(); continue; } } continue; } additionalPropertiesDictionary ??= new Dictionary <string, object>(); additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; return(new SapOpenHubTableDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, openHubDestinationName, excludeLastRequest.Value, baseRequestId.Value)); }
internal static JiraLinkedService DeserializeJiraLinkedService(JsonElement element) { string type = default; Optional <IntegrationRuntimeReference> connectVia = default; Optional <string> description = default; Optional <IDictionary <string, ParameterSpecification> > parameters = default; Optional <IList <object> > annotations = default; object host = default; Optional <object> port = default; object username = default; Optional <SecretBase> password = default; Optional <object> useEncryptedEndpoints = default; Optional <object> useHostVerification = default; Optional <object> usePeerVerification = default; Optional <object> encryptedCredential = default; IDictionary <string, object> additionalProperties = default; Dictionary <string, object> additionalPropertiesDictionary = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("type")) { type = property.Value.GetString(); continue; } if (property.NameEquals("connectVia")) { connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); continue; } if (property.NameEquals("description")) { description = property.Value.GetString(); continue; } if (property.NameEquals("parameters")) { Dictionary <string, ParameterSpecification> dictionary = new Dictionary <string, ParameterSpecification>(); foreach (var property0 in property.Value.EnumerateObject()) { dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); } parameters = dictionary; continue; } if (property.NameEquals("annotations")) { List <object> array = new List <object>(); foreach (var item in property.Value.EnumerateArray()) { array.Add(item.GetObject()); } annotations = array; continue; } if (property.NameEquals("typeProperties")) { foreach (var property0 in property.Value.EnumerateObject()) { if (property0.NameEquals("host")) { host = property0.Value.GetObject(); continue; } if (property0.NameEquals("port")) { port = property0.Value.GetObject(); continue; } if (property0.NameEquals("username")) { username = property0.Value.GetObject(); continue; } if (property0.NameEquals("password")) { password = SecretBase.DeserializeSecretBase(property0.Value); continue; } if (property0.NameEquals("useEncryptedEndpoints")) { useEncryptedEndpoints = property0.Value.GetObject(); continue; } if (property0.NameEquals("useHostVerification")) { useHostVerification = property0.Value.GetObject(); continue; } if (property0.NameEquals("usePeerVerification")) { usePeerVerification = property0.Value.GetObject(); continue; } if (property0.NameEquals("encryptedCredential")) { encryptedCredential = property0.Value.GetObject(); continue; } } continue; } additionalPropertiesDictionary ??= new Dictionary <string, object>(); additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; return(new JiraLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, host, port.Value, username, password.Value, useEncryptedEndpoints.Value, useHostVerification.Value, usePeerVerification.Value, encryptedCredential.Value)); }
internal static AzureBlobStorageLinkedService DeserializeAzureBlobStorageLinkedService(JsonElement element) { string type = default; Optional <IntegrationRuntimeReference> connectVia = default; Optional <string> description = default; Optional <IDictionary <string, ParameterSpecification> > parameters = default; Optional <IList <object> > annotations = default; Optional <object> connectionString = default; Optional <AzureKeyVaultSecretReference> accountKey = default; Optional <object> sasUri = default; Optional <AzureKeyVaultSecretReference> sasToken = default; Optional <string> serviceEndpoint = default; Optional <object> servicePrincipalId = default; Optional <SecretBase> servicePrincipalKey = default; Optional <object> tenant = default; Optional <string> encryptedCredential = default; IDictionary <string, object> additionalProperties = default; Dictionary <string, object> additionalPropertiesDictionary = new Dictionary <string, object>(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("type")) { type = property.Value.GetString(); continue; } if (property.NameEquals("connectVia")) { connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); continue; } if (property.NameEquals("description")) { description = property.Value.GetString(); continue; } if (property.NameEquals("parameters")) { Dictionary <string, ParameterSpecification> dictionary = new Dictionary <string, ParameterSpecification>(); foreach (var property0 in property.Value.EnumerateObject()) { dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); } parameters = dictionary; continue; } if (property.NameEquals("annotations")) { List <object> array = new List <object>(); foreach (var item in property.Value.EnumerateArray()) { array.Add(item.GetObject()); } annotations = array; continue; } if (property.NameEquals("typeProperties")) { foreach (var property0 in property.Value.EnumerateObject()) { if (property0.NameEquals("connectionString")) { connectionString = property0.Value.GetObject(); continue; } if (property0.NameEquals("accountKey")) { accountKey = AzureKeyVaultSecretReference.DeserializeAzureKeyVaultSecretReference(property0.Value); continue; } if (property0.NameEquals("sasUri")) { sasUri = property0.Value.GetObject(); continue; } if (property0.NameEquals("sasToken")) { sasToken = AzureKeyVaultSecretReference.DeserializeAzureKeyVaultSecretReference(property0.Value); continue; } if (property0.NameEquals("serviceEndpoint")) { serviceEndpoint = property0.Value.GetString(); continue; } if (property0.NameEquals("servicePrincipalId")) { servicePrincipalId = property0.Value.GetObject(); continue; } if (property0.NameEquals("servicePrincipalKey")) { servicePrincipalKey = SecretBase.DeserializeSecretBase(property0.Value); continue; } if (property0.NameEquals("tenant")) { tenant = property0.Value.GetObject(); continue; } if (property0.NameEquals("encryptedCredential")) { encryptedCredential = property0.Value.GetString(); continue; } } continue; } additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; return(new AzureBlobStorageLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, connectionString.Value, accountKey.Value, sasUri.Value, sasToken.Value, serviceEndpoint.Value, servicePrincipalId.Value, servicePrincipalKey.Value, tenant.Value, encryptedCredential.Value)); }
internal static MongoDbV2LinkedService DeserializeMongoDbV2LinkedService(JsonElement element) { string type = default; Optional <IntegrationRuntimeReference> connectVia = default; Optional <string> description = default; Optional <IDictionary <string, ParameterSpecification> > parameters = default; Optional <IList <object> > annotations = default; object connectionString = default; object database = default; IDictionary <string, object> additionalProperties = default; Dictionary <string, object> additionalPropertiesDictionary = new Dictionary <string, object>(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("type")) { type = property.Value.GetString(); continue; } if (property.NameEquals("connectVia")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); continue; } if (property.NameEquals("description")) { description = property.Value.GetString(); continue; } if (property.NameEquals("parameters")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } Dictionary <string, ParameterSpecification> dictionary = new Dictionary <string, ParameterSpecification>(); foreach (var property0 in property.Value.EnumerateObject()) { dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); } parameters = dictionary; continue; } if (property.NameEquals("annotations")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } List <object> array = new List <object>(); foreach (var item in property.Value.EnumerateArray()) { array.Add(item.GetObject()); } annotations = array; continue; } if (property.NameEquals("typeProperties")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } foreach (var property0 in property.Value.EnumerateObject()) { if (property0.NameEquals("connectionString")) { connectionString = property0.Value.GetObject(); continue; } if (property0.NameEquals("database")) { database = property0.Value.GetObject(); continue; } } continue; } additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; return(new MongoDbV2LinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, connectionString, database)); }