Current section
Files
Jump to
Current section
Files
lib/googly/cloud_storage/model/objects.ex
# NOTE: This file is auto generated by googly. Do not edit it manually.
defmodule Googly.CloudStorage.Model.Objects do
@moduledoc """
A list of objects.
## Attributes
* `items` (*type:* `list(Googly.CloudStorage.Model.Object.t())`) - The list of items.
* `kind` (*type:* `String.t()`) - The kind of item this is. For lists of objects, this is always storage#objects.
* `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.
* `prefixes` (*type:* `list(String.t())`) - The list of prefixes of objects matching-but-not-listed up to and including the requested delimiter.
"""
defstruct [:items, :kind, :next_page_token, :prefixes]
@type t :: %__MODULE__{
items: list(Googly.CloudStorage.Model.Object.t()) | nil,
kind: String.t() | nil,
next_page_token: String.t() | nil,
prefixes: 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.Object.decode(m["items"]),
kind: m["kind"],
next_page_token: m["nextPageToken"],
prefixes: m["prefixes"]
}
end
end