text: # -*- coding: utf-8 -*-
  #---------------------------------------------------------------------------
  # Copyright 2020 VMware, Inc.  All rights reserved.
  
  # AUTO GENERATED FILE -- DO NOT MODIFY!
  #
  # vAPI stub file for package com.vmware.nsx_policy.infra.tier_1s.locale_services.
  #---------------------------------------------------------------------------
  
  """
  
  
  """
  
  __author__ = 'VMware, Inc.'
  __docformat__ = 'restructuredtext en'
  
  import sys
  
  from vmware.vapi.bindings import type
  from vmware.vapi.bindings.converter import TypeConverter
  from vmware.vapi.bindings.enum import Enum
  from vmware.vapi.bindings.error import VapiError
  from vmware.vapi.bindings.struct import VapiStruct
  from vmware.vapi.bindings.stub import (
      ApiInterfaceStub, StubFactoryBase, VapiInterface)
  from vmware.vapi.bindings.common import raise_core_exception
  from vmware.vapi.data.validator import (UnionValidator, HasFieldsOfValidator)
  from vmware.vapi.exception import CoreException
  from vmware.vapi.lib.constants import TaskType
  from vmware.vapi.lib.rest import OperationRestMetadata
  
  
  class GatewayFirewall(VapiInterface):
      """
      
      """
  
      _VAPI_SERVICE_ID = 'com.vmware.nsx_policy.infra.tier_1s.locale_services.gateway_firewall'
      """
      Identifier of the service in canonical form.
      """
      def __init__(self, config):
          """
          :type  config: :class:`vmware.vapi.bindings.stub.StubConfiguration`
          :param config: Configuration to be used for creating the stub.
          """
          VapiInterface.__init__(self, config, _GatewayFirewallStub)
          self._VAPI_OPERATION_IDS = {}
  
  
      def list(self,
               tier1_id,
               locale_services_id,
               ):
          """
          Get filtered view of Gateway Firewall rules associated with the Tier-1
          Locale Services. The gateway policies are returned in the order of
          category and sequence number.
  
          :type  tier1_id: :class:`str`
          :param tier1_id: (required)
          :type  locale_services_id: :class:`str`
          :param locale_services_id: (required)
          :rtype: :class:`com.vmware.nsx_policy.model_client.GatewayPolicyListResult`
          :return: com.vmware.nsx_policy.model.GatewayPolicyListResult
          :raise: :class:`com.vmware.vapi.std.errors_client.ServiceUnavailable` 
               Service Unavailable
          :raise: :class:`com.vmware.vapi.std.errors_client.InvalidRequest` 
               Bad Request, Precondition Failed
          :raise: :class:`com.vmware.vapi.std.errors_client.InternalServerError` 
               Internal Server Error
          :raise: :class:`com.vmware.vapi.std.errors_client.Unauthorized` 
               Forbidden
          :raise: :class:`com.vmware.vapi.std.errors_client.NotFound` 
               Not Found
          """
          return self._invoke('list',
                              {
                              'tier1_id': tier1_id,
                              'locale_services_id': locale_services_id,
                              })
  class Interfaces(VapiInterface):
      """
      
      """
  
      _VAPI_SERVICE_ID = 'com.vmware.nsx_policy.infra.tier_1s.locale_services.interfaces'
      """
      Identifier of the service in canonical form.
      """
      def __init__(self, config):
          """
          :type  config: :class:`vmware.vapi.bindings.stub.StubConfiguration`
          :param config: Configuration to be used for creating the stub.
          """
          VapiInterface.__init__(self, config, _InterfacesStub)
          self._VAPI_OPERATION_IDS = {}
  
  
      def delete(self,
                 tier1_id,
                 locale_services_id,
                 interface_id,
                 ):
          """
          Delete Tier-1 interface
  
          :type  tier1_id: :class:`str`
          :param tier1_id: (required)
          :type  locale_services_id: :class:`str`
          :param locale_services_id: (required)
          :type  interface_id: :class:`str`
          :param interface_id: (required)
          :raise: :class:`com.vmware.vapi.std.errors_client.ServiceUnavailable` 
               Service Unavailable
          :raise: :class:`com.vmware.vapi.std.errors_client.InvalidRequest` 
               Bad Request, Precondition Failed
          :raise: :class:`com.vmware.vapi.std.errors_client.InternalServerError` 
               Internal Server Error
          :raise: :class:`com.vmware.vapi.std.errors_client.Unauthorized` 
               Forbidden
          :raise: :class:`com.vmware.vapi.std.errors_client.NotFound` 
               Not Found
          """
          return self._invoke('delete',
                              {
                              'tier1_id': tier1_id,
                              'locale_services_id': locale_services_id,
                              'interface_id': interface_id,
                              })
  
      def get(self,
              tier1_id,
              locale_services_id,
              interface_id,
              ):
          """
          Read Tier-1 interface
  
          :type  tier1_id: :class:`str`
          :param tier1_id: (required)
          :type  locale_services_id: :class:`str`
          :param locale_services_id: (required)
          :type  interface_id: :class:`str`
          :param interface_id: (required)
          :rtype: :class:`com.vmware.nsx_policy.model_client.Tier1Interface`
          :return: com.vmware.nsx_policy.model.Tier1Interface
          :raise: :class:`com.vmware.vapi.std.errors_client.ServiceUnavailable` 
               Service Unavailable
          :raise: :class:`com.vmware.vapi.std.errors_client.InvalidRequest` 
               Bad Request, Precondition Failed
          :raise: :class:`com.vmware.vapi.std.errors_client.InternalServerError` 
               Internal Server Error
          :raise: :class:`com.vmware.vapi.std.errors_client.Unauthorized` 
               Forbidden
          :raise: :class:`com.vmware.vapi.std.errors_client.NotFound` 
               Not Found
          """
          return self._invoke('get',
                              {
                              'tier1_id': tier1_id,
                              'locale_services_id': locale_services_id,
                              'interface_id': interface_id,
                              })
  
      def list(self,
               tier1_id,
               locale_services_id,
               cursor=None,
               include_mark_for_delete_objects=None,
               included_fields=None,
               page_size=None,
               sort_ascending=None,
               sort_by=None,
               ):
          """
          Paginated list of all Tier-1 interfaces
  
          :type  tier1_id: :class:`str`
          :param tier1_id: (required)
          :type  locale_services_id: :class:`str`
          :param locale_services_id: (required)
          :type  cursor: :class:`str` or ``None``
          :param cursor: Opaque cursor to be used for getting next page of records (supplied
              by current result page) (optional)
          :type  include_mark_for_delete_objects: :class:`bool` or ``None``
          :param include_mark_for_delete_objects: Include objects that are marked for deletion in results (optional,
              default to false)
          :type  included_fields: :class:`str` or ``None``
          :param included_fields: Comma separated list of fields that should be included in query
              result (optional)
          :type  page_size: :class:`long` or ``None``
          :param page_size: Maximum number of results to return in this page (server may return
              fewer) (optional, default to 1000)
          :type  sort_ascending: :class:`bool` or ``None``
          :param sort_ascending: (optional)
          :type  sort_by: :class:`str` or ``None``
          :param sort_by: Field by which records are sorted (optional)
          :rtype: :class:`com.vmware.nsx_policy.model_client.Tier1InterfaceListResult`
          :return: com.vmware.nsx_policy.model.Tier1InterfaceListResult
          :raise: :class:`com.vmware.vapi.std.errors_client.ServiceUnavailable` 
               Service Unavailable
          :raise: :class:`com.vmware.vapi.std.errors_client.InvalidRequest` 
               Bad Request, Precondition Failed
          :raise: :class:`com.vmware.vapi.std.errors_client.InternalServerError` 
               Internal Server Error
          :raise: :class:`com.vmware.vapi.std.errors_client.Unauthorized` 
               Forbidden
          :raise: :class:`com.vmware.vapi.std.errors_client.NotFound` 
               Not Found
          """
          return self._invoke('list',
                              {
                              'tier1_id': tier1_id,
                              'locale_services_id': locale_services_id,
                              'cursor': cursor,
                              'include_mark_for_delete_objects': include_mark_for_delete_objects,
                              'included_fields': included_fields,
                              'page_size': page_size,
                              'sort_ascending': sort_ascending,
                              'sort_by': sort_by,
                              })
  
      def patch(self,
                tier1_id,
                locale_services_id,
                interface_id,
                tier1_interface,
                ):
          """
          If an interface with the interface-id is not already present, create a
          new interface. If it already exists, update the interface for specified
          attributes.
  
          :type  tier1_id: :class:`str`
          :param tier1_id: (required)
          :type  locale_services_id: :class:`str`
          :param locale_services_id: (required)
          :type  interface_id: :class:`str`
          :param interface_id: (required)
          :type  tier1_interface: :class:`com.vmware.nsx_policy.model_client.Tier1Interface`
          :param tier1_interface: (required)
          :raise: :class:`com.vmware.vapi.std.errors_client.ServiceUnavailable` 
               Service Unavailable
          :raise: :class:`com.vmware.vapi.std.errors_client.InvalidRequest` 
               Bad Request, Precondition Failed
          :raise: :class:`com.vmware.vapi.std.errors_client.InternalServerError` 
               Internal Server Error
          :raise: :class:`com.vmware.vapi.std.errors_client.Unauthorized` 
               Forbidden
          :raise: :class:`com.vmware.vapi.std.errors_client.NotFound` 
               Not Found
          """
          return self._invoke('patch',
                              {
                              'tier1_id': tier1_id,
                              'locale_services_id': locale_services_id,
                              'interface_id': interface_id,
                              'tier1_interface': tier1_interface,
                              })
  
      def update(self,
                 tier1_id,
                 locale_services_id,
                 interface_id,
                 tier1_interface,
                 ):
          """
          If an interface with the interface-id is not already present, create a
          new interface. If it already exists, replace the interface with this
          object.
  
          :type  tier1_id: :class:`str`
          :param tier1_id: (required)
          :type  locale_services_id: :class:`str`
          :param locale_services_id: (required)
          :type  interface_id: :class:`str`
          :param interface_id: (required)
          :type  tier1_interface: :class:`com.vmware.nsx_policy.model_client.Tier1Interface`
          :param tier1_interface: (required)
          :rtype: :class:`com.vmware.nsx_policy.model_client.Tier1Interface`
          :return: com.vmware.nsx_policy.model.Tier1Interface
          :raise: :class:`com.vmware.vapi.std.errors_client.ServiceUnavailable` 
               Service Unavailable
          :raise: :class:`com.vmware.vapi.std.errors_client.InvalidRequest` 
               Bad Request, Precondition Failed
          :raise: :class:`com.vmware.vapi.std.errors_client.InternalServerError` 
               Internal Server Error
          :raise: :class:`com.vmware.vapi.std.errors_client.Unauthorized` 
               Forbidden
          :raise: :class:`com.vmware.vapi.std.errors_client.NotFound` 
               Not Found
          """
          return self._invoke('update',
                              {
                              'tier1_id': tier1_id,
                              'locale_services_id': locale_services_id,
                              'interface_id': interface_id,
                              'tier1_interface': tier1_interface,
                              })
  class ServiceInstances(VapiInterface):
      """
      
      """
  
      _VAPI_SERVICE_ID = 'com.vmware.nsx_policy.infra.tier_1s.locale_services.service_instances'
      """
      Identifier of the service in canonical form.
      """
      def __init__(self, config):
          """
          :type  config: :class:`vmware.vapi.bindings.stub.StubConfiguration`
          :param config: Configuration to be used for creating the stub.
          """
          VapiInterface.__init__(self, config, _ServiceInstancesStub)
          self._VAPI_OPERATION_IDS = {}
  
  
      def delete(self,
                 tier1_id,
                 locale_service_id,
                 service_instance_id,
                 ):
          """
          Delete Tier1 policy service instance
  
          :type  tier1_id: :class:`str`
          :param tier1_id: Tier-0 id (required)
          :type  locale_service_id: :class:`str`
          :param locale_service_id: Locale service id (required)
          :type  service_instance_id: :class:`str`
          :param service_instance_id: Tier1 Service instance id (required)
          :raise: :class:`com.vmware.vapi.std.errors_client.ServiceUnavailable` 
               Service Unavailable
          :raise: :class:`com.vmware.vapi.std.errors_client.InvalidRequest` 
               Bad Request, Precondition Failed
          :raise: :class:`com.vmware.vapi.std.errors_client.InternalServerError` 
               Internal Server Error
          :raise: :class:`com.vmware.vapi.std.errors_client.Unauthorized` 
               Forbidden
          :raise: :class:`com.vmware.vapi.std.errors_client.NotFound` 
               Not Found
          """
          return self._invoke('delete',
                              {
                              'tier1_id': tier1_id,
                              'locale_service_id': locale_service_id,
                              'service_instance_id': service_instance_id,
                              })
  
      def get(self,
              tier1_id,
              locale_service_id,
              service_instance_id,
              ):
          """
          Read Tier1 service instance
  
          :type  tier1_id: :class:`str`
          :param tier1_id: Tier-1 id (required)
          :type  locale_service_id: :class:`str`
          :param locale_service_id: Locale service id (required)
          :type  service_instance_id: :class:`str`
          :param service_instance_id: Service instance id (required)
          :rtype: :class:`com.vmware.nsx_policy.model_client.PolicyServiceInstance`
          :return: com.vmware.nsx_policy.model.PolicyServiceInstance
          :raise: :class:`com.vmware.vapi.std.errors_client.ServiceUnavailable` 
               Service Unavailable
          :raise: :class:`com.vmware.vapi.std.errors_client.InvalidRequest` 
               Bad Request, Precondition Failed
          :raise: :class:`com.vmware.vapi.std.errors_client.InternalServerError` 
               Internal Server Error
          :raise: :class:`com.vmware.vapi.std.errors_client.Unauthorized` 
               Forbidden
          :raise: :class:`com.vmware.vapi.std.errors_client.NotFound` 
               Not Found
          """
          return self._invoke('get',
                              {
                              'tier1_id': tier1_id,
                              'locale_service_id': locale_service_id,
                              'service_instance_id': service_instance_id,
                              })
  
      def list(self,
               tier1_id,
               locale_service_id,
               cursor=None,
               include_mark_for_delete_objects=None,
               included_fields=None,
               page_size=None,
               sort_ascending=None,
               sort_by=None,
               ):
          """
          Read all service instance objects under a tier-1
  
          :type  tier1_id: :class:`str`
          :param tier1_id: Tier-1 id (required)
          :type  locale_service_id: :class:`str`
          :param locale_service_id: Locale service id (required)
          :type  cursor: :class:`str` or ``None``
          :param cursor: Opaque cursor to be used for getting next page of records (supplied
              by current result page) (optional)
          :type  include_mark_for_delete_objects: :class:`bool` or ``None``
          :param include_mark_for_delete_objects: Include objects that are marked for deletion in results (optional,
              default to false)
          :type  included_fields: :class:`str` or ``None``
          :param included_fields: Comma separated list of fields that should be included in query
              result (optional)
          :type  page_size: :class:`long` or ``None``
          :param page_size: Maximum number of results to return in this page (server may return
              fewer) (optional, default to 1000)
          :type  sort_ascending: :class:`bool` or ``None``
          :param sort_ascending: (optional)
          :type  sort_by: :class:`str` or ``None``
          :param sort_by: Field by which records are sorted (optional)
          :rtype: :class:`com.vmware.nsx_policy.model_client.PolicyServiceInstanceListResult`
          :return: com.vmware.nsx_policy.model.PolicyServiceInstanceListResult
          :raise: :class:`com.vmware.vapi.std.errors_client.ServiceUnavailable` 
               Service Unavailable
          :raise: :class:`com.vmware.vapi.std.errors_client.InvalidRequest` 
               Bad Request, Precondition Failed
          :raise: :class:`com.vmware.vapi.std.errors_client.InternalServerError` 
               Internal Server Error
          :raise: :class:`com.vmware.vapi.std.errors_client.Unauthorized` 
               Forbidden
          :raise: :class:`com.vmware.vapi.std.errors_client.NotFound` 
               Not Found
          """
          return self._invoke('list',
                              {
                              'tier1_id': tier1_id,
                              'locale_service_id': locale_service_id,
                              'cursor': cursor,
                              'include_mark_for_delete_objects': include_mark_for_delete_objects,
                              'included_fields': included_fields,
                              'page_size': page_size,
                              'sort_ascending': sort_ascending,
                              'sort_by': sort_by,
                              })
  
      def patch(self,
                tier1_id,
                locale_service_id,
                service_instance_id,
                policy_service_instance,
                ):
          """
          Create Tier1 Service Instance. Please note that, only display_name,
          description and deployment_spec_name are allowed to be modified in an
          exisiting entity. If the deployment spec name is changed, it will
          trigger the upgrade operation for the SVMs.
  
          :type  tier1_id: :class:`str`
          :param tier1_id: Tier-1 id (required)
          :type  locale_service_id: :class:`str`
          :param locale_service_id: Locale service id (required)
          :type  service_instance_id: :class:`str`
          :param service_instance_id: Tier1 Service instance id (required)
          :type  policy_service_instance: :class:`com.vmware.nsx_policy.model_client.PolicyServiceInstance`
          :param policy_service_instance: (required)
          :raise: :class:`com.vmware.vapi.std.errors_client.ServiceUnavailable` 
               Service Unavailable
          :raise: :class:`com.vmware.vapi.std.errors_client.InvalidRequest` 
               Bad Request, Precondition Failed
          :raise: :class:`com.vmware.vapi.std.errors_client.InternalServerError` 
               Internal Server Error
          :raise: :class:`com.vmware.vapi.std.errors_client.Unauthorized` 
               Forbidden
          :raise: :class:`com.vmware.vapi.std.errors_client.NotFound` 
               Not Found
          """
          return self._invoke('patch',
                              {
                              'tier1_id': tier1_id,
                              'locale_service_id': locale_service_id,
                              'service_instance_id': service_instance_id,
                              'policy_service_instance': policy_service_instance,
                              })
  
      def update(self,
                 tier1_id,
                 locale_service_id,
                 service_instance_id,
                 policy_service_instance,
                 ):
          """
          Create Tier1 service instance. Please note that, only display_name,
          description and deployment_spec_name are allowed to be modified in an
          exisiting entity. If the deployment spec name is changed, it will
          trigger the upgrade operation for the SVMs.
  
          :type  tier1_id: :class:`str`
          :param tier1_id: Tier-1 id (required)
          :type  locale_service_id: :class:`str`
          :param locale_service_id: Locale service id (required)
          :type  service_instance_id: :class:`str`
          :param service_instance_id: Tier1 Service instance id (required)
          :type  policy_service_instance: :class:`com.vmware.nsx_policy.model_client.PolicyServiceInstance`
          :param policy_service_instance: (required)
          :rtype: :class:`com.vmware.nsx_policy.model_client.PolicyServiceInstance`
          :return: com.vmware.nsx_policy.model.PolicyServiceInstance
          :raise: :class:`com.vmware.vapi.std.errors_client.ServiceUnavailable` 
               Service Unavailable
          :raise: :class:`com.vmware.vapi.std.errors_client.InvalidRequest` 
               Bad Request, Precondition Failed
          :raise: :class:`com.vmware.vapi.std.errors_client.InternalServerError` 
               Internal Server Error
          :raise: :class:`com.vmware.vapi.std.errors_client.Unauthorized` 
               Forbidden
          :raise: :class:`com.vmware.vapi.std.errors_client.NotFound` 
               Not Found
          """
          return self._invoke('update',
                              {
                              'tier1_id': tier1_id,
                              'locale_service_id': locale_service_id,
                              'service_instance_id': service_instance_id,
                              'policy_service_instance': policy_service_instance,
                              })
  class _GatewayFirewallStub(ApiInterfaceStub):
      def __init__(self, config):
          # properties for list operation
          list_input_type = type.StructType('operation-input', {
              'tier1_id': type.StringType(),
              'locale_services_id': type.StringType(),
          })
          list_error_dict = {
              'com.vmware.vapi.std.errors.service_unavailable':
                  type.ReferenceType('com.vmware.vapi.std.errors_client', 'ServiceUnavailable'),
              'com.vmware.vapi.std.errors.invalid_request':
                  type.ReferenceType('com.vmware.vapi.std.errors_client', 'InvalidRequest'),
              'com.vmware.vapi.std.errors.internal_server_error':
                  type.ReferenceType('com.vmware.vapi.std.errors_client', 'InternalServerError'),
              'com.vmware.vapi.std.errors.unauthorized':
                  type.ReferenceType('com.vmware.vapi.std.errors_client', 'Unauthorized'),
              'com.vmware.vapi.std.errors.not_found':
                  type.ReferenceType('com.vmware.vapi.std.errors_client', 'NotFound'),
  
          }
          list_input_value_validator_list = [
          ]
          list_output_validator_list = [
              HasFieldsOfValidator()
          ]
          list_rest_metadata = OperationRestMetadata(
              http_method='GET',
              url_template='/policy/api/v1/infra/tier-1s/{tier-1-id}/locale-services/{locale-services-id}/gateway-firewall',
              path_variables={
                  'tier1_id': 'tier-1-id',
                  'locale_services_id': 'locale-services-id',
              },
              query_parameters={
              },
              content_type='application/json'
          )
  
          operations = {
              'list': {
                  'input_type': list_input_type,
                  'output_type': type.ReferenceType('com.vmware.nsx_policy.model_client', 'GatewayPolicyListResult'),
                  'errors': list_error_dict,
                  'input_value_validator_list': list_input_value_validator_list,
                  'output_validator_list': list_output_validator_list,
                  'task_type': TaskType.NONE,
              },
          }
          rest_metadata = {
              'list': list_rest_metadata,
          }
          ApiInterfaceStub.__init__(
              self, iface_name='com.vmware.nsx_policy.infra.tier_1s.locale_services.gateway_firewall',
              config=config, operations=operations, rest_metadata=rest_metadata,
              is_vapi_rest=False)
  
  class _InterfacesStub(ApiInterfaceStub):
      def __init__(self, config):
          # properties for delete operation
          delete_input_type = type.StructType('operation-input', {
              'tier1_id': type.StringType(),
              'locale_services_id': type.StringType(),
              'interface_id': type.StringType(),
          })
          delete_error_dict = {
              'com.vmware.vapi.std.errors.service_unavailable':
                  type.ReferenceType('com.vmware.vapi.std.errors_client', 'ServiceUnavailable'),
              'com.vmware.vapi.std.errors.invalid_request':
                  type.ReferenceType('com.vmware.vapi.std.errors_client', 'InvalidRequest'),
              'com.vmware.vapi.std.errors.internal_server_error':
                  type.ReferenceType('com.vmware.vapi.std.errors_client', 'InternalServerError'),
              'com.vmware.vapi.std.errors.unauthorized':
                  type.ReferenceType('com.vmware.vapi.std.errors_client', 'Unauthorized'),
              'com.vmware.vapi.std.errors.not_found':
                  type.ReferenceType('com.vmware.vapi.std.errors_client', 'NotFound'),
  
          }
          delete_input_value_validator_list = [
          ]
          delete_output_validator_list = [
          ]
          delete_rest_metadata = OperationRestMetadata(
              http_method='DELETE',
              url_template='/policy/api/v1/infra/tier-1s/{tier-1-id}/locale-services/{locale-services-id}/interfaces/{interface-id}',
              path_variables={
                  'tier1_id': 'tier-1-id',
                  'locale_services_id': 'locale-services-id',
                  'interface_id': 'interface-id',
              },
              query_parameters={
              },
              content_type='application/json'
          )
  
          # properties for get operation
          get_input_type = type.StructType('operation-input', {
              'tier1_id': type.StringType(),
              'locale_services_id': type.StringType(),
              'interface_id': type.StringType(),
          })
          get_error_dict = {
              'com.vmware.vapi.std.errors.service_unavailable':
                  type.ReferenceType('com.vmware.vapi.std.errors_client', 'ServiceUnavailable'),
              'com.vmware.vapi.std.errors.invalid_request':
                  type.ReferenceType('com.vmware.vapi.std.errors_client', 'InvalidRequest'),
              'com.vmware.vapi.std.errors.internal_server_error':
                  type.ReferenceType('com.vmware.vapi.std.errors_client', 'InternalServerError'),
              'com.vmware.vapi.std.errors.unauthorized':
                  type.ReferenceType('com.vmware.vapi.std.errors_client', 'Unauthorized'),
              'com.vmware.vapi.std.errors.not_found':
                  type.ReferenceType('com.vmware.vapi.std.errors_client', 'NotFound'),
  
          }
          get_input_value_validator_list = [
          ]
          get_output_validator_list = [
              HasFieldsOfValidator()
          ]
          get_rest_metadata = OperationRestMetadata(
              http_method='GET',
              url_template='/policy/api/v1/infra/tier-1s/{tier-1-id}/locale-services/{locale-services-id}/interfaces/{interface-id}',
              path_variables={
                  'tier1_id': 'tier-1-id',
                  'locale_services_id': 'locale-services-id',
                  'interface_id': 'interface-id',
              },
              query_parameters={
              },
              content_type='application/json'
          )
  
          # properties for list operation
          list_input_type = type.StructType('operation-input', {
              'tier1_id': type.StringType(),
              'locale_services_id': type.StringType(),
              'cursor': type.OptionalType(type.StringType()),
              'include_mark_for_delete_objects': type.OptionalType(type.BooleanType()),
              'included_fields': type.OptionalType(type.StringType()),
              'page_size': type.OptionalType(type.IntegerType()),
              'sort_ascending': type.OptionalType(type.BooleanType()),
              'sort_by': type.OptionalType(type.StringType()),
          })
          list_error_dict = {
              'com.vmware.vapi.std.errors.service_unavailable':
                  type.ReferenceType('com.vmware.vapi.std.errors_client', 'ServiceUnavailable'),
              'com.vmware.vapi.std.errors.invalid_request':
                  type.ReferenceType('com.vmware.vapi.std.errors_client', 'InvalidRequest'),
              'com.vmware.vapi.std.errors.internal_server_error':
                  type.ReferenceType('com.vmware.vapi.std.errors_client', 'InternalServerError'),
              'com.vmware.vapi.std.errors.unauthorized':
                  type.ReferenceType('com.vmware.vapi.std.errors_client', 'Unauthorized'),
              'com.vmware.vapi.std.errors.not_found':
                  type.ReferenceType('com.vmware.vapi.std.errors_client', 'NotFound'),
  
          }
          list_input_value_validator_list = [
          ]
          list_output_validator_list = [
              HasFieldsOfValidator()
          ]
          list_rest_metadata = OperationRestMetadata(
              http_method='GET',
              url_template='/policy/api/v1/infra/tier-1s/{tier-1-id}/locale-services/{locale-services-id}/interfaces',
              path_variables={
                  'tier1_id': 'tier-1-id',
                  'locale_services_id': 'locale-services-id',
              },
              query_parameters={
                  'cursor': 'cursor',
                  'include_mark_for_delete_objects': 'include_mark_for_delete_objects',
                  'included_fields': 'included_fields',
                  'page_size': 'page_size',
                  'sort_ascending': 'sort_ascending',
                  'sort_by': 'sort_by',
              },
              content_type='application/json'
          )
  
          # properties for patch operation
          patch_input_type = type.StructType('operation-input', {
              'tier1_id': type.StringType(),
              'locale_services_id': type.StringType(),
              'interface_id': type.StringType(),
              'tier1_interface': type.ReferenceType('com.vmware.nsx_policy.model_client', 'Tier1Interface'),
          })
          patch_error_dict = {
              'com.vmware.vapi.std.errors.service_unavailable':
                  type.ReferenceType('com.vmware.vapi.std.errors_client', 'ServiceUnavailable'),
              'com.vmware.vapi.std.errors.invalid_request':
                  type.ReferenceType('com.vmware.vapi.std.errors_client', 'InvalidRequest'),
              'com.vmware.vapi.std.errors.internal_server_error':
                  type.ReferenceType('com.vmware.vapi.std.errors_client', 'InternalServerError'),
              'com.vmware.vapi.std.errors.unauthorized':
                  type.ReferenceType('com.vmware.vapi.std.errors_client', 'Unauthorized'),
              'com.vmware.vapi.std.errors.not_found':
                  type.ReferenceType('com.vmware.vapi.std.errors_client', 'NotFound'),
  
          }
          patch_input_value_validator_list = [
              HasFieldsOfValidator()
          ]
          patch_output_validator_list = [
          ]
          patch_rest_metadata = OperationRestMetadata(
              http_method='PATCH',
              url_template='/policy/api/v1/infra/tier-1s/{tier-1-id}/locale-services/{locale-services-id}/interfaces/{interface-id}',
              request_body_parameter='tier1_interface',
              path_variables={
                  'tier1_id': 'tier-1-id',
                  'locale_services_id': 'locale-services-id',
                  'interface_id': 'interface-id',
              },
              query_parameters={
              },
              content_type='application/json'
          )
  
          # properties for update operation
          update_input_type = type.StructType('operation-input', {
              'tier1_id': type.StringType(),
              'locale_services_id': type.StringType(),
              'interface_id': type.StringType(),
              'tier1_interface': type.ReferenceType('com.vmware.nsx_policy.model_client', 'Tier1Interface'),
          })
          update_error_dict = {
              'com.vmware.vapi.std.errors.service_unavailable':
                  type.ReferenceType('com.vmware.vapi.std.errors_client', 'ServiceUnavailable'),
              'com.vmware.vapi.std.errors.invalid_request':
                  type.ReferenceType('com.vmware.vapi.std.errors_client', 'InvalidRequest'),
              'com.vmware.vapi.std.errors.internal_server_error':
                  type.ReferenceType('com.vmware.vapi.std.errors_client', 'InternalServerError'),
              'com.vmware.vapi.std.errors.unauthorized':
                  type.ReferenceType('com.vmware.vapi.std.errors_client', 'Unauthorized'),
              'com.vmware.vapi.std.errors.not_found':
                  type.ReferenceType('com.vmware.vapi.std.errors_client', 'NotFound'),
  
          }
          update_input_value_validator_list = [
              HasFieldsOfValidator()
          ]
          update_output_validator_list = [
              HasFieldsOfValidator()
          ]
          update_rest_metadata = OperationRestMetadata(
              http_method='PUT',
              url_template='/policy/api/v1/infra/tier-1s/{tier-1-id}/locale-services/{locale-services-id}/interfaces/{interface-id}',
              request_body_parameter='tier1_interface',
              path_variables={
                  'tier1_id': 'tier-1-id',
                  'locale_services_id': 'locale-services-id',
                  'interface_id': 'interface-id',
              },
              query_parameters={
              },
              content_type='application/json'
          )
  
          operations = {
              'delete': {
                  'input_type': delete_input_type,
                  'output_type': type.VoidType(),
                  'errors': delete_error_dict,
                  'input_value_validator_list': delete_input_value_validator_list,
                  'output_validator_list': delete_output_validator_list,
                  'task_type': TaskType.NONE,
              },
              'get': {
                  'input_type': get_input_type,
                  'output_type': type.ReferenceType('com.vmware.nsx_policy.model_client', 'Tier1Interface'),
                  'errors': get_error_dict,
                  'input_value_validator_list': get_input_value_validator_list,
                  'output_validator_list': get_output_validator_list,
                  'task_type': TaskType.NONE,
              },
              'list': {
                  'input_type': list_input_type,
                  'output_type': type.ReferenceType('com.vmware.nsx_policy.model_client', 'Tier1InterfaceListResult'),
                  'errors': list_error_dict,
                  'input_value_validator_list': list_input_value_validator_list,
                  'output_validator_list': list_output_validator_list,
                  'task_type': TaskType.NONE,
              },
              'patch': {
                  'input_type': patch_input_type,
                  'output_type': type.VoidType(),
                  'errors': patch_error_dict,
                  'input_value_validator_list': patch_input_value_validator_list,
                  'output_validator_list': patch_output_validator_list,
                  'task_type': TaskType.NONE,
              },
              'update': {
                  'input_type': update_input_type,
                  'output_type': type.ReferenceType('com.vmware.nsx_policy.model_client', 'Tier1Interface'),
                  'errors': update_error_dict,
                  'input_value_validator_list': update_input_value_validator_list,
                  'output_validator_list': update_output_validator_list,
                  'task_type': TaskType.NONE,
              },
          }
          rest_metadata = {
              'delete': delete_rest_metadata,
              'get': get_rest_metadata,
              'list': list_rest_metadata,
              'patch': patch_rest_metadata,
              'update': update_rest_metadata,
          }
          ApiInterfaceStub.__init__(
              self, iface_name='com.vmware.nsx_policy.infra.tier_1s.locale_services.interfaces',
              config=config, operations=operations, rest_metadata=rest_metadata,
              is_vapi_rest=False)
  
  class _ServiceInstancesStub(ApiInterfaceStub):
      def __init__(self, config):
          # properties for delete operation
          delete_input_type = type.StructType('operation-input', {
              'tier1_id': type.StringType(),
              'locale_service_id': type.StringType(),
              'service_instance_id': type.StringType(),
          })
          delete_error_dict = {
              'com.vmware.vapi.std.errors.service_unavailable':
                  type.ReferenceType('com.vmware.vapi.std.errors_client', 'ServiceUnavailable'),
              'com.vmware.vapi.std.errors.invalid_request':
                  type.ReferenceType('com.vmware.vapi.std.errors_client', 'InvalidRequest'),
              'com.vmware.vapi.std.errors.internal_server_error':
                  type.ReferenceType('com.vmware.vapi.std.errors_client', 'InternalServerError'),
              'com.vmware.vapi.std.errors.unauthorized':
                  type.ReferenceType('com.vmware.vapi.std.errors_client', 'Unauthorized'),
              'com.vmware.vapi.std.errors.not_found':
                  type.ReferenceType('com.vmware.vapi.std.errors_client', 'NotFound'),
  
          }
          delete_input_value_validator_list = [
          ]
          delete_output_validator_list = [
          ]
          delete_rest_metadata = OperationRestMetadata(
              http_method='DELETE',
              url_template='/policy/api/v1/infra/tier-1s/{tier-1-id}/locale-services/{locale-service-id}/service-instances/{service-instance-id}',
              path_variables={
                  'tier1_id': 'tier-1-id',
                  'locale_service_id': 'locale-service-id',
                  'service_instance_id': 'service-instance-id',
              },
              query_parameters={
              },
              content_type='application/json'
          )
  
          # properties for get operation
          get_input_type = type.StructType('operation-input', {
              'tier1_id': type.StringType(),
              'locale_service_id': type.StringType(),
              'service_instance_id': type.StringType(),
          })
          get_error_dict = {
              'com.vmware.vapi.std.errors.service_unavailable':
                  type.ReferenceType('com.vmware.vapi.std.errors_client', 'ServiceUnavailable'),
              'com.vmware.vapi.std.errors.invalid_request':
                  type.ReferenceType('com.vmware.vapi.std.errors_client', 'InvalidRequest'),
              'com.vmware.vapi.std.errors.internal_server_error':
                  type.ReferenceType('com.vmware.vapi.std.errors_client', 'InternalServerError'),
              'com.vmware.vapi.std.errors.unauthorized':
                  type.ReferenceType('com.vmware.vapi.std.errors_client', 'Unauthorized'),
              'com.vmware.vapi.std.errors.not_found':
                  type.ReferenceType('com.vmware.vapi.std.errors_client', 'NotFound'),
  
          }
          get_input_value_validator_list = [
          ]
          get_output_validator_list = [
              HasFieldsOfValidator()
          ]
          get_rest_metadata = OperationRestMetadata(
              http_method='GET',
              url_template='/policy/api/v1/infra/tier-1s/{tier-1-id}/locale-services/{locale-service-id}/service-instances/{service-instance-id}',
              path_variables={
                  'tier1_id': 'tier-1-id',
                  'locale_service_id': 'locale-service-id',
                  'service_instance_id': 'service-instance-id',
              },
              query_parameters={
              },
              content_type='application/json'
          )
  
          # properties for list operation
          list_input_type = type.StructType('operation-input', {
              'tier1_id': type.StringType(),
              'locale_service_id': type.StringType(),
              'cursor': type.OptionalType(type.StringType()),
              'include_mark_for_delete_objects': type.OptionalType(type.BooleanType()),
              'included_fields': type.OptionalType(type.StringType()),
              'page_size': type.OptionalType(type.IntegerType()),
              'sort_ascending': type.OptionalType(type.BooleanType()),
              'sort_by': type.OptionalType(type.StringType()),
          })
          list_error_dict = {
              'com.vmware.vapi.std.errors.service_unavailable':
                  type.ReferenceType('com.vmware.vapi.std.errors_client', 'ServiceUnavailable'),
              'com.vmware.vapi.std.errors.invalid_request':
                  type.ReferenceType('com.vmware.vapi.std.errors_client', 'InvalidRequest'),
              'com.vmware.vapi.std.errors.internal_server_error':
                  type.ReferenceType('com.vmware.vapi.std.errors_client', 'InternalServerError'),
              'com.vmware.vapi.std.errors.unauthorized':
                  type.ReferenceType('com.vmware.vapi.std.errors_client', 'Unauthorized'),
              'com.vmware.vapi.std.errors.not_found':
                  type.ReferenceType('com.vmware.vapi.std.errors_client', 'NotFound'),
  
          }
          list_input_value_validator_list = [
          ]
          list_output_validator_list = [
              HasFieldsOfValidator()
          ]
          list_rest_metadata = OperationRestMetadata(
              http_method='GET',
              url_template='/policy/api/v1/infra/tier-1s/{tier-1-id}/locale-services/{locale-service-id}/service-instances',
              path_variables={
                  'tier1_id': 'tier-1-id',
                  'locale_service_id': 'locale-service-id',
              },
              query_parameters={
                  'cursor': 'cursor',
                  'include_mark_for_delete_objects': 'include_mark_for_delete_objects',
                  'included_fields': 'included_fields',
                  'page_size': 'page_size',
                  'sort_ascending': 'sort_ascending',
                  'sort_by': 'sort_by',
              },
              content_type='application/json'
          )
  
          # properties for patch operation
          patch_input_type = type.StructType('operation-input', {
              'tier1_id': type.StringType(),
              'locale_service_id': type.StringType(),
              'service_instance_id': type.StringType(),
              'policy_service_instance': type.ReferenceType('com.vmware.nsx_policy.model_client', 'PolicyServiceInstance'),
          })
          patch_error_dict = {
              'com.vmware.vapi.std.errors.service_unavailable':
                  type.ReferenceType('com.vmware.vapi.std.errors_client', 'ServiceUnavailable'),
              'com.vmware.vapi.std.errors.invalid_request':
                  type.ReferenceType('com.vmware.vapi.std.errors_client', 'InvalidRequest'),
              'com.vmware.vapi.std.errors.internal_server_error':
                  type.ReferenceType('com.vmware.vapi.std.errors_client', 'InternalServerError'),
              'com.vmware.vapi.std.errors.unauthorized':
                  type.ReferenceType('com.vmware.vapi.std.errors_client', 'Unauthorized'),
              'com.vmware.vapi.std.errors.not_found':
                  type.ReferenceType('com.vmware.vapi.std.errors_client', 'NotFound'),
  
          }
          patch_input_value_validator_list = [
              HasFieldsOfValidator()
          ]
          patch_output_validator_list = [
          ]
          patch_rest_metadata = OperationRestMetadata(
              http_method='PATCH',
              url_template='/policy/api/v1/infra/tier-1s/{tier-1-id}/locale-services/{locale-service-id}/service-instances/{service-instance-id}',
              request_body_parameter='policy_service_instance',
              path_variables={
                  'tier1_id': 'tier-1-id',
                  'locale_service_id': 'locale-service-id',
                  'service_instance_id': 'service-instance-id',
              },
              query_parameters={
              },
              content_type='application/json'
          )
  
          # properties for update operation
          update_input_type = type.StructType('operation-input', {
              'tier1_id': type.StringType(),
              'locale_service_id': type.StringType(),
              'service_instance_id': type.StringType(),
              'policy_service_instance': type.ReferenceType('com.vmware.nsx_policy.model_client', 'PolicyServiceInstance'),
          })
          update_error_dict = {
              'com.vmware.vapi.std.errors.service_unavailable':
                  type.ReferenceType('com.vmware.vapi.std.errors_client', 'ServiceUnavailable'),
              'com.vmware.vapi.std.errors.invalid_request':
                  type.ReferenceType('com.vmware.vapi.std.errors_client', 'InvalidRequest'),
              'com.vmware.vapi.std.errors.internal_server_error':
                  type.ReferenceType('com.vmware.vapi.std.errors_client', 'InternalServerError'),
              'com.vmware.vapi.std.errors.unauthorized':
                  type.ReferenceType('com.vmware.vapi.std.errors_client', 'Unauthorized'),
              'com.vmware.vapi.std.errors.not_found':
                  type.ReferenceType('com.vmware.vapi.std.errors_client', 'NotFound'),
  
          }
          update_input_value_validator_list = [
              HasFieldsOfValidator()
          ]
          update_output_validator_list = [
              HasFieldsOfValidator()
          ]
          update_rest_metadata = OperationRestMetadata(
              http_method='PUT',
              url_template='/policy/api/v1/infra/tier-1s/{tier-1-id}/locale-services/{locale-service-id}/service-instances/{service-instance-id}',
              request_body_parameter='policy_service_instance',
              path_variables={
                  'tier1_id': 'tier-1-id',
                  'locale_service_id': 'locale-service-id',
                  'service_instance_id': 'service-instance-id',
              },
              query_parameters={
              },
              content_type='application/json'
          )
  
          operations = {
              'delete': {
                  'input_type': delete_input_type,
                  'output_type': type.VoidType(),
                  'errors': delete_error_dict,
                  'input_value_validator_list': delete_input_value_validator_list,
                  'output_validator_list': delete_output_validator_list,
                  'task_type': TaskType.NONE,
              },
              'get': {
                  'input_type': get_input_type,
                  'output_type': type.ReferenceType('com.vmware.nsx_policy.model_client', 'PolicyServiceInstance'),
                  'errors': get_error_dict,
                  'input_value_validator_list': get_input_value_validator_list,
                  'output_validator_list': get_output_validator_list,
                  'task_type': TaskType.NONE,
              },
              'list': {
                  'input_type': list_input_type,
                  'output_type': type.ReferenceType('com.vmware.nsx_policy.model_client', 'PolicyServiceInstanceListResult'),
                  'errors': list_error_dict,
                  'input_value_validator_list': list_input_value_validator_list,
                  'output_validator_list': list_output_validator_list,
                  'task_type': TaskType.NONE,
              },
              'patch': {
                  'input_type': patch_input_type,
                  'output_type': type.VoidType(),
                  'errors': patch_error_dict,
                  'input_value_validator_list': patch_input_value_validator_list,
                  'output_validator_list': patch_output_validator_list,
                  'task_type': TaskType.NONE,
              },
              'update': {
                  'input_type': update_input_type,
                  'output_type': type.ReferenceType('com.vmware.nsx_policy.model_client', 'PolicyServiceInstance'),
                  'errors': update_error_dict,
                  'input_value_validator_list': update_input_value_validator_list,
                  'output_validator_list': update_output_validator_list,
                  'task_type': TaskType.NONE,
              },
          }
          rest_metadata = {
              'delete': delete_rest_metadata,
              'get': get_rest_metadata,
              'list': list_rest_metadata,
              'patch': patch_rest_metadata,
              'update': update_rest_metadata,
          }
          ApiInterfaceStub.__init__(
              self, iface_name='com.vmware.nsx_policy.infra.tier_1s.locale_services.service_instances',
              config=config, operations=operations, rest_metadata=rest_metadata,
              is_vapi_rest=False)
  
  
  class StubFactory(StubFactoryBase):
      _attrs = {
          'GatewayFirewall': GatewayFirewall,
          'Interfaces': Interfaces,
          'ServiceInstances': ServiceInstances,
          'interfaces': 'com.vmware.nsx_policy.infra.tier_1s.locale_services.interfaces_client.StubFactory',
          'service_instances': 'com.vmware.nsx_policy.infra.tier_1s.locale_services.service_instances_client.StubFactory',
      }
  
  