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 .digital_twins_endpoint_resource_properties_py3 import DigitalTwinsEndpointResourceProperties
  
  
  class EventGrid(DigitalTwinsEndpointResourceProperties):
      """Properties related to EventGrid.
  
      Variables are only populated by the server, and will be ignored when
      sending a request.
  
      All required parameters must be populated in order to send to Azure.
  
      :ivar provisioning_state: The provisioning state. Possible values include:
       'Provisioning', 'Deleting', 'Succeeded', 'Failed', 'Canceled', 'Deleted',
       'Warning', 'Suspending', 'Restoring', 'Moving', 'Disabled'
      :vartype provisioning_state: str or
       ~controlplane.models.EndpointProvisioningState
      :ivar created_time: Time when the Endpoint was added to
       DigitalTwinsInstance.
      :vartype created_time: datetime
      :param authentication_type: Specifies the authentication type being used
       for connecting to the endpoint. Possible values include: 'KeyBased',
       'IdentityBased'
      :type authentication_type: str or ~controlplane.models.AuthenticationType
      :param dead_letter_secret: Dead letter storage secret for key-based
       authentication. Will be obfuscated during read.
      :type dead_letter_secret: str
      :param dead_letter_uri: Dead letter storage URL for identity-based
       authentication.
      :type dead_letter_uri: str
      :param endpoint_type: Required. Constant filled by server.
      :type endpoint_type: str
      :param topic_endpoint: Required. EventGrid Topic Endpoint
      :type topic_endpoint: str
      :param access_key1: Required. EventGrid secondary accesskey. Will be
       obfuscated during read.
      :type access_key1: str
      :param access_key2: EventGrid secondary accesskey. Will be obfuscated
       during read.
      :type access_key2: str
      """
  
      _validation = {
          'provisioning_state': {'readonly': True},
          'created_time': {'readonly': True},
          'endpoint_type': {'required': True},
          'topic_endpoint': {'required': True},
          'access_key1': {'required': True},
      }
  
      _attribute_map = {
          'provisioning_state': {'key': 'provisioningState', 'type': 'str'},
          'created_time': {'key': 'createdTime', 'type': 'iso-8601'},
          'authentication_type': {'key': 'authenticationType', 'type': 'str'},
          'dead_letter_secret': {'key': 'deadLetterSecret', 'type': 'str'},
          'dead_letter_uri': {'key': 'deadLetterUri', 'type': 'str'},
          'endpoint_type': {'key': 'endpointType', 'type': 'str'},
          'topic_endpoint': {'key': 'TopicEndpoint', 'type': 'str'},
          'access_key1': {'key': 'accessKey1', 'type': 'str'},
          'access_key2': {'key': 'accessKey2', 'type': 'str'},
      }
  
      def __init__(self, *, topic_endpoint: str, access_key1: str, authentication_type=None, dead_letter_secret: str=None, dead_letter_uri: str=None, access_key2: str=None, **kwargs) -> None:
          super(EventGrid, self).__init__(authentication_type=authentication_type, dead_letter_secret=dead_letter_secret, dead_letter_uri=dead_letter_uri, **kwargs)
          self.topic_endpoint = topic_endpoint
          self.access_key1 = access_key1
          self.access_key2 = access_key2
          self.endpoint_type = 'EventGrid'
  