# Copyright 2017 Google Inc. # # Licensed 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. # NOTE: This class is auto generated by the swagger code generator program. # https://github.com/swagger-api/swagger-codegen.git # Do not edit the class manually. defmodule GoogleApi.Compute.V1.Model.Route do @moduledoc """ Represents a Route resource. A route specifies how certain packets should be handled by the network. Routes are associated with instances by tags and the set of routes for a particular instance is called its routing table. For each packet leaving an instance, the system searches that instance's routing table for a single best matching route. Routes match packets by destination IP address, preferring smaller or more specific ranges over larger ones. If there is a tie, the system selects the route with the smallest priority value. If there is still a tie, it uses the layer three and four packet headers to select just one of the remaining matching routes. The packet is then forwarded as specified by the nextHop field of the winning route - either to another instance destination, an instance gateway, or a Google Compute Engine-operated gateway. Packets that do not match any route in the sending instance's routing table are dropped. """ @derive [Poison.Encoder] defstruct [ :"tags", :"creationTimestamp", :"description", :"destRange", :"id", :"kind", :"name", :"network", :"nextHopGateway", :"nextHopInstance", :"nextHopIp", :"nextHopNetwork", :"nextHopPeering", :"nextHopVpnTunnel", :"priority", :"selfLink", :"warnings" ] end defimpl Poison.Decoder, for: GoogleApi.Compute.V1.Model.Route do import GoogleApi.Compute.V1.Deserializer def decode(value, options) do value |> deserialize(:"warnings", :list, GoogleApi.Compute.V1.Model.Operation_warnings, options) end end