< Summary

Class:Microsoft.Azure.CognitiveServices.Search.EntitySearch.Models.CreativeWork
Assembly:Microsoft.Azure.CognitiveServices.Search.BingEntitySearch
File(s):C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Search.BingEntitySearch\src\Generated\EntitySearch\Models\CreativeWork.cs
Covered lines:3
Uncovered lines:13
Coverable lines:16
Total lines:98
Line coverage:18.7% (3 of 16)
Covered branches:0
Total branches:6
Branch coverage:0% (0 of 6)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-100%100%
.ctor(...)-0%100%
get_ThumbnailUrl()-0%100%
get_Provider()-100%100%
get_Text()-0%100%
Validate()-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Search.BingEntitySearch\src\Generated\EntitySearch\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.EntitySearch.Models
 8{
 9    using Newtonsoft.Json;
 10    using System.Collections;
 11    using System.Collections.Generic;
 12    using System.Linq;
 13
 14    public partial class CreativeWork : Thing
 15    {
 16        /// <summary>
 17        /// Initializes a new instance of the CreativeWork class.
 18        /// </summary>
 419        public CreativeWork()
 20        {
 21            CustomInit();
 422        }
 23
 24        /// <summary>
 25        /// Initializes a new instance of the CreativeWork class.
 26        /// </summary>
 27        /// <param name="id">A String identifier.</param>
 28        /// <param name="contractualRules">A list of rules that you must adhere
 29        /// to if you display the item.</param>
 30        /// <param name="webSearchUrl">The URL To Bing's search result for this
 31        /// item.</param>
 32        /// <param name="name">The name of the thing represented by this
 33        /// object.</param>
 34        /// <param name="url">The URL to get more information about the thing
 35        /// represented by this object.</param>
 36        /// <param name="description">A short description of the item.</param>
 37        /// <param name="entityPresentationInfo">Additional information about
 38        /// the entity such as hints that you can use to determine the entity's
 39        /// type. To determine the entity's type, use the entityScenario and
 40        /// entityTypeHint fields.</param>
 41        /// <param name="bingId">An ID that uniquely identifies this
 42        /// item.</param>
 43        /// <param name="thumbnailUrl">The URL to a thumbnail of the
 44        /// item.</param>
 45        /// <param name="provider">The source of the creative work.</param>
 46        public CreativeWork(string id = default(string), IList<ContractualRulesContractualRule> contractualRules = defau
 047            : base(id, contractualRules, webSearchUrl, name, url, image, description, entityPresentationInfo, bingId)
 48        {
 049            ThumbnailUrl = thumbnailUrl;
 050            Provider = provider;
 051            Text = text;
 52            CustomInit();
 053        }
 54
 55        /// <summary>
 56        /// An initialization method that performs custom operations like setting defaults
 57        /// </summary>
 58        partial void CustomInit();
 59
 60        /// <summary>
 61        /// Gets the URL to a thumbnail of the item.
 62        /// </summary>
 63        [JsonProperty(PropertyName = "thumbnailUrl")]
 064        public string ThumbnailUrl { get; private set; }
 65
 66        /// <summary>
 67        /// Gets the source of the creative work.
 68        /// </summary>
 69        [JsonProperty(PropertyName = "provider")]
 670        public IList<Thing> Provider { get; private set; }
 71
 72        /// <summary>
 73        /// </summary>
 74        [JsonProperty(PropertyName = "text")]
 075        public string Text { get; private set; }
 76
 77        /// <summary>
 78        /// Validate the object.
 79        /// </summary>
 80        /// <exception cref="Rest.ValidationException">
 81        /// Thrown if validation fails
 82        /// </exception>
 83        public override void Validate()
 84        {
 085            base.Validate();
 086            if (Provider != null)
 87            {
 088                foreach (var element in Provider)
 89                {
 090                    if (element != null)
 91                    {
 092                        element.Validate();
 93                    }
 94                }
 95            }
 096        }
 97    }
 98}