text: # coding=utf-8
  # --------------------------------------------------------------------------
  # Copyright (c) Microsoft Corporation. All rights reserved.
  # Licensed under the MIT License. See License.txt in the project root for
  # license information.
  #
  # Code generated by Microsoft (R) AutoRest Code Generator.
  # Changes may cause incorrect behavior and will be lost if the code is
  # regenerated.
  # --------------------------------------------------------------------------
  
  from msrest.serialization import Model
  
  
  class TenantPolicy(Model):
      """Tenant policy.
  
      Variables are only populated by the server, and will be ignored when
      sending a request.
  
      :ivar policy_id: Policy Id.
      :vartype policy_id: str
      :param block_subscriptions_leaving_tenant: Blocks the leaving of
       subscriptions from user's tenant.
      :type block_subscriptions_leaving_tenant: bool
      :param block_subscriptions_into_tenant: Blocks the entering of
       subscriptions into user's tenant.
      :type block_subscriptions_into_tenant: bool
      :param exempted_principals: List of user objectIds that are exempted from
       the set subscription tenant policies for the user's tenant.
      :type exempted_principals: list[str]
      """
  
      _validation = {
          'policy_id': {'readonly': True},
      }
  
      _attribute_map = {
          'policy_id': {'key': 'policyId', 'type': 'str'},
          'block_subscriptions_leaving_tenant': {'key': 'blockSubscriptionsLeavingTenant', 'type': 'bool'},
          'block_subscriptions_into_tenant': {'key': 'blockSubscriptionsIntoTenant', 'type': 'bool'},
          'exempted_principals': {'key': 'exemptedPrincipals', 'type': '[str]'},
      }
  
      def __init__(self, **kwargs):
          super(TenantPolicy, self).__init__(**kwargs)
          self.policy_id = None
          self.block_subscriptions_leaving_tenant = kwargs.get('block_subscriptions_leaving_tenant', None)
          self.block_subscriptions_into_tenant = kwargs.get('block_subscriptions_into_tenant', None)
          self.exempted_principals = kwargs.get('exempted_principals', None)
  