Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Automated regeneration of Discovery client #10847

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion clients/discovery/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Install this package from [Hex](https://hex.pm) by adding

```elixir
def deps do
[{:google_api_discovery, "~> 0.12"}]
[{:google_api_discovery, "~> 0.13"}]
end
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@ defmodule GoogleApi.Discovery.V1.Model.JsonSchema do
* `additionalProperties` (*type:* `GoogleApi.Discovery.V1.Model.JsonSchema.t`, *default:* `nil`) - If this is a schema for an object, this property is the schema for any additional properties with dynamic keys on this object.
* `annotations` (*type:* `GoogleApi.Discovery.V1.Model.JsonSchemaAnnotations.t`, *default:* `nil`) - Additional information about this property.
* `default` (*type:* `String.t`, *default:* `nil`) - The default value of this property (if one exists).
* `deprecated` (*type:* `boolean()`, *default:* `nil`) - Whether the parameter is deprecated.
* `description` (*type:* `String.t`, *default:* `nil`) - A description of this object.
* `enum` (*type:* `list(String.t)`, *default:* `nil`) - Values this parameter may take (if it is an enum).
* `enumDeprecated` (*type:* `list(boolean())`, *default:* `nil`) - The deprecation status for the enums. Each position maps to the corresponding value in the "enum" array.
* `enumDescriptions` (*type:* `list(String.t)`, *default:* `nil`) - The descriptions for the enums. Each position maps to the corresponding value in the "enum" array.
* `format` (*type:* `String.t`, *default:* `nil`) - An additional regular expression or key that helps constrain the value. For more details see: http://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.23
* `id` (*type:* `String.t`, *default:* `nil`) - Unique identifier for this schema.
Expand All @@ -50,8 +52,10 @@ defmodule GoogleApi.Discovery.V1.Model.JsonSchema do
:additionalProperties => GoogleApi.Discovery.V1.Model.JsonSchema.t() | nil,
:annotations => GoogleApi.Discovery.V1.Model.JsonSchemaAnnotations.t() | nil,
:default => String.t() | nil,
:deprecated => boolean() | nil,
:description => String.t() | nil,
:enum => list(String.t()) | nil,
:enumDeprecated => list(boolean()) | nil,
:enumDescriptions => list(String.t()) | nil,
:format => String.t() | nil,
:id => String.t() | nil,
Expand All @@ -73,8 +77,10 @@ defmodule GoogleApi.Discovery.V1.Model.JsonSchema do
field(:additionalProperties, as: GoogleApi.Discovery.V1.Model.JsonSchema)
field(:annotations, as: GoogleApi.Discovery.V1.Model.JsonSchemaAnnotations)
field(:default)
field(:deprecated)
field(:description)
field(:enum, type: :list)
field(:enumDeprecated, type: :list)
field(:enumDescriptions, type: :list)
field(:format)
field(:id)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ defmodule GoogleApi.Discovery.V1.Model.RestDescription do
* `description` (*type:* `String.t`, *default:* `nil`) - The description of this API.
* `discoveryVersion` (*type:* `String.t`, *default:* `v1`) - Indicate the version of the Discovery API used to generate this doc.
* `documentationLink` (*type:* `String.t`, *default:* `nil`) - A link to human readable documentation for the API.
* `endpoints` (*type:* `list(GoogleApi.Discovery.V1.Model.RestDescriptionEndpoints.t)`, *default:* `nil`) - A list of location-based endpoint objects for this API. Each object contains the endpoint URL, location, description and deprecation status.
* `etag` (*type:* `String.t`, *default:* `nil`) - The ETag for this response.
* `exponentialBackoffDefault` (*type:* `boolean()`, *default:* `nil`) - Enable exponential backoff for suitable methods in the generated clients.
* `features` (*type:* `list(String.t)`, *default:* `nil`) - A list of supported features for this API.
Expand Down Expand Up @@ -64,6 +65,7 @@ defmodule GoogleApi.Discovery.V1.Model.RestDescription do
:description => String.t() | nil,
:discoveryVersion => String.t() | nil,
:documentationLink => String.t() | nil,
:endpoints => list(GoogleApi.Discovery.V1.Model.RestDescriptionEndpoints.t()) | nil,
:etag => String.t() | nil,
:exponentialBackoffDefault => boolean() | nil,
:features => list(String.t()) | nil,
Expand Down Expand Up @@ -100,6 +102,7 @@ defmodule GoogleApi.Discovery.V1.Model.RestDescription do
field(:description)
field(:discoveryVersion)
field(:documentationLink)
field(:endpoints, as: GoogleApi.Discovery.V1.Model.RestDescriptionEndpoints, type: :list)
field(:etag)
field(:exponentialBackoffDefault)
field(:features, type: :list)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Copyright 2019 Google LLC
#
# 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 file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Discovery.V1.Model.RestDescriptionEndpoints do
@moduledoc """
A single endpoint object

## Attributes

* `deprecated` (*type:* `boolean()`, *default:* `nil`) - Whether this endpoint is deprecated
* `description` (*type:* `String.t`, *default:* `nil`) - A string describing the host designated by the URL
* `endpointUrl` (*type:* `String.t`, *default:* `nil`) - The URL of the endpoint target host
* `location` (*type:* `String.t`, *default:* `nil`) - The location of the endpoint
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:deprecated => boolean() | nil,
:description => String.t() | nil,
:endpointUrl => String.t() | nil,
:location => String.t() | nil
}

field(:deprecated)
field(:description)
field(:endpointUrl)
field(:location)
end

defimpl Poison.Decoder, for: GoogleApi.Discovery.V1.Model.RestDescriptionEndpoints do
def decode(value, options) do
GoogleApi.Discovery.V1.Model.RestDescriptionEndpoints.decode(value, options)
end
end

defimpl Poison.Encoder, for: GoogleApi.Discovery.V1.Model.RestDescriptionEndpoints do
def encode(value, options) do
GoogleApi.Gax.ModelBase.encode(value, options)
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ defmodule GoogleApi.Discovery.V1.Model.RestMethod do

## Attributes

* `deprecated` (*type:* `boolean()`, *default:* `nil`) - Whether this method is deprecated.
* `description` (*type:* `String.t`, *default:* `nil`) - Description of this method.
* `etagRequired` (*type:* `boolean()`, *default:* `nil`) - Whether this method requires an ETag to be specified. The ETag is sent as an HTTP If-Match or If-None-Match header.
* `flatPath` (*type:* `String.t`, *default:* `nil`) - The URI path of this REST method in (RFC 6570) format without level 2 features ({+var}). Supplementary to the path property.
Expand All @@ -42,6 +43,7 @@ defmodule GoogleApi.Discovery.V1.Model.RestMethod do
use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:deprecated => boolean() | nil,
:description => String.t() | nil,
:etagRequired => boolean() | nil,
:flatPath => String.t() | nil,
Expand All @@ -61,6 +63,7 @@ defmodule GoogleApi.Discovery.V1.Model.RestMethod do
:useMediaDownloadService => boolean() | nil
}

field(:deprecated)
field(:description)
field(:etagRequired)
field(:flatPath)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,22 @@ defmodule GoogleApi.Discovery.V1.Model.RestResource do

## Attributes

* `deprecated` (*type:* `boolean()`, *default:* `nil`) - Whether this resource is deprecated.
* `methods` (*type:* `%{optional(String.t) => GoogleApi.Discovery.V1.Model.RestMethod.t}`, *default:* `nil`) - Methods on this resource.
* `resources` (*type:* `%{optional(String.t) => GoogleApi.Discovery.V1.Model.RestResource.t}`, *default:* `nil`) - Sub-resources on this resource.
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:deprecated => boolean() | nil,
:methods =>
%{optional(String.t()) => GoogleApi.Discovery.V1.Model.RestMethod.t()} | nil,
:resources =>
%{optional(String.t()) => GoogleApi.Discovery.V1.Model.RestResource.t()} | nil
}

field(:deprecated)
field(:methods, as: GoogleApi.Discovery.V1.Model.RestMethod, type: :map)
field(:resources, as: GoogleApi.Discovery.V1.Model.RestResource, type: :map)
end
Expand Down
2 changes: 1 addition & 1 deletion clients/discovery/mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
defmodule GoogleApi.Discovery.Mixfile do
use Mix.Project

@version "0.12.0"
@version "0.13.0"

def project() do
[
Expand Down
Loading