Skip to content

Commit

Permalink
Merge pull request #1945 from aml-org/publish-5.4.9
Browse files Browse the repository at this point in the history
W-14875427 Publish 5.4.9
  • Loading branch information
damianpedra authored Mar 6, 2024
2 parents 25fd0ed + 56461ce commit 073d8a1
Show file tree
Hide file tree
Showing 161 changed files with 6,389 additions and 407 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@ package amf.apicontract.client.platform.model.domain
import amf.apicontract.client.platform.model.domain.bindings.ChannelBindings
import amf.apicontract.client.platform.model.domain.federation.EndPointFederationMetadata
import amf.apicontract.client.platform.model.domain.security.SecurityRequirement
import amf.apicontract.client.scala.model.domain.{EndPoint => InternalEndPoint}
import amf.apicontract.internal.convert.ApiClientConverters._
import amf.core.client.platform.model.StrField
import amf.core.client.platform.model.domain.{DomainElement, NamedDomainElement}
import amf.apicontract.client.scala.model.domain.{EndPoint => InternalEndPoint}
import amf.core.client.platform.model.domain.federation.ShapeFederationMetadata
import amf.core.client.platform.model.domain.{DomainElement, Linkable, NamedDomainElement}

import scala.scalajs.js.annotation.{JSExportAll, JSExportTopLevel}

