Skip to main content
Glama
ag2-mcp-servers

My Business Account Management API MCP Server

models.py12.9 kB
# generated by fastapi-codegen: # filename: openapi.yaml # timestamp: 2025-06-29T02:29:06+00:00 from __future__ import annotations from enum import Enum from typing import List, Optional from pydantic import BaseModel, Field class AcceptInvitationRequest(BaseModel): pass class PermissionLevel(Enum): PERMISSION_LEVEL_UNSPECIFIED = 'PERMISSION_LEVEL_UNSPECIFIED' OWNER_LEVEL = 'OWNER_LEVEL' MEMBER_LEVEL = 'MEMBER_LEVEL' class Role(Enum): ACCOUNT_ROLE_UNSPECIFIED = 'ACCOUNT_ROLE_UNSPECIFIED' PRIMARY_OWNER = 'PRIMARY_OWNER' OWNER = 'OWNER' MANAGER = 'MANAGER' SITE_MANAGER = 'SITE_MANAGER' class Type(Enum): ACCOUNT_TYPE_UNSPECIFIED = 'ACCOUNT_TYPE_UNSPECIFIED' PERSONAL = 'PERSONAL' LOCATION_GROUP = 'LOCATION_GROUP' USER_GROUP = 'USER_GROUP' ORGANIZATION = 'ORGANIZATION' class VerificationState(Enum): VERIFICATION_STATE_UNSPECIFIED = 'VERIFICATION_STATE_UNSPECIFIED' VERIFIED = 'VERIFIED' UNVERIFIED = 'UNVERIFIED' VERIFICATION_REQUESTED = 'VERIFICATION_REQUESTED' class VettedState(Enum): VETTED_STATE_UNSPECIFIED = 'VETTED_STATE_UNSPECIFIED' NOT_VETTED = 'NOT_VETTED' VETTED = 'VETTED' INVALID = 'INVALID' class Role1(Enum): ADMIN_ROLE_UNSPECIFIED = 'ADMIN_ROLE_UNSPECIFIED' PRIMARY_OWNER = 'PRIMARY_OWNER' OWNER = 'OWNER' MANAGER = 'MANAGER' SITE_MANAGER = 'SITE_MANAGER' class Admin(BaseModel): account: Optional[str] = Field( None, description='Immutable. The name of the Account resource that this Admin refers to. Used when calling locations.admins.create to invite a LocationGroup as an admin. If both this field and `admin` are set on `CREATE` requests, this field takes precedence and the email address in `admin` will be ignored. Format: `accounts/{account}`.', ) admin: Optional[str] = Field( None, description="Optional. The name of the admin. When making the initial invitation, this is the invitee's email address. On `GET` calls, the user's email address is returned if the invitation is still pending. Otherwise, it contains the user's first and last names. This field is only needed to be set during admin creation.", ) name: Optional[str] = Field( None, description='Immutable. The resource name. For account admins, this is in the form: `accounts/{account_id}/admins/{admin_id}` For location admins, this is in the form: `locations/{location_id}/admins/{admin_id}` This field will be ignored if set during admin creation.', ) pendingInvitation: Optional[bool] = Field( None, description='Output only. Indicates whether this admin has a pending invitation for the specified resource.', ) role: Optional[Role1] = Field( None, description='Required. Specifies the role that this admin uses with the specified Account or Location.', ) class DeclineInvitationRequest(BaseModel): pass class Empty(BaseModel): pass class TargetType(Enum): TARGET_TYPE_UNSPECIFIED = 'TARGET_TYPE_UNSPECIFIED' ACCOUNTS_ONLY = 'ACCOUNTS_ONLY' LOCATIONS_ONLY = 'LOCATIONS_ONLY' class ListAccountAdminsResponse(BaseModel): accountAdmins: Optional[List[Admin]] = Field( None, description='A collection of Admin instances.' ) class ListLocationAdminsResponse(BaseModel): admins: Optional[List[Admin]] = Field(None, description='A collection of Admins.') class PostalAddress(BaseModel): addressLines: Optional[List[str]] = Field( None, description='Unstructured address lines describing the lower levels of an address. Because values in address_lines do not have type information and may sometimes contain multiple values in a single field (e.g. "Austin, TX"), it is important that the line order is clear. The order of address lines should be "envelope order" for the country/region of the address. In places where this can vary (e.g. Japan), address_language is used to make it explicit (e.g. "ja" for large-to-small ordering and "ja-Latn" or "en" for small-to-large). This way, the most specific line of an address can be selected based on the language. The minimum permitted structural representation of an address consists of a region_code with all remaining information placed in the address_lines. It would be possible to format such an address very approximately without geocoding, but no semantic reasoning could be made about any of the address components until it was at least partially resolved. Creating an address only containing a region_code and address_lines, and then geocoding is the recommended way to handle completely unstructured addresses (as opposed to guessing which parts of the address should be localities or administrative areas).', ) administrativeArea: Optional[str] = Field( None, description='Optional. Highest administrative subdivision which is used for postal addresses of a country or region. For example, this can be a state, a province, an oblast, or a prefecture. Specifically, for Spain this is the province and not the autonomous community (e.g. "Barcelona" and not "Catalonia"). Many countries don\'t use an administrative area in postal addresses. E.g. in Switzerland this should be left unpopulated.', ) languageCode: Optional[str] = Field( None, description='Optional. BCP-47 language code of the contents of this address (if known). This is often the UI language of the input form or is expected to match one of the languages used in the address\' country/region, or their transliterated equivalents. This can affect formatting in certain countries, but is not critical to the correctness of the data and will never affect any validation or other non-formatting related operations. If this value is not known, it should be omitted (rather than specifying a possibly incorrect default). Examples: "zh-Hant", "ja", "ja-Latn", "en".', ) locality: Optional[str] = Field( None, description='Optional. Generally refers to the city/town portion of the address. Examples: US city, IT comune, UK post town. In regions of the world where localities are not well defined or do not fit into this structure well, leave locality empty and use address_lines.', ) organization: Optional[str] = Field( None, description='Optional. The name of the organization at the address.' ) postalCode: Optional[str] = Field( None, description='Optional. Postal code of the address. Not all countries use or require postal codes to be present, but where they are used, they may trigger additional validation with other parts of the address (e.g. state/zip validation in the U.S.A.).', ) recipients: Optional[List[str]] = Field( None, description='Optional. The recipient at the address. This field may, under certain circumstances, contain multiline information. For example, it might contain "care of" information.', ) regionCode: Optional[str] = Field( None, description='Required. CLDR region code of the country/region of the address. This is never inferred and it is up to the user to ensure the value is correct. See https://cldr.unicode.org/ and https://www.unicode.org/cldr/charts/30/supplemental/territory_information.html for details. Example: "CH" for Switzerland.', ) revision: Optional[int] = Field( None, description='The schema revision of the `PostalAddress`. This must be set to 0, which is the latest revision. All new revisions **must** be backward compatible with old revisions.', ) sortingCode: Optional[str] = Field( None, description='Optional. Additional, country-specific, sorting code. This is not used in most regions. Where it is used, the value is either a string like "CEDEX", optionally followed by a number (e.g. "CEDEX 7"), or just a number alone, representing the "sector code" (Jamaica), "delivery area indicator" (Malawi) or "post office indicator" (e.g. Côte d\'Ivoire).', ) sublocality: Optional[str] = Field( None, description='Optional. Sublocality of the address. For example, this can be neighborhoods, boroughs, districts.', ) class TargetLocation(BaseModel): address: Optional[str] = Field( None, description='The address of the location to which the user is invited.' ) locationName: Optional[str] = Field( None, description='The name of the location to which the user is invited.' ) class TransferLocationRequest(BaseModel): destinationAccount: Optional[str] = Field( None, description='Required. Name of the account resource to transfer the location to (for example, "accounts/{account}").', ) class FieldXgafv(Enum): field_1 = '1' field_2 = '2' class Alt(Enum): json = 'json' media = 'media' proto = 'proto' class OrganizationInfo(BaseModel): address: Optional[PostalAddress] = Field( None, description='Output only. The postal address for the account.' ) phoneNumber: Optional[str] = Field( None, description='Output only. The contact number for the organization.' ) registeredDomain: Optional[str] = Field( None, description='Output only. The registered domain for the account.' ) class Account(BaseModel): accountName: Optional[str] = Field( None, description='Required. The name of the account. For an account of type `PERSONAL`, this is the first and last name of the user account.', ) accountNumber: Optional[str] = Field( None, description='Output only. Account reference number if provisioned.' ) name: Optional[str] = Field( None, description='Immutable. The resource name, in the format `accounts/{account_id}`.', ) organizationInfo: Optional[OrganizationInfo] = Field( None, description='Output only. Additional info for an organization. This is populated only for an organization account.', ) permissionLevel: Optional[PermissionLevel] = Field( None, description='Output only. Specifies the permission level the user has for this account.', ) primaryOwner: Optional[str] = Field( None, description='Required. Input only. The resource name of the account which will be the primary owner of the account being created. It should be of the form `accounts/{account_id}`.', ) role: Optional[Role] = Field( None, description='Output only. Specifies the AccountRole of this account.' ) type: Optional[Type] = Field( None, description='Required. Contains the type of account. Accounts of type PERSONAL and ORGANIZATION cannot be created using this API.', ) verificationState: Optional[VerificationState] = Field( None, description='Output only. If verified, future locations that are created are automatically connected to Google Maps, and have Google+ pages created, without requiring moderation.', ) vettedState: Optional[VettedState] = Field( None, description='Output only. Indicates whether the account is vetted by Google. A vetted account is able to verify locations via the VETTED_PARTNER method.', ) class Invitation(BaseModel): name: Optional[str] = Field( None, description='Required. The resource name for the invitation. `accounts/{account_id}/invitations/{invitation_id}`.', ) role: Optional[Role1] = Field( None, description='Output only. The invited role on the account.' ) targetAccount: Optional[Account] = Field( None, description='The sparsely populated account this invitation is for.' ) targetLocation: Optional[TargetLocation] = Field( None, description='The target location this invitation is for.' ) targetType: Optional[TargetType] = Field( None, description='Output only. Specifies which target types should appear in the response.', ) class ListAccountsResponse(BaseModel): accounts: Optional[List[Account]] = Field( None, description='A collection of accounts to which the user has access. The personal account of the user doing the query will always be the first item of the result, unless it is filtered out.', ) nextPageToken: Optional[str] = Field( None, description='If the number of accounts exceeds the requested page size, this field is populated with a token to fetch the next page of accounts on a subsequent call to `accounts.list`. If there are no more accounts, this field is not present in the response.', ) class ListInvitationsResponse(BaseModel): invitations: Optional[List[Invitation]] = Field( None, description='A collection of invitations that are pending for the account. The number of invitations listed here cannot exceed 1000.', )

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ag2-mcp-servers/my-business-account-management-api'

If you have feedback or need assistance with the MCP directory API, please join our Discord server