@NotNull
    @ObjectiveCName("build")
    public Configuration build() {
        if (endpoints.size() == 0) {
            throw new RuntimeException("Endpoints not set");
        }
        if (phoneBookProvider == null) {
            throw new RuntimeException("Phonebook Provider not set");
        }
        if (apiConfiguration == null) {
            throw new RuntimeException("Api Configuration not set");
        }
        if (deviceCategory == null) {
            throw new RuntimeException("Device Category not set");
        }
        if (platformType == null) {
            throw new RuntimeException("App Category not set");
        }
        if (trustedKeys.size() == 0) {
            Log.w("ConfigurationBuilder", "No Trusted keys set. Using anonymous server authentication.");
        }
        return new Configuration(endpoints.toArray(new ConnectionEndpoint[endpoints.size()]),
                phoneBookProvider, notificationProvider,
                apiConfiguration, enableContactsLogging, enableNetworkLogging,
                enableFilesLogging, deviceCategory, platformType,
                minDelay, maxDelay, maxFailureCount,
                timeZone, preferredLanguages.toArray(new String[preferredLanguages.size()]),
                customAppName,
                trustedKeys.toArray(new TrustedKey[trustedKeys.size()]),
                isPhoneBookImportEnabled,
                isOnClientPrivacyEnabled,
                callsProvider,
                rawUpdatesHandler,
                voiceCallsEnabled,
                videoCallsEnabled,
                isEnabledGroupedChatList,
                autoJoinGroups.toArray(new String[autoJoinGroups.size()]),
                autoJoinType);
    }
@ NotNull @ ObjectiveCName ( "build" ) public Configuration build ( ) { if ( endpoints . size ( ) == 0 ) { throw new RuntimeException ( "Endpoints not set" ) ; } if ( phoneBookProvider == null ) { throw new RuntimeException ( "Phonebook Provider not set" ) ; } if ( apiConfiguration == null ) { throw new RuntimeException ( "Api Configuration not set" ) ; } if ( deviceCategory == null ) { throw new RuntimeException ( "Device Category not set" ) ; } if ( platformType == null ) { throw new RuntimeException ( "App Category not set" ) ; } if ( trustedKeys . size ( ) == 0 ) { Log . w ( "ConfigurationBuilder" , "No Trusted keys set. Using anonymous server authentication." ) ; } return new Configuration ( endpoints . toArray ( new ConnectionEndpoint [ endpoints . size ( ) ] ) , phoneBookProvider , notificationProvider , apiConfiguration , enableContactsLogging , enableNetworkLogging , enableFilesLogging , deviceCategory , platformType , minDelay , maxDelay , maxFailureCount , timeZone , preferredLanguages . toArray ( new String [ preferredLanguages . size ( ) ] ) , customAppName , trustedKeys . toArray ( new TrustedKey [ trustedKeys . size ( ) ] ) , isPhoneBookImportEnabled , isOnClientPrivacyEnabled , callsProvider , rawUpdatesHandler , voiceCallsEnabled , videoCallsEnabled , isEnabledGroupedChatList , autoJoinGroups . toArray ( new String [ autoJoinGroups . size ( ) ] ) , autoJoinType ) ; }
Build configuration

@return result configuration