types

package
v0.0.0-...-3d84a2e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 23, 2023 License: MIT-0 Imports: 5 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_mikebway_types_address_proto protoreflect.FileDescriptor
View Source
var File_mikebway_types_person_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Contact

type Contact struct {

	// A UUID ID in hexadecimal string form
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Optional. The person if the contact is a specific, individual, human
	Person *Person `protobuf:"bytes,2,opt,name=person,proto3" json:"person,omitempty"`
	// Optional. The name of the business / institution if the contact is either the business / institution in general
	// of the person is a representative of the business.
	BusinessName string `protobuf:"bytes,3,opt,name=business_name,json=businessName,proto3" json:"business_name,omitempty"`
	// Optional. The email address for the person or business entity
	Email string `protobuf:"bytes,4,opt,name=email,proto3" json:"email,omitempty"`
	// Optional. The phone number of the contact
	Phone *phone_number.PhoneNumber `protobuf:"bytes,5,opt,name=phone,proto3" json:"phone,omitempty"`
	// contains filtered or unexported fields
}

Contact describes an entity (person, business, institution, etc) that serves as a contact for some purpose.

func (*Contact) Descriptor deprecated

func (*Contact) Descriptor() ([]byte, []int)

Deprecated: Use Contact.ProtoReflect.Descriptor instead.

func (*Contact) GetBusinessName

func (x *Contact) GetBusinessName() string

func (*Contact) GetEmail

func (x *Contact) GetEmail() string

func (*Contact) GetId

func (x *Contact) GetId() string

func (*Contact) GetPerson

func (x *Contact) GetPerson() *Person

func (*Contact) GetPhone

func (x *Contact) GetPhone() *phone_number.PhoneNumber

func (*Contact) ProtoMessage

func (*Contact) ProtoMessage()

func (*Contact) ProtoReflect

func (x *Contact) ProtoReflect() protoreflect.Message

func (*Contact) Reset

func (x *Contact) Reset()

func (*Contact) String

func (x *Contact) String() string

type Person

