mirror of
https://github.com/zoriya/octokit.net.git
synced 2025-12-06 07:16:09 +00:00
* add custom properties model and clients * observable * observable tests * add search * error CS8370: 'target-typed object creation' * Error CS8370: 'target-typed object creation' * add patch with body that return status code * fixes for failed ConventionTests * working UnitTests * (de)serialization and model tests * Update Repository.cs
67 lines
2.1 KiB
C#
67 lines
2.1 KiB
C#
using System.Collections.Generic;
|
|
using System.Diagnostics;
|
|
using System.Globalization;
|
|
|
|
namespace Octokit
|
|
{
|
|
[DebuggerDisplay("{DebuggerDisplay,nq}")]
|
|
public class OrganizationCustomPropertyUpdate
|
|
{
|
|
public OrganizationCustomPropertyUpdate() { }
|
|
|
|
public OrganizationCustomPropertyUpdate(string propertyName, CustomPropertyValueType valueType, string defaultValue)
|
|
{
|
|
PropertyName = propertyName;
|
|
ValueType = valueType;
|
|
Required = true;
|
|
DefaultValue = defaultValue;
|
|
}
|
|
|
|
public OrganizationCustomPropertyUpdate(string propertyName, CustomPropertyValueType valueType, IReadOnlyList<string> defaultValue)
|
|
{
|
|
PropertyName = propertyName;
|
|
ValueType = valueType;
|
|
Required = true;
|
|
DefaultValue = defaultValue;
|
|
}
|
|
|
|
/// <summary>
|
|
/// The name of the property
|
|
/// </summary>
|
|
public string PropertyName { get; set; }
|
|
|
|
/// <summary>
|
|
/// The type of the value for the property
|
|
/// </summary>
|
|
public StringEnum<CustomPropertyValueType> ValueType { get; set; }
|
|
|
|
/// <summary>
|
|
/// Whether the property is required
|
|
/// </summary>
|
|
public bool Required { get; set; }
|
|
|
|
/// <summary>
|
|
/// Default value of the property
|
|
/// </summary>
|
|
public object DefaultValue { get; private set; }
|
|
|
|
/// <summary>
|
|
/// Short description of the property
|
|
/// </summary>
|
|
public string Description { get; set; }
|
|
|
|
/// <summary>
|
|
/// An ordered list of the allowed values of the property.
|
|
/// The property can have up to 200 allowed values.
|
|
/// </summary>
|
|
public IEnumerable<string> AllowedValues { get; set; }
|
|
|
|
/// <summary>
|
|
/// Who can edit the values of the property
|
|
/// </summary>
|
|
public StringEnum<CustomPropertyValuesEditableBy>? ValuesEditableBy { get; set; }
|
|
|
|
internal string DebuggerDisplay => string.Format(CultureInfo.InvariantCulture, "PropertyName: {0}", PropertyName);
|
|
}
|
|
}
|