How to use the gql.gql.enum_utils.enum_field function in gql

To help you get started, we’ve selected a few gql examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github magma / magma / symphony / cli / pyinventory / graphql / fragment / property_type.py View on Github external
"""]

@dataclass
class PropertyTypeFragment(DataClassJsonMixin):
    id: str
    externalId: Optional[str]
    name: str
    index: Optional[int]
    category: Optional[str]
    rawValue: Optional[str]
    isEditable: Optional[bool]
    isInstanceProperty: Optional[bool]
    isMandatory: Optional[bool]
    isDeleted: Optional[bool]
    type: PropertyKind = enum_field(PropertyKind)
github magma / magma / symphony / cli / pyinventory / graphql / input / location_filter.py View on Github external
from numbers import Number
from typing import Any, Callable, List, Mapping, Optional

from dataclasses_json import DataClassJsonMixin

from gql.gql.enum_utils import enum_field
from ..enum.filter_operator import FilterOperator
from ..enum.location_filter_type import LocationFilterType

from ..input.property_type import PropertyTypeInput
@dataclass
class LocationFilterInput(DataClassJsonMixin):
    idSet: List[str]
    stringSet: List[str]
    filterType: LocationFilterType = enum_field(LocationFilterType)
    operator: FilterOperator = enum_field(FilterOperator)
    boolValue: Optional[bool] = None
    stringValue: Optional[str] = None
    propertyValue: Optional[PropertyTypeInput] = None
    maxDepth: Optional[int] = None
github magma / magma / symphony / cli / pyinventory / graphql / input / location_filter.py View on Github external
from gql.gql.datetime_utils import DATETIME_FIELD
from numbers import Number
from typing import Any, Callable, List, Mapping, Optional

from dataclasses_json import DataClassJsonMixin

from gql.gql.enum_utils import enum_field
from ..enum.filter_operator import FilterOperator
from ..enum.location_filter_type import LocationFilterType

from ..input.property_type import PropertyTypeInput
@dataclass
class LocationFilterInput(DataClassJsonMixin):
    idSet: List[str]
    stringSet: List[str]
    filterType: LocationFilterType = enum_field(LocationFilterType)
    operator: FilterOperator = enum_field(FilterOperator)
    boolValue: Optional[bool] = None
    stringValue: Optional[str] = None
    propertyValue: Optional[PropertyTypeInput] = None
    maxDepth: Optional[int] = None
github magma / magma / symphony / cli / pyinventory / graphql / input / equipment_filter.py View on Github external
from numbers import Number
from typing import Any, Callable, List, Mapping, Optional

from dataclasses_json import DataClassJsonMixin

from gql.gql.enum_utils import enum_field
from ..enum.equipment_filter_type import EquipmentFilterType
from ..enum.filter_operator import FilterOperator

from ..input.property_type import PropertyTypeInput
@dataclass
class EquipmentFilterInput(DataClassJsonMixin):
    idSet: List[str]
    stringSet: List[str]
    filterType: EquipmentFilterType = enum_field(EquipmentFilterType)
    operator: FilterOperator = enum_field(FilterOperator)
    stringValue: Optional[str] = None
    propertyValue: Optional[PropertyTypeInput] = None
    maxDepth: Optional[int] = None
github magma / magma / symphony / cli / pyinventory / graphql / input / equipment_filter.py View on Github external
from gql.gql.datetime_utils import DATETIME_FIELD
from numbers import Number
from typing import Any, Callable, List, Mapping, Optional

from dataclasses_json import DataClassJsonMixin

from gql.gql.enum_utils import enum_field
from ..enum.equipment_filter_type import EquipmentFilterType
from ..enum.filter_operator import FilterOperator

from ..input.property_type import PropertyTypeInput
@dataclass
class EquipmentFilterInput(DataClassJsonMixin):
    idSet: List[str]
    stringSet: List[str]
    filterType: EquipmentFilterType = enum_field(EquipmentFilterType)
    operator: FilterOperator = enum_field(FilterOperator)
    stringValue: Optional[str] = None
    propertyValue: Optional[PropertyTypeInput] = None
    maxDepth: Optional[int] = None
github magma / magma / symphony / cli / pyinventory / graphql / input / survey_template_question.py View on Github external
from functools import partial
from gql.gql.datetime_utils import DATETIME_FIELD
from numbers import Number
from typing import Any, Callable, List, Mapping, Optional

from dataclasses_json import DataClassJsonMixin

from gql.gql.enum_utils import enum_field
from ..enum.survey_question_type import SurveyQuestionType

@dataclass
class SurveyTemplateQuestionInput(DataClassJsonMixin):
    questionTitle: str
    questionDescription: str
    index: int
    questionType: SurveyQuestionType = enum_field(SurveyQuestionType)
    id: Optional[str] = None
github magma / magma / symphony / cli / pyinventory / graphql / fragment / user.py View on Github external
fragment UserFragment on User {
  id
  authID
  email
  status
  role
}

"""]

@dataclass
class UserFragment(DataClassJsonMixin):
    id: str
    authID: str
    email: str
    status: UserStatus = enum_field(UserStatus)
    role: UserRole = enum_field(UserRole)
github magma / magma / symphony / cli / pysymphony / graphql / input / add_image.py View on Github external
from numbers import Number
from typing import Any, Callable, List, Mapping, Optional

from dataclasses_json import DataClassJsonMixin

from gql.gql.enum_utils import enum_field
from ..enum.image_entity import ImageEntity

@dataclass
class AddImageInput(DataClassJsonMixin):
    entityId: str
    imgKey: str
    fileName: str
    fileSize: int
    contentType: str
    entityType: ImageEntity = enum_field(ImageEntity)
    modified: datetime = DATETIME_FIELD
    category: Optional[str] = None
    annotation: Optional[str] = None
github magma / magma / symphony / cli / pyinventory / graphql / fragment / user.py View on Github external
id
  authID
  email
  status
  role
}

"""]

@dataclass
class UserFragment(DataClassJsonMixin):
    id: str
    authID: str
    email: str
    status: UserStatus = enum_field(UserStatus)
    role: UserRole = enum_field(UserRole)
github magma / magma / symphony / cli / pyinventory / graphql / input / survey_cell_scan_data.py View on Github external
from dataclasses import dataclass
from datetime import datetime
from functools import partial
from gql.gql.datetime_utils import DATETIME_FIELD
from numbers import Number
from typing import Any, Callable, List, Mapping, Optional

from dataclasses_json import DataClassJsonMixin

from gql.gql.enum_utils import enum_field
from ..enum.cellular_network_type import CellularNetworkType

@dataclass
class SurveyCellScanData(DataClassJsonMixin):
    signalStrength: int
    networkType: CellularNetworkType = enum_field(CellularNetworkType)
    timestamp: Optional[int] = None
    baseStationID: Optional[str] = None
    networkID: Optional[str] = None
    systemID: Optional[str] = None
    cellID: Optional[str] = None
    locationAreaCode: Optional[str] = None
    mobileCountryCode: Optional[str] = None
    mobileNetworkCode: Optional[str] = None
    primaryScramblingCode: Optional[str] = None
    operator: Optional[str] = None
    arfcn: Optional[int] = None
    physicalCellID: Optional[str] = None
    trackingAreaCode: Optional[str] = None
    timingAdvance: Optional[int] = None
    earfcn: Optional[int] = None
    uarfcn: Optional[int] = None