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