{
  "canonicalName": "My Business Q&A",
  "parameters": {
    "callback": {
      "type": "string",
      "description": "JSONP",
      "location": "query"
    },
    "quotaUser": {
      "type": "string",
      "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.",
      "location": "query"
    },
    "fields": {
      "location": "query",
      "type": "string",
      "description": "Selector specifying which fields to include in a partial response."
    },
    "key": {
      "location": "query",
      "type": "string",
      "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."
    },
    "oauth_token": {
      "location": "query",
      "type": "string",
      "description": "OAuth 2.0 token for the current user."
    },
    "upload_protocol": {
      "type": "string",
      "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").",
      "location": "query"
    },
    "uploadType": {
      "type": "string",
      "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").",
      "location": "query"
    },
    "prettyPrint": {
      "default": "true",
      "location": "query",
      "type": "boolean",
      "description": "Returns response with indentations and line breaks."
    },
    "$.xgafv": {
      "type": "string",
      "description": "V1 error format.",
      "enum": [
        "1",
        "2"
      ],
      "enumDescriptions": [
        "v1 error format",
        "v2 error format"
      ],
      "location": "query"
    },
    "alt": {
      "type": "string",
      "description": "Data format for response.",
      "enum": [
        "json",
        "media",
        "proto"
      ],
      "enumDescriptions": [
        "Responses with Content-Type of application/json",
        "Media download with context-dependent Content-Type",
        "Responses with Content-Type of application/x-protobuf"
      ],
      "location": "query",
      "default": "json"
    },
    "access_token": {
      "location": "query",
      "type": "string",
      "description": "OAuth access token."
    }
  },
  "ownerName": "Google",
  "kind": "discovery#restDescription",
  "batchPath": "batch",
  "description": "The My Business Q&A API allows questions and answers to be posted for specific listings. Note - If you have a quota of 0 after enabling the API, please request for GBP API access.",
  "documentationLink": "https://developers.google.com/my-business/",
  "name": "mybusinessqanda",
  "baseUrl": "https://mybusinessqanda.googleapis.com/",
  "basePath": "",
  "mtlsRootUrl": "https://mybusinessqanda.mtls.googleapis.com/",
  "schemas": {
    "ListAnswersResponse": {
      "description": "Response message for QuestionsAndAnswers.ListAnswers",
      "type": "object",
      "properties": {
        "nextPageToken": {
          "description": "If the number of answers exceeds the requested max page size, this field is populated with a token to fetch the next page of answers on a subsequent call. If there are no more answers, this field is not present in the response.",
          "type": "string"
        },
        "answers": {
          "description": "The requested answers.",
          "type": "array",
          "items": {
            "$ref": "Answer"
          }
        },
        "totalSize": {
          "description": "The total number of answers posted for this question across all pages.",
          "type": "integer",
          "format": "int32"
        }
      },
      "id": "ListAnswersResponse"
    },
    "UpsertAnswerRequest": {
      "description": "Request message for QuestionsAndAnswers.UpsertAnswer",
      "type": "object",
      "properties": {
        "answer": {
          "description": "Required. The new answer.",
          "$ref": "Answer"
        }
      },
      "id": "UpsertAnswerRequest"
    },
    "Empty": {
      "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }",
      "type": "object",
      "properties": {},
      "id": "Empty"
    },
    "Answer": {
      "id": "Answer",
      "description": "Represents an answer to a question",
      "type": "object",
      "properties": {
        "author": {
          "description": "Output only. The author of the answer. Will only be set during list operations.",
          "readOnly": true,
          "$ref": "Author"
        },
        "upvoteCount": {
          "format": "int32",
          "description": "Output only. The number of upvotes for the answer.",
          "readOnly": true,
          "type": "integer"
        },
        "text": {
          "description": "Required. The text of the answer. It should contain at least one non-whitespace character. The maximum length is 4096 characters.",
          "type": "string"
        },
        "createTime": {
          "description": "Output only. The timestamp for when the answer was written. Only retrieved during ListResponse fetching.",
          "readOnly": true,
          "type": "string",
          "format": "google-datetime"
        },
        "updateTime": {
          "description": "Output only. The timestamp for when the answer was last modified.",
          "readOnly": true,
          "type": "string",
          "format": "google-datetime"
        },
        "name": {
          "description": "Output only. The unique name for the answer locations/*/questions/*/answers/*",
          "readOnly": true,
          "type": "string"
        }
      }
    },
    "ListQuestionsResponse": {
      "id": "ListQuestionsResponse",
      "description": "Response message for QuestionsAndAnswers.ListQuestions",
      "type": "object",
      "properties": {
        "totalSize": {
          "format": "int32",
          "description": "The total number of questions posted for this location across all pages.",
          "type": "integer"
        },
        "questions": {
          "items": {
            "$ref": "Question"
          },
          "description": "The requested questions,",
          "type": "array"
        },
        "nextPageToken": {
          "description": "If the number of questions exceeds the requested max page size, this field is populated with a token to fetch the next page of questions on a subsequent call. If there are no more questions, this field is not present in the response.",
          "type": "string"
        }
      }
    },
    "Author": {
      "id": "Author",
      "description": "Represents the author of a question or answer",
      "type": "object",
      "properties": {
        "displayName": {
          "description": "The display name of the user",
          "type": "string"
        },
        "type": {
          "enumDescriptions": [
            "This should not be used.",
            "A regular user.",
            "A Local Guide",
            "The owner/manager of the location"
          ],
          "enum": [
            "AUTHOR_TYPE_UNSPECIFIED",
            "REGULAR_USER",
            "LOCAL_GUIDE",
            "MERCHANT"
          ],
          "description": "The type of user the author is.",
          "type": "string"
        },
        "profilePhotoUri": {
          "description": "The profile photo URI of the user.",
          "type": "string"
        }
      }
    },
    "Question": {
      "description": "Represents a single question and some of its answers.",
      "type": "object",
      "properties": {
        "name": {
          "description": "Immutable. The unique name for the question. locations/*/questions/* This field will be ignored if set during question creation.",
          "type": "string"
        },
        "topAnswers": {
          "items": {
            "$ref": "Answer"
          },
          "description": "Output only. A list of answers to the question, sorted by upvotes. This may not be a complete list of answers depending on the request parameters (answers_per_question)",
          "readOnly": true,
          "type": "array"
        },
        "totalAnswerCount": {
          "description": "Output only. The total number of answers posted for this question.",
          "readOnly": true,
          "type": "integer",
          "format": "int32"
        },
        "text": {
          "description": "Required. The text of the question. It should contain at least three words and the total length should be greater than or equal to 10 characters. The maximum length is 4096 characters.",
          "type": "string"
        },
        "createTime": {
          "description": "Output only. The timestamp for when the question was written.",
          "readOnly": true,
          "type": "string",
          "format": "google-datetime"
        },
        "updateTime": {
          "format": "google-datetime",
          "description": "Output only. The timestamp for when the question was last modified.",
          "readOnly": true,
          "type": "string"
        },
        "author": {
          "description": "Output only. The author of the question.",
          "readOnly": true,
          "$ref": "Author"
        },
        "upvoteCount": {
          "format": "int32",
          "description": "Output only. The number of upvotes for the question.",
          "readOnly": true,
          "type": "integer"
        }
      },
      "id": "Question"
    }
  },
  "title": "My Business Q&A API",
  "id": "mybusinessqanda:v1",
  "revision": "20260610",
  "discoveryVersion": "v1",
  "ownerDomain": "google.com",
  "protocol": "rest",
  "version": "v1",
  "rootUrl": "https://mybusinessqanda.googleapis.com/",
  "icons": {
    "x32": "http://www.google.com/images/icons/product/search-32.gif",
    "x16": "http://www.google.com/images/icons/product/search-16.gif"
  },
  "version_module": true,
  "servicePath": "",
  "fullyEncodeReservedExpansion": true,
  "resources": {
    "locations": {
      "resources": {
        "questions": {
          "methods": {
            "patch": {
              "request": {
                "$ref": "Question"
              },
              "response": {
                "$ref": "Question"
              },
              "description": "Updates a specific question written by the current user.",
              "httpMethod": "PATCH",
              "parameters": {
                "name": {
                  "required": true,
                  "pattern": "^locations/[^/]+/questions/[^/]+$",
                  "description": "Immutable. The unique name for the question. locations/*/questions/* This field will be ignored if set during question creation.",
                  "type": "string",
                  "location": "path"
                },
                "updateMask": {
                  "location": "query",
                  "description": "Required. The specific fields to update. Only question text can be updated.",
                  "type": "string",
                  "format": "google-fieldmask"
                }
              },
              "id": "mybusinessqanda.locations.questions.patch",
              "path": "v1/{+name}",
              "flatPath": "v1/locations/{locationsId}/questions/{questionsId}",
              "parameterOrder": [
                "name"
              ]
            },
            "delete": {
              "httpMethod": "DELETE",
              "parameters": {
                "name": {
                  "description": "Required. The name of the question to delete.",
                  "type": "string",
                  "location": "path",
                  "required": true,
                  "pattern": "^locations/[^/]+/questions/[^/]+$"
                }
              },
              "response": {
                "$ref": "Empty"
              },
              "path": "v1/{+name}",
              "id": "mybusinessqanda.locations.questions.delete",
              "parameterOrder": [
                "name"
              ],
              "description": "Deletes a specific question written by the current user.",
              "flatPath": "v1/locations/{locationsId}/questions/{questionsId}"
            },
            "create": {
              "request": {
                "$ref": "Question"
              },
              "response": {
                "$ref": "Question"
              },
              "description": "Adds a question for the specified location.",
              "httpMethod": "POST",
              "parameters": {
                "parent": {
                  "location": "path",
                  "description": "Required. The name of the location to write a question for.",
                  "type": "string",
                  "pattern": "^locations/[^/]+/questions$",
                  "required": true
                }
              },
              "id": "mybusinessqanda.locations.questions.create",
              "path": "v1/{+parent}",
              "flatPath": "v1/locations/{locationsId}/questions",
              "parameterOrder": [
                "parent"
              ]
            },
            "list": {
              "httpMethod": "GET",
              "parameters": {
                "parent": {
                  "required": true,
                  "pattern": "^locations/[^/]+/questions$",
                  "description": "Required. The name of the location to fetch questions for.",
                  "type": "string",
                  "location": "path"
                },
                "answersPerQuestion": {
                  "location": "query",
                  "description": "Optional. How many answers to fetch per question. The default and maximum `answers_per_question` values are 10.",
                  "type": "integer",
                  "format": "int32"
                },
                "pageSize": {
                  "format": "int32",
                  "description": "Optional. How many questions to fetch per page. The default and maximum `page_size` values are 10.",
                  "type": "integer",
                  "location": "query"
                },
                "pageToken": {
                  "location": "query",
                  "description": "Optional. If specified, the next page of questions is retrieved.",
                  "type": "string"
                },
                "filter": {
                  "description": "Optional. A filter constraining the questions to return. The only filter currently supported is \"ignore_answered=true\"",
                  "type": "string",
                  "location": "query"
                },
                "orderBy": {
                  "location": "query",
                  "description": "Optional. The order to return the questions. Valid options include 'update_time desc' and 'upvote_count desc', which will return the questions sorted descendingly by the requested field. The default sort order is 'update_time desc'.",
                  "type": "string"
                }
              },
              "response": {
                "$ref": "ListQuestionsResponse"
              },
              "id": "mybusinessqanda.locations.questions.list",
              "path": "v1/{+parent}",
              "flatPath": "v1/locations/{locationsId}/questions",
              "parameterOrder": [
                "parent"
              ],
              "description": "Returns the paginated list of questions and some of its answers for a specified location. This operation is only valid if the specified location is verified."
            }
          },
          "resources": {
            "answers": {
              "methods": {
                "upsert": {
                  "parameterOrder": [
                    "parent"
                  ],
                  "flatPath": "v1/locations/{locationsId}/questions/{questionsId}/answers:upsert",
                  "path": "v1/{+parent}/answers:upsert",
                  "id": "mybusinessqanda.locations.questions.answers.upsert",
                  "httpMethod": "POST",
                  "parameters": {
                    "parent": {
                      "pattern": "^locations/[^/]+/questions/[^/]+$",
                      "required": true,
                      "location": "path",
                      "description": "Required. The name of the question to write an answer for.",
                      "type": "string"
                    }
                  },
                  "description": "Creates an answer or updates the existing answer written by the user for the specified question. A user can only create one answer per question.",
                  "response": {
                    "$ref": "Answer"
                  },
                  "request": {
                    "$ref": "UpsertAnswerRequest"
                  }
                },
                "list": {
                  "parameterOrder": [
                    "parent"
                  ],
                  "description": "Returns the paginated list of answers for a specified question.",
                  "flatPath": "v1/locations/{locationsId}/questions/{questionsId}/answers",
                  "path": "v1/{+parent}/answers",
                  "id": "mybusinessqanda.locations.questions.answers.list",
                  "httpMethod": "GET",
                  "parameters": {
                    "pageSize": {
                      "format": "int32",
                      "location": "query",
                      "description": "Optional. How many answers to fetch per page. The default and maximum `page_size` values are 10.",
                      "type": "integer"
                    },
                    "pageToken": {
                      "location": "query",
                      "description": "Optional. If specified, the next page of answers is retrieved.",
                      "type": "string"
                    },
                    "orderBy": {
                      "location": "query",
                      "description": "Optional. The order to return the answers. Valid options include 'update_time desc' and 'upvote_count desc', which will return the answers sorted descendingly by the requested field. The default sort order is 'update_time desc'.",
                      "type": "string"
                    },
                    "parent": {
                      "pattern": "^locations/[^/]+/questions/[^/]+$",
                      "required": true,
                      "location": "path",
                      "description": "Required. The name of the question to fetch answers for.",
                      "type": "string"
                    }
                  },
                  "response": {
                    "$ref": "ListAnswersResponse"
                  }
                },
                "delete": {
                  "flatPath": "v1/locations/{locationsId}/questions/{questionsId}/answers:delete",
                  "parameterOrder": [
                    "name"
                  ],
                  "description": "Deletes the answer written by the current user to a question.",
                  "id": "mybusinessqanda.locations.questions.answers.delete",
                  "path": "v1/{+name}/answers:delete",
                  "httpMethod": "DELETE",
                  "parameters": {
                    "name": {
                      "pattern": "^locations/[^/]+/questions/[^/]+$",
                      "required": true,
                      "location": "path",
                      "description": "Required. The name of the question to delete an answer for.",
                      "type": "string"
                    }
                  },
                  "response": {
                    "$ref": "Empty"
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
