/// <summary> /// This method returns public keys of resource. /// </summary> /// <param name="jobDefinitionName">Job definition name.</param> /// <returns>Data transformation input.</returns> public PublicKeys GetPublicKeys() { var getResponse = _serviceHelper.GetPublicKeys(_resourceGroup, _resourceName); if (getResponse == null) { //throw new WebJobException("Job definition entity is being returned as null."); } JObject output = JObject.Parse(getResponse); string dataServiceLevel1KeyString = output[Constants.Properties][Constants.DataServiceLevel1Key].ToString(); var dataServiceLevel1Key = JsonConvert.DeserializeObject <DataServiceLevel1Key>(dataServiceLevel1KeyString); string dataServiceLevel2KeyString = output[Constants.Properties][Constants.DataServiceLevel2Key].ToString(); var dataServiceLevel2Key = JsonConvert.DeserializeObject <DataServiceLevel2Key>(dataServiceLevel2KeyString); var publicKeys = new PublicKeys() { dataServiceLevel1Key = dataServiceLevel1Key, dataServiceLevel2Key = dataServiceLevel2Key }; return(publicKeys); }