# 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.Script.V1.Model.Status do @moduledoc """ If a `run` call succeeds but the script function (or Apps Script itself) throws an exception, the response body's `error` field will contain this `Status` object. ## Attributes - code (Integer): The status code. For this API, this value will always be 3, corresponding to an <code>INVALID_ARGUMENT</code> error. Defaults to: `null`. - details (List[Object]): An array that contains a single `ExecutionError` object that provides information about the nature of the error. Defaults to: `null`. - message (String): A developer-facing error message, which is in English. Any user-facing error message is localized and sent in the [`google.rpc.Status.details`](google.rpc.Status.details) field, or localized by the client. Defaults to: `null`. """ defstruct [ :"code", :"details", :"message" ] end defimpl Poison.Decoder, for: GoogleApi.Script.V1.Model.Status do import GoogleApi.Script.V1.Deserializer def decode(value, options) do value |> deserialize(:"details", :list, GoogleApi.Script.V1.Model.Object, options) end end defimpl Poison.Encoder, for: GoogleApi.Script.V1.Model.Status do def encode(value, options) do GoogleApi.Script.V1.Deserializer.serialize_non_nil(value, options) end end