# coding: utf-8

"""
    ThousandEyes for OpenTelemetry API

    **Note:** The following ThousandEyes for OpenTelemetry API capabilities are not available for ThousandEyes for Government instance:  * Traces * OTel-based integrations that rely on connectors and operations, including:   * Splunk Cloud Platform HEC   * Splunk Enterprise HEC   * Splunk Observability APM   * Dynatrace Observability APM  ThousandEyes for OpenTelemetry provides machine-to-machine integration between ThousandEyes and its customers. It allows you to export ThousandEyes telemetry data in OTel format, which is widely used in the industry. With ThousandEyes for OTel, you can leverage frameworks widely used in the observability domain - such as Splunk, Grafana, and Honeycomb - to capture and analyze ThousandEyes data. Any client that supports OTel can use ThousandEyes for OpenTelemetry.  ThousandEyes for OTel is made up of the following components:  * Data streaming APIs that you can use to configure and enable your ThousandEyes tests with OTel-compatible streams, in particular to configure how ThousandEyes telemetry data is exported to client integrations. * A set of streaming pipelines called _collectors_ that actively fetch ThousandEyes network test data, enrich the data with some additional detail, filter, and push the data to the customer-configured endpoints, depending on what you configure via the public APIs. * Third-party OTel collectors that receive, transform, filter, and export different metrics to client applications such as AppD, or any other OTel-capable client configuration.  For more information about ThousandEyes for OpenTelemetry, see the [product documentation](https://docs.thousandeyes.com/product-documentation/integration-guides/opentelemetry). 

    Generated by OpenAPI Generator (https://openapi-generator.tech)

    Do not edit the class manually.
"""  # noqa: E501


import json

from sdk_test_support.mock_server_types import ErrorResponseExpectation, OperationExpectation

