2018-12-05 15:29:22 -05:00
|
|
|
/*
|
|
|
|
* Copyright 2018 Comcast Cable Communications Management, LLC
|
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*/
|
|
|
|
|
|
|
|
package models
|
|
|
|
import play.api.Configuration
|
|
|
|
|
2019-06-03 17:21:41 -04:00
|
|
|
case class Meta(
|
|
|
|
version: String,
|
|
|
|
sharedDisplayEnabled: Boolean,
|
|
|
|
batchChangeLimit: Int,
|
2019-08-02 17:02:18 -04:00
|
|
|
defaultTtl: Long,
|
|
|
|
manualBatchChangeReviewEnabled: Boolean,
|
2019-10-10 21:22:29 -04:00
|
|
|
scheduledBatchChangesEnabled: Boolean,
|
|
|
|
multiRecordBatchChangeEnabled: Boolean)
|
2018-12-05 15:29:22 -05:00
|
|
|
object Meta {
|
|
|
|
def apply(config: Configuration): Meta =
|
2019-01-22 11:40:57 -05:00
|
|
|
Meta(
|
|
|
|
config.getOptional[String]("vinyldns.version").getOrElse("unknown"),
|
2019-02-20 16:25:30 -05:00
|
|
|
config.getOptional[Boolean]("shared-display-enabled").getOrElse(false),
|
2019-06-03 17:21:41 -04:00
|
|
|
config.getOptional[Int]("batch-change-limit").getOrElse(1000),
|
2019-08-02 17:02:18 -04:00
|
|
|
config.getOptional[Long]("default-ttl").getOrElse(7200L),
|
|
|
|
config.getOptional[Boolean]("manual-batch-review-enabled").getOrElse(false),
|
2019-10-10 21:22:29 -04:00
|
|
|
config.getOptional[Boolean]("scheduled-changes-enabled").getOrElse(false),
|
|
|
|
config.getOptional[Boolean]("multi-record-batch-change-enabled").getOrElse(false)
|
2019-02-20 16:25:30 -05:00
|
|
|
)
|
2018-12-05 15:29:22 -05:00
|
|
|
}
|