Expand All @@ -16,7 +15,8 @@ import scala.scalajs.js.annotation.{JSExportAll, JSExportTopLevel}
@JSExportAll
case class EndPoint(override private[amf] val _internal: InternalEndPoint)
extends DomainElement
with NamedDomainElement {
with NamedDomainElement
with Linkable {

@JSExportTopLevel("EndPoint")
def this() = this(InternalEndPoint())
Expand Down Expand Up @@ -117,4 +117,6 @@ case class EndPoint(override private[amf] val _internal: InternalEndPoint)
_internal.withBindings(bindings)
this
}

override def linkCopy(): EndPoint = _internal.linkCopy()
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import amf.apicontract.client.platform.model.domain.bindings.ServerBindings
import amf.apicontract.client.platform.model.domain.security.SecurityRequirement
import amf.apicontract.internal.convert.ApiClientConverters.ClientList
import amf.core.client.platform.model.StrField
import amf.core.client.platform.model.domain.DomainElement
import amf.core.client.platform.model.domain.{DomainElement, Linkable}

import scala.scalajs.js.annotation.{JSExportAll, JSExportTopLevel}
import amf.apicontract.client.scala.model.domain.{Server => InternalServer}
Expand All @@ -13,14 +13,15 @@ import amf.apicontract.internal.convert.ApiClientConverters._
/** Server model class.
*/
@JSExportAll
case class Server(override private[amf] val _internal: InternalServer) extends DomainElement {
case class Server(override private[amf] val _internal: InternalServer) extends DomainElement with Linkable {

@JSExportTopLevel("Server")
def this() = this(InternalServer())

def name: StrField = _internal.name
def url: StrField = _internal.url
def description: StrField = _internal.description
def tags: ClientList[Tag] = _internal.tags.asClient
def variables: ClientList[Parameter] = _internal.variables.asClient
def protocol: StrField = _internal.protocol
def protocolVersion: StrField = _internal.protocolVersion
Expand All @@ -39,6 +40,12 @@ case class Server(override private[amf] val _internal: InternalServer) extends D
this
}

/** Set tags property of this Server. */
def withTags(tags:ClientList[Tag]): this.type = {
_internal.withTags(tags.asInternal)
this
}

/** Set host property of this Server. */
def withVariables(variables: ClientList[Parameter]): this.type = {
_internal.withVariables(variables.asInternal)
Expand Down Expand Up @@ -69,4 +76,6 @@ case class Server(override private[amf] val _internal: InternalServer) extends D
* Parameter is required.
*/
def withVariable(name: String): Parameter = _internal.withVariable(name)

override def linkCopy(): Server = _internal.linkCopy()
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import amf.apicontract.client.scala.model.domain.bindings.{
ServerBinding => InternalServerBinding
}
import amf.core.client.platform.model.StrField
import amf.core.client.platform.model.domain.{DomainElement, Linkable}
import amf.core.client.platform.model.domain.{DomainElement, Linkable, Shape}

import scala.scalajs.js.annotation.JSExportAll

Expand Down Expand Up @@ -36,3 +36,8 @@ trait BindingVersion {
def withBindingVersion(bindingVersion: String): this.type

}

trait BindingHeaders {
protected def headers: Shape
def withHeaders(headers: Shape): this.type
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
package amf.apicontract.client.platform.model.domain.bindings.anypointmq

import amf.apicontract.client.platform.model.domain.bindings.{BindingVersion, ChannelBinding}
import amf.core.client.platform.model
import amf.apicontract.client.scala.model.domain.bindings.anypointmq.{
AnypointMQChannelBinding => InternalAnypointMQChannelBinding
}
import amf.core.client.platform.model.StrField
import amf.apicontract.internal.convert.ApiClientConverters._
import scala.scalajs.js.annotation.{JSExportAll, JSExportTopLevel}

@JSExportAll
case class AnypointMQChannelBinding(override private[amf] val _internal: InternalAnypointMQChannelBinding)
extends ChannelBinding
with BindingVersion {
@JSExportTopLevel("AnypointMQChannelBinding")
def this() = this(InternalAnypointMQChannelBinding())

def destination: StrField = _internal.destination

def withDestination(destination: String): this.type = {
_internal.withDestination(destination)
this
}

def destinationType: StrField = _internal.destinationType

def withDestinationType(destinationType: String): this.type = {
_internal.withDestinationType(destinationType)
this
}

override protected def bindingVersion: model.StrField = _internal.bindingVersion

override def withBindingVersion(bindingVersion: String): this.type = {
_internal.withBindingVersion(bindingVersion)
this
}

override def linkCopy(): AnypointMQChannelBinding = _internal.linkCopy()
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
package amf.apicontract.client.platform.model.domain.bindings.anypointmq

import amf.apicontract.client.platform.model.domain.bindings.{BindingHeaders, BindingVersion, MessageBinding}
import amf.apicontract.client.scala.model.domain.bindings.anypointmq.{
AnypointMQMessageBinding => InternalAnypointMQMessageBinding
}
import amf.apicontract.internal.convert.ApiClientConverters._
import amf.core.client.platform.model
import amf.core.client.platform.model.domain.Shape

import scala.scalajs.js.annotation.{JSExportAll, JSExportTopLevel}

@JSExportAll
case class AnypointMQMessageBinding(override private[amf] val _internal: InternalAnypointMQMessageBinding)
extends MessageBinding
with BindingVersion
with BindingHeaders {
@JSExportTopLevel("AnypointMQMessageBinding")
def this() = this(InternalAnypointMQMessageBinding())

override def headers: Shape = _internal.headers

override def withHeaders(headers: Shape): this.type = {
_internal.withHeaders(headers)
this
}

override protected def bindingVersion: model.StrField = _internal.bindingVersion

override def withBindingVersion(bindingVersion: String): this.type = {
_internal.withBindingVersion(bindingVersion)
this
}

override def linkCopy(): AnypointMQMessageBinding = _internal.linkCopy()
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package amf.apicontract.client.platform.model.domain.bindings.http

import amf.apicontract.client.platform.model.domain.bindings.{BindingVersion, MessageBinding}
import amf.apicontract.client.platform.model.domain.bindings.{BindingHeaders, BindingVersion, MessageBinding}
import amf.core.client.platform.model.StrField
import amf.core.client.platform.model.domain.Shape
import amf.apicontract.client.scala.model.domain.bindings.http.{HttpMessageBinding => InternalHttpMessageBinding}
Expand All @@ -11,7 +11,8 @@ import scala.scalajs.js.annotation.{JSExportAll, JSExportTopLevel}
@JSExportAll
case class HttpMessageBinding(override private[amf] val _internal: InternalHttpMessageBinding)
extends MessageBinding
with BindingVersion {
with BindingVersion
with BindingHeaders {

@JSExportTopLevel("HttpMessageBinding")
def this() = this(InternalHttpMessageBinding())
Expand All @@ -21,9 +22,9 @@ case class HttpMessageBinding(override private[amf] val _internal: InternalHttpM
this
}

def headers: Shape = _internal.headers
override def headers: Shape = _internal.headers

def withHeaders(headers: Shape): this.type = {
override def withHeaders(headers: Shape): this.type = {
_internal.withHeaders(headers)
this
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
package amf.apicontract.client.platform.model.domain.bindings.ibmmq

import amf.apicontract.client.platform.model.domain.bindings.{BindingVersion, ChannelBinding}
import amf.apicontract.client.scala.model.domain.bindings.ibmmq.{
IBMMQChannelTopic => InternalIBMMQChannelTopic,
IBMMQChannelBinding => InternalIBMMQChannelBinding,
IBMMQChannelQueue => InternalIBMMQChannelQueue
}
import amf.apicontract.internal.convert.ApiClientConverters._
import amf.core.client.platform.model
import amf.core.client.platform.model.domain.{DomainElement, NamedDomainElement}
import amf.core.client.platform.model.{BoolField, IntField, StrField}

import scala.scalajs.js.annotation.{JSExportAll, JSExportTopLevel}

@JSExportAll
case class IBMMQChannelBinding(override private[amf] val _internal: InternalIBMMQChannelBinding)
extends ChannelBinding
with BindingVersion {
@JSExportTopLevel("IBMMQChannelBinding")
def this() = this(InternalIBMMQChannelBinding())

def destinationType: StrField = _internal.destinationType
def queue: IBMMQChannelQueue = _internal.queue
def topic: IBMMQChannelTopic = _internal.topic
def maxMsgLength: IntField = _internal.maxMsgLength

def withDestinationType(destinationType: String): this.type = {
_internal.withDestinationType(destinationType)
this
}

def withQueue(queue: IBMMQChannelQueue): this.type = {
_internal.withQueue(queue)
this
}

def withTopic(topic: IBMMQChannelTopic): this.type = {
_internal.withTopic(topic)
this
}

def withMaxMsgLength(maxMsgLength: Int): this.type = {
_internal.withMaxMsgLength(maxMsgLength)
this
}

override protected def bindingVersion: model.StrField = _internal.bindingVersion

override def withBindingVersion(bindingVersion: String): this.type = {
_internal.withBindingVersion(bindingVersion)
this
}

override def linkCopy(): IBMMQChannelBinding = _internal.linkCopy()
}

@JSExportAll
case class IBMMQChannelQueue(override private[amf] val _internal: InternalIBMMQChannelQueue)
extends DomainElement
with NamedDomainElement {

@JSExportTopLevel("IBMMQChannelQueue")
def this() = this(InternalIBMMQChannelQueue())

def objectName: StrField = _internal.objectName
def isPartitioned: BoolField = _internal.isPartitioned
def exclusive: BoolField = _internal.exclusive

def withObjectName(objectName: Boolean): this.type = {
_internal.withObjectName(objectName)
this
}

def withIsPartitioned(isPartitioned: Boolean): this.type = {
_internal.withIsPartitioned(isPartitioned)
this
}

def withExclusive(exclusive: Boolean): this.type = {
_internal.withExclusive(exclusive)
this
}

override def name: StrField = _internal.name

override def withName(name: String): this.type = {
_internal.withName(name)
this
}
}

@JSExportAll
case class IBMMQChannelTopic(override private[amf] val _internal: InternalIBMMQChannelTopic)
extends DomainElement
with NamedDomainElement {

@JSExportTopLevel("IBMMQChannelTopic")
def this() = this(InternalIBMMQChannelTopic())

def string: BoolField = _internal.string
def objectName: StrField = _internal.objectName
def durablePermitted: BoolField = _internal.durablePermitted
def lastMsgRetained: BoolField = _internal.lastMsgRetained

def withString(string: Boolean): this.type = {
_internal.withString(string)
this
}

def withObjectName(objectName: Boolean): this.type = {
_internal.withObjectName(objectName)
this
}

def withDurablePermitted(durablePermitted: Boolean): this.type = {
_internal.withDurablePermitted(durablePermitted)
this
}

def withLastMsgRetained(lastMsgRetained: Boolean): this.type = {
_internal.withLastMsgRetained(lastMsgRetained)
this
}

override def name: StrField = _internal.name

override def withName(name: String): this.type = {
_internal.withName(name)
this
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
package amf.apicontract.client.platform.model.domain.bindings.ibmmq

import amf.apicontract.client.platform.model.domain.bindings.{BindingVersion, MessageBinding}
import amf.apicontract.client.scala.model.domain.bindings.ibmmq.{IBMMQMessageBinding => InternalIBMMQMessageBinding}
import amf.apicontract.internal.convert.ApiClientConverters._
import amf.core.client.platform.model
import amf.core.client.platform.model.{IntField, StrField}

import scala.scalajs.js.annotation.{JSExportAll, JSExportTopLevel}

@JSExportAll
case class IBMMQMessageBinding(override private[amf] val _internal: InternalIBMMQMessageBinding)
extends MessageBinding
with BindingVersion {
@JSExportTopLevel("IBMMQMessageBinding")
def this() = this(InternalIBMMQMessageBinding())

def messageType: StrField = _internal.messageType
def headers: ClientList[StrField] = _internal.headers.asClient
def description: StrField = _internal.description
def expiry: IntField = _internal.expiry

def withType(messageType: String): this.type = {
_internal.withMessageType(messageType)
this
}

def withHeaders(headers: String): this.type = {
_internal.withHeaders(headers)
this
}

def withDescription(description: String): this.type = {
_internal.withDescription(description)
this
}

def withExpiry(expiry: Int): this.type = {
_internal.withExpiry(expiry)
this
}

override protected def bindingVersion: model.StrField = _internal.bindingVersion

override def withBindingVersion(bindingVersion: String): this.type = {
_internal.withBindingVersion(bindingVersion)
this
}

override def linkCopy(): IBMMQMessageBinding = _internal.linkCopy()
}
Loading

0 comments on commit 073d8a1

Please sign in to comment.