<commit_before># -*- coding:utf-8 -*-
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You 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.

from networkapiclient.Ambiente import Ambiente
from networkapiclient.AmbienteLogico import AmbienteLogico
from networkapiclient.ApiEnvironmentVip import ApiEnvironmentVip
from networkapiclient.ApiEnvironment import ApiEnvironment
from networkapiclient.ApiEquipment import ApiEquipment
from networkapiclient.ApiInterface import ApiInterfaceRequest
from networkapiclient.ApiNetworkIPv4 import ApiNetworkIPv4
from networkapiclient.ApiNetworkIPv6 import ApiNetworkIPv6
# from networkapiclient.ApiOptionPool import ApiOptionPool
from networkapiclient.ApiOptionVip import ApiOptionVip
from networkapiclient.ApiPool import ApiPool
from networkapiclient.ApiRack import ApiRack
from networkapiclient.ApiVipRequest import ApiVipRequest
from networkapiclient.ApiVlan import ApiVlan
from networkapiclient.BlockRule import BlockRule
from networkapiclient.DireitoGrupoEquipamento import DireitoGrupoEquipamento
from networkapiclient.DivisaoDc import DivisaoDc
from networkapiclient.EnvironmentVIP import EnvironmentVIP
from networkapiclient.Equipamento import Equipamento
from networkapiclient.EquipamentoAcesso import EquipamentoAcesso
from networkapiclient.EquipamentoAmbiente import EquipamentoAmbiente
from networkapiclient.EquipamentoRoteiro import EquipamentoRoteiro
from networkapiclient.EventLog import EventLog
from networkapiclient.Filter import Filter
from networkapiclient.GrupoEquipamento import GrupoEquipamento
from networkapiclient.GrupoL3 import GrupoL3
from networkapiclient.GrupoUsuario import GrupoUsuario
from networkapiclient.GrupoVirtual import GrupoVirtual
from networkapiclient.Healthcheck import Healthcheck
from networkapiclient.Interface import Interface
from networkapiclient.Ip import Ip
from networkapiclient.Marca import Marca
from networkapiclient.Modelo import Modelo
from networkapiclient.Network import DHCPRelayIPv4, DHCPRelayIPv6, Network
from networkapiclient.OptionPool import OptionPool
from networkapiclient.OptionVIP import OptionVIP
from networkapiclient.PermissaoAdministrativa import PermissaoAdministrativa
from networkapiclient.Permission import Permission
from networkapiclient.Pool import Pool
from networkapiclient.Rack import Rack
from networkapiclient.RackServers import RackServers
from networkapiclient.Roteiro import Roteiro
from networkapiclient.System import System
from networkapiclient.TipoAcesso import TipoAcesso
from networkapiclient.TipoEquipamento import TipoEquipamento
from networkapiclient.TipoRede import TipoRede
from networkapiclient.TipoRoteiro import TipoRoteiro
from networkapiclient.Usuario import Usuario
from networkapiclient.UsuarioGrupo import UsuarioGrupo
from networkapiclient.Vip import Vip
from networkapiclient.Vlan import Vlan


