/// <summary>
 /// Initializes a new instance of the PluginUpsert class.
 /// </summary>
 /// <param name="name">The name of the Plugin that’s going to be added.
 /// Currently the Plugin must be installed in every Kong instance
 /// separately.</param>
 /// <param name="config">The configuration properties for the Plugin
 /// which can be found on the plugins documentation page in the Kong
 /// Hub.</param>
 /// <param name="route">If set, the plugin will only activate when
 /// receiving requests via the specified route. Leave unset for the
 /// plugin to activate regardless of the Route being used. Defaults to
 /// null. With form-encoded, the notation is route.id=&lt;route_id&gt;.
 /// With JSON, use "route":{"id":"&lt;route_id&gt;"}.</param>
 /// <param name="service">If set, the plugin will only activate when
 /// receiving requests via one of the routes belonging to the specified
 /// Service. Leave unset for the plugin to activate regardless of the
 /// Service being matched. Defaults to null. With form-encoded, the
 /// notation is service.id=&lt;service_id&gt;. With JSON, use
 /// "service":{"id":"&lt;service_id&gt;"}.</param>
 /// <param name="consumer">If set, the plugin will activate only for
 /// requests where the specified has been authenticated. (Note that
 /// some plugins can not be restricted to consumers this way.). Leave
 /// unset for the plugin to activate regardless of the authenticated
 /// consumer. Defaults to null. With form-encoded, the notation is
 /// consumer.id=&lt;consumer_id&gt;. With JSON, use
 /// "consumer":{"id":"&lt;consumer_id&gt;"}.</param>
 /// <param name="runOn">Control on which Kong nodes this plugin will
 /// run, given a Service Mesh scenario. Accepted values are: * first,
 /// meaning “run on the first Kong node that is encountered by the
 /// request”. On an API Getaway scenario, this is the usual operation,
 /// since there is only one Kong node in between source and
 /// destination. In a sidecar-to-sidecar Service Mesh scenario, this
 /// means running the plugin only on the Kong sidecar of the outbound
 /// connection. * second, meaning “run on the second node that is
 /// encountered by the request”. This option is only relevant for
 /// sidecar-to-sidecar Service Mesh scenarios: this means running the
 /// plugin only on the Kong sidecar of the inbound connection. * all
 /// means “run on all nodes”, meaning both sidecars in a
 /// sidecar-to-sidecar scenario. This is useful for tracing/logging
 /// plugins.</param>
 /// <param name="enabled">Whether the plugin is applied.</param>
 public PluginUpsert(string name = default(string), IDictionary <string, object> config = default(IDictionary <string, object>), RoutePreview route = default(RoutePreview), ServicePreview service = default(ServicePreview), ConsumerPreview consumer = default(ConsumerPreview), string runOn = default(string), bool?enabled = default(bool?))
 {
     Name     = name;
     Config   = config;
     Route    = route;
     Service  = service;
     Consumer = consumer;
     RunOn    = runOn;
     Enabled  = enabled;
     CustomInit();
 }
 /// <summary>
 /// Initializes a new instance of the Route class.
 /// </summary>
 /// <param name="name">The name of the Route.</param>
 /// <param name="protocols">A list of the protocols this Route should
 /// allow. When set to ["https"], HTTP requests are answered with a
 /// request to upgrade to HTTPS. Defaults to ["http", "https"].</param>
 /// <param name="methods">A list of HTTP methods that match this Route.
 /// When using http or https protocols, at least one of hosts, paths,
 /// or methods must be set.</param>
 /// <param name="hosts">A list of domain names that match this Route.
 /// When using http or https protocols, at least one of hosts, paths,
 /// or methods must be set. With form-encoded, the notation is
 /// hosts[]=example.com&amp;hosts[]=foo.test. With JSON, use an
 /// Array.</param>
 /// <param name="paths">A list of paths that match this Route. When
 /// using http or https protocols, at least one of hosts, paths, or
 /// methods must be set. With form-encoded, the notation is
 /// paths[]=/foo&amp;paths[]=/bar. With JSON, use an Array.</param>
 /// <param name="regexPriority">A number used to choose which route
 /// resolves a given request when several routes match it using regexes
 /// simultaneously. When two routes match the path and have the same
 /// regex_priority, the older one (lowest created_at) is used. Note
 /// that the priority for non-regex routes is different (longer
 /// non-regex routes are matched before shorter ones).</param>
 /// <param name="stripPath">When matching a Route via one of the paths,
 /// strip the matching prefix from the upstream request URL.</param>
 /// <param name="preserveHost">When matching a Route via one of the
 /// hosts domain names, use the request Host header in the upstream
 /// request headers. If set to false, the upstream Host header will be
 /// that of the Service’s host.</param>
 /// <param name="snis">A list of SNIs that match this Route when using
 /// stream routing. When using tcp or tls protocols, at least one of
 /// snis, sources, or destinations must be set.</param>
 /// <param name="sources">A list of IP sources of incoming connections
 /// that match this Route when using stream routing. Each entry is an
 /// object with fields “ip” (optionally in CIDR range notation) and/or
 /// “port”. When using tcp or tls protocols, at least one of snis,
 /// sources, or destinations must be set.</param>
 /// <param name="destinations">A list of IP destinations of incoming
 /// connections that match this Route when using stream routing. Each
 /// entry is an object with fields “ip” (optionally in CIDR range
 /// notation) and/or “port”. When using tcp or tls protocols, at least
 /// one of snis, sources, or destinations must be set.</param>
 /// <param name="id">Uid.</param>
 /// <param name="createdAt">Unix timestamp of the create action</param>
 /// <param name="updatedAt">Unix timestamp of the last update
 /// action</param>
 public Route(string name = default(string), IList <string> protocols = default(IList <string>), IList <string> methods = default(IList <string>), IList <string> hosts = default(IList <string>), IList <string> paths = default(IList <string>), int?regexPriority = default(int?), bool?stripPath = default(bool?), bool?preserveHost = default(bool?), IList <string> snis = default(IList <string>), IList <string> sources = default(IList <string>), IList <string> destinations = default(IList <string>), string id = default(string), int?createdAt = default(int?), int?updatedAt = default(int?), ServicePreview service = default(ServicePreview))
 {
     Name          = name;
     Protocols     = protocols;
     Methods       = methods;
     Hosts         = hosts;
     Paths         = paths;
     RegexPriority = regexPriority;
     StripPath     = stripPath;
     PreserveHost  = preserveHost;
     Snis          = snis;
     Sources       = sources;
     Destinations  = destinations;
     Id            = id;
     CreatedAt     = createdAt;
     UpdatedAt     = updatedAt;
     Service       = service;
     CustomInit();
 }