Current section

Files

Jump to
google_api_compute lib google_api compute v1 model path_matcher.ex
Raw

lib/google_api/compute/v1/model/path_matcher.ex

# 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 or routeRules defined by this PathMatcher are matched. 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 Use defaultService instead of defaultRouteAction when simple routing to a backend service is desired and other advanced capabilities like traffic splitting and URL rewrites are not required. Only one of defaultService, defaultRouteAction or defaultUrlRedirect must be set. Authorization requires one or more of the following Google IAM permissions on the specified resource default_service: - compute.backendBuckets.use - compute.backendServices.use 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. Use this list instead of routeRules when routing based on simple path matching is all that's required. The order by which path rules are specified does not matter. Matches are always done on the longest-path-first basis. For example: a pathRule with a path /a/b/c/* will match before /a/b/* irrespective of the order in which those paths appear in this list. Only one of pathRules or routeRules must be set. 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