From 7ec270dce7e8e9f4fb658bc12116c0218e7d5339 Mon Sep 17 00:00:00 2001 From: Eric Chiang Date: Tue, 2 Aug 2016 10:49:53 -0700 Subject: [PATCH] *: regenerate all --- .../rbac.authorization.k8s.io_v1alpha1.json | 6 +- pkg/apis/rbac/v1alpha1/generated.proto | 3 +- pkg/apis/rbac/v1alpha1/types.generated.go | 84 +++++++++++-------- .../v1alpha1/types_swagger_doc_generated.go | 2 +- 4 files changed, 54 insertions(+), 41 deletions(-) diff --git a/api/swagger-spec/rbac.authorization.k8s.io_v1alpha1.json b/api/swagger-spec/rbac.authorization.k8s.io_v1alpha1.json index 6c5f674c72b..fa45a90ad28 100644 --- a/api/swagger-spec/rbac.authorization.k8s.io_v1alpha1.json +++ b/api/swagger-spec/rbac.authorization.k8s.io_v1alpha1.json @@ -3075,9 +3075,7 @@ "id": "v1alpha1.PolicyRule", "description": "PolicyRule holds information that describes a policy rule, but does not contain information about who the rule applies to or which namespace the rule applies to.", "required": [ - "verbs", - "apiGroups", - "resources" + "verbs" ], "properties": { "verbs": { @@ -3117,7 +3115,7 @@ "items": { "type": "string" }, - "description": "NonResourceURLsSlice 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." + "description": "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 \"pods\" or \"secrets\") or non-resource URL paths (such as \"/api\"), but not both." } } }, diff --git a/pkg/apis/rbac/v1alpha1/generated.proto b/pkg/apis/rbac/v1alpha1/generated.proto index 062f815b81b..4973e076575 100644 --- a/pkg/apis/rbac/v1alpha1/generated.proto +++ b/pkg/apis/rbac/v1alpha1/generated.proto @@ -91,9 +91,10 @@ message PolicyRule { // ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. repeated string resourceNames = 5; - // NonResourceURLsSlice 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 + // 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 "pods" or "secrets") or non-resource URL paths (such as "/api"), but not both. repeated string nonResourceURLs = 6; } diff --git a/pkg/apis/rbac/v1alpha1/types.generated.go b/pkg/apis/rbac/v1alpha1/types.generated.go index bf7b3db2bf3..45dfb271e97 100644 --- a/pkg/apis/rbac/v1alpha1/types.generated.go +++ b/pkg/apis/rbac/v1alpha1/types.generated.go @@ -91,13 +91,15 @@ func (x *PolicyRule) CodecEncodeSelf(e *codec1978.Encoder) { _, _, _ = yysep2, yyq2, yy2arr2 const yyr2 bool = false yyq2[1] = true + yyq2[2] = len(x.APIGroups) != 0 + yyq2[3] = len(x.Resources) != 0 yyq2[4] = len(x.ResourceNames) != 0 yyq2[5] = len(x.NonResourceURLs) != 0 var yynn2 int if yyr2 || yy2arr2 { r.EncodeArrayStart(6) } else { - yynn2 = 3 + yynn2 = 1 for _, b := range yyq2 { if b { yynn2++ @@ -168,55 +170,67 @@ func (x *PolicyRule) CodecEncodeSelf(e *codec1978.Encoder) { } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if x.APIGroups == nil { - r.EncodeNil() - } else { - yym12 := z.EncBinary() - _ = yym12 - if false { + if yyq2[2] { + if x.APIGroups == nil { + r.EncodeNil() } else { - z.F.EncSliceStringV(x.APIGroups, false, e) + yym12 := z.EncBinary() + _ = yym12 + if false { + } else { + z.F.EncSliceStringV(x.APIGroups, false, e) + } } + } else { + r.EncodeNil() } } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiGroups")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.APIGroups == nil { - r.EncodeNil() - } else { - yym13 := z.EncBinary() - _ = yym13 - if false { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiGroups")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.APIGroups == nil { + r.EncodeNil() } else { - z.F.EncSliceStringV(x.APIGroups, false, e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else { + z.F.EncSliceStringV(x.APIGroups, false, e) + } } } } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if x.Resources == nil { - r.EncodeNil() - } else { - yym15 := z.EncBinary() - _ = yym15 - if false { + if yyq2[3] { + if x.Resources == nil { + r.EncodeNil() } else { - z.F.EncSliceStringV(x.Resources, false, e) + yym15 := z.EncBinary() + _ = yym15 + if false { + } else { + z.F.EncSliceStringV(x.Resources, false, e) + } } + } else { + r.EncodeNil() } } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("resources")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Resources == nil { - r.EncodeNil() - } else { - yym16 := z.EncBinary() - _ = yym16 - if false { + if yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("resources")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Resources == nil { + r.EncodeNil() } else { - z.F.EncSliceStringV(x.Resources, false, e) + yym16 := z.EncBinary() + _ = yym16 + if false { + } else { + z.F.EncSliceStringV(x.Resources, false, e) + } } } } diff --git a/pkg/apis/rbac/v1alpha1/types_swagger_doc_generated.go b/pkg/apis/rbac/v1alpha1/types_swagger_doc_generated.go index f1c6fdbdf61..6d1c4bc9d32 100644 --- a/pkg/apis/rbac/v1alpha1/types_swagger_doc_generated.go +++ b/pkg/apis/rbac/v1alpha1/types_swagger_doc_generated.go @@ -75,7 +75,7 @@ var map_PolicyRule = map[string]string{ "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.", "resources": "Resources is a list of resources this rule applies to. ResourceAll represents all resources.", "resourceNames": "ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.", - "nonResourceURLs": "NonResourceURLsSlice 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.", + "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 \"pods\" or \"secrets\") or non-resource URL paths (such as \"/api\"), but not both.", } func (PolicyRule) SwaggerDoc() map[string]string {