< Summary

Class:Microsoft.Azure.Graph.RBAC.Models.GroupAddMemberParameters
Assembly:Microsoft.Azure.Graph.RBAC
File(s):C:\Git\azure-sdk-for-net\sdk\graphrbac\Microsoft.Azure.Graph.RBAC\src\Generated\Models\GroupAddMemberParameters.cs
Covered lines:8
Uncovered lines:3
Coverable lines:11
Total lines:86
Line coverage:72.7% (8 of 11)
Covered branches:1
Total branches:2
Branch coverage:50% (1 of 2)

Metrics

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

File(s)

C:\Git\azure-sdk-for-net\sdk\graphrbac\Microsoft.Azure.Graph.RBAC\src\Generated\Models\GroupAddMemberParameters.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 member to a group.
 21    /// </summary>
 22    public partial class GroupAddMemberParameters
 23    {
 24        /// <summary>
 25        /// Initializes a new instance of the GroupAddMemberParameters class.
 26        /// </summary>
 027        public GroupAddMemberParameters()
 28        {
 29            CustomInit();
 030        }
 31
 32        /// <summary>
 33        /// Initializes a new instance of the GroupAddMemberParameters class.
 34        /// </summary>
 35        /// <param name="url">A member 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
 39        /// member (user, application, servicePrincipal, group) to be
 40        /// added.</param>
 41        /// <param name="additionalProperties">Unmatched properties from the
 42        /// message are deserialized this collection</param>
 243        public GroupAddMemberParameters(string url, IDictionary<string, object> additionalProperties = default(IDictiona
 44        {
 245            AdditionalProperties = additionalProperties;
 246            Url = url;
 47            CustomInit();
 248        }
 49
 50        /// <summary>
 51        /// An initialization method that performs custom operations like setting defaults
 52        /// </summary>
 53        partial void CustomInit();
 54
 55        /// <summary>
 56        /// Gets or sets unmatched properties from the message are deserialized
 57        /// this collection
 58        /// </summary>
 59        [JsonExtensionData]
 460        public IDictionary<string, object> AdditionalProperties { get; set; }
 61
 62        /// <summary>
 63        /// Gets or sets a member object URL, such as
 64        /// "https://graph.windows.net/0b1f9851-1bf0-433f-aec3-cb9272f093dc/directoryObjects/f260bbc4-c254-447b-94cf-293
 65        /// where "0b1f9851-1bf0-433f-aec3-cb9272f093dc" is the tenantId and
 66        /// "f260bbc4-c254-447b-94cf-293b5ec434dd" is the objectId of the
 67        /// member (user, application, servicePrincipal, group) to be added.
 68        /// </summary>
 69        [JsonProperty(PropertyName = "url")]
 670        public string Url { get; set; }
 71
 72        /// <summary>
 73        /// Validate the object.
 74        /// </summary>
 75        /// <exception cref="ValidationException">
 76        /// Thrown if validation fails
 77        /// </exception>
 78        public virtual void Validate()
 79        {
 280            if (Url == null)
 81            {
 082                throw new ValidationException(ValidationRules.CannotBeNull, "Url");
 83            }
 284        }
 85    }
 86}