text: # MIT LICENSE
  #
  # Copyright 1997 - 2020 by IXIA Keysight
  #
  # Permission is hereby granted, free of charge, to any person obtaining a copy
  # of this software and associated documentation files (the "Software"),
  # to deal in the Software without restriction, including without limitation
  # the rights to use, copy, modify, merge, publish, distribute, sublicense,
  # and/or sell copies of the Software, and to permit persons to whom the
  # Software is furnished to do so, subject to the following conditions:
  #
  # The above copyright notice and this permission notice shall be included in
  # all copies or substantial portions of the Software.
  #
  # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  # THE SOFTWARE. 
  from ixnetwork_restpy.base import Base
  from ixnetwork_restpy.files import Files
  
  
  class DhcpRateCpf(Base):
      """
      The DhcpRateCpf class encapsulates a list of dhcpRateCpf resources that are managed by the user.
      A list of resources can be retrieved from the server using the DhcpRateCpf.find() method.
      The list can be managed by using the DhcpRateCpf.add() and DhcpRateCpf.remove() methods.
      """
  
      __slots__ = ()
      _SDM_NAME = 'dhcpRateCpf'
      _SDM_ATT_MAP = {
          'ForceApplyQTConfig': 'forceApplyQTConfig',
          'InputParameters': 'inputParameters',
          'Mode': 'mode',
          'Name': 'name',
      }
  
      def __init__(self, parent):
          super(DhcpRateCpf, self).__init__(parent)
  
      @property
      def Results(self):
          """
          Returns
          -------
          - obj(ixnetwork_restpy.testplatform.sessions.ixnetwork.quicktest.results_23583c0cce1dabf7b75fe7d2ae18cfc4.Results): An instance of the Results class
  
          Raises
          ------
          - ServerError: The server has encountered an uncategorized error condition
          """
          from ixnetwork_restpy.testplatform.sessions.ixnetwork.quicktest.results_23583c0cce1dabf7b75fe7d2ae18cfc4 import Results
          return Results(self)._select()
  
      @property
      def TestConfig(self):
          """
          Returns
          -------
          - obj(ixnetwork_restpy.testplatform.sessions.ixnetwork.quicktest.testconfig_8190de730bfe601e4f1a0157fb815f8e.TestConfig): An instance of the TestConfig class
  
          Raises
          ------
          - ServerError: The server has encountered an uncategorized error condition
          """
          from ixnetwork_restpy.testplatform.sessions.ixnetwork.quicktest.testconfig_8190de730bfe601e4f1a0157fb815f8e import TestConfig
          return TestConfig(self)._select()
  
      @property
      def ForceApplyQTConfig(self):
          """
          Returns
          -------
          - bool: Apply QT config
          """
          return self._get_attribute(self._SDM_ATT_MAP['ForceApplyQTConfig'])
      @ForceApplyQTConfig.setter
      def ForceApplyQTConfig(self, value):
          self._set_attribute(self._SDM_ATT_MAP['ForceApplyQTConfig'], value)
  
      @property
      def InputParameters(self):
          """
          Returns
          -------
          - str: Input Parameters
          """
          return self._get_attribute(self._SDM_ATT_MAP['InputParameters'])
      @InputParameters.setter
      def InputParameters(self, value):
          self._set_attribute(self._SDM_ATT_MAP['InputParameters'], value)
  
      @property
      def Mode(self):
          """
          Returns
          -------
          - str(existingMode | newMode): Test mode
          """
          return self._get_attribute(self._SDM_ATT_MAP['Mode'])
      @Mode.setter
      def Mode(self, value):
          self._set_attribute(self._SDM_ATT_MAP['Mode'], value)
  
      @property
      def Name(self):
          """
          Returns
          -------
          - str: Test name
          """
          return self._get_attribute(self._SDM_ATT_MAP['Name'])
      @Name.setter
      def Name(self, value):
          self._set_attribute(self._SDM_ATT_MAP['Name'], value)
  
      def update(self, ForceApplyQTConfig=None, InputParameters=None, Mode=None, Name=None):
          """Updates dhcpRateCpf resource on the server.
  
          Args
          ----
          - ForceApplyQTConfig (bool): Apply QT config
          - InputParameters (str): Input Parameters
          - Mode (str(existingMode | newMode)): Test mode
          - Name (str): Test name
  
          Raises
          ------
          - ServerError: The server has encountered an uncategorized error condition
          """
          return self._update(self._map_locals(self._SDM_ATT_MAP, locals()))
  
      def add(self, ForceApplyQTConfig=None, InputParameters=None, Mode=None, Name=None):
          """Adds a new dhcpRateCpf resource on the server and adds it to the container.
  
          Args
          ----
          - ForceApplyQTConfig (bool): Apply QT config
          - InputParameters (str): Input Parameters
          - Mode (str(existingMode | newMode)): Test mode
          - Name (str): Test name
  
          Returns
          -------
          - self: This instance with all currently retrieved dhcpRateCpf resources using find and the newly added dhcpRateCpf resources available through an iterator or index
  
          Raises
          ------
          - ServerError: The server has encountered an uncategorized error condition
          """
          return self._create(self._map_locals(self._SDM_ATT_MAP, locals()))
  
      def remove(self):
          """Deletes all the contained dhcpRateCpf resources in this instance from the server.
  
          Raises
          ------
          - NotFoundError: The requested resource does not exist on the server
          - ServerError: The server has encountered an uncategorized error condition
          """
          self._delete()
  
      def find(self, ForceApplyQTConfig=None, InputParameters=None, Mode=None, Name=None):
          """Finds and retrieves dhcpRateCpf resources from the server.
  
          All named parameters are evaluated on the server using regex. The named parameters can be used to selectively retrieve dhcpRateCpf resources from the server.
          To retrieve an exact match ensure the parameter value starts with ^ and ends with $
          By default the find method takes no parameters and will retrieve all dhcpRateCpf resources from the server.
  
          Args
          ----
          - ForceApplyQTConfig (bool): Apply QT config
          - InputParameters (str): Input Parameters
          - Mode (str(existingMode | newMode)): Test mode
          - Name (str): Test name
  
          Returns
          -------
          - self: This instance with matching dhcpRateCpf resources retrieved from the server available through an iterator or index
  
          Raises
          ------
          - ServerError: The server has encountered an uncategorized error condition
          """
          return self._select(self._map_locals(self._SDM_ATT_MAP, locals()))
  
      def read(self, href):
          """Retrieves a single instance of dhcpRateCpf data from the server.
  
          Args
          ----
          - href (str): An href to the instance to be retrieved
  
          Returns
          -------
          - self: This instance with the dhcpRateCpf resources from the server available through an iterator or index
  
          Raises
          ------
          - NotFoundError: The requested resource does not exist on the server
          - ServerError: The server has encountered an uncategorized error condition
          """
          return self._read(href)
  
      def Apply(self):
          """Executes the apply operation on the server.
  
          Applies the specified Quick Test.
  
          Raises
          ------
          - NotFoundError: The requested resource does not exist on the server
          - ServerError: The server has encountered an uncategorized error condition
          """
          payload = { "Arg1": self.href }
          return self._execute('apply', payload=payload, response_object=None)
  
      def ApplyAsync(self):
          """Executes the applyAsync operation on the server.
  
          Raises
          ------
          - NotFoundError: The requested resource does not exist on the server
          - ServerError: The server has encountered an uncategorized error condition
          """
          payload = { "Arg1": self.href }
          return self._execute('applyAsync', payload=payload, response_object=None)
  
      def ApplyAsyncResult(self):
          """Executes the applyAsyncResult operation on the server.
  
          Raises
          ------
          - NotFoundError: The requested resource does not exist on the server
          - ServerError: The server has encountered an uncategorized error condition
          """
          payload = { "Arg1": self.href }
          return self._execute('applyAsyncResult', payload=payload, response_object=None)
  
      def ApplyITWizardConfiguration(self):
          """Executes the applyITWizardConfiguration operation on the server.
  
          Applies the specified Quick Test.
  
          Raises
          ------
          - NotFoundError: The requested resource does not exist on the server
          - ServerError: The server has encountered an uncategorized error condition
          """
          payload = { "Arg1": self.href }
          return self._execute('applyITWizardConfiguration', payload=payload, response_object=None)
  
      def GenerateReport(self):
          """Executes the generateReport operation on the server.
  
          Generate a PDF report for the last succesfull test run.
  
          Raises
          ------
          - NotFoundError: The requested resource does not exist on the server
          - ServerError: The server has encountered an uncategorized error condition
          """
          payload = { "Arg1": self.href }
          return self._execute('generateReport', payload=payload, response_object=None)
  
      def Run(self, *args, **kwargs):
          """Executes the run operation on the server.
  
          Starts the specified Quick Test and waits for its execution to finish.
  
          The IxNetwork model allows for multiple method Signatures with the same name while python does not.
  
          run(InputParameters=string)list
          -------------------------------
          - InputParameters (str): The input arguments of the test.
          - Returns list(str): This method is synchronous and returns the result of the test.
  
          Raises
          ------
          - NotFoundError: The requested resource does not exist on the server
          - ServerError: The server has encountered an uncategorized error condition
          """
          payload = { "Arg1": self.href }
          for i in range(len(args)): payload['Arg%s' % (i + 2)] = args[i]
          for item in kwargs.items(): payload[item[0]] = item[1]
          return self._execute('run', payload=payload, response_object=None)
  
      def Start(self, *args, **kwargs):
          """Executes the start operation on the server.
  
          Starts the specified Quick Test.
  
          The IxNetwork model allows for multiple method Signatures with the same name while python does not.
  
          start(InputParameters=string)
          -----------------------------
          - InputParameters (str): The input arguments of the test.
  
          Raises
          ------
          - NotFoundError: The requested resource does not exist on the server
          - ServerError: The server has encountered an uncategorized error condition
          """
          payload = { "Arg1": self.href }
          for i in range(len(args)): payload['Arg%s' % (i + 2)] = args[i]
          for item in kwargs.items(): payload[item[0]] = item[1]
          return self._execute('start', payload=payload, response_object=None)
  
      def Stop(self):
          """Executes the stop operation on the server.
  
          Stops the currently running Quick Test.
  
          Raises
          ------
          - NotFoundError: The requested resource does not exist on the server
          - ServerError: The server has encountered an uncategorized error condition
          """
          payload = { "Arg1": self.href }
          return self._execute('stop', payload=payload, response_object=None)
  
      def WaitForTest(self):
          """Executes the waitForTest operation on the server.
  
          Waits for the execution of the specified Quick Test to be completed.
  
          Raises
          ------
          - NotFoundError: The requested resource does not exist on the server
          - ServerError: The server has encountered an uncategorized error condition
          """
          payload = { "Arg1": self.href }
          return self._execute('waitForTest', payload=payload, response_object=None)
  