class ClientFactory(object):

    """Factory to create entities for NetworkAPI-Client."""

    def __init__(self, networkapi_url, user, password, user_ldap=None):
        """Class constructor receives parameters to connect to the networkAPI.
        :param networkapi_url: URL to access the network API.
        :param user: User for authentication.
        :param password: Password for authentication.
        """
        self.networkapi_url = networkapi_url
        self.user = user
        self.password = password
        self.user_ldap = user_ldap

    def create_ambiente(self):
        """Get an instance of ambiente services facade."""
        return Ambiente(
            self.networkapi_url,
            self.user,
            self.password,
            self.user_ldap)

    def create_ambiente_logico(self):
        """Get an instance of ambiente_logico services facade."""
        return AmbienteLogico(
            self.networkapi_url,
            self.user,
            self.password,
            self.user_ldap)

    def create_api_environment_vip(self):
        """Get an instance of Api Environment Vip services facade."""
        return ApiEnvironmentVip(
            self.networkapi_url,
            self.user,
            self.password,
            self.user_ldap)

    def create_api_environment(self):
        """Get an instance of Api Environment services facade."""
        return ApiEnvironment(
            self.networkapi_url,
            self.user,
            self.password,
            self.user_ldap)

    def create_api_equipment(self):
        """Get an instance of Api Equipment services facade."""
        return ApiEquipment(
            self.networkapi_url,
            self.user,
            self.password,
            self.user_ldap)

    def create_api_interface_request(self):
        """Get an instance of Api Vip Requests services facade."""

        return ApiInterfaceRequest(
            self.networkapi_url,
            self.user,
            self.password,
            self.user_ldap)

    def create_api_network_ipv4(self):
        """Get an instance of Api Networkv4 services facade."""

        return ApiNetworkIPv4(
            self.networkapi_url,
            self.user,
            self.password,
            self.user_ldap)

    def create_api_network_ipv6(self):
        """Get an instance of Api Networkv6 services facade."""

        return ApiNetworkIPv6(
            self.networkapi_url,
            self.user,
            self.password,
            self.user_ldap)

    def create_api_option_vip(self):
        """Get an instance of Api Option Vip services facade."""
        return ApiOptionVip(
            self.networkapi_url,
            self.user,
            self.password,
            self.user_ldap)

    def create_api_pool(self):
        """Get an instance of Api Pool services facade."""
        return ApiPool(
            self.networkapi_url,
            self.user,
            self.password,
            self.user_ldap)

    def create_apirack(self):
        """Get an instance of Api Rack Variables services facade."""
        return ApiRack(
            self.networkapi_url,
            self.user,
            self.password,
            self.user_ldap)

    def create_api_vip_request(self):
        """Get an instance of Api Vip Requests services facade."""

        return ApiVipRequest(
            self.networkapi_url,
            self.user,
            self.password,
            self.user_ldap)

    def create_api_vlan(self):
        """Get an instance of Api Vlan services facade."""
        return ApiVlan(
            self.networkapi_url,
            self.user,
            self.password,
            self.user_ldap)

    def create_rule(self):
        """Get an instance of block rule services facade."""
        return BlockRule(
            self.networkapi_url,
            self.user,
            self.password,
            self.user_ldap)

    def create_direito_grupo_equipamento(self):
        """Get an instance of direito_grupo_equipamento services facade."""
        return DireitoGrupoEquipamento(
            self.networkapi_url,<commit_msg>Adding ApiVrf callings to ClientFactory<commit_after># -*- coding:utf-8 -*-
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You 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.

from networkapiclient.Ambiente import Ambiente
from networkapiclient.AmbienteLogico import AmbienteLogico
from networkapiclient.ApiEnvironmentVip import ApiEnvironmentVip
from networkapiclient.ApiEnvironment import ApiEnvironment
from networkapiclient.ApiEquipment import ApiEquipment
from networkapiclient.ApiInterface import ApiInterfaceRequest
from networkapiclient.ApiNetworkIPv4 import ApiNetworkIPv4
from networkapiclient.ApiNetworkIPv6 import ApiNetworkIPv6
# from networkapiclient.ApiOptionPool import ApiOptionPool
from networkapiclient.ApiOptionVip import ApiOptionVip
from networkapiclient.ApiPool import ApiPool
from networkapiclient.ApiRack import ApiRack
from networkapiclient.ApiVipRequest import ApiVipRequest
from networkapiclient.ApiVlan import ApiVlan
from networkapiclient.ApiVrf import ApiVrf

from networkapiclient.BlockRule import BlockRule
from networkapiclient.DireitoGrupoEquipamento import DireitoGrupoEquipamento
from networkapiclient.DivisaoDc import DivisaoDc
from networkapiclient.EnvironmentVIP import EnvironmentVIP
from networkapiclient.Equipamento import Equipamento
from networkapiclient.EquipamentoAcesso import EquipamentoAcesso
from networkapiclient.EquipamentoAmbiente import EquipamentoAmbiente
from networkapiclient.EquipamentoRoteiro import EquipamentoRoteiro
from networkapiclient.EventLog import EventLog
from networkapiclient.Filter import Filter
from networkapiclient.GrupoEquipamento import GrupoEquipamento
from networkapiclient.GrupoL3 import GrupoL3
from networkapiclient.GrupoUsuario import GrupoUsuario
from networkapiclient.GrupoVirtual import GrupoVirtual
from networkapiclient.Healthcheck import Healthcheck
from networkapiclient.Interface import Interface
from networkapiclient.Ip import Ip
from networkapiclient.Marca import Marca
from networkapiclient.Modelo import Modelo
from networkapiclient.Network import DHCPRelayIPv4, DHCPRelayIPv6, Network
from networkapiclient.OptionPool import OptionPool
from networkapiclient.OptionVIP import OptionVIP
from networkapiclient.PermissaoAdministrativa import PermissaoAdministrativa
from networkapiclient.Permission import Permission
from networkapiclient.Pool import Pool
from networkapiclient.Rack import Rack
from networkapiclient.RackServers import RackServers
from networkapiclient.Roteiro import Roteiro
from networkapiclient.System import System
from networkapiclient.TipoAcesso import TipoAcesso
from networkapiclient.TipoEquipamento import TipoEquipamento
from networkapiclient.TipoRede import TipoRede
from networkapiclient.TipoRoteiro import TipoRoteiro
from networkapiclient.Usuario import Usuario
from networkapiclient.UsuarioGrupo import UsuarioGrupo
from networkapiclient.Vip import Vip
from networkapiclient.Vlan import Vlan


class ClientFactory(object):

    """Factory to create entities for NetworkAPI-Client."""

    def __init__(self, networkapi_url, user, password, user_ldap=None):
        """Class constructor receives parameters to connect to the networkAPI.
        :param networkapi_url: URL to access the network API.
        :param user: User for authentication.
        :param password: Password for authentication.
        """
        self.networkapi_url = networkapi_url
        self.user = user
        self.password = password
        self.user_ldap = user_ldap

    def create_ambiente(self):
        """Get an instance of ambiente services facade."""
        return Ambiente(
            self.networkapi_url,
            self.user,
            self.password,
            self.user_ldap)

    def create_ambiente_logico(self):
        """Get an instance of ambiente_logico services facade."""
        return AmbienteLogico(
            self.networkapi_url,
            self.user,
            self.password,
            self.user_ldap)

    def create_api_environment_vip(self):
        """Get an instance of Api Environment Vip services facade."""
        return ApiEnvironmentVip(
            self.networkapi_url,
            self.user,
            self.password,
            self.user_ldap)

    def create_api_environment(self):
        """Get an instance of Api Environment services facade."""
        return ApiEnvironment(
            self.networkapi_url,
            self.user,
            self.password,
            self.user_ldap)

    def create_api_equipment(self):
        """Get an instance of Api Equipment services facade."""
        return ApiEquipment(
            self.networkapi_url,
            self.user,
            self.password,
            self.user_ldap)

    def create_api_interface_request(self):
        """Get an instance of Api Vip Requests services facade."""

        return ApiInterfaceRequest(
            self.networkapi_url,
            self.user,
            self.password,
            self.user_ldap)

    def create_api_network_ipv4(self):
        """Get an instance of Api Networkv4 services facade."""

        return ApiNetworkIPv4(
            self.networkapi_url,
            self.user,
            self.password,
            self.user_ldap)

    def create_api_network_ipv6(self):
        """Get an instance of Api Networkv6 services facade."""

        return ApiNetworkIPv6(
            self.networkapi_url,
            self.user,
            self.password,
            self.user_ldap)

    def create_api_option_vip(self):
        """Get an instance of Api Option Vip services facade."""
        return ApiOptionVip(
            self.networkapi_url,
            self.user,
            self.password,
            self.user_ldap)

    def create_api_pool(self):
        """Get an instance of Api Pool services facade."""
        return ApiPool(
            self.networkapi_url,
            self.user,
            self.password,
            self.user_ldap)

    def create_apirack(self):
        """Get an instance of Api Rack Variables services facade."""
        return ApiRack(
            self.networkapi_url,
            self.user,
            self.password,
            self.user_ldap)

    def create_api_vip_request(self):
        """Get an instance of Api Vip Requests services facade."""

        return ApiVipRequest(
            self.networkapi_url,
            self.user,
            self.password,
            self.user_ldap)

    def create_api_vlan(self):
        """Get an instance of Api Vlan services facade."""
        return ApiVlan(
            self.networkapi_url,
            self.user,
            self.password,
            self.user_ldap)

    def create_api_vrf(self):
        """Get an instance of Api Vrf services facade."""
        return ApiVrf(
            self.networkapi_url,
            self.user,
            self.password,
            self.user_ldap)

    def create_rule(self):
        """Get an instance of block rule services facade."""
        return BlockRule(
            self.networkapi_url,
            self.user,
            self.password,
            self.user_ldap)

    def create_direito_grupo_equipamento(self):
        """Get an instance of direito_grupo_equipamento services facade."""
        return DireitoGrupoEquipamento(
            self.networkapi_url,
{'fraction_non_alphanumeric': 0.0563560678834454, 'fraction_numerical': 0.0024335574767851424, 'mean_word_length': 3.05505063619839, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6324122', 'n_tokens_mistral': 4263, 'n_tokens_neox': 4365, 'n_words': 1239}