text: # Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
  # This product includes software developed at Datadog (https://www.datadoghq.com/).
  # Copyright 2019-Present Datadog, Inc.
  
  
  from datadog_api_client.v1.model_utils import (
      ModelNormal,
      cached_property,
  )
  
  
  def lazy_import():
      from datadog_api_client.v1.model.apm_stats_query_column_type import ApmStatsQueryColumnType
      from datadog_api_client.v1.model.apm_stats_query_row_type import ApmStatsQueryRowType
  
      globals()["ApmStatsQueryColumnType"] = ApmStatsQueryColumnType
      globals()["ApmStatsQueryRowType"] = ApmStatsQueryRowType
  
  
  class ApmStatsQueryDefinition(ModelNormal):
      """NOTE: This class is auto generated by OpenAPI Generator.
      Ref: https://openapi-generator.tech
  
      Do not edit the class manually.
      """
  
      validations = {}
  
      @cached_property
      def openapi_types():
          lazy_import()
          return {
              "columns": ([ApmStatsQueryColumnType],),
              "env": (str,),
              "name": (str,),
              "primary_tag": (str,),
              "resource": (str,),
              "row_type": (ApmStatsQueryRowType,),
              "service": (str,),
          }
  
      attribute_map = {
          "env": "env",
          "name": "name",
          "primary_tag": "primary_tag",
          "row_type": "row_type",
          "service": "service",
          "columns": "columns",
          "resource": "resource",
      }
  
      read_only_vars = {}
  
      def __init__(self, env, name, primary_tag, row_type, service, *args, **kwargs):
          """ApmStatsQueryDefinition - a model defined in OpenAPI
  
          Args:
              env (str): Environment name.
              name (str): Operation name associated with service.
              primary_tag (str): The organization's host group name and value.
              row_type (ApmStatsQueryRowType):
              service (str): Service name.
  
          Keyword Args:
              columns ([ApmStatsQueryColumnType]): [optional] Column properties used by the front end for display.
              resource (str): [optional] Resource name.
          """
          super().__init__(kwargs)
  
          self._check_pos_args(args)
  
          self.env = env
          self.name = name
          self.primary_tag = primary_tag
          self.row_type = row_type
          self.service = service
  
      @classmethod
      def _from_openapi_data(cls, env, name, primary_tag, row_type, service, *args, **kwargs):
          """Helper creating a new instance from a response."""
  
          self = super(ApmStatsQueryDefinition, cls)._from_openapi_data(kwargs)
  
          self._check_pos_args(args)
  
          self.env = env
          self.name = name
          self.primary_tag = primary_tag
          self.row_type = row_type
          self.service = service
          return self
  