Exemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="V1alpha1PolicyRule" /> class.
 /// </summary>
 /// <param name="ApiGroups">APIGroups is the name of the APIGroup that contains the resources.  If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed..</param>
 /// <param name="AttributeRestrictions">AttributeRestrictions will vary depending on what the Authorizer/AuthorizationAttributeBuilder pair supports. If the Authorizer does not recognize how to handle the AttributeRestrictions, the Authorizer should report an error..</param>
 /// <param name="NonResourceURLs">NonResourceURLs is a set of partial urls that a user should have access to.  *s are allowed, but only as the full, final step in the path This name is intentionally different than the internal type so that the DefaultConvert works nicely and because the ordering may be different. Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply to API resources (such as \&quot;pods\&quot; or \&quot;secrets\&quot;) or non-resource URL paths (such as \&quot;/api\&quot;),  but not both..</param>
 /// <param name="ResourceNames">ResourceNames is an optional white list of names that the rule applies to.  An empty set means that everything is allowed..</param>
 /// <param name="Resources">Resources is a list of resources this rule applies to.  ResourceAll represents all resources..</param>
 /// <param name="Verbs">Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule.  VerbAll represents all kinds. (required).</param>
 public V1alpha1PolicyRule(List <string> ApiGroups = default(List <string>), RuntimeRawExtension AttributeRestrictions = default(RuntimeRawExtension), List <string> NonResourceURLs = default(List <string>), List <string> ResourceNames = default(List <string>), List <string> Resources = default(List <string>), List <string> Verbs = default(List <string>))
 {
     // to ensure "Verbs" is required (not null)
     if (Verbs == null)
     {
         throw new InvalidDataException("Verbs is a required property for V1alpha1PolicyRule and cannot be null");
     }
     else
     {
         this.Verbs = Verbs;
     }
     this.ApiGroups             = ApiGroups;
     this.AttributeRestrictions = AttributeRestrictions;
     this.NonResourceURLs       = NonResourceURLs;
     this.ResourceNames         = ResourceNames;
     this.Resources             = Resources;
 }
Exemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="VersionedEvent" /> class.
 /// </summary>
 /// <param name="_Object">Object is:  * If Type is Added or Modified: the new state of the object.  * If Type is Deleted: the state of the object immediately before deletion.  * If Type is Error: *api.Status is recommended; other types may make sense    depending on context. (required).</param>
 /// <param name="Type">Type (required).</param>
 public VersionedEvent(RuntimeRawExtension _Object = default(RuntimeRawExtension), string Type = default(string))
 {
     // to ensure "_Object" is required (not null)
     if (_Object == null)
     {
         throw new InvalidDataException("_Object is a required property for VersionedEvent and cannot be null");
     }
     else
     {
         this._Object = _Object;
     }
     // to ensure "Type" is required (not null)
     if (Type == null)
     {
         throw new InvalidDataException("Type is a required property for VersionedEvent and cannot be null");
     }
     else
     {
         this.Type = Type;
     }
 }