def __init__(self, *args, **kwargs):  # noqa: E501
        """LogsProcessor - a model defined in OpenAPI

        Args:

        Keyword Args:
            grok (LogsGrokParserRules): defaults to nulltype.Null  # noqa: E501
            source (str): Source attribute used to perform the lookup.. defaults to nulltype.Null  # noqa: E501
            type (LogsTraceRemapperType): defaults to nulltype.Null, must be one of ["trace-id-remapper", ]  # noqa: E501
            sources ([str]): Array of source attributes.. defaults to nulltype.Null  # noqa: E501
            target (str): Name of the attribute that contains the corresponding value in the mapping list or the `default_lookup` if not found in the mapping list.. defaults to nulltype.Null  # noqa: E501
            categories ([LogsCategoryProcessorCategories]): Array of filters to match or not a log and their corresponding `name`to assign a custom value to the log.. defaults to nulltype.Null  # noqa: E501
            expression (str): Arithmetic operation between one or more log attributes.. defaults to nulltype.Null  # noqa: E501
            template (str): A formula with one or more attributes and raw text.. defaults to nulltype.Null  # noqa: E501
            lookup_table ([str]): Mapping table of values for the source attribute and their associated target attribute values, formatted as `[\"source_key1,target_value1\", \"source_key2,target_value2\"]`. defaults to nulltype.Null  # noqa: E501
            _check_type (bool): if True, values for parameters in openapi_types
                                will be type checked and a TypeError will be
                                raised if the wrong type is input.
                                Defaults to True
            _path_to_item (tuple/list): This is a list of keys or values to
                                drill down to the model in received_data
                                when deserializing a response
            _spec_property_naming (bool): True if the variable names in the input data
                                are serialized names, as specified in the OpenAPI document.
                                False if the variable names in the input data
                                are pythonic names, e.g. snake case (default)
            _configuration (Configuration): the instance to use when
                                deserializing a file_type parameter.
                                If passed, type conversion is attempted
                                If omitted no type conversion is done.
            _visited_composed_classes (tuple): This stores a tuple of
                                classes that we have traveled through so that
                                if we see that class again we will not use its
                                discriminator again.
                                When traveling through a discriminator, the
                                composed schema that is
                                is traveled through is added to this set.
                                For example if Animal has a discriminator
                                petType and we pass in "Dog", and the class Dog
                                allOf includes Animal, we move through Animal
                                once using the discriminator, and pick Dog.
                                Then in Dog, we will make an instance of the
                                Animal class but this time we won't travel
                                through its discriminator because we passed in
                                _visited_composed_classes = (Animal,)
            is_enabled (bool): Whether or not the processor is enabled.. [optional] if omitted the server will use the default value of False  # noqa: E501
            name (str): Name of the processor.. [optional]  # noqa: E501
            samples ([str]): List of sample logs to test this grok parser.. [optional]  # noqa: E501
            override_on_conflict (bool): Override or not the target element if already set,. [optional] if omitted the server will use the default value of False  # noqa: E501
            preserve_source (bool): Remove or preserve the remapped source element.. [optional] if omitted the server will use the default value of False  # noqa: E501
            source_type (str): Defines if the sources are from log `attribute` or `tag`.. [optional] if omitted the server will use the default value of "attribute"  # noqa: E501
            target_type (str): Defines if the final attribute or tag name is from log `attribute` or `tag`.. [optional] if omitted the server will use the default value of "attribute"  # noqa: E501
            normalize_ending_slashes (bool, none_type): Normalize the ending slashes or not.. [optional] if omitted the server will use the default value of False  # noqa: E501
            is_encoded (bool): Define if the source attribute is URL encoded or not.. [optional] if omitted the server will use the default value of False  # noqa: E501
            is_replace_missing (bool): If true, it replaces all missing attributes of `template` by an empty string. If `false` (default), skips the operation for missing attributes.. [optional] if omitted the server will use the default value of False  # noqa: E501
            filter (LogsFilter): [optional]  # noqa: E501
            processors ([LogsProcessor]): Ordered list of processors in this pipeline.. [optional]  # noqa: E501
            default_lookup (str): Value to set the target attribute if the source value is not found in the list.. [optional]  # noqa: E501
        """

        grok = kwargs.get('grok', nulltype.Null)
        source = kwargs.get('source', nulltype.Null)
        type = kwargs.get('type', nulltype.Null)
        sources = kwargs.get('sources', nulltype.Null)
        target = kwargs.get('target', nulltype.Null)
        categories = kwargs.get('categories', nulltype.Null)
        expression = kwargs.get('expression', nulltype.Null)
        template = kwargs.get('template', nulltype.Null)
        lookup_table = kwargs.get('lookup_table', nulltype.Null)
        _check_type = kwargs.pop('_check_type', True)
        _spec_property_naming = kwargs.pop('_spec_property_naming', False)
        _path_to_item = kwargs.pop('_path_to_item', ())
        _configuration = kwargs.pop('_configuration', None)
        _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())

        if args:
            raise ApiTypeError(
                "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments."
                % (
                    args,
                    self.__class__.__name__,
                ),
                path_to_item=_path_to_item,
                valid_classes=(self.__class__, ),
            )

        self._data_store = {}
        self._check_type = _check_type
        self._spec_property_naming = _spec_property_naming
        self._path_to_item = _path_to_item
        self._configuration = _configuration
        self._visited_composed_classes = _visited_composed_classes + (
            self.__class__, )

        constant_args = {
            '_check_type': _check_type,
            '_path_to_item': _path_to_item,
            '_spec_property_naming': _spec_property_naming,
            '_configuration': _configuration,
            '_visited_composed_classes': self._visited_composed_classes,
        }
        required_args = {
            'grok': grok,
            'source': source,
            'type': type,
            'sources': sources,
            'target': target,
            'categories': categories,
            'expression': expression,
            'template': template,
            'lookup_table': lookup_table,
        }
        # remove args whose value is Null because they are unset
        required_arg_names = list(required_args.keys())
        for required_arg_name in required_arg_names:
            if required_args[required_arg_name] is nulltype.Null:
                del required_args[required_arg_name]
        model_args = {}
        model_args.update(required_args)
        model_args.update(kwargs)
        composed_info = validate_get_composed_info(constant_args, model_args,
                                                   self)
        self._composed_instances = composed_info[0]
        self._var_name_to_model_instances = composed_info[1]
        self._additional_properties_model_instances = composed_info[2]
        unused_args = composed_info[3]

        for var_name, var_value in required_args.items():
            setattr(self, var_name, var_value)
        for var_name, var_value in kwargs.items():
            if var_name in unused_args and \
                        self._configuration is not None and \
                        self._configuration.discard_unknown_keys and \
                        not self._additional_properties_model_instances:
                # discard variable.
                continue
            setattr(self, var_name, var_value)
    def __init__(self, *args, **kwargs):  # noqa: E501
        """SyntheticsAssertion - a model defined in OpenAPI

        Args:

        Keyword Args:
            operator (SyntheticsAssertionJSONPathOperator): defaults to nulltype.Null, must be one of ["validatesJSONPath", ]  # noqa: E501
            type (SyntheticsAssertionType): defaults to nulltype.Null, must be one of ["body", "header", "statusCode", "certificate", "responseTime", "property", ]  # noqa: E501
            _check_type (bool): if True, values for parameters in openapi_types
                                will be type checked and a TypeError will be
                                raised if the wrong type is input.
                                Defaults to True
            _path_to_item (tuple/list): This is a list of keys or values to
                                drill down to the model in received_data
                                when deserializing a response
            _spec_property_naming (bool): True if the variable names in the input data
                                are serialized names, as specified in the OpenAPI document.
                                False if the variable names in the input data
                                are pythonic names, e.g. snake case (default)
            _configuration (Configuration): the instance to use when
                                deserializing a file_type parameter.
                                If passed, type conversion is attempted
                                If omitted no type conversion is done.
            _visited_composed_classes (tuple): This stores a tuple of
                                classes that we have traveled through so that
                                if we see that class again we will not use its
                                discriminator again.
                                When traveling through a discriminator, the
                                composed schema that is
                                is traveled through is added to this set.
                                For example if Animal has a discriminator
                                petType and we pass in "Dog", and the class Dog
                                allOf includes Animal, we move through Animal
                                once using the discriminator, and pick Dog.
                                Then in Dog, we will make an instance of the
                                Animal class but this time we won't travel
                                through its discriminator because we passed in
                                _visited_composed_classes = (Animal,)
            _property (str): The associated assertion property.. [optional]  # noqa: E501
            target (SyntheticsAssertionJSONPathTargetTarget): [optional]  # noqa: E501
        """

        operator = kwargs.get('operator', nulltype.Null)
        type = kwargs.get('type', nulltype.Null)
        _check_type = kwargs.pop('_check_type', True)
        _spec_property_naming = kwargs.pop('_spec_property_naming', False)
        _path_to_item = kwargs.pop('_path_to_item', ())
        _configuration = kwargs.pop('_configuration', None)
        _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())

        if args:
            raise ApiTypeError(
                "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments."
                % (
                    args,
                    self.__class__.__name__,
                ),
                path_to_item=_path_to_item,
                valid_classes=(self.__class__, ),
            )

        self._data_store = {}
        self._check_type = _check_type
        self._spec_property_naming = _spec_property_naming
        self._path_to_item = _path_to_item
        self._configuration = _configuration
        self._visited_composed_classes = _visited_composed_classes + (
            self.__class__, )

        constant_args = {
            '_check_type': _check_type,
            '_path_to_item': _path_to_item,
            '_spec_property_naming': _spec_property_naming,
            '_configuration': _configuration,
            '_visited_composed_classes': self._visited_composed_classes,
        }
        required_args = {
            'operator': operator,
            'type': type,
        }
        # remove args whose value is Null because they are unset
        required_arg_names = list(required_args.keys())
        for required_arg_name in required_arg_names:
            if required_args[required_arg_name] is nulltype.Null:
                del required_args[required_arg_name]
        model_args = {}
        model_args.update(required_args)
        model_args.update(kwargs)
        composed_info = validate_get_composed_info(constant_args, model_args,
                                                   self)
        self._composed_instances = composed_info[0]
        self._var_name_to_model_instances = composed_info[1]
        self._additional_properties_model_instances = composed_info[2]
        unused_args = composed_info[3]

        for var_name, var_value in required_args.items():
            setattr(self, var_name, var_value)
        for var_name, var_value in kwargs.items():
            if var_name in unused_args and \
                        self._configuration is not None and \
                        self._configuration.discard_unknown_keys and \
                        not self._additional_properties_model_instances:
                # discard variable.
                continue
            setattr(self, var_name, var_value)
