{
  "protocol": "rest",
  "servicePath": "",
  "mtlsRootUrl": "https://libraryagent.mtls.googleapis.com/",
  "revision": "20260628",
  "schemas": {
    "GoogleExampleLibraryagentV1ListShelvesResponse": {
      "id": "GoogleExampleLibraryagentV1ListShelvesResponse",
      "type": "object",
      "description": "Response message for LibraryAgent.ListShelves.",
      "properties": {
        "shelves": {
          "items": {
            "$ref": "GoogleExampleLibraryagentV1Shelf"
          },
          "description": "The list of shelves.",
          "type": "array"
        },
        "nextPageToken": {
          "description": "A token to retrieve next page of results. Pass this value in the ListShelvesRequest.page_token field in the subsequent call to `ListShelves` method to retrieve the next page of results.",
          "type": "string"
        }
      }
    },
    "GoogleExampleLibraryagentV1ListBooksResponse": {
      "type": "object",
      "description": "Response message for LibraryAgent.ListBooks.",
      "properties": {
        "books": {
          "description": "The list of books.",
          "type": "array",
          "items": {
            "$ref": "GoogleExampleLibraryagentV1Book"
          }
        },
        "nextPageToken": {
          "description": "A token to retrieve next page of results. Pass this value in the ListBooksRequest.page_token field in the subsequent call to `ListBooks` method to retrieve the next page of results.",
          "type": "string"
        }
      },
      "id": "GoogleExampleLibraryagentV1ListBooksResponse"
    },
    "GoogleExampleLibraryagentV1Book": {
      "id": "GoogleExampleLibraryagentV1Book",
      "type": "object",
      "description": "A single book in the library.",
      "properties": {
        "author": {
          "type": "string",
          "description": "The name of the book author."
        },
        "title": {
          "type": "string",
          "description": "The title of the book."
        },
        "read": {
          "description": "Value indicating whether the book has been read.",
          "type": "boolean"
        },
        "name": {
          "description": "The resource name of the book. Book names have the form `shelves/{shelf_id}/books/{book_id}`. The name is ignored when creating a book.",
          "type": "string"
        }
      }
    },
    "GoogleExampleLibraryagentV1Shelf": {
      "description": "A Shelf contains a collection of books with a theme.",
      "properties": {
        "name": {
          "description": "Output only. The resource name of the shelf. Shelf names have the form `shelves/{shelf_id}`. The name is ignored when creating a shelf.",
          "type": "string"
        },
        "theme": {
          "type": "string",
          "description": "The theme of the shelf"
        }
      },
      "type": "object",
      "id": "GoogleExampleLibraryagentV1Shelf"
    }
  },
  "resources": {
    "shelves": {
      "resources": {
        "books": {
          "methods": {
            "get": {
              "id": "libraryagent.shelves.books.get",
              "parameters": {
                "name": {
                  "type": "string",
                  "pattern": "^shelves/[^/]+/books/[^/]+$",
                  "required": true,
                  "description": "Required. The name of the book to retrieve.",
                  "location": "path"
                }
              },
              "response": {
                "$ref": "GoogleExampleLibraryagentV1Book"
              },
              "parameterOrder": [
                "name"
              ],
              "httpMethod": "GET",
              "path": "v1/{+name}",
              "description": "Gets a book. Returns NOT_FOUND if the book does not exist.",
              "flatPath": "v1/shelves/{shelvesId}/books/{booksId}",
              "scopes": [
                "https://www.googleapis.com/auth/cloud-platform"
              ]
            },
            "list": {
              "flatPath": "v1/shelves/{shelvesId}/books",
              "scopes": [
                "https://www.googleapis.com/auth/cloud-platform"
              ],
              "path": "v1/{+parent}/books",
              "description": "Lists books in a shelf. The order is unspecified but deterministic. Newly created books will not necessarily be added to the end of this list. Returns NOT_FOUND if the shelf does not exist.",
              "httpMethod": "GET",
              "parameterOrder": [
                "parent"
              ],
              "parameters": {
                "pageSize": {
                  "location": "query",
                  "type": "integer",
                  "description": "Requested page size. Server may return fewer books than requested. If unspecified, server will pick an appropriate default.",
                  "format": "int32"
                },
                "parent": {
                  "location": "path",
                  "description": "Required. The name of the shelf whose books we'd like to list.",
                  "required": true,
                  "pattern": "^shelves/[^/]+$",
                  "type": "string"
                },
                "pageToken": {
                  "description": "A token identifying a page of results the server should return. Typically, this is the value of ListBooksResponse.next_page_token. returned from the previous call to `ListBooks` method.",
                  "location": "query",
                  "type": "string"
                }
              },
              "response": {
                "$ref": "GoogleExampleLibraryagentV1ListBooksResponse"
              },
              "id": "libraryagent.shelves.books.list"
            },
            "borrow": {
              "httpMethod": "POST",
              "parameterOrder": [
                "name"
              ],
              "flatPath": "v1/shelves/{shelvesId}/books/{booksId}:borrow",
              "scopes": [
                "https://www.googleapis.com/auth/cloud-platform"
              ],
              "path": "v1/{+name}:borrow",
              "description": "Borrow a book from the library. Returns the book if it is borrowed successfully. Returns NOT_FOUND if the book does not exist in the library. Returns quota exceeded error if the amount of books borrowed exceeds allocation quota in any dimensions.",
              "id": "libraryagent.shelves.books.borrow",
              "response": {
                "$ref": "GoogleExampleLibraryagentV1Book"
              },
              "parameters": {
                "name": {
                  "type": "string",
                  "pattern": "^shelves/[^/]+/books/[^/]+$",
                  "required": true,
                  "description": "Required. The name of the book to borrow.",
                  "location": "path"
                }
              }
            },
            "return": {
              "httpMethod": "POST",
              "parameterOrder": [
                "name"
              ],
              "flatPath": "v1/shelves/{shelvesId}/books/{booksId}:return",
              "scopes": [
                "https://www.googleapis.com/auth/cloud-platform"
              ],
              "path": "v1/{+name}:return",
              "description": "Return a book to the library. Returns the book if it is returned to the library successfully. Returns error if the book does not belong to the library or the users didn't borrow before.",
              "id": "libraryagent.shelves.books.return",
              "parameters": {
                "name": {
                  "location": "path",
                  "description": "Required. The name of the book to return.",
                  "required": true,
                  "pattern": "^shelves/[^/]+/books/[^/]+$",
                  "type": "string"
                }
              },
              "response": {
                "$ref": "GoogleExampleLibraryagentV1Book"
              }
            }
          }
        }
      },
      "methods": {
        "list": {
          "flatPath": "v1/shelves",
          "scopes": [
            "https://www.googleapis.com/auth/cloud-platform"
          ],
          "path": "v1/shelves",
          "description": "Lists shelves. The order is unspecified but deterministic. Newly created shelves will not necessarily be added to the end of this list.",
          "httpMethod": "GET",
          "parameterOrder": [],
          "parameters": {
            "pageSize": {
              "location": "query",
              "type": "integer",
              "description": "Requested page size. Server may return fewer shelves than requested. If unspecified, server will pick an appropriate default.",
              "format": "int32"
            },
            "pageToken": {
              "location": "query",
              "type": "string",
              "description": "A token identifying a page of results the server should return. Typically, this is the value of ListShelvesResponse.next_page_token returned from the previous call to `ListShelves` method."
            }
          },
          "response": {
            "$ref": "GoogleExampleLibraryagentV1ListShelvesResponse"
          },
          "id": "libraryagent.shelves.list"
        },
        "get": {
          "parameters": {
            "name": {
              "location": "path",
              "description": "Required. The name of the shelf to retrieve.",
              "required": true,
              "pattern": "^shelves/[^/]+$",
              "type": "string"
            }
          },
          "response": {
            "$ref": "GoogleExampleLibraryagentV1Shelf"
          },
          "id": "libraryagent.shelves.get",
          "flatPath": "v1/shelves/{shelvesId}",
          "scopes": [
            "https://www.googleapis.com/auth/cloud-platform"
          ],
          "path": "v1/{+name}",
          "description": "Gets a shelf. Returns NOT_FOUND if the shelf does not exist.",
          "httpMethod": "GET",
          "parameterOrder": [
            "name"
          ]
        }
      }
    }
  },
  "description": "A simple Google Example Library API.",
  "ownerDomain": "google.com",
  "version_module": true,
  "documentationLink": "https://cloud.google.com/docs/quota",
  "icons": {
    "x16": "http://www.google.com/images/icons/product/search-16.gif",
    "x32": "http://www.google.com/images/icons/product/search-32.gif"
  },
  "parameters": {
    "key": {
      "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.",
      "type": "string",
      "location": "query"
    },
    "uploadType": {
      "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").",
      "type": "string",
      "location": "query"
    },
    "access_token": {
      "description": "OAuth access token.",
      "type": "string",
      "location": "query"
    },
    "alt": {
      "location": "query",
      "description": "Data format for response.",
      "enumDescriptions": [
        "Responses with Content-Type of application/json",
        "Media download with context-dependent Content-Type",
        "Responses with Content-Type of application/x-protobuf"
      ],
      "type": "string",
      "enum": [
        "json",
        "media",
        "proto"
      ],
      "default": "json"
    },
    "oauth_token": {
      "type": "string",
      "location": "query",
      "description": "OAuth 2.0 token for the current user."
    },
    "quotaUser": {
      "type": "string",
      "location": "query",
      "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters."
    },
    "callback": {
      "type": "string",
      "location": "query",
      "description": "JSONP"
    },
    "upload_protocol": {
      "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").",
      "type": "string",
      "location": "query"
    },
    "$.xgafv": {
      "enumDescriptions": [
        "v1 error format",
        "v2 error format"
      ],
      "description": "V1 error format.",
      "location": "query",
      "type": "string",
      "enum": [
        "1",
        "2"
      ]
    },
    "fields": {
      "type": "string",
      "location": "query",
      "description": "Selector specifying which fields to include in a partial response."
    },
    "prettyPrint": {
      "default": "true",
      "type": "boolean",
      "location": "query",
      "description": "Returns response with indentations and line breaks."
    }
  },
  "rootUrl": "https://libraryagent.googleapis.com/",
  "auth": {
    "oauth2": {
      "scopes": {
        "https://www.googleapis.com/auth/cloud-platform": {
          "description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account."
        }
      }
    }
  },
  "ownerName": "Google",
  "baseUrl": "https://libraryagent.googleapis.com/",
  "canonicalName": "Libraryagent",
  "version": "v1",
  "kind": "discovery#restDescription",
  "id": "libraryagent:v1",
  "basePath": "",
  "name": "libraryagent",
  "fullyEncodeReservedExpansion": true,
  "discoveryVersion": "v1",
  "title": "Library Agent API",
  "batchPath": "batch"
}
