< Summary

Class:Microsoft.Azure.Graph.RBAC.Models.AddOwnerParameters
Assembly:Microsoft.Azure.Graph.RBAC
File(s):C:\Git\azure-sdk-for-net\sdk\graphrbac\Microsoft.Azure.Graph.RBAC\src\Generated\Models\AddOwnerParameters.cs
Covered lines:0
Uncovered lines:11
Coverable lines:11
Total lines:85
Line coverage:0% (0 of 11)
Covered branches:0
Total branches:2
Branch coverage:0% (0 of 2)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_AdditionalProperties()-0%100%
get_Url()-0%100%
Validate()-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\graphrbac\Microsoft.Azure.Graph.RBAC\src\Generated\Models\AddOwnerParameters.cs

#LineLine coverage
 1// <auto-generated>
 2// Copyright (c) Microsoft Corporation. All rights reserved.
 3// Licensed under the MIT License. See License.txt in the project root for
 4// license information.
 5//
 6// Code generated by Microsoft (R) AutoRest Code Generator.
 7// Changes may cause incorrect behavior and will be lost if the code is
 8// regenerated.
 9// </auto-generated>
 10
 11namespace Microsoft.Azure.Graph.RBAC.Models
 12{
 13    using Microsoft.Rest;
 14    using Newtonsoft.Json;
 15    using System.Collections;
 16    using System.Collections.Generic;
 17    using System.Linq;
 18
 19    /// <summary>
 20    /// Request parameters for adding a owner to an application.
 21    /// </summary>
 22    public partial class AddOwnerParameters
 23    {
 24        /// <summary>
 25        /// Initializes a new instance of the AddOwnerParameters class.
 26        /// </summary>
 027        public AddOwnerParameters()
 28        {
 29            CustomInit();
 030        }
 31
 32        /// <summary>
 33        /// Initializes a new instance of the AddOwnerParameters class.
 34        /// </summary>
 35        /// <param name="url">A owner object URL, such as
 36        /// "https://graph.windows.net/0b1f9851-1bf0-433f-aec3-cb9272f093dc/directoryObjects/f260bbc4-c254-447b-94cf-293
 37        /// where "0b1f9851-1bf0-433f-aec3-cb9272f093dc" is the tenantId and
 38        /// "f260bbc4-c254-447b-94cf-293b5ec434dd" is the objectId of the owner
 39        /// (user, application, servicePrincipal, group) to be added.</param>
 40        /// <param name="additionalProperties">Unmatched properties from the
 41        /// message are deserialized this collection</param>
 042        public AddOwnerParameters(string url, IDictionary<string, object> additionalProperties = default(IDictionary<str
 43        {
 044            AdditionalProperties = additionalProperties;
 045            Url = url;
 46            CustomInit();
 047        }
 48
 49        /// <summary>
 50        /// An initialization method that performs custom operations like setting defaults
 51        /// </summary>
 52        partial void CustomInit();
 53
 54        /// <summary>
 55        /// Gets or sets unmatched properties from the message are deserialized
 56        /// this collection
 57        /// </summary>
 58        [JsonExtensionData]
 059        public IDictionary<string, object> AdditionalProperties { get; set; }
 60
 61        /// <summary>
 62        /// Gets or sets a owner object URL, such as
 63        /// "https://graph.windows.net/0b1f9851-1bf0-433f-aec3-cb9272f093dc/directoryObjects/f260bbc4-c254-447b-94cf-293
 64        /// where "0b1f9851-1bf0-433f-aec3-cb9272f093dc" is the tenantId and
 65        /// "f260bbc4-c254-447b-94cf-293b5ec434dd" is the objectId of the owner
 66        /// (user, application, servicePrincipal, group) to be added.
 67        /// </summary>
 68        [JsonProperty(PropertyName = "url")]
 069        public string Url { get; set; }
 70
 71        /// <summary>
 72        /// Validate the object.
 73        /// </summary>
 74        /// <exception cref="ValidationException">
 75        /// Thrown if validation fails
 76        /// </exception>
 77        public virtual void Validate()
 78        {
 079            if (Url == null)
 80            {
 081                throw new ValidationException(ValidationRules.CannotBeNull, "Url");
 82            }
 083        }
 84    }
 85}