# 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.PathMatcher do @moduledoc """ A matcher for the path portion of the URL. The BackendService from the longest-matched rule will serve the URL. If no rule was matched, the default service will be used. ## Attributes - defaultService (String.t): The full or partial URL to the BackendService resource. This will be used if none of the pathRules defined by this PathMatcher is matched by the URL's path portion. For example, the following are all valid URLs to a BackendService resource: - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService - compute/v1/projects/project/global/backendServices/backendService - global/backendServices/backendService Defaults to: `null`. - description (String.t): An optional description of this resource. Provide this property when you create the resource. Defaults to: `null`. - name (String.t): The name to which this PathMatcher is referred by the HostRule. Defaults to: `null`. - pathRules ([PathRule]): The list of path rules. Defaults to: `null`. """ use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ :defaultService => any(), :description => any(), :name => any(), :pathRules => list(GoogleApi.Compute.V1.Model.PathRule.t()) } field(:defaultService) field(:description) field(:name) field(:pathRules, as: GoogleApi.Compute.V1.Model.PathRule, type: :list) end defimpl Poison.Decoder, for: GoogleApi.Compute.V1.Model.PathMatcher do def decode(value, options) do GoogleApi.Compute.V1.Model.PathMatcher.decode(value, options) end end defimpl Poison.Encoder, for: GoogleApi.Compute.V1.Model.PathMatcher do def encode(value, options) do GoogleApi.Gax.ModelBase.encode(value, options) end end