type Person struct {

	// A UUID ID in hexadecimal string form
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Optional. In western cultures, the person's last name (e.g. "Broadway")
	FamilyName string `protobuf:"bytes,2,opt,name=family_name,json=familyName,proto3" json:"family_name,omitempty"`
	// Optional. In western cultures, the person's first name (e.g. "Michael")
	GivenName string `protobuf:"bytes,3,opt,name=given_name,json=givenName,proto3" json:"given_name,omitempty"`
	// Optional. The person's middle name(s), space delimited, if any (e.g. "Dennis Albert")
	MiddleName string `protobuf:"bytes,4,opt,name=middle_name,json=middleName,proto3" json:"middle_name,omitempty"`
	// Optional. How the name might be displayed on a web page (e.g. "Mike Broadway")
	DisplayName string `protobuf:"bytes,5,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
	// contains filtered or unexported fields
}

Person describes a human individual.

See https://developers.google.com/people/api/rest/v1/people#Person.Name as field naming reference.

func (*Person) Descriptor deprecated

func (*Person) Descriptor() ([]byte, []int)

Deprecated: Use Person.ProtoReflect.Descriptor instead.

func (*Person) GetDisplayName

func (x *Person) GetDisplayName() string

func (*Person) GetFamilyName

func (x *Person) GetFamilyName() string

func (*Person) GetGivenName

func (x *Person) GetGivenName() string

func (*Person) GetId

func (x *Person) GetId() string

func (*Person) GetMiddleName

func (x *Person) GetMiddleName() string

func (*Person) ProtoMessage

func (*Person) ProtoMessage()

func (*Person) ProtoReflect

func (x *Person) ProtoReflect() protoreflect.Message

func (*Person) Reset

func (x *Person) Reset()

func (*Person) String

func (x *Person) String() string

type PostalAddress

type PostalAddress struct {

	// The schema revision of the `PostalAddress`.
	// All new revisions **must** be backward compatible with old revisions.
	//
	// This is retained in the message definition for compatibility with the
	// Google PostalAddress but the primary versioning mechanism at
	// ZenBusiness shall be in the package name.
	Revision int32 `protobuf:"varint,1,opt,name=revision,proto3" json:"revision,omitempty"`
	// 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 http://cldr.unicode.org/ and
	// http://www.unicode.org/cldr/charts/30/supplemental/territory_information.html
	// for details. Example: "CH" for Switzerland.
	RegionCode string `protobuf:"bytes,2,opt,name=region_code,json=regionCode,proto3" json:"region_code,omitempty"`
	// 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".
	LanguageCode string `protobuf:"bytes,3,opt,name=language_code,json=languageCode,proto3" json:"language_code,omitempty"`
	// 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.).
	PostalCode string `protobuf:"bytes,4,opt,name=postal_code,json=postalCode,proto3" json:"postal_code,omitempty"`
	// 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).
	SortingCode string `protobuf:"bytes,5,opt,name=sorting_code,json=sortingCode,proto3" json:"sorting_code,omitempty"`
	// 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.
	AdministrativeArea string `protobuf:"bytes,6,opt,name=administrative_area,json=administrativeArea,proto3" json:"administrative_area,omitempty"`
	// 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.
	Locality string `protobuf:"bytes,7,opt,name=locality,proto3" json:"locality,omitempty"`
	// Optional. Sublocality of the address.
	// For example, this can be neighborhoods, boroughs, districts.
	Sublocality string `protobuf:"bytes,8,opt,name=sublocality,proto3" json:"sublocality,omitempty"`
	// 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).
	AddressLines []string `protobuf:"bytes,9,rep,name=address_lines,json=addressLines,proto3" json:"address_lines,omitempty"`
	// Optional. The recipient at the address.
	// This field may, under certain circumstances, contain multiline information.
	// For example, it might contain "care of" information.
	Recipients []string `protobuf:"bytes,10,rep,name=recipients,proto3" json:"recipients,omitempty"`
	// Optional. The name of the organization at the address.
	Organization string `protobuf:"bytes,11,opt,name=organization,proto3" json:"organization,omitempty"`
	// Optional. The identifier of a mailbox at this address. Used in the case
	// where multiple entities may be registered at the same address, divided
	// by per entity delivery boxes.
	MailboxId string `protobuf:"bytes,12,opt,name=mailbox_id,json=mailboxId,proto3" json:"mailbox_id,omitempty"`
	// contains filtered or unexported fields
}

Represents a postal address, e.g. for postal delivery or payments addresses. Given a postal address, a postal service can deliver items to a premise, P.O. Box or similar. It is not intended to model geographical locations (roads, towns, mountains).

In typical usage an address would be created via user input or from importing existing data, depending on the type of process.

Advice on address input / editing:

For more guidance on how to use this schema, please see: https://support.google.com/business/answer/6397478

func (*PostalAddress) Descriptor deprecated

func (*PostalAddress) Descriptor() ([]byte, []int)

Deprecated: Use PostalAddress.ProtoReflect.Descriptor instead.

func (*PostalAddress) GetAddressLines

func (x *PostalAddress) GetAddressLines() []string

func (*PostalAddress) GetAdministrativeArea

func (x *PostalAddress) GetAdministrativeArea() string

func (*PostalAddress) GetLanguageCode

func (x *PostalAddress) GetLanguageCode() string

func (*PostalAddress) GetLocality

func (x *PostalAddress) GetLocality() string

func (*PostalAddress) GetMailboxId

func (x *PostalAddress) GetMailboxId() string

func (*PostalAddress) GetOrganization

func (x *PostalAddress) GetOrganization() string

func (*PostalAddress) GetPostalCode

func (x *PostalAddress) GetPostalCode() string

func (*PostalAddress) GetRecipients

func (x *PostalAddress) GetRecipients() []string

func (*PostalAddress) GetRegionCode

func (x *PostalAddress) GetRegionCode() string

func (*PostalAddress) GetRevision

func (x *PostalAddress) GetRevision() int32

func (*PostalAddress) GetSortingCode

func (x *PostalAddress) GetSortingCode() string

func (*PostalAddress) GetSublocality

func (x *PostalAddress) GetSublocality() string

func (*PostalAddress) ProtoMessage

func (*PostalAddress) ProtoMessage()

func (*PostalAddress) ProtoReflect

func (x *PostalAddress) ProtoReflect() protoreflect.Message

func (*PostalAddress) Reset

func (x *PostalAddress) Reset()

func (*PostalAddress) String

func (x *PostalAddress) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL