Skip to content
This repository has been archived by the owner on May 6, 2022. It is now read-only.

Commit

Permalink
Merge branch 'pr/862'
Browse files Browse the repository at this point in the history
lgtm from:
 - jpeeler
 - kibbles-n-bytes
 - MHBauer
  • Loading branch information
MHBauer committed May 17, 2017
2 parents 52cb3c6 + 85196f5 commit a2db8ee
Show file tree
Hide file tree
Showing 8 changed files with 178 additions and 162 deletions.
14 changes: 11 additions & 3 deletions pkg/apis/servicecatalog/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,20 @@ type ServiceClass struct {
// Immutable.
ExternalID string

// OSB-specific
AlphaTags []string
Requires []string
// Description is a short description of the service.
Description string
ExternalMetadata *runtime.RawExtension

AlphaTags []string

// Currently, this field is ALPHA: it may change or disappear at any time
// and its data will not be migrated.
//
// AlphaRequires exposes a list of Cloud Foundry-specific 'permissions'
// that must be granted to an instance of this service within Cloud
// Foundry. These 'permissions' have no meaning within Kubernetes and an
// Instance provisioned from this ServiceClass will not work correctly.
AlphaRequires []string
}

// ServicePlan represents a tier of a ServiceClass.
Expand Down
226 changes: 113 additions & 113 deletions pkg/apis/servicecatalog/v1alpha1/types.generated.go
Original file line number Diff line number Diff line change
Expand Up @@ -2038,8 +2038,8 @@ func (x *ServiceClass) CodecEncodeSelf(e *codec1978.Encoder) {
yyq2[0] = x.Kind != ""
yyq2[1] = x.APIVersion != ""
yyq2[2] = true
yyq2[8] = len(x.AlphaTags) != 0
yyq2[9] = len(x.Requires) != 0
yyq2[10] = len(x.AlphaTags) != 0
yyq2[11] = len(x.AlphaRequires) != 0
var yynn2 int
if yyr2 || yy2arr2 {
r.EncodeArrayStart(12)
Expand Down Expand Up @@ -2237,12 +2237,64 @@ func (x *ServiceClass) CodecEncodeSelf(e *codec1978.Encoder) {
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq2[8] {
yym30 := z.EncBinary()
_ = yym30
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Description))
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("description"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym31 := z.EncBinary()
_ = yym31
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Description))
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if x.ExternalMetadata == nil {
r.EncodeNil()
} else {
yym33 := z.EncBinary()
_ = yym33
if false {
} else if z.HasExtensions() && z.EncExt(x.ExternalMetadata) {
} else if !yym33 && z.IsJSONHandle() {
z.EncJSONMarshal(x.ExternalMetadata)
} else {
z.EncFallback(x.ExternalMetadata)
}
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("externalMetadata"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
if x.ExternalMetadata == nil {
r.EncodeNil()
} else {
yym34 := z.EncBinary()
_ = yym34
if false {
} else if z.HasExtensions() && z.EncExt(x.ExternalMetadata) {
} else if !yym34 && z.IsJSONHandle() {
z.EncJSONMarshal(x.ExternalMetadata)
} else {
z.EncFallback(x.ExternalMetadata)
}
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq2[10] {
if x.AlphaTags == nil {
r.EncodeNil()
} else {
yym30 := z.EncBinary()
_ = yym30
yym36 := z.EncBinary()
_ = yym36
if false {
} else {
z.F.EncSliceStringV(x.AlphaTags, false, e)
Expand All @@ -2252,15 +2304,15 @@ func (x *ServiceClass) CodecEncodeSelf(e *codec1978.Encoder) {
r.EncodeNil()
}
} else {
if yyq2[8] {
if yyq2[10] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("alphaTags"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
if x.AlphaTags == nil {
r.EncodeNil()
} else {
yym31 := z.EncBinary()
_ = yym31
yym37 := z.EncBinary()
_ = yym37
if false {
} else {
z.F.EncSliceStringV(x.AlphaTags, false, e)
Expand All @@ -2270,89 +2322,37 @@ func (x *ServiceClass) CodecEncodeSelf(e *codec1978.Encoder) {
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq2[9] {
if x.Requires == nil {
if yyq2[11] {
if x.AlphaRequires == nil {
r.EncodeNil()
} else {
yym33 := z.EncBinary()
_ = yym33
yym39 := z.EncBinary()
_ = yym39
if false {
} else {
z.F.EncSliceStringV(x.Requires, false, e)
z.F.EncSliceStringV(x.AlphaRequires, false, e)
}
}
} else {
r.EncodeNil()
}
} else {
if yyq2[9] {
if yyq2[11] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("requires"))
r.EncodeString(codecSelferC_UTF81234, string("alphaRequires"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
if x.Requires == nil {
if x.AlphaRequires == nil {
r.EncodeNil()
} else {
yym34 := z.EncBinary()
_ = yym34
yym40 := z.EncBinary()
_ = yym40
if false {
} else {
z.F.EncSliceStringV(x.Requires, false, e)
z.F.EncSliceStringV(x.AlphaRequires, false, e)
}
}
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yym36 := z.EncBinary()
_ = yym36
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Description))
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("description"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym37 := z.EncBinary()
_ = yym37
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Description))
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if x.ExternalMetadata == nil {
r.EncodeNil()
} else {
yym39 := z.EncBinary()
_ = yym39
if false {
} else if z.HasExtensions() && z.EncExt(x.ExternalMetadata) {
} else if !yym39 && z.IsJSONHandle() {
z.EncJSONMarshal(x.ExternalMetadata)
} else {
z.EncFallback(x.ExternalMetadata)
}
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("externalMetadata"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
if x.ExternalMetadata == nil {
r.EncodeNil()
} else {
yym40 := z.EncBinary()
_ = yym40
if false {
} else if z.HasExtensions() && z.EncExt(x.ExternalMetadata) {
} else if !yym40 && z.IsJSONHandle() {
z.EncJSONMarshal(x.ExternalMetadata)
} else {
z.EncFallback(x.ExternalMetadata)
}
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
Expand Down Expand Up @@ -2511,59 +2511,59 @@ func (x *ServiceClass) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
*((*string)(yyv18)) = r.DecodeString()
}
}
case "alphaTags":
case "description":
if r.TryDecodeAsNil() {
x.AlphaTags = nil
x.Description = ""
} else {
yyv20 := &x.AlphaTags
yyv20 := &x.Description
yym21 := z.DecBinary()
_ = yym21
if false {
} else {
z.F.DecSliceStringX(yyv20, false, d)
*((*string)(yyv20)) = r.DecodeString()
}
}
case "requires":
case "externalMetadata":
if r.TryDecodeAsNil() {
x.Requires = nil
if x.ExternalMetadata != nil {
x.ExternalMetadata = nil
}
} else {
yyv22 := &x.Requires
if x.ExternalMetadata == nil {
x.ExternalMetadata = new(pkg4_runtime.RawExtension)
}
yym23 := z.DecBinary()
_ = yym23
if false {
} else if z.HasExtensions() && z.DecExt(x.ExternalMetadata) {
} else if !yym23 && z.IsJSONHandle() {
z.DecJSONUnmarshal(x.ExternalMetadata)
} else {
z.F.DecSliceStringX(yyv22, false, d)
z.DecFallback(x.ExternalMetadata, false)
}
}
case "description":
case "alphaTags":
if r.TryDecodeAsNil() {
x.Description = ""
x.AlphaTags = nil
} else {
yyv24 := &x.Description
yyv24 := &x.AlphaTags
yym25 := z.DecBinary()
_ = yym25
if false {
} else {
*((*string)(yyv24)) = r.DecodeString()
z.F.DecSliceStringX(yyv24, false, d)
}
}
case "externalMetadata":
case "alphaRequires":
if r.TryDecodeAsNil() {
if x.ExternalMetadata != nil {
x.ExternalMetadata = nil
}
x.AlphaRequires = nil
} else {
if x.ExternalMetadata == nil {
x.ExternalMetadata = new(pkg4_runtime.RawExtension)
}
yyv26 := &x.AlphaRequires
yym27 := z.DecBinary()
_ = yym27
if false {
} else if z.HasExtensions() && z.DecExt(x.ExternalMetadata) {
} else if !yym27 && z.IsJSONHandle() {
z.DecJSONUnmarshal(x.ExternalMetadata)
} else {
z.DecFallback(x.ExternalMetadata, false)
z.F.DecSliceStringX(yyv26, false, d)
}
}
default:
Expand Down Expand Up @@ -2769,14 +2769,14 @@ func (x *ServiceClass) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.AlphaTags = nil
x.Description = ""
} else {
yyv45 := &x.AlphaTags
yyv45 := &x.Description
yym46 := z.DecBinary()
_ = yym46
if false {
} else {
z.F.DecSliceStringX(yyv45, false, d)
*((*string)(yyv45)) = r.DecodeString()
}
}
yyj28++
Expand All @@ -2791,14 +2791,21 @@ func (x *ServiceClass) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Requires = nil
if x.ExternalMetadata != nil {
x.ExternalMetadata = nil
}
} else {
yyv47 := &x.Requires
if x.ExternalMetadata == nil {
x.ExternalMetadata = new(pkg4_runtime.RawExtension)
}
yym48 := z.DecBinary()
_ = yym48
if false {
} else if z.HasExtensions() && z.DecExt(x.ExternalMetadata) {
} else if !yym48 && z.IsJSONHandle() {
z.DecJSONUnmarshal(x.ExternalMetadata)
} else {
z.F.DecSliceStringX(yyv47, false, d)
z.DecFallback(x.ExternalMetadata, false)
}
}
yyj28++
Expand All @@ -2813,14 +2820,14 @@ func (x *ServiceClass) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Description = ""
x.AlphaTags = nil
} else {
yyv49 := &x.Description
yyv49 := &x.AlphaTags
yym50 := z.DecBinary()
_ = yym50
if false {
} else {
*((*string)(yyv49)) = r.DecodeString()
z.F.DecSliceStringX(yyv49, false, d)
}
}
yyj28++
Expand All @@ -2835,21 +2842,14 @@ func (x *ServiceClass) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
if x.ExternalMetadata != nil {
x.ExternalMetadata = nil
}
x.AlphaRequires = nil
} else {
if x.ExternalMetadata == nil {
x.ExternalMetadata = new(pkg4_runtime.RawExtension)
}
yyv51 := &x.AlphaRequires
yym52 := z.DecBinary()
_ = yym52
if false {
} else if z.HasExtensions() && z.DecExt(x.ExternalMetadata) {
} else if !yym52 && z.IsJSONHandle() {
z.DecJSONUnmarshal(x.ExternalMetadata)
} else {
z.DecFallback(x.ExternalMetadata, false)
z.F.DecSliceStringX(yyv51, false, d)
}
}
for {
Expand Down
Loading

0 comments on commit a2db8ee

Please sign in to comment.