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.meetings; 017 018import com.fasterxml.jackson.annotation.JsonProperty; 019import com.vonage.client.JsonableBaseObject; 020 021public class InitialJoinOptions extends JsonableBaseObject { 022 private MicrophoneState microphoneState; 023 024 protected InitialJoinOptions() { 025 } 026 027 InitialJoinOptions(Builder builder) { 028 microphoneState = builder.microphoneState; 029 } 030 031 /** 032 * The default microphone option for users in the pre-join screen of this room. 033 * 034 * @return The microphone state, as an enum 035 */ 036 @JsonProperty("microphone_state") 037 public MicrophoneState getMicrophoneState() { 038 return microphoneState; 039 } 040 041 /** 042 * Entry point for constructing an instance of this class. 043 * 044 * @return A new Builder. 045 */ 046 public static Builder builder() { 047 return new Builder(); 048 } 049 050 public static class Builder { 051 private MicrophoneState microphoneState; 052 053 Builder() {} 054 055 /** 056 * 057 * @param microphoneState Set the default microphone option for users in the pre-join screen of this room. 058 * 059 * @return This builder. 060 */ 061 public Builder microphoneState(MicrophoneState microphoneState) { 062 this.microphoneState = microphoneState; 063 return this; 064 } 065 066 067 /** 068 * Builds the {@linkplain InitialJoinOptions}. 069 * 070 * @return An instance of InitialJoinOptions, populated with all fields from this builder. 071 */ 072 public InitialJoinOptions build() { 073 return new InitialJoinOptions(this); 074 } 075 } 076}