001/* 002 * Copyright 2024 Vonage 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package com.vonage.client.application.capabilities; 017 018import com.vonage.client.common.Webhook; 019 020/** 021 * Messages capability configuration settings. 022 */ 023public final class Messages extends Capability { 024 025 private Messages() { 026 } 027 028 private Messages(Builder builder) { 029 super(builder); 030 } 031 032 @Override 033 public Type getType() { 034 return Type.MESSAGES; 035 } 036 037 /** 038 * Entry point for constructing an instance of this class. 039 * 040 * @return A new Builder. 041 */ 042 public static Builder builder() { 043 return new Builder(); 044 } 045 046 public static class Builder extends Capability.Builder<Messages, Builder> { 047 048 @Override 049 public Builder addWebhook(Webhook.Type type, Webhook webhook) { 050 return super.addWebhook(type, webhook); 051 } 052 053 @Override 054 public Builder removeWebhook(Webhook.Type type) { 055 return super.removeWebhook(type); 056 } 057 058 /** 059 * Builds the Messages object. 060 * 061 * @return A new Messages capability containing the configured properties. 062 */ 063 @Override 064 public Messages build() { 065 return new Messages(this); 066 } 067 } 068}