Packages

Google Cloud Storage JSON API client library. Stores and retrieves potentially large, immutable data objects.

Current section

Files

Jump to
googly_cloud_storage lib googly cloud_storage model buckets.ex
Raw

lib/googly/cloud_storage/model/buckets.ex

# NOTE: This file is auto generated by googly. Do not edit it manually.
defmodule Googly.CloudStorage.Model.Buckets do
@moduledoc """
A list of buckets.
## Attributes
* `items` (*type:* `list(Googly.CloudStorage.Model.Bucket.t())`) - The list of items.
* `kind` (*type:* `String.t()`) - The kind of item this is. For lists of buckets, this is always storage#buckets.
* `next_page_token` (*type:* `String.t()`) - The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results.
* `unreachable` (*type:* `list(String.t())`) - The list of bucket resource names that could not be reached during the listing operation.
"""
defstruct [:items, :kind, :next_page_token, :unreachable]
@type t :: %__MODULE__{
items: list(Googly.CloudStorage.Model.Bucket.t()) | nil,
kind: String.t() | nil,
next_page_token: String.t() | nil,
unreachable: list(String.t()) | nil
}
@wire %{next_page_token: "nextPageToken"}
@doc false
def __wire__, do: @wire
@doc false
def decode(nil), do: nil
def decode(list) when is_list(list), do: Enum.map(list, &decode/1)
def decode(m) do
%__MODULE__{
items: Googly.CloudStorage.Model.Bucket.decode(m["items"]),
kind: m["kind"],
next_page_token: m["nextPageToken"],
unreachable: m["unreachable"]
}
end
end