示例#3
0
    def __init__(self, *args, **kwargs):  # noqa: E501
        """NotebookCellTime - a model defined in OpenAPI

        Keyword Args:
            _check_type (bool): if True, values for parameters in openapi_types
                                will be type checked and a TypeError will be
                                raised if the wrong type is input.
                                Defaults to True
            _path_to_item (tuple/list): This is a list of keys or values to
                                drill down to the model in received_data
                                when deserializing a response
            _spec_property_naming (bool): True if the variable names in the input data
                                are serialized names, as specified in the OpenAPI document.
                                False if the variable names in the input data
                                are pythonic names, e.g. snake case (default)
            _configuration (Configuration): the instance to use when
                                deserializing a file_type parameter.
                                If passed, type conversion is attempted
                                If omitted no type conversion is done.
            _visited_composed_classes (tuple): This stores a tuple of
                                classes that we have traveled through so that
                                if we see that class again we will not use its
                                discriminator again.
                                When traveling through a discriminator, the
                                composed schema that is
                                is traveled through is added to this set.
                                For example if Animal has a discriminator
                                petType and we pass in "Dog", and the class Dog
                                allOf includes Animal, we move through Animal
                                once using the discriminator, and pick Dog.
                                Then in Dog, we will make an instance of the
                                Animal class but this time we won't travel
                                through its discriminator because we passed in
                                _visited_composed_classes = (Animal,)
            live (bool): Indicates whether the timeframe should be shifted to end at the current time.. [optional]  # noqa: E501
            live_span (WidgetLiveSpan): [optional]  # noqa: E501
            end (datetime): The end time.. [optional]  # noqa: E501
            start (datetime): The start time.. [optional]  # noqa: E501
        """

        _check_type = kwargs.pop("_check_type", True)
        _spec_property_naming = kwargs.pop("_spec_property_naming", False)
        _path_to_item = kwargs.pop("_path_to_item", ())
        _configuration = kwargs.pop("_configuration", None)
        _visited_composed_classes = kwargs.pop("_visited_composed_classes", ())

        if args:
            raise ApiTypeError(
                "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments."
                % (
                    args,
                    self.__class__.__name__,
                ),
                path_to_item=_path_to_item,
                valid_classes=(self.__class__, ),
            )

        self._data_store = {}
        self._check_type = _check_type
        self._spec_property_naming = _spec_property_naming
        self._path_to_item = _path_to_item
        self._configuration = _configuration
        self._visited_composed_classes = _visited_composed_classes + (
            self.__class__, )

        constant_args = {
            "_check_type": _check_type,
            "_path_to_item": _path_to_item,
            "_spec_property_naming": _spec_property_naming,
            "_configuration": _configuration,
            "_visited_composed_classes": self._visited_composed_classes,
        }
        required_args = {}
        model_args = {}
        model_args.update(required_args)
        model_args.update(kwargs)
        composed_info = validate_get_composed_info(constant_args, model_args,
                                                   self)
        self._composed_instances = composed_info[0]
        self._var_name_to_model_instances = composed_info[1]
        self._additional_properties_model_instances = composed_info[2]
        unused_args = composed_info[3]

        for var_name, var_value in required_args.items():
            setattr(self, var_name, var_value)
        for var_name, var_value in kwargs.items():
            if (var_name in unused_args and self._configuration is not None
                    and self._configuration.discard_unknown_keys
                    and not self._additional_properties_model_instances):
                # discard variable.
                continue
            setattr(self, var_name, var_value)
    def __init__(self, *args, **kwargs):  # noqa: E501
        """WidgetDefinition - a model defined in OpenAPI

        Args:

        Keyword Args:
            alert_id (str): ID of the alert to use in the widget.. defaults to nulltype.Null  # noqa: E501
            type (ToplistWidgetDefinitionType): defaults to nulltype.Null, must be one of ["toplist", ]  # noqa: E501
            viz_type (WidgetVizType): defaults to nulltype.Null, must be one of ["timeseries", "toplist", ]  # noqa: E501
            requests ([ToplistWidgetRequest]): List of top list widget requests.. defaults to nulltype.Null  # noqa: E501
            check (str): Name of the check to use in the widget.. defaults to nulltype.Null  # noqa: E501
            grouping (WidgetGrouping): defaults to nulltype.Null, must be one of ["check", "cluster", ]  # noqa: E501
            query (str): Query to filter the monitors with.. defaults to nulltype.Null  # noqa: E501
            text (str): Text to display.. defaults to nulltype.Null  # noqa: E501
            layout_type (WidgetLayoutType): defaults to nulltype.Null, must be one of ["ordered", ]  # noqa: E501
            widgets ([Widget]): List of widget groups.. defaults to nulltype.Null  # noqa: E501
            url (str): URL of the image.. defaults to nulltype.Null  # noqa: E501
            content (str): Content of the note.. defaults to nulltype.Null  # noqa: E501
            view_type (str): Type of view displayed by the widget.. defaults to nulltype.Null  # noqa: E501
            filters ([str]): Your environment and primary tag (or * if enabled for your account).. defaults to nulltype.Null  # noqa: E501
            service (str): APM service.. defaults to nulltype.Null  # noqa: E501
            env (str): APM environment.. defaults to nulltype.Null  # noqa: E501
            span_name (str): APM span name.. defaults to nulltype.Null  # noqa: E501
            _check_type (bool): if True, values for parameters in openapi_types
                                will be type checked and a TypeError will be
                                raised if the wrong type is input.
                                Defaults to True
            _path_to_item (tuple/list): This is a list of keys or values to
                                drill down to the model in received_data
                                when deserializing a response
            _spec_property_naming (bool): True if the variable names in the input data
                                are serialized names, as specified in the OpenAPI document.
                                False if the variable names in the input data
                                are pythonic names, e.g. snake case (default)
            _configuration (Configuration): the instance to use when
                                deserializing a file_type parameter.
                                If passed, type conversion is attempted
                                If omitted no type conversion is done.
            _visited_composed_classes (tuple): This stores a tuple of
                                classes that we have traveled through so that
                                if we see that class again we will not use its
                                discriminator again.
                                When traveling through a discriminator, the
                                composed schema that is
                                is traveled through is added to this set.
                                For example if Animal has a discriminator
                                petType and we pass in "Dog", and the class Dog
                                allOf includes Animal, we move through Animal
                                once using the discriminator, and pick Dog.
                                Then in Dog, we will make an instance of the
                                Animal class but this time we won't travel
                                through its discriminator because we passed in
                                _visited_composed_classes = (Animal,)
            time (WidgetTime): [optional]  # noqa: E501
            title (str): Title of your widget.. [optional]  # noqa: E501
            title_align (WidgetTextAlign): [optional]  # noqa: E501
            title_size (str): Size of the title.. [optional]  # noqa: E501
            precision (int): Number of decimals to show. If not defined, the widget uses the raw value.. [optional]  # noqa: E501
            text_align (WidgetTextAlign): [optional]  # noqa: E501
            unit (str): Unit to display with the value.. [optional]  # noqa: E501
            custom_links ([WidgetCustomLink]): List of custom links.. [optional]  # noqa: E501
            group ([str]): List of tag prefixes to group by.. [optional]  # noqa: E501
            group_by ([str]): List of tag prefixes to group by in the case of a cluster check.. [optional]  # noqa: E501
            tags ([str]): List of tags used to filter the groups reporting a cluster check.. [optional]  # noqa: E501
            legend_size (str): Available legend sizes for a widget. Should be one of \"0\", \"2\", \"4\", \"8\", \"16\", or \"auto\".. [optional]  # noqa: E501
            show_legend (bool): (screenboard only) Show the legend for this widget.. [optional]  # noqa: E501
            event_size (WidgetEventSize): [optional]  # noqa: E501
            tags_execution (str): The execution method for multi-value filters. Can be either and or or.. [optional]  # noqa: E501
            color (str): Color of the text.. [optional]  # noqa: E501
            font_size (str): Size of the text.. [optional]  # noqa: E501
            events ([WidgetEvent]): List of widget events.. [optional]  # noqa: E501
            yaxis (WidgetAxis): [optional]  # noqa: E501
            no_group_hosts (bool): Whether to show the hosts that don’t fit in a group.. [optional]  # noqa: E501
            no_metric_hosts (bool): Whether to show the hosts with no metrics.. [optional]  # noqa: E501
            node_type (WidgetNodeType): [optional]  # noqa: E501
            notes (str): Notes on the title.. [optional]  # noqa: E501
            scope ([str]): List of tags used to filter the map.. [optional]  # noqa: E501
            style (HostMapWidgetDefinitionStyle): [optional]  # noqa: E501
            margin (WidgetMargin): [optional]  # noqa: E501
            sizing (WidgetImageSizing): [optional]  # noqa: E501
            columns ([str]): Which columns to display on the widget.. [optional]  # noqa: E501
            indexes ([str]): An array of index names to query in the stream. Use [] to query all indexes at once.. [optional]  # noqa: E501
            logset (str): ID of the log set to use.. [optional]  # noqa: E501
            message_display (WidgetMessageDisplay): [optional]  # noqa: E501
            show_date_column (bool): Whether to show the date column or not. [optional]  # noqa: E501
            show_message_column (bool): Whether to show the message column or not. [optional]  # noqa: E501
            sort (WidgetMonitorSummarySort): [optional]  # noqa: E501
            color_preference (WidgetColorPreference): [optional]  # noqa: E501
            count (int): The number of monitors to display.. [optional]  # noqa: E501
            display_format (WidgetServiceSummaryDisplayFormat): [optional]  # noqa: E501
            hide_zero_counts (bool): Whether to show counts of 0 or not.. [optional]  # noqa: E501
            show_last_triggered (bool): Whether to show the time that has elapsed since the monitor/group triggered.. [optional]  # noqa: E501
            start (int): The start of the list. Typically 0.. [optional]  # noqa: E501
            summary_type (WidgetSummaryType): [optional]  # noqa: E501
            background_color (str): Background color of the note.. [optional]  # noqa: E501
            show_tick (bool): Whether to show a tick or not.. [optional]  # noqa: E501
            tick_edge (WidgetTickEdge): [optional]  # noqa: E501
            tick_pos (str): Where to position the tick on an edge.. [optional]  # noqa: E501
            autoscale (bool): Whether to use auto-scaling or not.. [optional]  # noqa: E501
            custom_unit (str): Display a unit of your choice on the widget.. [optional]  # noqa: E501
            color_by_groups ([str]): List of groups used for colors.. [optional]  # noqa: E501
            xaxis (WidgetAxis): [optional]  # noqa: E501
            show_error_budget (bool): Defined error budget.. [optional]  # noqa: E501
            slo_id (str): ID of the SLO displayed.. [optional]  # noqa: E501
            time_windows ([WidgetTimeWindows]): Times being monitored.. [optional]  # noqa: E501
            view_mode (WidgetViewMode): [optional]  # noqa: E501
            show_breakdown (bool): Whether to show the latency breakdown or not.. [optional]  # noqa: E501
            show_distribution (bool): Whether to show the latency distribution or not.. [optional]  # noqa: E501
            show_errors (bool): Whether to show the error metrics or not.. [optional]  # noqa: E501
            show_hits (bool): Whether to show the hits metrics or not.. [optional]  # noqa: E501
            show_latency (bool): Whether to show the latency metrics or not.. [optional]  # noqa: E501
            show_resource_list (bool): Whether to show the resource list or not.. [optional]  # noqa: E501
            size_format (WidgetSizeFormat): [optional]  # noqa: E501
            markers ([WidgetMarker]): List of markers.. [optional]  # noqa: E501
        """

        alert_id = kwargs.get('alert_id', nulltype.Null)
        type = kwargs.get('type', nulltype.Null)
        viz_type = kwargs.get('viz_type', nulltype.Null)
        requests = kwargs.get('requests', nulltype.Null)
        check = kwargs.get('check', nulltype.Null)
        grouping = kwargs.get('grouping', nulltype.Null)
        query = kwargs.get('query', nulltype.Null)
        text = kwargs.get('text', nulltype.Null)
        layout_type = kwargs.get('layout_type', nulltype.Null)
        widgets = kwargs.get('widgets', nulltype.Null)
        url = kwargs.get('url', nulltype.Null)
        content = kwargs.get('content', nulltype.Null)
        view_type = kwargs.get('view_type', nulltype.Null)
        filters = kwargs.get('filters', nulltype.Null)
        service = kwargs.get('service', nulltype.Null)
        env = kwargs.get('env', nulltype.Null)
        span_name = kwargs.get('span_name', nulltype.Null)
        _check_type = kwargs.pop('_check_type', True)
        _spec_property_naming = kwargs.pop('_spec_property_naming', False)
        _path_to_item = kwargs.pop('_path_to_item', ())
        _configuration = kwargs.pop('_configuration', None)
        _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())

        if args:
            raise ApiTypeError(
                "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
                    args,
                    self.__class__.__name__,
                ),
                path_to_item=_path_to_item,
                valid_classes=(self.__class__,),
            )

        self._data_store = {}
        self._check_type = _check_type
        self._spec_property_naming = _spec_property_naming
        self._path_to_item = _path_to_item
        self._configuration = _configuration
        self._visited_composed_classes = _visited_composed_classes + (self.__class__,)

        constant_args = {
            '_check_type': _check_type,
            '_path_to_item': _path_to_item,
            '_spec_property_naming': _spec_property_naming,
            '_configuration': _configuration,
            '_visited_composed_classes': self._visited_composed_classes,
        }
        required_args = {
            'alert_id': alert_id,
            'type': type,
            'viz_type': viz_type,
            'requests': requests,
            'check': check,
            'grouping': grouping,
            'query': query,
            'text': text,
            'layout_type': layout_type,
            'widgets': widgets,
            'url': url,
            'content': content,
            'view_type': view_type,
            'filters': filters,
            'service': service,
            'env': env,
            'span_name': span_name,
        }
        # remove args whose value is Null because they are unset
        required_arg_names = list(required_args.keys())
        for required_arg_name in required_arg_names:
            if required_args[required_arg_name] is nulltype.Null:
                del required_args[required_arg_name]
        model_args = {}
        model_args.update(required_args)
        model_args.update(kwargs)
        composed_info = validate_get_composed_info(
            constant_args, model_args, self)
        self._composed_instances = composed_info[0]
        self._var_name_to_model_instances = composed_info[1]
        self._additional_properties_model_instances = composed_info[2]
        unused_args = composed_info[3]

        for var_name, var_value in required_args.items():
            setattr(self, var_name, var_value)
        for var_name, var_value in kwargs.items():
            if var_name in unused_args and \
                        self._configuration is not None and \
                        self._configuration.discard_unknown_keys and \
                        not self._additional_properties_model_instances:
                # discard variable.
                continue
            setattr(self, var_name, var_value)
