/// <summary>
        /// Initializes a new instance of the <see cref="RoleUpdateRequest" /> class.
        /// </summary>
        /// <param name="description">description.</param>
        /// <param name="resource">resource (required).</param>
        /// <param name="when">when (required).</param>
        public RoleUpdateRequest(string description = default(string), RoleResourceRequest resource = default(RoleResourceRequest), WhenSpec when = default(WhenSpec))
        {
            this.Description = description;
            // to ensure "resource" is required (not null)
            if (resource == null)
            {
                throw new InvalidDataException("resource is a required property for RoleUpdateRequest and cannot be null");
            }
            else
            {
                this.Resource = resource;
            }

            // to ensure "when" is required (not null)
            if (when == null)
            {
                throw new InvalidDataException("when is a required property for RoleUpdateRequest and cannot be null");
            }
            else
            {
                this.When = when;
            }

            this.Description = description;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="LicenceCreationRequest" /> class.
        /// </summary>
        /// <param name="code">code (required).</param>
        /// <param name="description">description (required).</param>
        /// <param name="applications">applications (required).</param>
        /// <param name="selectors">selectors (required).</param>
        /// <param name="when">when (required).</param>
        /// <param name="_for">_for.</param>
        /// <param name="how">how.</param>
        /// <param name="_if">_if.</param>
        public LicenceCreationRequest(string code = default(string), string description = default(string), List <string> applications = default(List <string>), List <LicenceSelectorDefinition> selectors = default(List <LicenceSelectorDefinition>), WhenSpec when = default(WhenSpec), List <ForSpec> _for = default(List <ForSpec>), HowSpec how = default(HowSpec), List <IfExpression> _if = default(List <IfExpression>))
        {
            // to ensure "code" is required (not null)
            if (code == null)
            {
                throw new InvalidDataException("code is a required property for LicenceCreationRequest and cannot be null");
            }
            else
            {
                this.Code = code;
            }

            // to ensure "description" is required (not null)
            if (description == null)
            {
                throw new InvalidDataException("description is a required property for LicenceCreationRequest and cannot be null");
            }
            else
            {
                this.Description = description;
            }

            // to ensure "applications" is required (not null)
            if (applications == null)
            {
                throw new InvalidDataException("applications is a required property for LicenceCreationRequest and cannot be null");
            }
            else
            {
                this.Applications = applications;
            }

            // to ensure "selectors" is required (not null)
            if (selectors == null)
            {
                throw new InvalidDataException("selectors is a required property for LicenceCreationRequest and cannot be null");
            }
            else
            {
                this.Selectors = selectors;
            }

            // to ensure "when" is required (not null)
            if (when == null)
            {
                throw new InvalidDataException("when is a required property for LicenceCreationRequest and cannot be null");
            }
            else
            {
                this.When = when;
            }

            this.For = _for;
            this.If  = _if;
            this.For = _for;
            this.How = how;
            this.If  = _if;
        }
Exemplo n.º 3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="PolicyUpdateRequest" /> class.
        /// </summary>
        /// <param name="description">Description of what the policy will be used for.</param>
        /// <param name="applications">Applications this policy is used with.</param>
        /// <param name="grant">grant (required).</param>
        /// <param name="selectors">Selectors that identify what resources this policy qualifies for (required).</param>
        /// <param name="_for">\&quot;For Specification\&quot; for when the policy is to be applied.</param>
        /// <param name="_if">\&quot;If Specification\&quot; for when the policy is to be applied.</param>
        /// <param name="when">when (required).</param>
        /// <param name="how">how.</param>
        public PolicyUpdateRequest(string description = default(string), List <string> applications = default(List <string>), Grant grant = default(Grant), List <SelectorDefinition> selectors = default(List <SelectorDefinition>), List <ForSpec> _for = default(List <ForSpec>), List <IfExpression> _if = default(List <IfExpression>), WhenSpec when = default(WhenSpec), HowSpec how = default(HowSpec))
        {
            this.Description  = description;
            this.Applications = applications;
            // to ensure "grant" is required (not null)
            if (grant == null)
            {
                throw new InvalidDataException("grant is a required property for PolicyUpdateRequest and cannot be null");
            }
            else
            {
                this.Grant = grant;
            }

            // to ensure "selectors" is required (not null)
            if (selectors == null)
            {
                throw new InvalidDataException("selectors is a required property for PolicyUpdateRequest and cannot be null");
            }
            else
            {
                this.Selectors = selectors;
            }

            this.For = _for;
            this.If  = _if;
            // to ensure "when" is required (not null)
            if (when == null)
            {
                throw new InvalidDataException("when is a required property for PolicyUpdateRequest and cannot be null");
            }
            else
            {
                this.When = when;
            }

            this.Description  = description;
            this.Applications = applications;
            this.For          = _for;
            this.If           = _if;
            this.How          = how;
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="PolicyResponse" /> class.
 /// </summary>
 /// <param name="id">id.</param>
 /// <param name="description">Description of what the policy is entitling.</param>
 /// <param name="applications">Applications to which the policy applies.</param>
 /// <param name="grant">grant.</param>
 /// <param name="selectors">Selectors that this policy will be applied to.</param>
 /// <param name="_for">\&quot;For Specification\&quot; for when the policy is to be applied.</param>
 /// <param name="_if">\&quot;If Specification\&quot; for when the policy is to be applied.</param>
 /// <param name="when">when.</param>
 /// <param name="how">how.</param>
 /// <param name="links">links.</param>
 public PolicyResponse(PolicyId id = default(PolicyId), string description = default(string), List <string> applications = default(List <string>), Grant grant = default(Grant), List <SelectorDefinition> selectors = default(List <SelectorDefinition>), List <ForSpec> _for = default(List <ForSpec>), List <IfExpression> _if = default(List <IfExpression>), WhenSpec when = default(WhenSpec), HowSpec how = default(HowSpec), List <Link> links = default(List <Link>))
 {
     this.Description  = description;
     this.Applications = applications;
     this.Selectors    = selectors;
     this.For          = _for;
     this.If           = _if;
     this.Links        = links;
     this.Id           = id;
     this.Description  = description;
     this.Applications = applications;
     this.Grant        = grant;
     this.Selectors    = selectors;
     this.For          = _for;
     this.If           = _if;
     this.When         = when;
     this.How          = how;
     this.Links        = links;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="AttachedPolicyDefinitionResponse" /> class.
 /// </summary>
 /// <param name="sourceRole">sourceRole.</param>
 /// <param name="roleHierarchyIndex">roleHierarchyIndex.</param>
 /// <param name="description">description.</param>
 /// <param name="applications">applications.</param>
 /// <param name="policyType">policyType.</param>
 /// <param name="id">id.</param>
 /// <param name="grant">grant.</param>
 /// <param name="selectors">selectors.</param>
 /// <param name="_for">_for.</param>
 /// <param name="_if">_if.</param>
 /// <param name="when">when.</param>
 /// <param name="how">how.</param>
 public AttachedPolicyDefinitionResponse(RoleId sourceRole = default(RoleId), int?roleHierarchyIndex = default(int?), string description = default(string), List <string> applications = default(List <string>), PolicyType policyType = default(PolicyType), PolicyId id = default(PolicyId), Grant grant = default(Grant), List <SelectorDefinition> selectors = default(List <SelectorDefinition>), List <ForSpec> _for = default(List <ForSpec>), List <IfExpression> _if = default(List <IfExpression>), WhenSpec when = default(WhenSpec), HowSpec how = default(HowSpec))
 {
     this.Description        = description;
     this.Applications       = applications;
     this.Selectors          = selectors;
     this.For                = _for;
     this.If                 = _if;
     this.SourceRole         = sourceRole;
     this.RoleHierarchyIndex = roleHierarchyIndex;
     this.Description        = description;
     this.Applications       = applications;
     this.PolicyType         = policyType;
     this.Id                 = id;
     this.Grant              = grant;
     this.Selectors          = selectors;
     this.For                = _for;
     this.If                 = _if;
     this.When               = when;
     this.How                = how;
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="RoleResponse" /> class.
        /// </summary>
        /// <param name="id">id (required).</param>
        /// <param name="roleHierarchyIndex">roleHierarchyIndex (required).</param>
        /// <param name="description">description.</param>
        /// <param name="resource">resource (required).</param>
        /// <param name="when">when (required).</param>
        /// <param name="permission">permission (required).</param>
        /// <param name="limit">limit.</param>
        /// <param name="links">links.</param>
        public RoleResponse(RoleId id = default(RoleId), int?roleHierarchyIndex = default(int?), string description = default(string), RoleResourceRequest resource = default(RoleResourceRequest), WhenSpec when = default(WhenSpec), string permission = default(string), Dictionary <string, string> limit = default(Dictionary <string, string>), List <Link> links = default(List <Link>))
        {
            // to ensure "id" is required (not null)
            if (id == null)
            {
                throw new InvalidDataException("id is a required property for RoleResponse and cannot be null");
            }
            else
            {
                this.Id = id;
            }

            // to ensure "roleHierarchyIndex" is required (not null)
            if (roleHierarchyIndex == null)
            {
                throw new InvalidDataException("roleHierarchyIndex is a required property for RoleResponse and cannot be null");
            }
            else
            {
                this.RoleHierarchyIndex = roleHierarchyIndex;
            }

            this.Description = description;
            // to ensure "resource" is required (not null)
            if (resource == null)
            {
                throw new InvalidDataException("resource is a required property for RoleResponse and cannot be null");
            }
            else
            {
                this.Resource = resource;
            }

            // to ensure "when" is required (not null)
            if (when == null)
            {
                throw new InvalidDataException("when is a required property for RoleResponse and cannot be null");
            }
            else
            {
                this.When = when;
            }

            // to ensure "permission" is required (not null)
            if (permission == null)
            {
                throw new InvalidDataException("permission is a required property for RoleResponse and cannot be null");
            }
            else
            {
                this.Permission = permission;
            }

            this.Limit       = limit;
            this.Links       = links;
            this.Description = description;
            this.Limit       = limit;
            this.Links       = links;
        }