Skip to content

Commit

Permalink
Merge pull request #1998 from aml-org/W-15425058
Browse files Browse the repository at this point in the history
W-15425058: fix solace operation topic
  • Loading branch information
damianpedra authored May 24, 2024
2 parents e511afa + 2a3b255 commit ad62772
Show file tree
Hide file tree
Showing 2 changed files with 110 additions and 60 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,22 @@
package amf.apicontract.client.scala.model.domain.bindings.solace

import amf.apicontract.client.scala.model.domain.bindings.{BindingVersion, OperationBinding}
import amf.apicontract.internal.metamodel.domain.bindings.{SolaceOperationBinding010Model, SolaceOperationBinding020Model, SolaceOperationBinding030Model, SolaceOperationBinding040Model, SolaceOperationBindingModel, SolaceOperationDestination010Model, SolaceOperationDestination020Model, SolaceOperationDestination030Model, SolaceOperationDestination040Model, SolaceOperationDestinationModel, SolaceOperationQueue010Model, SolaceOperationQueue030Model, SolaceOperationQueueModel, SolaceOperationTopicModel}
import amf.apicontract.internal.metamodel.domain.bindings.{
SolaceOperationBinding010Model,
SolaceOperationBinding020Model,
SolaceOperationBinding030Model,
SolaceOperationBinding040Model,
SolaceOperationBindingModel,
SolaceOperationDestination010Model,
SolaceOperationDestination020Model,
SolaceOperationDestination030Model,
SolaceOperationDestination040Model,
SolaceOperationDestinationModel,
SolaceOperationQueue010Model,
SolaceOperationQueue030Model,
SolaceOperationQueueModel,
SolaceOperationTopicModel
}
import amf.apicontract.internal.metamodel.domain.bindings.SolaceOperationBindingModel._
import amf.apicontract.internal.spec.async.parser.bindings.Bindings.Solace
import amf.core.client.scala.model.domain.{DomainElement, Linkable, NamedDomainElement}
Expand Down Expand Up @@ -81,28 +96,31 @@ object SolaceOperationBinding030 {
new SolaceOperationBinding030(fields, annotations)
}
class SolaceOperationBinding040(fields: Fields, annotations: Annotations)
extends SolaceOperationBinding(fields, annotations) {
extends SolaceOperationBinding(fields, annotations) {

override def destinations: Seq[SolaceOperationDestination040] = fields.field(SolaceOperationBinding040Model.Destinations)
override def destinations: Seq[SolaceOperationDestination040] =
fields.field(SolaceOperationBinding040Model.Destinations)

def withDestinations(destinations: Seq[SolaceOperationDestination040]): this.type = setArray(Destinations, destinations)
def withDestinations(destinations: Seq[SolaceOperationDestination040]): this.type =
setArray(Destinations, destinations)

def timeToLive: IntField = fields.field(SolaceOperationBinding040Model.TimeToLive)
def priority: IntField = fields.field(SolaceOperationBinding040Model.Priority)
def timeToLive: IntField = fields.field(SolaceOperationBinding040Model.TimeToLive)
def priority: IntField = fields.field(SolaceOperationBinding040Model.Priority)
def dmqEligible: BoolField = fields.field(SolaceOperationBinding040Model.DmqEligible)

def withTimeToLive(value: Int): this.type = set(SolaceOperationBinding040Model.TimeToLive, value)
def withPriority(value: Int): this.type = set(SolaceOperationBinding040Model.Priority, value)
def withTimeToLive(value: Int): this.type = set(SolaceOperationBinding040Model.TimeToLive, value)
def withPriority(value: Int): this.type = set(SolaceOperationBinding040Model.Priority, value)
def withDmqEligible(value: Boolean): this.type = set(SolaceOperationBinding040Model.DmqEligible, value)

override def componentId: String = s"/$Solace-operation-040"
override def componentId: String = s"/$Solace-operation-040"
override def meta: SolaceOperationBinding040Model.type = SolaceOperationBinding040Model
override def linkCopy(): SolaceOperationBinding = SolaceOperationBinding040().withId(id)
override def linkCopy(): SolaceOperationBinding = SolaceOperationBinding040().withId(id)

override protected def classConstructor: (Fields, Annotations) => Linkable with DomainElement = SolaceOperationBinding040.apply
override protected def classConstructor: (Fields, Annotations) => Linkable with DomainElement =
SolaceOperationBinding040.apply
}
object SolaceOperationBinding040 {
def apply(): SolaceOperationBinding040 = apply(Annotations())
def apply(): SolaceOperationBinding040 = apply(Annotations())
def apply(annotations: Annotations): SolaceOperationBinding040 = apply(Fields(), annotations)
def apply(fields: Fields, annotations: Annotations): SolaceOperationBinding040 =
new SolaceOperationBinding040(fields, annotations)
Expand All @@ -126,8 +144,8 @@ abstract class SolaceOperationDestination(override val fields: Fields, override
}
class SolaceOperationDestination010(override val fields: Fields, override val annotations: Annotations)
extends SolaceOperationDestination(fields, annotations) {
override def queue: SolaceOperationQueue010 = fields.field(SolaceOperationDestination010Model.Queue)
def withQueue(queue: SolaceOperationQueue010): this.type = set(SolaceOperationDestination010Model.Queue, queue)
override def queue: SolaceOperationQueue010 = fields.field(SolaceOperationDestination010Model.Queue)
def withQueue(queue: SolaceOperationQueue010): this.type = set(SolaceOperationDestination010Model.Queue, queue)
override def componentId: String = s"/$Solace-operation-destination-010"
override def meta: SolaceOperationDestination010Model.type = SolaceOperationDestination010Model

Expand All @@ -142,12 +160,13 @@ class SolaceOperationDestination020(override val fields: Fields, override val an
extends SolaceOperationDestination(fields, annotations) {
override def meta: SolaceOperationDestination020Model.type = SolaceOperationDestination020Model
override def componentId: String = s"/$Solace-operation-destination-020"
override def queue: SolaceOperationQueue010 = fields.field(SolaceOperationDestination020Model.Queue)
def withQueue(queue: SolaceOperationQueue010): this.type = set(SolaceOperationDestination020Model.Queue, queue)
override def queue: SolaceOperationQueue010 = fields.field(SolaceOperationDestination020Model.Queue)
def withQueue(queue: SolaceOperationQueue010): this.type = set(SolaceOperationDestination020Model.Queue, queue)
def topic: SolaceOperationTopic = fields.field(SolaceOperationDestination020Model.Topic)
def withTopic(topic: SolaceOperationTopic): this.type = set(SolaceOperationDestination020Model.Topic, topic)
def destinations: Seq[SolaceOperationDestination020] = fields.field(SolaceOperationBinding020Model.Destinations)
def withDestinations(destinations: Seq[SolaceOperationDestination020]): this.type = setArray(SolaceOperationBinding020Model.Destinations, destinations)
def withDestinations(destinations: Seq[SolaceOperationDestination020]): this.type =
setArray(SolaceOperationBinding020Model.Destinations, destinations)
}

object SolaceOperationDestination020 {
Expand All @@ -160,15 +179,17 @@ object SolaceOperationDestination020 {
class SolaceOperationDestination030(override val fields: Fields, override val annotations: Annotations)
extends SolaceOperationDestination(fields, annotations) {

override def withDestinationType(destinationType: String): SolaceOperationDestination030.this.type = super.withDestinationType(destinationType)
override def withDestinationType(destinationType: String): SolaceOperationDestination030.this.type =
super.withDestinationType(destinationType)
override def meta: SolaceOperationDestination030Model.type = SolaceOperationDestination030Model
override def componentId: String = s"/$Solace-operation-destination-030"
override def queue: SolaceOperationQueue030 = fields.field(SolaceOperationDestination030Model.Queue)
def withQueue(queue: SolaceOperationQueue030): this.type = set(SolaceOperationDestination030Model.Queue, queue)
override def queue: SolaceOperationQueue030 = fields.field(SolaceOperationDestination030Model.Queue)
def withQueue(queue: SolaceOperationQueue030): this.type = set(SolaceOperationDestination030Model.Queue, queue)
def destinations: Seq[SolaceOperationDestination030] = fields.field(SolaceOperationBinding030Model.Destinations)
def withDestinations(destinations: Seq[SolaceOperationDestination030]): this.type = setArray(SolaceOperationBinding030Model.Destinations, destinations)
def topic: SolaceOperationTopic = fields.field(SolaceOperationDestination030Model.Topic)
def withTopic(topic: SolaceOperationTopic): this.type = set(SolaceOperationDestination030Model.Topic, topic)
def withDestinations(destinations: Seq[SolaceOperationDestination030]): this.type =
setArray(SolaceOperationBinding030Model.Destinations, destinations)
def topic: SolaceOperationTopic = fields.field(SolaceOperationDestination030Model.Topic)
def withTopic(topic: SolaceOperationTopic): this.type = set(SolaceOperationDestination030Model.Topic, topic)
}

object SolaceOperationDestination030 {
Expand All @@ -179,21 +200,23 @@ object SolaceOperationDestination030 {
}

class SolaceOperationDestination040(override val fields: Fields, override val annotations: Annotations)
extends SolaceOperationDestination(fields, annotations) {
extends SolaceOperationDestination(fields, annotations) {
override def meta: SolaceOperationDestination040Model.type = SolaceOperationDestination040Model
override def componentId: String = s"/$Solace-operation-destination-040"
override def queue: SolaceOperationQueue030 = fields.field(SolaceOperationDestination040Model.Queue)
def withQueue(queue: SolaceOperationQueue030): this.type = set(SolaceOperationDestination040Model.Queue, queue)
override def componentId: String = s"/$Solace-operation-destination-040"
override def queue: SolaceOperationQueue030 = fields.field(SolaceOperationDestination040Model.Queue)
def withQueue(queue: SolaceOperationQueue030): this.type = set(SolaceOperationDestination040Model.Queue, queue)
def topic: SolaceOperationTopic = fields.field(SolaceOperationDestination040Model.Topic)
def withTopic(topic: SolaceOperationTopic): this.type = set(SolaceOperationDestination040Model.Topic, topic)
def destinations: Seq[SolaceOperationDestination040] = fields.field(SolaceOperationBinding040Model.Destinations)
def withDestinations(destinations: Seq[SolaceOperationDestination040]): this.type = setArray(SolaceOperationBinding040Model.Destinations, destinations)
def withBindingVersion(bindingVersion: String): this.type = set(SolaceOperationDestination040Model.BindingVersion, bindingVersion)
def withDestinations(destinations: Seq[SolaceOperationDestination040]): this.type =
setArray(SolaceOperationBinding040Model.Destinations, destinations)
def withBindingVersion(bindingVersion: String): this.type =
set(SolaceOperationDestination040Model.BindingVersion, bindingVersion)
def bindingVersion: StrField = fields.field(SolaceOperationDestination040Model.BindingVersion)
}

object SolaceOperationDestination040 {
def apply(): SolaceOperationDestination040 = apply(Annotations())
def apply(): SolaceOperationDestination040 = apply(Annotations())
def apply(annotations: Annotations): SolaceOperationDestination040 = apply(Fields(), annotations)
def apply(fields: Fields, annotations: Annotations): SolaceOperationDestination040 =
new SolaceOperationDestination040(fields, annotations)
Expand Down Expand Up @@ -260,7 +283,6 @@ class SolaceOperationTopic(override val fields: Fields, override val annotations
}

object SolaceOperationTopic {

def apply(): SolaceOperationTopic = apply(Annotations())

def apply(annotations: Annotations): SolaceOperationTopic = apply(Fields(), annotations)
Expand Down
Loading

0 comments on commit ad62772

Please sign in to comment.