public override void OnInspectorGUI() { serializedObject.Update(); props.Draw(PropNames.meshFilter); props.Draw(PropNames.initializationPolicy); props.Draw(PropNames.GenerateOnInit); props.Draw(PropNames.initialization); props.Draw(PropNames.dataCreationPolicy); DataManagementPolicy dataPolicy = marchingSquares.DataCreation; if (dataPolicy == DataManagementPolicy.CreateOwn) { props.Draw(PropNames.dataCreationInfo); } else if (dataPolicy == DataManagementPolicy.FromDataComponent) { props.Draw(PropNames.dataComponent); } props.Draw(PropNames.AutoCompleteGeneration); serializedObject.ApplyModifiedProperties(); }
public void BuildTest() { TransactionRetention retention = TransactionRetentionBuilder.NewTransactionRetention().Build(); DataManagementPolicyBuilder builder = DataManagementPolicyBuilder.NewDataManagementPolicy() .WithTransactionRetention(retention); DataManagementPolicy result = builder.Build(); Assert.IsNotNull(result); Assert.IsNotNull(result.TransactionRetention); }
override public void Execute() { DataManagementPolicy dataManagementPolicy = DataManagementPolicyBuilder.NewDataManagementPolicy() .WithTransactionRetention(TransactionRetentionBuilder.NewTransactionRetention() .WithArchived(60) .WithCompleted(60) .WithDeclined(60) .WithDraft(60) .WithExpired(60) .WithOptedOut(60) .WithSent(0) .Build()) .Build(); OssClient.DataRetentionSettingsService.SetDataManagementPolicy(dataManagementPolicy); dataManagementPolicyAfterUpdate = OssClient.DataRetentionSettingsService.GetDataManagementPolicy(); }
/// <summary> /// Update data management policy for account. /// </summary> /// <param name="dataManagementPolicy">dataManagementPolicy.</param> public void SetDataManagementPolicy(DataManagementPolicy dataManagementPolicy) { String path = template.UrlFor(UrlTemplate.DATA_MANAGEMENT_POLICY_PATH) .Build(); DataManagementPolicyConverter converter = new DataManagementPolicyConverter(dataManagementPolicy); String dataManagementPolicyJson = JsonConvert.SerializeObject(converter.ToAPIDataManagementPolicy()); try { restClient.Put(path, dataManagementPolicyJson); } catch (OssServerException e) { throw new OssServerException("Could not update dataManagementPolicy" + " Exception: " + e.Message, e.ServerError, e); } catch (Exception e) { throw new OssException("Could not update dataManagementPolicy" + " Exception: " + e.Message, e); } }