Skip to content

Commit

Permalink
fix(code-gen/go): disable builder temporary for discriminated types
Browse files Browse the repository at this point in the history
  • Loading branch information
sruehl committed Sep 27, 2024
1 parent a36f407 commit 6cc035d
Show file tree
Hide file tree
Showing 2,986 changed files with 10,639 additions and 10,435 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ type ${type.name}Builder interface {
<#assign typeRef=field.asTypedField().orElseThrow().type>
// With${field.name?cap_first} adds ${field.name?cap_first} (property field)
With<#if field.isOptionalField()>Optional</#if>${field.name?cap_first}(${helper.getLanguageTypeNameForTypeReference(typeRef, true)}) ${type.name}Builder
<#if typeRef.isComplexTypeReference()>
<#if typeRef.isComplexTypeReference() && !typeRef.asComplexTypeReference().orElseThrow().typeDefinition.isAbstract()>
// With<#if field.isOptionalField()>Optional</#if>${field.name?cap_first}Builder adds ${field.name?cap_first} (property field) which is build by the builder
With<#if field.isOptionalField()>Optional</#if>${field.name?cap_first}Builder(func(${helper.getLanguageTypeNameForTypeReference(typeRef)}Builder)${helper.getLanguageTypeNameForTypeReference(typeRef)}Builder) ${type.name}Builder
</#if>
Expand Down Expand Up @@ -395,7 +395,7 @@ func (m *_${type.name}Builder) With<#if field.isOptionalField()>Optional</#if>${
return m
}

<#if typeRef.isComplexTypeReference()>
<#if typeRef.isComplexTypeReference() && !typeRef.asComplexTypeReference().orElseThrow().typeDefinition.isAbstract()>
func (m *_${type.name}Builder) With<#if field.isOptionalField()>Optional</#if>${field.name?cap_first}Builder(builderSupplier func(${helper.getLanguageTypeNameForTypeReference(typeRef)}Builder)${helper.getLanguageTypeNameForTypeReference(typeRef)}Builder) ${type.name}Builder {
builder:=builderSupplier(m.${field.name?cap_first}.Create${helper.getLanguageTypeNameForField(field)}Builder())
var err error
Expand Down
1 change: 0 additions & 1 deletion plc4go/internal/ads/Subscriber.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ package ads

import (
"context"
"errors"
"runtime/debug"
"time"

Expand Down
4 changes: 4 additions & 0 deletions plc4go/internal/bacnetip/bacgopes/apdu/apdu_ComplexAckPDU.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ type ComplexAckPDU struct {

var _ readWriteModel.APDUComplexAck = (*ComplexAckPDU)(nil)

func (c *ComplexAckPDU) CreateAPDUComplexAckBuilder() readWriteModel.APDUComplexAckBuilder {
panic("implement me")
}

func (c *ComplexAckPDU) GetSegmentedMessage() bool {
//TODO implement me
panic("implement me")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@ func (c *ConfirmedRequestPDU) buildConfirmedRequest(serviceRequest readWriteMode
)
}

func (c *ConfirmedRequestPDU) CreateAPDUConfirmedRequestBuilder() readWriteModel.APDUConfirmedRequestBuilder {
//TODO implement me
panic("implement me")
}

func (c *ConfirmedRequestPDU) GetSegmentedMessage() bool {
return c.apduSeg
}
Expand Down
5 changes: 5 additions & 0 deletions plc4go/internal/bacnetip/bacgopes/apdu/apdu_ErrorPDU.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,11 @@ func (e *ErrorPDU) buildConfirmedRequest(bacnetError readWriteModel.BACnetError)
)
}

func (e *ErrorPDU) CreateAPDUErrorBuilder() readWriteModel.APDUErrorBuilder {
//TODO implement me
panic("implement me")
}

func (e *ErrorPDU) GetSegmentedMessage() bool {
return e.apduSeg
}
Expand Down
4 changes: 4 additions & 0 deletions plc4go/internal/bacnetip/bacgopes/apdu/apdu_SimpleAckPDU.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ type SimpleAckPDU struct {

var _ readWriteModel.APDUComplexAck = (*SimpleAckPDU)(nil)

func (s *SimpleAckPDU) CreateAPDUComplexAckBuilder() readWriteModel.APDUComplexAckBuilder {
panic("implement me")
}

func (s *SimpleAckPDU) GetSegmentedMessage() bool {
//TODO implement me
panic("implement me")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ func (u *UnconfirmedRequestPDU) buildUnconfirmedServiceRequest(serviceRequest re
return readWriteModel.NewAPDUUnconfirmedRequest(serviceRequest, 0)
}

func (u *UnconfirmedRequestPDU) CreateAPDUUnconfirmedRequestBuilder() readWriteModel.APDUUnconfirmedRequestBuilder {
panic("implement me")
}

func (u *UnconfirmedRequestPDU) GetServiceRequest() readWriteModel.BACnetUnconfirmedServiceRequest {
return u.serviceRequest
}
Expand Down
3 changes: 2 additions & 1 deletion plc4go/protocols/abeth/readwrite/ParserHelper.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion plc4go/protocols/abeth/readwrite/XmlParserHelper.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 4 additions & 17 deletions plc4go/protocols/abeth/readwrite/model/DF1CommandRequestMessage.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions plc4go/protocols/abeth/readwrite/model/DF1RequestCommand.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions plc4go/protocols/abeth/readwrite/model/DF1RequestMessage.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions plc4go/protocols/abeth/readwrite/model/DF1ResponseMessage.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion plc4go/protocols/ads/discovery/readwrite/ParserHelper.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion plc4go/protocols/ads/discovery/readwrite/XmlParserHelper.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 6cc035d

Please sign in to comment.