/// <summary> /// Initializes a new instance of the <see cref="InlineObject" /> class. /// </summary> /// <param name="description">The description of the channel..</param> /// <param name="link">The link to access the channel. You can use a custom name in the URL in place of a numeric channel ID, as in `/channels/{url_custom}`..</param> /// <param name="name">The name of the channel. (required).</param> /// <param name="privacy">The privacy level of the channel. Option descriptions: * `anybody` - Anyone can access the channel. * `moderators` - Only moderators can access the channel. * `user` - Only moderators and designated users can access the channel. (required).</param> public InlineObject(string description = default(string), string link = default(string), string name = default(string), PrivacyEnum privacy = default(PrivacyEnum)) { // to ensure "name" is required (not null) this.Name = name ?? throw new ArgumentNullException("name is a required property for InlineObject and cannot be null"); this.Privacy = privacy; this.Description = description; this.Link = link; }
private string GetPrivacyString(PrivacyEnum privacy) { switch (privacy) { case PrivacyEnum.Friends: return("friends"); case PrivacyEnum.Me: return("me"); case PrivacyEnum.None: return("none"); case PrivacyEnum.Public: return("public"); default: return("public"); } }
private string GetPrivacyString(PrivacyEnum privacy) { switch (privacy) { case PrivacyEnum.Friends: return "friends"; case PrivacyEnum.Me: return "me"; case PrivacyEnum.None: return "none"; case PrivacyEnum.Public: return "public"; default: return "public"; } }