/** * Generated by API Builder - https://www.apibuilder.io * Service version: 0.0.1-dev * User agent: apibuilder app.apibuilder.io/teambytes/hipchat-sns-bridge/0.0.1-dev/http4s_0_15 */ package com.teambytes.hipchat.sns.bridge.v0.models { /** * A request semantic failure reason. */ final case class Error( description: String ) /** * @param scopes An array of scopes that are required to consume the HipChat API. * @param fromName The name that messages should be from when sent from the integration itself. */ final case class HipchatApiConsumer( scopes: Seq[com.teambytes.hipchat.sns.bridge.v0.models.HipchatScope], fromName: _root_.scala.Option[String] = None ) /** * @param configurable Most integrations will need to be configured in order to work correctly. For * this purpose, an integration can expose a 'configurable' capability that * provides an HTML page to be included as a panel in the configuration dialog. * @param hipchatApiConsumer The ability to consume the HipChat API. * @param installable The capability of receiving a synchronous installation callback during * integration installation. * @param oauth2Provider The capability of providing and accepting OAuth 2 tokens for authentication. */ final case class HipchatCapabilities( configurable: _root_.scala.Option[com.teambytes.hipchat.sns.bridge.v0.models.HipchatConfigurationPage] = None, hipchatApiConsumer: _root_.scala.Option[com.teambytes.hipchat.sns.bridge.v0.models.HipchatApiConsumer] = None, installable: _root_.scala.Option[com.teambytes.hipchat.sns.bridge.v0.models.HipchatInstallable] = None, oauth2Provider: _root_.scala.Option[com.teambytes.hipchat.sns.bridge.v0.models.HipchatOauth2Provider] = None ) /** * @param name The display name of this application. * @param description A short description of this application. * @param key The marketplace integration key that uniquely identifies the application, if * registered. * @param apiVersion The HipChat Connect API version used by this integration. Defaults to 1:1. * @param capabilities The set of capabilities this application supports. * @param links URLs to retrieve this and related integration information. * @param vendor The vendor that maintains this application. */ final case class HipchatCapabilitiesDescriptor( name: String, description: String, key: String, apiVersion: _root_.scala.Option[String] = None, capabilities: _root_.scala.Option[com.teambytes.hipchat.sns.bridge.v0.models.HipchatCapabilities] = None, links: com.teambytes.hipchat.sns.bridge.v0.models.HipchatLinks, vendor: _root_.scala.Option[com.teambytes.hipchat.sns.bridge.v0.models.HipchatVendor] = None ) /** * @param allowAccessToRoomAdmins If the add-on is installed globally, this property can allow the configuration * page to be accessed in the room administration pages making it possible to have * room specific configuration for the global add-on. This is only valid for * globally installed add-ons. * @param url The URL to embed into a configure dialog via an iframe. */ final case class HipchatConfigurationPage( allowAccessToRoomAdmins: _root_.scala.Option[String] = None, url: String ) final case class HipchatInstallData( capabilitiesUrl: String, oauthId: String, oauthSecret: String, groupId: Long, roomId: _root_.scala.Option[String] = None ) /** * @param callbackUrl The URL to receive a confirmation of an integration installation. * @param installedUrl The URL HipChat will redirect to post-installation. * @param allowGlobal Whether the integration can be installed globally or not. * @param allowRoom Whether the integration can be installed in a room or not. */ final case class HipchatInstallable( callbackUrl: _root_.scala.Option[String] = None, installedUrl: _root_.scala.Option[String] = None, allowGlobal: _root_.scala.Option[Boolean] = None, allowRoom: _root_.scala.Option[Boolean] = None ) /** * @param homepage The URL to human-viewable home page of this integration. * @param api The URL to the REST API root. * @param self The URL to this descriptor. */ final case class HipchatLinks( homepage: _root_.scala.Option[String] = None, api: _root_.scala.Option[String] = None, self: String ) /** * @param tokenUrl The OAuth 2 token endpoint for retrieving an access token. * @param authorizationUrl The OAuth 2 endpoint to direct browsers to in order to receive an authorization * code that can be later exchanged using the token URL for an access token. */ final case class HipchatOauth2Provider( tokenUrl: _root_.scala.Option[String] = None, authorizationUrl: _root_.scala.Option[String] = None ) /** * @param name The vendor display name. * @param url The vendor's home page URL. */ final case class HipchatVendor( name: String, url: String ) /** * @param name Name of this service. * @param version Version of this service. * @param scalaVersion Version of Scala this service is using. * @param sbtVersion Version of SBT used to build this service. * @param buildTime Time the service was built at. */ final case class ServiceInfo( name: String, version: String, scalaVersion: String, sbtVersion: String, buildTime: _root_.java.time.Instant ) /** * @param `type` The type of message. For a unsubscribe confirmation, the type is * UnsubscribeConfirmation. * @param messageId A Universally Unique Identifier, unique for each message published. For a * message that Amazon SNS resends during a retry, the message ID of the original * message is used. * @param topicArn The Amazon Resource Name (ARN) for the topic that this endpoint has been * unsubscribed from. * @param message A string that describes the message. * @param timestamp The time (GMT) when the unsubscribe confirmation was sent. * @param signatureVersion Version of the Amazon SNS signature used. * @param signature Base64-encoded 'SHA1withRSA' signature of the Message, MessageId, Type, * Timestamp, and TopicArn values. * @param signingCertURL The URL to the certificate that was used to sign the message. * @param token A value you can use with the ConfirmSubscription action to re-confirm the * subscription. Alternatively, you can simply visit the SubscribeURL. * @param subject The Subject parameter specified when the notification was published to the * topic. Note that this is an optional parameter. If no Subject was specified, * then this name/value pair does not appear in this JSON document. * @param subscribeURL The URL that you must visit in order to re-confirm the subscription. * Alternatively, you can instead use the Token with the ConfirmSubscription action * to re-confirm the subscription. * @param unsubscribeURL A URL that you can use to unsubscribe the endpoint from this topic. If you visit * this URL, Amazon SNS unsubscribes the endpoint and stops sending notifications * to this endpoint. */ final case class SnsNotification( `type`: String, messageId: String, topicArn: String, message: String, timestamp: String, signatureVersion: String, signature: String, signingCertURL: String, token: _root_.scala.Option[String] = None, subject: _root_.scala.Option[String] = None, subscribeURL: _root_.scala.Option[String] = None, unsubscribeURL: _root_.scala.Option[String] = None ) /** * Your add-on must declare the scopes it requires based on which API endpoints it * needs to use, via its descriptor. */ sealed trait HipchatScope extends _root_.scala.Product with _root_.scala.Serializable object HipchatScope { case object SendMessage extends HipchatScope { override def toString = "send_message" } case object SendNotification extends HipchatScope { override def toString = "send_notification" } /** * UNDEFINED captures values that are sent either in error or * that were added by the server after this library was * generated. We want to make it easy and obvious to users of * this library to handle this case gracefully. * * We use all CAPS for the variable name to avoid collisions * with the camel cased values above. */ final case class UNDEFINED(override val toString: String) extends HipchatScope /** * all returns a list of all the valid, known values. We use * lower case to avoid collisions with the camel cased values * above. */ val all: scala.List[HipchatScope] = scala.List(SendMessage, SendNotification) private val byName: Map[String, HipchatScope] = all.map(x => x.toString.toLowerCase -> x).toMap def apply(value: String): HipchatScope = fromString(value).getOrElse(UNDEFINED(value)) def fromString(value: String): _root_.scala.Option[HipchatScope] = byName.get(value.toLowerCase) } }