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 RecordingOptions extends JsonableBaseObject {
022        private Boolean autoRecord, recordOnlyOwner;
023
024        protected RecordingOptions() {
025        }
026
027        RecordingOptions(Builder builder) {
028                autoRecord = builder.autoRecord;
029                recordOnlyOwner = builder.recordOnlyOwner;
030        }
031
032        /**
033         * Automatically record all sessions in this room. Recording cannot be stopped when this is set to true.
034         *
035         * @return Whether all sessions are automatically recorded, or {@code null} if unknown.
036         */
037        @JsonProperty("auto_record")
038        public Boolean getAutoRecord() {
039                return autoRecord;
040        }
041
042        /**
043         * Record only the owner screen or any share screen of the video.
044         *
045         * @return Whether only the owner screen is recorded, or {@code null} if unknown.
046         */
047        @JsonProperty("record_only_owner")
048        public Boolean getRecordOnlyOwner() {
049                return recordOnlyOwner;
050        }
051        
052        /**
053         * Entry point for constructing an instance of this class.
054         * 
055         * @return A new Builder.
056         */
057        public static Builder builder() {
058                return new Builder();
059        }
060        
061        public static class Builder {
062                private Boolean autoRecord, recordOnlyOwner;
063        
064                Builder() {}
065        
066                /**
067                 *
068                 * @param autoRecord Automatically record all sessions in this room. Recording cannot be stopped when this is set to true.
069                 *
070                 * @return This builder.
071                 */
072                public Builder autoRecord(boolean autoRecord) {
073                        this.autoRecord = autoRecord;
074                        return this;
075                }
076
077                /**
078                 *
079                 * @param recordOnlyOwner Record only the owner screen or any share screen of the video.
080                 *
081                 * @return This builder.
082                 */
083                public Builder recordOnlyOwner(boolean recordOnlyOwner) {
084                        this.recordOnlyOwner = recordOnlyOwner;
085                        return this;
086                }
087
088        
089                /**
090                 * Builds the {@linkplain RecordingOptions}.
091                 *
092                 * @return An instance of RecordingOptions, populated with all fields from this builder.
093                 */
094                public RecordingOptions build() {
095                        return new RecordingOptions(this);
096                }
097        }
098}