< Summary

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

Metrics

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

File(s)

C:\Git\azure-sdk-for-net\sdk\graphrbac\Microsoft.Azure.Graph.RBAC\src\Generated\Models\CheckGroupMembershipParameters.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 IsMemberOf API call.
 21    /// </summary>
 22    public partial class CheckGroupMembershipParameters
 23    {
 24        /// <summary>
 25        /// Initializes a new instance of the CheckGroupMembershipParameters
 26        /// class.
 27        /// </summary>
 028        public CheckGroupMembershipParameters()
 29        {
 30            CustomInit();
 031        }
 32
 33        /// <summary>
 34        /// Initializes a new instance of the CheckGroupMembershipParameters
 35        /// class.
 36        /// </summary>
 37        /// <param name="groupId">The object ID of the group to check.</param>
 38        /// <param name="memberId">The object ID of the contact, group, user,
 39        /// or service principal to check for membership in the specified
 40        /// group.</param>
 41        /// <param name="additionalProperties">Unmatched properties from the
 42        /// message are deserialized this collection</param>
 043        public CheckGroupMembershipParameters(string groupId, string memberId, IDictionary<string, object> additionalPro
 44        {
 045            AdditionalProperties = additionalProperties;
 046            GroupId = groupId;
 047            MemberId = memberId;
 48            CustomInit();
 049        }
 50
 51        /// <summary>
 52        /// An initialization method that performs custom operations like setting defaults
 53        /// </summary>
 54        partial void CustomInit();
 55
 56        /// <summary>
 57        /// Gets or sets unmatched properties from the message are deserialized
 58        /// this collection
 59        /// </summary>
 60        [JsonExtensionData]
 061        public IDictionary<string, object> AdditionalProperties { get; set; }
 62
 63        /// <summary>
 64        /// Gets or sets the object ID of the group to check.
 65        /// </summary>
 66        [JsonProperty(PropertyName = "groupId")]
 067        public string GroupId { get; set; }
 68
 69        /// <summary>
 70        /// Gets or sets the object ID of the contact, group, user, or service
 71        /// principal to check for membership in the specified group.
 72        /// </summary>
 73        [JsonProperty(PropertyName = "memberId")]
 074        public string MemberId { get; set; }
 75
 76        /// <summary>
 77        /// Validate the object.
 78        /// </summary>
 79        /// <exception cref="ValidationException">
 80        /// Thrown if validation fails
 81        /// </exception>
 82        public virtual void Validate()
 83        {
 084            if (GroupId == null)
 85            {
 086                throw new ValidationException(ValidationRules.CannotBeNull, "GroupId");
 87            }
 088            if (MemberId == null)
 89            {
 090                throw new ValidationException(ValidationRules.CannotBeNull, "MemberId");
 91            }
 092        }
 93    }
 94}