/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements. See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership. The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License. You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied. See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */


================================
Test a struct with crazy nesting
================================

struct CrazyNesting {
  1: string string_field,
  2: optional set<Insanity> set_field,
  // Do not insert line break as test/go/Makefile.am is removing this line with pattern match
  3: required list<map<set<i32> (python.immutable = ""), map<i32,set<list<map<Insanity,string>(python.immutable = "")> (python.immutable = "")>>>> list_field,
  4: binary binary_field
  5: uuid uuid_field
}

---

(document
  (struct_definition
    (identifier)
    (field
      (field_id
        (number))
      (type
        (primitive))
      (identifier))
    (field
      (field_id
        (number))
      (field_modifier)
      (type
        (container_type
          (set
            (type
              (identifier)))))
      (identifier))
    (comment)
    (field
      (field_id
        (number))
      (field_modifier)
      (type
        (container_type
          (list
            (type
              (container_type
                (map
                  (type
                    (container_type
                      (set
                        (type
                          (primitive))
                        (annotation_definition
                          (annotation_identifier
                            (identifier)
                            (identifier))
                          (literal
                            (string))))))
                  (type
                    (container_type
                      (map
                        (type
                          (primitive))
                        (type
                          (container_type
                            (set
                              (type
                                (container_type
                                  (list
                                    (type
                                      (container_type
                                        (map
                                          (type
                                            (identifier))
                                          (type
                                            (primitive))
                                          (annotation_definition
                                            (annotation_identifier
                                              (identifier)
                                              (identifier))
                                            (literal
                                              (string))))))
                                    (annotation_definition
                                      (annotation_identifier
                                        (identifier)
                                        (identifier))
                                      (literal
                                        (string))))))))))))))))))
      (identifier))
    (field
      (field_id
        (number))
      (type
        (primitive))
      (identifier))
    (field
      (field_id
        (number))
      (type
        (identifier))
      (identifier))))