示例#5
0
    def __init__(self, *args, **kwargs):  # noqa: E501
        """WidgetDefinition - a model defined in OpenAPI

        Keyword Args:
            _check_type (bool): if True, values for parameters in openapi_types
                                will be type checked and a TypeError will be
                                raised if the wrong type is input.
                                Defaults to True
            _path_to_item (tuple/list): This is a list of keys or values to
                                drill down to the model in received_data
                                when deserializing a response
            _spec_property_naming (bool): True if the variable names in the input data
                                are serialized names, as specified in the OpenAPI document.
                                False if the variable names in the input data
                                are pythonic names, e.g. snake case (default)
            _configuration (Configuration): the instance to use when
                                deserializing a file_type parameter.
                                If passed, type conversion is attempted
                                If omitted no type conversion is done.
            _visited_composed_classes (tuple): This stores a tuple of
                                classes that we have traveled through so that
                                if we see that class again we will not use its
                                discriminator again.
                                When traveling through a discriminator, the
                                composed schema that is
                                is traveled through is added to this set.
                                For example if Animal has a discriminator
                                petType and we pass in "Dog", and the class Dog
                                allOf includes Animal, we move through Animal
                                once using the discriminator, and pick Dog.
                                Then in Dog, we will make an instance of the
                                Animal class but this time we won't travel
                                through its discriminator because we passed in
                                _visited_composed_classes = (Animal,)
            time (WidgetTime): [optional]  # noqa: E501
            title (str): Title of your widget.. [optional]  # noqa: E501
            title_align (WidgetTextAlign): [optional]  # noqa: E501
            title_size (str): Size of the title.. [optional]  # noqa: E501
            precision (int): Number of decimals to show. If not defined, the widget uses the raw value.. [optional]  # noqa: E501
            text_align (WidgetTextAlign): [optional]  # noqa: E501
            unit (str): Unit to display with the value.. [optional]  # noqa: E501
            custom_links ([WidgetCustomLink]): List of custom links.. [optional]  # noqa: E501
            group ([str]): List of tag prefixes to group by.. [optional]  # noqa: E501
            group_by ([str]): List of tag prefixes to group by in the case of a cluster check.. [optional]  # noqa: E501
            tags ([str]): List of tags used to filter the groups reporting a cluster check.. [optional]  # noqa: E501
            legend_size (str): Available legend sizes for a widget. Should be one of \"0\", \"2\", \"4\", \"8\", \"16\", or \"auto\".. [optional]  # noqa: E501
            markers ([WidgetMarker]): List of markers.. [optional]  # noqa: E501
            show_legend (bool): (screenboard only) Show the legend for this widget.. [optional]  # noqa: E501
            xaxis (WidgetAxis): [optional]  # noqa: E501
            yaxis (WidgetAxis): [optional]  # noqa: E501
            event_size (WidgetEventSize): [optional]  # noqa: E501
            tags_execution (str): The execution method for multi-value filters. Can be either and or or.. [optional]  # noqa: E501
            color (str): Color of the text.. [optional]  # noqa: E501
            font_size (str): Size of the text.. [optional]  # noqa: E501
            background_color (str): Background color of the note.. [optional]  # noqa: E501
            banner_img (str): URL of image to display as a banner for the group.. [optional]  # noqa: E501
            show_title (bool): Whether to show the title or not.. [optional] if omitted the server will use the default value of True  # noqa: E501
            events ([WidgetEvent]): List of widget events.. [optional]  # noqa: E501
            no_group_hosts (bool): Whether to show the hosts that don’t fit in a group.. [optional]  # noqa: E501
            no_metric_hosts (bool): Whether to show the hosts with no metrics.. [optional]  # noqa: E501
            node_type (WidgetNodeType): [optional]  # noqa: E501
            notes (str): Notes on the title.. [optional]  # noqa: E501
            scope ([str]): List of tags used to filter the map.. [optional]  # noqa: E501
            has_background (bool): Whether to display a background or not.. [optional] if omitted the server will use the default value of True  # noqa: E501
            has_border (bool): Whether to display a border or not.. [optional] if omitted the server will use the default value of True  # noqa: E501
            horizontal_align (WidgetHorizontalAlign): [optional]  # noqa: E501
            margin (WidgetMargin): [optional]  # noqa: E501
            sizing (WidgetImageSizing): [optional]  # noqa: E501
            url_dark_theme (str): URL of the image in dark mode.. [optional]  # noqa: E501
            vertical_align (WidgetVerticalAlign): [optional]  # noqa: E501
            columns ([str]): Which columns to display on the widget.. [optional]  # noqa: E501
            indexes ([str]): An array of index names to query in the stream. Use [] to query all indexes at once.. [optional]  # noqa: E501
            logset (str): ID of the log set to use.. [optional]  # noqa: E501
            message_display (WidgetMessageDisplay): [optional]  # noqa: E501
            show_date_column (bool): Whether to show the date column or not. [optional]  # noqa: E501
            show_message_column (bool): Whether to show the message column or not. [optional]  # noqa: E501
            sort (WidgetMonitorSummarySort): [optional]  # noqa: E501
            color_preference (WidgetColorPreference): [optional]  # noqa: E501
            count (int): The number of monitors to display.. [optional]  # noqa: E501
            display_format (WidgetServiceSummaryDisplayFormat): [optional]  # noqa: E501
            hide_zero_counts (bool): Whether to show counts of 0 or not.. [optional]  # noqa: E501
            show_last_triggered (bool): Whether to show the time that has elapsed since the monitor/group triggered.. [optional]  # noqa: E501
            start (int): The start of the list. Typically 0.. [optional]  # noqa: E501
            summary_type (WidgetSummaryType): [optional]  # noqa: E501
            has_padding (bool): Whether to add padding or not.. [optional] if omitted the server will use the default value of True  # noqa: E501
            show_tick (bool): Whether to show a tick or not.. [optional]  # noqa: E501
            tick_edge (WidgetTickEdge): [optional]  # noqa: E501
            tick_pos (str): Where to position the tick on an edge.. [optional]  # noqa: E501
            autoscale (bool): Whether to use auto-scaling or not.. [optional]  # noqa: E501
            custom_unit (str): Display a unit of your choice on the widget.. [optional]  # noqa: E501
            color_by_groups ([str]): List of groups used for colors.. [optional]  # noqa: E501
            global_time_target (str): Defined global time target.. [optional]  # noqa: E501
            show_error_budget (bool): Defined error budget.. [optional]  # noqa: E501
            slo_id (str): ID of the SLO displayed.. [optional]  # noqa: E501
            time_windows ([WidgetTimeWindows]): Times being monitored.. [optional]  # noqa: E501
            view_mode (WidgetViewMode): [optional]  # noqa: E501
            show_breakdown (bool): Whether to show the latency breakdown or not.. [optional]  # noqa: E501
            show_distribution (bool): Whether to show the latency distribution or not.. [optional]  # noqa: E501
            show_errors (bool): Whether to show the error metrics or not.. [optional]  # noqa: E501
            show_hits (bool): Whether to show the hits metrics or not.. [optional]  # noqa: E501
            show_latency (bool): Whether to show the latency metrics or not.. [optional]  # noqa: E501
            show_resource_list (bool): Whether to show the resource list or not.. [optional]  # noqa: E501
            size_format (WidgetSizeFormat): [optional]  # noqa: E501
            has_search_bar (TableWidgetHasSearchBar): [optional]  # noqa: E501
            legend_columns ([TimeseriesWidgetLegendColumn]): Columns displayed in the legend.. [optional]  # noqa: E501
            legend_layout (TimeseriesWidgetLegendLayout): [optional]  # noqa: E501
            right_yaxis (WidgetAxis): [optional]  # noqa: E501
            alert_id (str): ID of the alert to use in the widget.. [optional]  # noqa: E501
            type (ToplistWidgetDefinitionType): [optional]  # noqa: E501
            viz_type (WidgetVizType): [optional]  # noqa: E501
            requests ([ToplistWidgetRequest]): List of top list widget requests.. [optional]  # noqa: E501
            check (str): Name of the check to use in the widget.. [optional]  # noqa: E501
            grouping (WidgetGrouping): [optional]  # noqa: E501
            query (str): Query to filter the monitors with.. [optional]  # noqa: E501
            text (str): Text to display.. [optional]  # noqa: E501
            style (HostMapWidgetDefinitionStyle): [optional]  # noqa: E501
            view (GeomapWidgetDefinitionView): [optional]  # noqa: E501
            layout_type (WidgetLayoutType): [optional]  # noqa: E501
            widgets ([Widget]): List of widget groups.. [optional]  # noqa: E501
            url (str): URL of the image.. [optional]  # noqa: E501
            content (str): Content of the note.. [optional]  # noqa: E501
            view_type (str): Type of view displayed by the widget.. [optional] if omitted the server will use the default value of "detail"  # noqa: E501
            filters ([str]): Your environment and primary tag (or * if enabled for your account).. [optional]  # noqa: E501
            service (str): APM service.. [optional]  # noqa: E501
            env (str): APM environment.. [optional]  # noqa: E501
            span_name (str): APM span name.. [optional]  # noqa: E501
        """

        _check_type = kwargs.pop("_check_type", True)
        _spec_property_naming = kwargs.pop("_spec_property_naming", False)
        _path_to_item = kwargs.pop("_path_to_item", ())
        _configuration = kwargs.pop("_configuration", None)
        _visited_composed_classes = kwargs.pop("_visited_composed_classes", ())

        if args:
            raise ApiTypeError(
                "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments."
                % (
                    args,
                    self.__class__.__name__,
                ),
                path_to_item=_path_to_item,
                valid_classes=(self.__class__, ),
            )

        self._data_store = {}
        self._check_type = _check_type
        self._spec_property_naming = _spec_property_naming
        self._path_to_item = _path_to_item
        self._configuration = _configuration
        self._visited_composed_classes = _visited_composed_classes + (
            self.__class__, )

        constant_args = {
            "_check_type": _check_type,
            "_path_to_item": _path_to_item,
            "_spec_property_naming": _spec_property_naming,
            "_configuration": _configuration,
            "_visited_composed_classes": self._visited_composed_classes,
        }
        required_args = {}
        model_args = {}
        model_args.update(required_args)
        model_args.update(kwargs)
        composed_info = validate_get_composed_info(constant_args, model_args,
                                                   self)
        self._composed_instances = composed_info[0]
        self._var_name_to_model_instances = composed_info[1]
        self._additional_properties_model_instances = composed_info[2]
        unused_args = composed_info[3]

        for var_name, var_value in required_args.items():
            setattr(self, var_name, var_value)
        for var_name, var_value in kwargs.items():
            if (var_name in unused_args and self._configuration is not None
                    and self._configuration.discard_unknown_keys
                    and not self._additional_properties_model_instances):
                # discard variable.
                continue
            setattr(self, var_name, var_value)
