< Summary

Class:Microsoft.Azure.CognitiveServices.Search.LocalSearch.Models.CreativeWork
Assembly:Microsoft.Azure.CognitiveServices.Search.BingLocalSearch
File(s):C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Search.BingLocalSearch\src\Generated\LocalSearch\Models\CreativeWork.cs
Covered lines:0
Uncovered lines:56
Coverable lines:56
Total lines:214
Line coverage:0% (0 of 56)
Covered branches:0
Total branches:24
Branch coverage:0% (0 of 24)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_ThumbnailUrl()-0%100%
get_About()-0%100%
get_Mentions()-0%100%
get_Provider()-0%100%
get_Creator()-0%100%
get_Text()-0%100%
get_DiscussionUrl()-0%100%
get_CommentCount()-0%100%
get_MainEntity()-0%100%
get_HeadLine()-0%100%
get_CopyrightHolder()-0%100%
get_CopyrightYear()-0%100%
get_Disclaimer()-0%100%
get_IsAccessibleForFree()-0%100%
get_Genre()-0%100%
get_IsFamilyFriendly()-0%100%
Validate()-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Search.BingLocalSearch\src\Generated\LocalSearch\Models\CreativeWork.cs

#LineLine coverage
 1// <auto-generated>
 2// Code generated by Microsoft (R) AutoRest Code Generator.
 3// Changes may cause incorrect behavior and will be lost if the code is
 4// regenerated.
 5// </auto-generated>
 6
 7namespace Microsoft.Azure.CognitiveServices.Search.LocalSearch.Models
 8{
 9    using Newtonsoft.Json;
 10    using System.Collections;
 11    using System.Collections.Generic;
 12    using System.Linq;
 13
 14    /// <summary>
 15    /// The most generic kind of creative work, including books, movies,
 16    /// photographs, software programs, etc.
 17    /// </summary>
 18    public partial class CreativeWork : Thing
 19    {
 20        /// <summary>
 21        /// Initializes a new instance of the CreativeWork class.
 22        /// </summary>
 023        public CreativeWork()
 24        {
 25            CustomInit();
 026        }
 27
 28        /// <summary>
 29        /// Initializes a new instance of the CreativeWork class.
 30        /// </summary>
 31        /// <param name="id">A String identifier.</param>
 32        /// <param name="readLink">The URL that returns this resource.</param>
 33        /// <param name="webSearchUrl">The URL to Bing's search result for this
 34        /// item.</param>
 35        /// <param name="name">The name of the thing represented by this
 36        /// object.</param>
 37        /// <param name="url">The URL to get more information about the thing
 38        /// represented by this object.</param>
 39        /// <param name="entityPresentationInfo">Additional information about
 40        /// the entity such as hints that you can use to determine the entity's
 41        /// type. To determine the entity's type, use the entityScenario and
 42        /// entityTypeHint fields.</param>
 43        /// <param name="thumbnailUrl">The URL to a thumbnail of the
 44        /// item.</param>
 45        /// <param name="about">For internal use only.</param>
 46        /// <param name="mentions">For internal use only.</param>
 47        /// <param name="provider">The source of the creative work.</param>
 48        /// <param name="text">Text content of this creative work</param>
 49        public CreativeWork(string id = default(string), string readLink = default(string), string webSearchUrl = defaul
 050            : base(id, readLink, webSearchUrl, potentialAction, immediateAction, preferredClickthroughUrl, adaptiveCard,
 51        {
 052            ThumbnailUrl = thumbnailUrl;
 053            About = about;
 054            Mentions = mentions;
 055            Provider = provider;
 056            Creator = creator;
 057            Text = text;
 058            DiscussionUrl = discussionUrl;
 059            CommentCount = commentCount;
 060            MainEntity = mainEntity;
 061            HeadLine = headLine;
 062            CopyrightHolder = copyrightHolder;
 063            CopyrightYear = copyrightYear;
 064            Disclaimer = disclaimer;
 065            IsAccessibleForFree = isAccessibleForFree;
 066            Genre = genre;
 067            IsFamilyFriendly = isFamilyFriendly;
 68            CustomInit();
 069        }
 70
 71        /// <summary>
 72        /// An initialization method that performs custom operations like setting defaults
 73        /// </summary>
 74        partial void CustomInit();
 75
 76        /// <summary>
 77        /// Gets the URL to a thumbnail of the item.
 78        /// </summary>
 79        [JsonProperty(PropertyName = "thumbnailUrl")]
 080        public string ThumbnailUrl { get; private set; }
 81
 82        /// <summary>
 83        /// Gets for internal use only.
 84        /// </summary>
 85        [JsonProperty(PropertyName = "about")]
 086        public IList<Thing> About { get; private set; }
 87
 88        /// <summary>
 89        /// Gets for internal use only.
 90        /// </summary>
 91        [JsonProperty(PropertyName = "mentions")]
 092        public IList<Thing> Mentions { get; private set; }
 93
 94        /// <summary>
 95        /// Gets the source of the creative work.
 96        /// </summary>
 97        [JsonProperty(PropertyName = "provider")]
 098        public IList<Thing> Provider { get; private set; }
 99
 100        /// <summary>
 101        /// </summary>
 102        [JsonProperty(PropertyName = "creator")]
 0103        public Thing Creator { get; private set; }
 104
 105        /// <summary>
 106        /// Gets text content of this creative work
 107        /// </summary>
 108        [JsonProperty(PropertyName = "text")]
 0109        public string Text { get; private set; }
 110
 111        /// <summary>
 112        /// </summary>
 113        [JsonProperty(PropertyName = "discussionUrl")]
 0114        public string DiscussionUrl { get; private set; }
 115
 116        /// <summary>
 117        /// </summary>
 118        [JsonProperty(PropertyName = "commentCount")]
 0119        public int? CommentCount { get; private set; }
 120
 121        /// <summary>
 122        /// </summary>
 123        [JsonProperty(PropertyName = "mainEntity")]
 0124        public Thing MainEntity { get; private set; }
 125
 126        /// <summary>
 127        /// </summary>
 128        [JsonProperty(PropertyName = "headLine")]
 0129        public string HeadLine { get; private set; }
 130
 131        /// <summary>
 132        /// </summary>
 133        [JsonProperty(PropertyName = "copyrightHolder")]
 0134        public Thing CopyrightHolder { get; private set; }
 135
 136        /// <summary>
 137        /// </summary>
 138        [JsonProperty(PropertyName = "copyrightYear")]
 0139        public int? CopyrightYear { get; private set; }
 140
 141        /// <summary>
 142        /// </summary>
 143        [JsonProperty(PropertyName = "disclaimer")]
 0144        public string Disclaimer { get; private set; }
 145
 146        /// <summary>
 147        /// </summary>
 148        [JsonProperty(PropertyName = "isAccessibleForFree")]
 0149        public bool? IsAccessibleForFree { get; private set; }
 150
 151        /// <summary>
 152        /// </summary>
 153        [JsonProperty(PropertyName = "genre")]
 0154        public IList<string> Genre { get; private set; }
 155
 156        /// <summary>
 157        /// </summary>
 158        [JsonProperty(PropertyName = "isFamilyFriendly")]
 0159        public bool? IsFamilyFriendly { get; private set; }
 160
 161        /// <summary>
 162        /// Validate the object.
 163        /// </summary>
 164        /// <exception cref="Rest.ValidationException">
 165        /// Thrown if validation fails
 166        /// </exception>
 167        public override void Validate()
 168        {
 0169            base.Validate();
 0170            if (About != null)
 171            {
 0172                foreach (var element in About)
 173                {
 0174                    if (element != null)
 175                    {
 0176                        element.Validate();
 177                    }
 178                }
 179            }
 0180            if (Mentions != null)
 181            {
 0182                foreach (var element1 in Mentions)
 183                {
 0184                    if (element1 != null)
 185                    {
 0186                        element1.Validate();
 187                    }
 188                }
 189            }
 0190            if (Provider != null)
 191            {
 0192                foreach (var element2 in Provider)
 193                {
 0194                    if (element2 != null)
 195                    {
 0196                        element2.Validate();
 197                    }
 198                }
 199            }
 0200            if (Creator != null)
 201            {
 0202                Creator.Validate();
 203            }
 0204            if (MainEntity != null)
 205            {
 0206                MainEntity.Validate();
 207            }
 0208            if (CopyrightHolder != null)
 209            {
 0210                CopyrightHolder.Validate();
 211            }
 0212        }
 213    }
 214}