OPERATION_MANIFEST = {

    "create_stream": OperationExpectation(
        operation_id="create_stream",
        method="POST",
        path="/streams",
        path_param_examples={
        },
        success_status=201,
        success_body=json.loads("""

                {
                  "endpointAgentLabel" : [ {
                    "id" : "1234"
                  }, {
                    "id" : "1234"
                  } ],
                  "endpointType" : "grpc",
                  "_links" : {
                    "self" : {
                      "href" : "https://api.thousandeyes.com/v7/streams/575766da-9664-4e85-94fe-facbe1154799"
                    }
                  },
                  "streamEndpointUrl" : "https://api.thousandeyes.otel-collector",
                  "exporterConfig" : {
                    "authorization" : {
                      "oAuth2" : {
                        "clientId" : "1234567890",
                        "tokenUrl" : "https://example.com/token",
                        "clientSecret" : "1234567890",
                        "scopes" : [ "read", "write" ]
                      }
                    },
                    "splunkHec" : {
                      "sourceType" : "ThousandEyesOTel",
                      "index" : "thousandeyes_otel_events_index",
                      "source" : "ThousandEyesOTel",
                      "token" : "d0a91307-be2f-4218-a9f8-71c02d98846b"
                    }
                  },
                  "filters" : {
                    "testTypes" : {
                      "values" : [ "agent-to-server", "bgp", "http-server" ]
                    }
                  },
                  "type" : "opentelemetry",
                  "enabled" : true,
                  "dataModelVersion" : "v2",
                  "endpointAgentTag" : [ {
                    "id" : "91863f70-e5a6-4a1c-a266-caf02db3607d"
                  }, {
                    "id" : "91863f70-e5a6-4a1c-a266-caf02db3607d"
                  } ],
                  "testMatch" : [ {
                    "id" : "1234",
                    "domain" : "cea"
                  }, {
                    "id" : "5678",
                    "domain" : "endpoint"
                  } ],
                  "tagMatch" : [ {
                    "key" : "keyA",
                    "value" : "valueA"
                  }, {
                    "key" : "keyB",
                    "value" : "valueB"
                  } ],
                  "id" : "342ieu09",
                  "streamStatus" : {
                    "lastSuccess" : 1679677853573,
                    "lastFailure" : 1679677853573,
                    "status" : "connected"
                  },
                  "signal" : "metric",
                  "auditOperation" : {
                    "createdDate" : 1679677853573,
                    "createdBy" : 3962
                  },
                  "customHeaders" : {
                    "Authorization" : "*****",
                    "Content-Type" : "*****"
                  }
                }

                """),

        success_content_type="application/json",

        request_body_example=json.loads("""

                {
                  "endpointAgentLabel" : [ {
                    "id" : "1234"
                  }, {
                    "id" : "1234"
                  } ],
                  "endpointType" : "grpc",
                  "streamEndpointUrl" : "https://api.thousandeyes.otel-collector",
                  "exporterConfig" : {
                    "authorization" : {
                      "oAuth2" : {
                        "clientId" : "1234567890",
                        "tokenUrl" : "https://example.com/token",
                        "clientSecret" : "1234567890",
                        "scopes" : [ "read", "write" ]
                      }
                    },
                    "splunkHec" : {
                      "sourceType" : "ThousandEyesOTel",
                      "index" : "thousandeyes_otel_events_index",
                      "source" : "ThousandEyesOTel",
                      "token" : "d0a91307-be2f-4218-a9f8-71c02d98846b"
                    }
                  },
                  "filters" : {
                    "testTypes" : {
                      "values" : [ "agent-to-server", "bgp", "http-server" ]
                    }
                  },
                  "type" : "opentelemetry",
                  "dataModelVersion" : "v2",
                  "enabled" : true,
                  "endpointAgentTag" : [ {
                    "id" : "91863f70-e5a6-4a1c-a266-caf02db3607d"
                  }, {
                    "id" : "91863f70-e5a6-4a1c-a266-caf02db3607d"
                  } ],
                  "testMatch" : [ {
                    "id" : "1234",
                    "domain" : "cea"
                  }, {
                    "id" : "5678",
                    "domain" : "endpoint"
                  } ],
                  "tagMatch" : [ {
                    "key" : "keyA",
                    "value" : "valueA"
                  }, {
                    "key" : "keyB",
                    "value" : "valueB"
                  } ],
                  "signal" : "metric",
                  "customHeaders" : {
                    "Authorization" : "*****",
                    "Content-Type" : "*****"
                  }
                }

                """),
        error_responses={

            "400": ErrorResponseExpectation(
                status=400,
                body=json.loads("""
                {
                  "path" : "https://api.thousandeyes.com/v7/streams",
                  "httpStatus" : "BAD_REQUEST",
                  "errors" : [ "JSON parse error: invalid type", "JSON parse error: invalid type" ],
                  "timestamp" : 1679677853573
                }"""),
                content_type="application/json",
            ),

            "401": ErrorResponseExpectation(
                status=401,
                body=json.loads("""
                {
                  "error_description" : "Invalid access token",
                  "error" : "invalid_token"
                }"""),
                content_type="application/json",
            ),

            "412": ErrorResponseExpectation(
                status=412,
                body=json.loads("""
                {
                  "path" : "https://api.thousandeyes.com/v7/streams",
                  "httpStatus" : "PRECONDITION_FAILED",
                  "errors" : [ "User cannot create more than 5 integrations", "User cannot create more than 5 integrations" ],
                  "timestamp" : 1679677853573
                }"""),
                content_type="application/json",
            ),

            "500": ErrorResponseExpectation(
                status=500,
                body=json.loads("""
                {
                  "path" : "https://api.thousandeyes.com/v7/request/path",
                  "errors" : "Internal Server Error",
                  "timestamp" : 1679677853573,
                  "status" : 500
                }"""),
                content_type="application/json",
            ),

        },
    ),

    "delete_stream": OperationExpectation(
        operation_id="delete_stream",
        method="DELETE",
        path="/streams/{id}",
        path_param_examples={
            "id": 'id_example',
        },
        success_status=204,
        success_body=None,
        success_content_type="application/json",
        request_body_example=None,
        error_responses={

            "401": ErrorResponseExpectation(
                status=401,
                body=json.loads("""
                {
                  "error_description" : "Invalid access token",
                  "error" : "invalid_token"
                }"""),
                content_type="application/json",
            ),

            "500": ErrorResponseExpectation(
                status=500,
                body=json.loads("""
                {
                  "path" : "https://api.thousandeyes.com/v7/request/path",
                  "errors" : "Internal Server Error",
                  "timestamp" : 1679677853573,
                  "status" : 500
                }"""),
                content_type="application/json",
            ),

        },
    ),

    "get_stream": OperationExpectation(
        operation_id="get_stream",
        method="GET",
        path="/streams/{id}",
        path_param_examples={
            "id": 'id_example',
        },
        success_status=200,
        success_body=json.loads("""

                {
                  "endpointAgentLabel" : [ {
                    "id" : "1234"
                  }, {
                    "id" : "1234"
                  } ],
                  "endpointType" : "grpc",
                  "_links" : {
                    "self" : {
                      "href" : "https://api.thousandeyes.com/v7/streams/575766da-9664-4e85-94fe-facbe1154799"
                    }
                  },
                  "streamEndpointUrl" : "https://api.thousandeyes.otel-collector",
                  "exporterConfig" : {
                    "authorization" : {
                      "oAuth2" : {
                        "clientId" : "1234567890",
                        "tokenUrl" : "https://example.com/token",
                        "clientSecret" : "1234567890",
                        "scopes" : [ "read", "write" ]
                      }
                    },
                    "splunkHec" : {
                      "sourceType" : "ThousandEyesOTel",
                      "index" : "thousandeyes_otel_events_index",
                      "source" : "ThousandEyesOTel",
                      "token" : "d0a91307-be2f-4218-a9f8-71c02d98846b"
                    }
                  },
                  "filters" : {
                    "testTypes" : {
                      "values" : [ "agent-to-server", "bgp", "http-server" ]
                    }
                  },
                  "type" : "opentelemetry",
                  "enabled" : true,
                  "dataModelVersion" : "v2",
                  "endpointAgentTag" : [ {
                    "id" : "91863f70-e5a6-4a1c-a266-caf02db3607d"
                  }, {
                    "id" : "91863f70-e5a6-4a1c-a266-caf02db3607d"
                  } ],
                  "testMatch" : [ {
                    "id" : "1234",
                    "domain" : "cea"
                  }, {
                    "id" : "5678",
                    "domain" : "endpoint"
                  } ],
                  "tagMatch" : [ {
                    "key" : "keyA",
                    "value" : "valueA"
                  }, {
                    "key" : "keyB",
                    "value" : "valueB"
                  } ],
                  "id" : "342ieu09",
                  "streamStatus" : {
                    "lastSuccess" : 1679677853573,
                    "lastFailure" : 1679677853573,
                    "status" : "connected"
                  },
                  "signal" : "metric",
                  "auditOperation" : {
                    "createdDate" : 1679677853573,
                    "updatedBy" : 3962,
                    "createdBy" : 3962,
                    "updatedDate" : 1679677853573
                  },
                  "customHeaders" : {
                    "Authorization" : "*****",
                    "Content-Type" : "*****"
                  }
                }

                """),

        success_content_type="application/json",

        request_body_example=None,
        error_responses={

            "401": ErrorResponseExpectation(
                status=401,
                body=json.loads("""
                {
                  "error_description" : "Invalid access token",
                  "error" : "invalid_token"
                }"""),
                content_type="application/json",
            ),

            "500": ErrorResponseExpectation(
                status=500,
                body=json.loads("""
                {
                  "path" : "https://api.thousandeyes.com/v7/request/path",
                  "errors" : "Internal Server Error",
                  "timestamp" : 1679677853573,
                  "status" : 500
                }"""),
                content_type="application/json",
            ),

        },
    ),

    "get_streams": OperationExpectation(
        operation_id="get_streams",
        method="GET",
        path="/streams",
        path_param_examples={
        },
        success_status=200,
        success_body=json.loads("""

                [ {
                  "endpointAgentLabel" : [ {
                    "id" : "1234"
                  }, {
                    "id" : "1234"
                  } ],
                  "endpointType" : "grpc",
                  "_links" : {
                    "self" : {
                      "href" : "https://api.thousandeyes.com/v7/streams/575766da-9664-4e85-94fe-facbe1154799"
                    }
                  },
                  "streamEndpointUrl" : "https://api.thousandeyes.otel-collector",
                  "exporterConfig" : {
                    "authorization" : {
                      "oAuth2" : {
                        "clientId" : "1234567890",
                        "tokenUrl" : "https://example.com/token",
                        "clientSecret" : "1234567890",
                        "scopes" : [ "read", "write" ]
                      }
                    },
                    "splunkHec" : {
                      "sourceType" : "ThousandEyesOTel",
                      "index" : "thousandeyes_otel_events_index",
                      "source" : "ThousandEyesOTel",
                      "token" : "d0a91307-be2f-4218-a9f8-71c02d98846b"
                    }
                  },
                  "filters" : {
                    "testTypes" : {
                      "values" : [ "agent-to-server", "bgp", "http-server" ]
                    }
                  },
                  "type" : "opentelemetry",
                  "enabled" : true,
                  "dataModelVersion" : "v2",
                  "endpointAgentTag" : [ {
                    "id" : "91863f70-e5a6-4a1c-a266-caf02db3607d"
                  }, {
                    "id" : "91863f70-e5a6-4a1c-a266-caf02db3607d"
                  } ],
                  "testMatch" : [ {
                    "id" : "1234",
                    "domain" : "cea"
                  }, {
                    "id" : "5678",
                    "domain" : "endpoint"
                  } ],
                  "tagMatch" : [ {
                    "key" : "keyA",
                    "value" : "valueA"
                  }, {
                    "key" : "keyB",
                    "value" : "valueB"
                  } ],
                  "id" : "342ieu09",
                  "streamStatus" : {
                    "lastSuccess" : 1679677853573,
                    "lastFailure" : 1679677853573,
                    "status" : "connected"
                  },
                  "signal" : "metric",
                  "auditOperation" : {
                    "createdDate" : 1679677853573,
                    "updatedBy" : 3962,
                    "createdBy" : 3962,
                    "updatedDate" : 1679677853573
                  },
                  "customHeaders" : {
                    "Authorization" : "*****",
                    "Content-Type" : "*****"
                  }
                }, {
                  "endpointAgentLabel" : [ {
                    "id" : "1234"
                  }, {
                    "id" : "1234"
                  } ],
                  "endpointType" : "grpc",
                  "_links" : {
                    "self" : {
                      "href" : "https://api.thousandeyes.com/v7/streams/575766da-9664-4e85-94fe-facbe1154799"
                    }
                  },
                  "streamEndpointUrl" : "https://api.thousandeyes.otel-collector",
                  "exporterConfig" : {
                    "authorization" : {
                      "oAuth2" : {
                        "clientId" : "1234567890",
                        "tokenUrl" : "https://example.com/token",
                        "clientSecret" : "1234567890",
                        "scopes" : [ "read", "write" ]
                      }
                    },
                    "splunkHec" : {
                      "sourceType" : "ThousandEyesOTel",
                      "index" : "thousandeyes_otel_events_index",
                      "source" : "ThousandEyesOTel",
                      "token" : "d0a91307-be2f-4218-a9f8-71c02d98846b"
                    }
                  },
                  "filters" : {
                    "testTypes" : {
                      "values" : [ "agent-to-server", "bgp", "http-server" ]
                    }
                  },
                  "type" : "opentelemetry",
                  "enabled" : true,
                  "dataModelVersion" : "v2",
                  "endpointAgentTag" : [ {
                    "id" : "91863f70-e5a6-4a1c-a266-caf02db3607d"
                  }, {
                    "id" : "91863f70-e5a6-4a1c-a266-caf02db3607d"
                  } ],
                  "testMatch" : [ {
                    "id" : "1234",
                    "domain" : "cea"
                  }, {
                    "id" : "5678",
                    "domain" : "endpoint"
                  } ],
                  "tagMatch" : [ {
                    "key" : "keyA",
                    "value" : "valueA"
                  }, {
                    "key" : "keyB",
                    "value" : "valueB"
                  } ],
                  "id" : "342ieu09",
                  "streamStatus" : {
                    "lastSuccess" : 1679677853573,
                    "lastFailure" : 1679677853573,
                    "status" : "connected"
                  },
                  "signal" : "metric",
                  "auditOperation" : {
                    "createdDate" : 1679677853573,
                    "updatedBy" : 3962,
                    "createdBy" : 3962,
                    "updatedDate" : 1679677853573
                  },
                  "customHeaders" : {
                    "Authorization" : "*****",
                    "Content-Type" : "*****"
                  }
                } ]

                """),

        success_content_type="application/json",

        request_body_example=None,
        error_responses={

            "400": ErrorResponseExpectation(
                status=400,
                body=json.loads("""
                {
                  "path" : "https://api.thousandeyes.com/v7/streams",
                  "httpStatus" : "BAD_REQUEST",
                  "errors" : [ "JSON parse error: invalid type", "JSON parse error: invalid type" ],
                  "timestamp" : 1679677853573
                }"""),
                content_type="application/json",
            ),

            "401": ErrorResponseExpectation(
                status=401,
                body=json.loads("""
                {
                  "error_description" : "Invalid access token",
                  "error" : "invalid_token"
                }"""),
                content_type="application/json",
            ),

            "500": ErrorResponseExpectation(
                status=500,
                body=json.loads("""
                {
                  "path" : "https://api.thousandeyes.com/v7/request/path",
                  "errors" : "Internal Server Error",
                  "timestamp" : 1679677853573,
                  "status" : 500
                }"""),
                content_type="application/json",
            ),

        },
    ),

    "update_stream": OperationExpectation(
        operation_id="update_stream",
        method="PUT",
        path="/streams/{id}",
        path_param_examples={
            "id": 'id_example',
        },
        success_status=200,
        success_body=json.loads("""

                {
                  "endpointAgentLabel" : [ {
                    "id" : "1234"
                  }, {
                    "id" : "1234"
                  } ],
                  "endpointType" : "grpc",
                  "_links" : {
                    "self" : {
                      "href" : "https://api.thousandeyes.com/v7/streams/575766da-9664-4e85-94fe-facbe1154799"
                    }
                  },
                  "streamEndpointUrl" : "https://api.thousandeyes.otel-collector",
                  "exporterConfig" : {
                    "authorization" : {
                      "oAuth2" : {
                        "clientId" : "1234567890",
                        "tokenUrl" : "https://example.com/token",
                        "clientSecret" : "1234567890",
                        "scopes" : [ "read", "write" ]
                      }
                    },
                    "splunkHec" : {
                      "sourceType" : "ThousandEyesOTel",
                      "index" : "thousandeyes_otel_events_index",
                      "source" : "ThousandEyesOTel",
                      "token" : "d0a91307-be2f-4218-a9f8-71c02d98846b"
                    }
                  },
                  "filters" : {
                    "testTypes" : {
                      "values" : [ "agent-to-server", "bgp", "http-server" ]
                    }
                  },
                  "type" : "opentelemetry",
                  "enabled" : true,
                  "dataModelVersion" : "v2",
                  "endpointAgentTag" : [ {
                    "id" : "91863f70-e5a6-4a1c-a266-caf02db3607d"
                  }, {
                    "id" : "91863f70-e5a6-4a1c-a266-caf02db3607d"
                  } ],
                  "testMatch" : [ {
                    "id" : "1234",
                    "domain" : "cea"
                  }, {
                    "id" : "5678",
                    "domain" : "endpoint"
                  } ],
                  "tagMatch" : [ {
                    "key" : "keyA",
                    "value" : "valueA"
                  }, {
                    "key" : "keyB",
                    "value" : "valueB"
                  } ],
                  "id" : "342ieu09",
                  "streamStatus" : {
                    "lastSuccess" : 1679677853573,
                    "lastFailure" : 1679677853573,
                    "status" : "connected"
                  },
                  "signal" : "metric",
                  "auditOperation" : {
                    "createdDate" : 1679677853573,
                    "updatedBy" : 3962,
                    "createdBy" : 3962,
                    "updatedDate" : 1679677853573
                  },
                  "customHeaders" : {
                    "Authorization" : "*****",
                    "Content-Type" : "*****"
                  }
                }

                """),

        success_content_type="application/json",

        request_body_example=json.loads("""

                {
                  "endpointAgentLabel" : [ {
                    "id" : "1234"
                  }, {
                    "id" : "1234"
                  } ],
                  "endpointAgentTag" : [ {
                    "id" : "91863f70-e5a6-4a1c-a266-caf02db3607d"
                  }, {
                    "id" : "91863f70-e5a6-4a1c-a266-caf02db3607d"
                  } ],
                  "testMatch" : [ {
                    "id" : "1234",
                    "domain" : "cea"
                  }, {
                    "id" : "5678",
                    "domain" : "endpoint"
                  } ],
                  "streamEndpointUrl" : "https://api.thousandeyes.otel-collector",
                  "exporterConfig" : {
                    "authorization" : {
                      "oAuth2" : {
                        "clientId" : "1234567890",
                        "tokenUrl" : "https://example.com/token",
                        "clientSecret" : "1234567890",
                        "scopes" : [ "read", "write" ]
                      }
                    },
                    "splunkHec" : {
                      "sourceType" : "ThousandEyesOTel",
                      "index" : "thousandeyes_otel_events_index",
                      "source" : "ThousandEyesOTel",
                      "token" : "d0a91307-be2f-4218-a9f8-71c02d98846b"
                    }
                  },
                  "tagMatch" : [ {
                    "key" : "keyA",
                    "value" : "valueA"
                  }, {
                    "key" : "keyB",
                    "value" : "valueB"
                  } ],
                  "filters" : {
                    "testTypes" : {
                      "values" : [ "agent-to-server", "bgp", "http-server" ]
                    }
                  },
                  "customHeaders" : {
                    "Authorization" : "*****",
                    "Content-Type" : "*****"
                  },
                  "enabled" : true
                }

                """),
        error_responses={

            "400": ErrorResponseExpectation(
                status=400,
                body=json.loads("""
                {
                  "path" : "https://api.thousandeyes.com/v7/streams",
                  "httpStatus" : "BAD_REQUEST",
                  "errors" : [ "JSON parse error: invalid type", "JSON parse error: invalid type" ],
                  "timestamp" : 1679677853573
                }"""),
                content_type="application/json",
            ),

            "401": ErrorResponseExpectation(
                status=401,
                body=json.loads("""
                {
                  "error_description" : "Invalid access token",
                  "error" : "invalid_token"
                }"""),
                content_type="application/json",
            ),

            "500": ErrorResponseExpectation(
                status=500,
                body=json.loads("""
                {
                  "path" : "https://api.thousandeyes.com/v7/request/path",
                  "errors" : "Internal Server Error",
                  "timestamp" : 1679677853573,
                  "status" : 500
                }"""),
                content_type="application/json",
            ),

        },
    ),

}
