|
| 1 | +# Copyright 2019 Google LLC |
| 2 | +# |
| 3 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +# you may not use this file except in compliance with the License. |
| 5 | +# You may obtain a copy of the License at |
| 6 | +# |
| 7 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +# |
| 9 | +# Unless required by applicable law or agreed to in writing, software |
| 10 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +# See the License for the specific language governing permissions and |
| 13 | +# limitations under the License. |
| 14 | + |
| 15 | +# NOTE: This file is auto generated by the elixir code generator program. |
| 16 | +# Do not edit this file manually. |
| 17 | + |
| 18 | +defmodule GoogleApi.CloudBuild.V1.Model.RepositoryEventConfig do |
| 19 | + @moduledoc """ |
| 20 | + The configuration of a trigger that creates a build whenever an event from Repo API is received. |
| 21 | +
|
| 22 | + ## Attributes |
| 23 | +
|
| 24 | + * `pullRequest` (*type:* `GoogleApi.CloudBuild.V1.Model.PullRequestFilter.t`, *default:* `nil`) - Filter to match changes in pull requests. |
| 25 | + * `push` (*type:* `GoogleApi.CloudBuild.V1.Model.PushFilter.t`, *default:* `nil`) - Filter to match changes in refs like branches, tags. |
| 26 | + * `repository` (*type:* `String.t`, *default:* `nil`) - The resource name of the Repo API resource. |
| 27 | + * `repositoryType` (*type:* `String.t`, *default:* `nil`) - Output only. The type of the SCM vendor the repository points to. |
| 28 | + """ |
| 29 | + |
| 30 | + use GoogleApi.Gax.ModelBase |
| 31 | + |
| 32 | + @type t :: %__MODULE__{ |
| 33 | + :pullRequest => GoogleApi.CloudBuild.V1.Model.PullRequestFilter.t() | nil, |
| 34 | + :push => GoogleApi.CloudBuild.V1.Model.PushFilter.t() | nil, |
| 35 | + :repository => String.t() | nil, |
| 36 | + :repositoryType => String.t() | nil |
| 37 | + } |
| 38 | + |
| 39 | + field(:pullRequest, as: GoogleApi.CloudBuild.V1.Model.PullRequestFilter) |
| 40 | + field(:push, as: GoogleApi.CloudBuild.V1.Model.PushFilter) |
| 41 | + field(:repository) |
| 42 | + field(:repositoryType) |
| 43 | +end |
| 44 | + |
| 45 | +defimpl Poison.Decoder, for: GoogleApi.CloudBuild.V1.Model.RepositoryEventConfig do |
| 46 | + def decode(value, options) do |
| 47 | + GoogleApi.CloudBuild.V1.Model.RepositoryEventConfig.decode(value, options) |
| 48 | + end |
| 49 | +end |
| 50 | + |
| 51 | +defimpl Poison.Encoder, for: GoogleApi.CloudBuild.V1.Model.RepositoryEventConfig do |
| 52 | + def encode(value, options) do |
| 53 | + GoogleApi.Gax.ModelBase.encode(value, options) |
| 54 | + end |
| 55 | +end |
0 commit comments