示例#6
0
    def __init__(self, *args, **kwargs):  # noqa: E501
        """LogsProcessor - a model defined in OpenAPI

        Keyword Args:
            _check_type (bool): if True, values for parameters in openapi_types
                                will be type checked and a TypeError will be
                                raised if the wrong type is input.
                                Defaults to True
            _path_to_item (tuple/list): This is a list of keys or values to
                                drill down to the model in received_data
                                when deserializing a response
            _spec_property_naming (bool): True if the variable names in the input data
                                are serialized names, as specified in the OpenAPI document.
                                False if the variable names in the input data
                                are pythonic names, e.g. snake case (default)
            _configuration (Configuration): the instance to use when
                                deserializing a file_type parameter.
                                If passed, type conversion is attempted
                                If omitted no type conversion is done.
            _visited_composed_classes (tuple): This stores a tuple of
                                classes that we have traveled through so that
                                if we see that class again we will not use its
                                discriminator again.
                                When traveling through a discriminator, the
                                composed schema that is
                                is traveled through is added to this set.
                                For example if Animal has a discriminator
                                petType and we pass in "Dog", and the class Dog
                                allOf includes Animal, we move through Animal
                                once using the discriminator, and pick Dog.
                                Then in Dog, we will make an instance of the
                                Animal class but this time we won't travel
                                through its discriminator because we passed in
                                _visited_composed_classes = (Animal,)
            is_enabled (bool): Whether or not the processor is enabled.. [optional] if omitted the server will use the default value of False  # noqa: E501
            name (str): Name of the processor.. [optional]  # noqa: E501
            samples ([str]): List of sample logs to test this grok parser.. [optional]  # noqa: E501
            override_on_conflict (bool): Override or not the target element if already set,. [optional] if omitted the server will use the default value of False  # noqa: E501
            preserve_source (bool): Remove or preserve the remapped source element.. [optional] if omitted the server will use the default value of False  # noqa: E501
            source_type (str): Defines if the sources are from log `attribute` or `tag`.. [optional] if omitted the server will use the default value of "attribute"  # noqa: E501
            target_format (TargetFormatType): [optional]  # noqa: E501
            target_type (str): Defines if the final attribute or tag name is from log `attribute` or `tag`.. [optional] if omitted the server will use the default value of "attribute"  # noqa: E501
            normalize_ending_slashes (bool, none_type): Normalize the ending slashes or not.. [optional] if omitted the server will use the default value of False  # noqa: E501
            is_encoded (bool): Define if the source attribute is URL encoded or not.. [optional] if omitted the server will use the default value of False  # noqa: E501
            is_replace_missing (bool): If true, it replaces all missing attributes of `template` by an empty string. If `false` (default), skips the operation for missing attributes.. [optional] if omitted the server will use the default value of False  # noqa: E501
            filter (LogsFilter): [optional]  # noqa: E501
            processors ([LogsProcessor]): Ordered list of processors in this pipeline.. [optional]  # noqa: E501
            default_lookup (str): Value to set the target attribute if the source value is not found in the list.. [optional]  # noqa: E501
            grok (LogsGrokParserRules): [optional]  # noqa: E501
            source (str): Source attribute used to perform the lookup.. [optional]  # noqa: E501
            type (LogsTraceRemapperType): [optional]  # noqa: E501
            sources ([str]): Array of source attributes.. [optional] if omitted the server will use the default value of ["dd.trace_id"]  # noqa: E501
            target (str): Name of the attribute that contains the corresponding value in the mapping list or the `default_lookup` if not found in the mapping list.. [optional]  # noqa: E501
            categories ([LogsCategoryProcessorCategory]): Array of filters to match or not a log and their corresponding `name`to assign a custom value to the log.. [optional]  # noqa: E501
            expression (str): Arithmetic operation between one or more log attributes.. [optional]  # noqa: E501
            template (str): A formula with one or more attributes and raw text.. [optional]  # noqa: E501
            lookup_table ([str]): Mapping table of values for the source attribute and their associated target attribute values, formatted as `[\"source_key1,target_value1\", \"source_key2,target_value2\"]`. [optional]  # noqa: E501
        """

        _check_type = kwargs.pop("_check_type", True)
        _spec_property_naming = kwargs.pop("_spec_property_naming", False)
        _path_to_item = kwargs.pop("_path_to_item", ())
        _configuration = kwargs.pop("_configuration", None)
        _visited_composed_classes = kwargs.pop("_visited_composed_classes", ())

        if args:
            raise ApiTypeError(
                "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments."
                % (
                    args,
                    self.__class__.__name__,
                ),
                path_to_item=_path_to_item,
                valid_classes=(self.__class__,),
            )

        self._data_store = {}
        self._check_type = _check_type
        self._spec_property_naming = _spec_property_naming
        self._path_to_item = _path_to_item
        self._configuration = _configuration
        self._visited_composed_classes = _visited_composed_classes + (self.__class__,)

        constant_args = {
            "_check_type": _check_type,
            "_path_to_item": _path_to_item,
            "_spec_property_naming": _spec_property_naming,
            "_configuration": _configuration,
            "_visited_composed_classes": self._visited_composed_classes,
        }
        required_args = {}
        model_args = {}
        model_args.update(required_args)
        model_args.update(kwargs)
        composed_info = validate_get_composed_info(constant_args, model_args, self)
        self._composed_instances = composed_info[0]
        self._var_name_to_model_instances = composed_info[1]
        self._additional_properties_model_instances = composed_info[2]
        unused_args = composed_info[3]

        for var_name, var_value in required_args.items():
            setattr(self, var_name, var_value)
        for var_name, var_value in kwargs.items():
            if (
                var_name in unused_args
                and self._configuration is not None
                and self._configuration.discard_unknown_keys
                and not self._additional_properties_model_instances
            ):
                # discard variable.
                continue
            setattr(self, var_name, var_value)