_type

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthColor        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowColor          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupColor = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthDate        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowDate          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupDate = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthDatetime        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowDatetime          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupDatetime = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthExpr        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowExpr          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupExpr = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthFraction        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowFraction          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupFraction = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthLatlng        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowLatlng          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupLatlng = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthMoney        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowMoney          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupMoney = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthPostalAddress        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowPostalAddress          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupPostalAddress = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthQuaternion        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowQuaternion          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupQuaternion = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthTimeofday        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTimeofday          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTimeofday = fmt.Errorf("proto: unexpected end of group")
)
View Source
var CalendarPeriod_name = map[int32]string{
	0: "CALENDAR_PERIOD_UNSPECIFIED",
	1: "DAY",
	2: "WEEK",
	3: "FORTNIGHT",
	4: "MONTH",
	5: "QUARTER",
	6: "HALF",
	7: "YEAR",
}
View Source
var CalendarPeriod_value = map[string]int32{
	"CALENDAR_PERIOD_UNSPECIFIED": 0,
	"DAY":                         1,
	"WEEK":                        2,
	"FORTNIGHT":                   3,
	"MONTH":                       4,
	"QUARTER":                     5,
	"HALF":                        6,
	"YEAR":                        7,
}
View Source
var DayOfWeek_name = map[int32]string{
	0: "DAY_OF_WEEK_UNSPECIFIED",
	1: "MONDAY",
	2: "TUESDAY",
	3: "WEDNESDAY",
	4: "THURSDAY",
	5: "FRIDAY",
	6: "SATURDAY",
	7: "SUNDAY",
}
View Source
var DayOfWeek_value = map[string]int32{
	"DAY_OF_WEEK_UNSPECIFIED": 0,
	"MONDAY":                  1,
	"TUESDAY":                 2,
	"WEDNESDAY":               3,
	"THURSDAY":                4,
	"FRIDAY":                  5,
	"SATURDAY":                6,
	"SUNDAY":                  7,
}
View Source
var Month_name = map[int32]string{
	0:  "MONTH_UNSPECIFIED",
	1:  "JANUARY",
	2:  "FEBRUARY",
	3:  "MARCH",
	4:  "APRIL",
	5:  "MAY",
	6:  "JUNE",
	7:  "JULY",
	8:  "AUGUST",
	9:  "SEPTEMBER",
	10: "OCTOBER",
	11: "NOVEMBER",
	12: "DECEMBER",
}
View Source
var Month_value = map[string]int32{
	"MONTH_UNSPECIFIED": 0,
	"JANUARY":           1,
	"FEBRUARY":          2,
	"MARCH":             3,
	"APRIL":             4,
	"MAY":               5,
	"JUNE":              6,
	"JULY":              7,
	"AUGUST":            8,
	"SEPTEMBER":         9,
	"OCTOBER":           10,
	"NOVEMBER":          11,
	"DECEMBER":          12,
}

Functions

This section is empty.

Types

type CalendarPeriod

type CalendarPeriod int32

A `CalendarPeriod` represents the abstract concept of a time period that has a canonical start. Grammatically, "the start of the current `CalendarPeriod`." All calendar times begin at midnight UTC.

const (
	// Undefined period, raises an error.
	CalendarPeriod_CALENDAR_PERIOD_UNSPECIFIED CalendarPeriod = 0
	// A day.
	CalendarPeriod_DAY CalendarPeriod = 1
	// A week. Weeks begin on Monday, following
	// [ISO 8601](https://en.wikipedia.org/wiki/ISO_week_date).
	CalendarPeriod_WEEK CalendarPeriod = 2
	// A fortnight. The first calendar fortnight of the year begins at the start
	// of week 1 according to
	// [ISO 8601](https://en.wikipedia.org/wiki/ISO_week_date).
	CalendarPeriod_FORTNIGHT CalendarPeriod = 3
	// A month.
	CalendarPeriod_MONTH CalendarPeriod = 4
	// A quarter. Quarters start on dates 1-Jan, 1-Apr, 1-Jul, and 1-Oct of each
	// year.
	CalendarPeriod_QUARTER CalendarPeriod = 5
	// A half-year. Half-years start on dates 1-Jan and 1-Jul.
	CalendarPeriod_HALF CalendarPeriod = 6
	// A year.
	CalendarPeriod_YEAR CalendarPeriod = 7
)

func (CalendarPeriod) EnumDescriptor

func (CalendarPeriod) EnumDescriptor() ([]byte, []int)

func (CalendarPeriod) String

func (x CalendarPeriod) String() string

type Color

type Color struct {
	// The amount of red in the color as a value in the interval [0, 1].
	Red float32 `protobuf:"fixed32,1,opt,name=red,proto3" json:"red,omitempty"`
	// The amount of green in the color as a value in the interval [0, 1].
	Green float32 `protobuf:"fixed32,2,opt,name=green,proto3" json:"green,omitempty"`
	// The amount of blue in the color as a value in the interval [0, 1].
	Blue float32 `protobuf:"fixed32,3,opt,name=blue,proto3" json:"blue,omitempty"`
	// The fraction of this color that should be applied to the pixel. That is,
	// the final pixel color is defined by the equation:
	//
	//   pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
	//
	// This means that a value of 1.0 corresponds to a solid color, whereas
	// a value of 0.0 corresponds to a completely transparent color. This
	// uses a wrapper message rather than a simple float scalar so that it is
	// possible to distinguish between a default value and the value being unset.
	// If omitted, this color object is to be rendered as a solid color
	// (as if the alpha value had been explicitly given with a value of 1.0).
	Alpha                *types.FloatValue `protobuf:"bytes,4,opt,name=alpha,proto3" json:"alpha,omitempty"`
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to/from color representations in various languages over compactness; for example, the fields of this representation can be trivially provided to the constructor of "java.awt.Color" in Java; it can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha" method in iOS; and, with just a little work, it can be easily formatted into a CSS "rgba()" string in JavaScript, as well.

Note: this proto does not carry information about the absolute color space that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default, applications SHOULD assume the sRGB color space.

Note: when color equality needs to be decided, implementations, unless documented otherwise, will treat two colors to be equal if all their red, green, blue and alpha values each differ by at most 1e-5.

Example (Java):

import com.google.type.Color;

// ...
public static java.awt.Color fromProto(Color protocolor) {
  float alpha = protocolor.hasAlpha()
      ? protocolor.getAlpha().getValue()
      : 1.0;

  return new java.awt.Color(
      protocolor.getRed(),
      protocolor.getGreen(),
      protocolor.getBlue(),
      alpha);
}

public static Color toProto(java.awt.Color color) {
  float red = (float) color.getRed();
  float green = (float) color.getGreen();
  float blue = (float) color.getBlue();
  float denominator = 255.0;
  Color.Builder resultBuilder =
      Color
          .newBuilder()
          .setRed(red / denominator)
          .setGreen(green / denominator)
          .setBlue(blue / denominator);
  int alpha = color.getAlpha();
  if (alpha != 255) {
    result.setAlpha(
        FloatValue
            .newBuilder()
            .setValue(((float) alpha) / denominator)
            .build());
  }
  return resultBuilder.build();
}
// ...

Example (iOS / Obj-C):

    // ...
    static UIColor* fromProto(Color* protocolor) {
       float red = [protocolor red];
       float green = [protocolor green];
       float blue = [protocolor blue];
       FloatValue* alpha_wrapper = [protocolor alpha];
       float alpha = 1.0;
       if (alpha_wrapper != nil) {
         alpha = [alpha_wrapper value];
       }
       return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
    }

    static Color* toProto(UIColor* color) {
        CGFloat red, green, blue, alpha;
        if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
          return nil;
        }
        Color* result = [[Color alloc] init];
        [result setRed:red];
        [result setGreen:green];
        [result setBlue:blue];
        if (alpha <= 0.9999) {
          [result setAlpha:floatWrapperWithValue(alpha)];
        }
        [result autorelease];
        return result;
   }
   // ...

Example (JavaScript):

   // ...

   var protoToCssColor = function(rgb_color) {
      var redFrac = rgb_color.red || 0.0;
      var greenFrac = rgb_color.green || 0.0;
      var blueFrac = rgb_color.blue || 0.0;
      var red = Math.floor(redFrac * 255);
      var green = Math.floor(greenFrac * 255);
      var blue = Math.floor(blueFrac * 255);

      if (!('alpha' in rgb_color)) {
         return rgbToCssColor_(red, green, blue);
      }

      var alphaFrac = rgb_color.alpha.value || 0.0;
      var rgbParams = [red, green, blue].join(',');
      return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
   };

   var rgbToCssColor_ = function(red, green, blue) {
     var rgbNumber = new Number((red << 16) | (green << 8) | blue);
     var hexString = rgbNumber.toString(16);
     var missingZeros = 6 - hexString.length;
     var resultBuilder = ['#'];
     for (var i = 0; i < missingZeros; i++) {
        resultBuilder.push('0');
     }
     resultBuilder.push(hexString);
     return resultBuilder.join('');
   };

   // ...

func NewPopulatedColor

func NewPopulatedColor(r randyColor, easy bool) *Color

func (*Color) Compare

func (this *Color) Compare(that interface{}) int

func (*Color) Descriptor

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

func (*Color) Equal

func (this *Color) Equal(that interface{}) bool

func (*Color) GetAlpha

func (m *Color) GetAlpha() *types.FloatValue

func (*Color) GetBlue

func (m *Color) GetBlue() float32

func (*Color) GetGreen

func (m *Color) GetGreen() float32

func (*Color) GetRed

func (m *Color) GetRed() float32

func (*Color) GoString

func (this *Color) GoString() string

func (*Color) Marshal

func (m *Color) Marshal() (dAtA []byte, err error)

func (*Color) MarshalTo

func (m *Color) MarshalTo(dAtA []byte) (int, error)

func (*Color) MarshalToSizedBuffer

func (m *Color) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Color) ProtoMessage

func (*Color) ProtoMessage()

func (*Color) Reset

func (m *Color) Reset()

func (*Color) Size

func (m *Color) Size() (n int)

func (*Color) String

func (this *Color) String() string

func (*Color) Unmarshal

func (m *Color) Unmarshal(dAtA []byte) error

func (*Color) XXX_DiscardUnknown

func (m *Color) XXX_DiscardUnknown()

func (*Color) XXX_Marshal

func (m *Color) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Color) XXX_Merge

func (m *Color) XXX_Merge(src proto.Message)

func (*Color) XXX_MessageName

func (*Color) XXX_MessageName() string

func (*Color) XXX_Size

func (m *Color) XXX_Size() int

func (*Color) XXX_Unmarshal

func (m *Color) XXX_Unmarshal(b []byte) error

type Date

type Date struct {
	// Year of the date. Must be from 1 to 9999, or 0 to specify a date without
	// a year.
	Year int32 `protobuf:"varint,1,opt,name=year,proto3" json:"year,omitempty"`
	// Month of a year. Must be from 1 to 12, or 0 to specify a year without a
	// month and day.
	Month int32 `protobuf:"varint,2,opt,name=month,proto3" json:"month,omitempty"`
	// Day of a month. Must be from 1 to 31 and valid for the year and month, or 0
	// to specify a year by itself or a year and month where the day isn't
	// significant.
	Day                  int32    `protobuf:"varint,3,opt,name=day,proto3" json:"day,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following:

* A full date, with non-zero year, month, and day values * A month and day value, with a zero year, such as an anniversary * A year on its own, with zero month and day values * A year and month value, with a zero day, such as a credit card expiration date

Related types are [google.type.TimeOfDay][google.type.TimeOfDay] and `google.protobuf.Timestamp`.

func NewPopulatedDate

func NewPopulatedDate(r randyDate, easy bool) *Date

func (*Date) Compare

func (this *Date) Compare(that interface{}) int

func (*Date) Descriptor

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

func (*Date) Equal

func (this *Date) Equal(that interface{}) bool

func (*Date) GetDay

func (m *Date) GetDay() int32

func (*Date) GetMonth

func (m *Date) GetMonth() int32

func (*Date) GetYear

func (m *Date) GetYear() int32

func (*Date) GoString

func (this *Date) GoString() string

func (*Date) Marshal

func (m *Date) Marshal() (dAtA []byte, err error)

func (*Date) MarshalTo

func (m *Date) MarshalTo(dAtA []byte) (int, error)

func (*Date) MarshalToSizedBuffer

func (m *Date) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Date) ProtoMessage

func (*Date) ProtoMessage()

func (*Date) Reset

func (m *Date) Reset()

func (*Date) Size

func (m *Date) Size() (n int)

func (*Date) String

func (this *Date) String() string

func (*Date) Unmarshal

func (m *Date) Unmarshal(dAtA []byte) error

func (*Date) XXX_DiscardUnknown

func (m *Date) XXX_DiscardUnknown()

func (*Date) XXX_Marshal

func (m *Date) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Date) XXX_Merge

func (m *Date) XXX_Merge(src proto.Message)

func (*Date) XXX_MessageName

func (*Date) XXX_MessageName() string

func (*Date) XXX_Size

func (m *Date) XXX_Size() int

func (*Date) XXX_Unmarshal

func (m *Date) XXX_Unmarshal(b []byte) error

type DateTime

type DateTime struct {
	// Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a
	// datetime without a year.
	Year int32 `protobuf:"varint,1,opt,name=year,proto3" json:"year,omitempty"`
	// Required. Month of year. Must be from 1 to 12.
	Month int32 `protobuf:"varint,2,opt,name=month,proto3" json:"month,omitempty"`
	// Required. Day of month. Must be from 1 to 31 and valid for the year and
	// month.
	Day int32 `protobuf:"varint,3,opt,name=day,proto3" json:"day,omitempty"`
	// Required. Hours of day in 24 hour format. Should be from 0 to 23. An API
	// may choose to allow the value "24:00:00" for scenarios like business
	// closing time.
	Hours int32 `protobuf:"varint,4,opt,name=hours,proto3" json:"hours,omitempty"`
	// Required. Minutes of hour of day. Must be from 0 to 59.
	Minutes int32 `protobuf:"varint,5,opt,name=minutes,proto3" json:"minutes,omitempty"`
	// Required. Seconds of minutes of the time. Must normally be from 0 to 59. An
	// API may allow the value 60 if it allows leap-seconds.
	Seconds int32 `protobuf:"varint,6,opt,name=seconds,proto3" json:"seconds,omitempty"`
	// Required. Fractions of seconds in nanoseconds. Must be from 0 to
	// 999,999,999.
	Nanos int32 `protobuf:"varint,7,opt,name=nanos,proto3" json:"nanos,omitempty"`
	// Optional. Specifies either the UTC offset or the time zone of the DateTime.
	// Choose carefully between them, considering that time zone data may change
	// in the future (for example, a country modifies their DST start/end dates,
	// and future DateTimes in the affected range had already been stored).
	// If omitted, the DateTime is considered to be in local time.
	//
	// Types that are valid to be assigned to TimeOffset:
	//	*DateTime_UtcOffset
	//	*DateTime_TimeZone
	TimeOffset           isDateTime_TimeOffset `protobuf_oneof:"time_offset"`
	XXX_NoUnkeyedLiteral struct{}              `json:"-"`
	XXX_unrecognized     []byte                `json:"-"`
	XXX_sizecache        int32                 `json:"-"`
}

Represents civil time (or occasionally physical time).

This type can represent a civil time in one of a few possible ways:

  • When utc_offset is set and time_zone is unset: a civil time on a calendar day with a particular offset from UTC.
  • When time_zone is set and utc_offset is unset: a civil time on a calendar day in a particular time zone.
  • When neither time_zone nor utc_offset is set: a civil time on a calendar day in local time.

The date is relative to the Proleptic Gregorian Calendar.

If year is 0, the DateTime is considered not to have a specific year. month and day must have valid, non-zero values.

This type may also be used to represent a physical time if all the date and time fields are set and either case of the `time_offset` oneof is set. Consider using `Timestamp` message for physical time instead. If your use case also would like to store the user's timezone, that can be done in another field.

This type is more flexible than some applications may want. Make sure to document and validate your application's limitations.

func NewPopulatedDateTime

func NewPopulatedDateTime(r randyDatetime, easy bool) *DateTime

func (*DateTime) Descriptor

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

func (*DateTime) Equal

func (this *DateTime) Equal(that interface{}) bool

func (*DateTime) GetDay

func (m *DateTime) GetDay() int32

func (*DateTime) GetHours

func (m *DateTime) GetHours() int32

func (*DateTime) GetMinutes

func (m *DateTime) GetMinutes() int32

func (*DateTime) GetMonth

func (m *DateTime) GetMonth() int32

func (*DateTime) GetNanos

func (m *DateTime) GetNanos() int32

func (*DateTime) GetSeconds

func (m *DateTime) GetSeconds() int32

func (*DateTime) GetTimeOffset

func (m *DateTime) GetTimeOffset() isDateTime_TimeOffset

func (*DateTime) GetTimeZone

func (m *DateTime) GetTimeZone() *TimeZone

func (*DateTime) GetUtcOffset

func (m *DateTime) GetUtcOffset() *types.Duration

func (*DateTime) GetYear

func (m *DateTime) GetYear() int32

func (*DateTime) GoString

func (this *DateTime) GoString() string

func (*DateTime) Marshal

func (m *DateTime) Marshal() (dAtA []byte, err error)

func (*DateTime) MarshalTo

func (m *DateTime) MarshalTo(dAtA []byte) (int, error)

func (*DateTime) MarshalToSizedBuffer

func (m *DateTime) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*DateTime) ProtoMessage

func (*DateTime) ProtoMessage()

func (*DateTime) Reset

func (m *DateTime) Reset()

func (*DateTime) Size

func (m *DateTime) Size() (n int)

func (*DateTime) String

func (this *DateTime) String() string

func (*DateTime) Unmarshal

func (m *DateTime) Unmarshal(dAtA []byte) error

func (*DateTime) XXX_DiscardUnknown

func (m *DateTime) XXX_DiscardUnknown()

func (*DateTime) XXX_Marshal

func (m *DateTime) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DateTime) XXX_Merge

func (m *DateTime) XXX_Merge(src proto.Message)

func (*DateTime) XXX_MessageName

func (*DateTime) XXX_MessageName() string

func (*DateTime) XXX_OneofWrappers

func (*DateTime) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*DateTime) XXX_Size

func (m *DateTime) XXX_Size() int

func (*DateTime) XXX_Unmarshal

func (m *DateTime) XXX_Unmarshal(b []byte) error

type DateTime_TimeZone

type DateTime_TimeZone struct {
	TimeZone *TimeZone `protobuf:"bytes,9,opt,name=time_zone,json=timeZone,proto3,oneof" json:"time_zone,omitempty"`
}

func NewPopulatedDateTime_TimeZone

func NewPopulatedDateTime_TimeZone(r randyDatetime, easy bool) *DateTime_TimeZone

func (*DateTime_TimeZone) Equal

func (this *DateTime_TimeZone) Equal(that interface{}) bool

func (*DateTime_TimeZone) GoString

func (this *DateTime_TimeZone) GoString() string

func (*DateTime_TimeZone) MarshalTo

func (m *DateTime_TimeZone) MarshalTo(dAtA []byte) (int, error)

func (*DateTime_TimeZone) MarshalToSizedBuffer

func (m *DateTime_TimeZone) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*DateTime_TimeZone) Size

func (m *DateTime_TimeZone) Size() (n int)

func (*DateTime_TimeZone) String

func (this *DateTime_TimeZone) String() string

type DateTime_UtcOffset

type DateTime_UtcOffset struct {
	UtcOffset *types.Duration `protobuf:"bytes,8,opt,name=utc_offset,json=utcOffset,proto3,oneof" json:"utc_offset,omitempty"`
}

func NewPopulatedDateTime_UtcOffset

func NewPopulatedDateTime_UtcOffset(r randyDatetime, easy bool) *DateTime_UtcOffset

func (*DateTime_UtcOffset) Equal

func (this *DateTime_UtcOffset) Equal(that interface{}) bool

func (*DateTime_UtcOffset) GoString

func (this *DateTime_UtcOffset) GoString() string

func (*DateTime_UtcOffset) MarshalTo

func (m *DateTime_UtcOffset) MarshalTo(dAtA []byte) (int, error)

func (*DateTime_UtcOffset) MarshalToSizedBuffer

func (m *DateTime_UtcOffset) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*DateTime_UtcOffset) Size

func (m *DateTime_UtcOffset) Size() (n int)

func (*DateTime_UtcOffset) String

func (this *DateTime_UtcOffset) String() string

type DayOfWeek

type DayOfWeek int32

Represents a day of the week.

const (
	// The day of the week is unspecified.
	DayOfWeek_DAY_OF_WEEK_UNSPECIFIED DayOfWeek = 0
	// Monday
	DayOfWeek_MONDAY DayOfWeek = 1
	// Tuesday
	DayOfWeek_TUESDAY DayOfWeek = 2
	// Wednesday
	DayOfWeek_WEDNESDAY DayOfWeek = 3
	// Thursday
	DayOfWeek_THURSDAY DayOfWeek = 4
	// Friday
	DayOfWeek_FRIDAY DayOfWeek = 5
	// Saturday
	DayOfWeek_SATURDAY DayOfWeek = 6
	// Sunday
	DayOfWeek_SUNDAY DayOfWeek = 7
)

func (DayOfWeek) EnumDescriptor

func (DayOfWeek) EnumDescriptor() ([]byte, []int)

func (DayOfWeek) String

func (x DayOfWeek) String() string

type Expr

type Expr struct {
	// Textual representation of an expression in Common Expression Language
	// syntax.
	Expression string `protobuf:"bytes,1,opt,name=expression,proto3" json:"expression,omitempty"`
	// Optional. Title for the expression, i.e. a short string describing
	// its purpose. This can be used e.g. in UIs which allow to enter the
	// expression.
	Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
	// Optional. Description of the expression. This is a longer text which
	// describes the expression, e.g. when hovered over it in a UI.
	Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
	// Optional. String indicating the location of the expression for error
	// reporting, e.g. a file name and a position in the file.
	Location             string   `protobuf:"bytes,4,opt,name=location,proto3" json:"location,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec.

Example (Comparison):

title: "Summary size limit"
description: "Determines if a summary is less than 100 chars"
expression: "document.summary.size() < 100"

Example (Equality):

title: "Requestor is owner"
description: "Determines if requestor is the document owner"
expression: "document.owner == request.auth.claims.email"

Example (Logic):

title: "Public documents"
description: "Determine whether the document should be publicly visible"
expression: "document.type != 'private' && document.type != 'internal'"

Example (Data Manipulation):

title: "Notification string"
description: "Create a notification string with a timestamp."
expression: "'New message received at ' + string(document.create_time)"

The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.

func NewPopulatedExpr

func NewPopulatedExpr(r randyExpr, easy bool) *Expr

func (*Expr) Compare

func (this *Expr) Compare(that interface{}) int

func (*Expr) Descriptor

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

func (*Expr) Equal

func (this *Expr) Equal(that interface{}) bool

func (*Expr) GetDescription

func (m *Expr) GetDescription() string

func (*Expr) GetExpression

func (m *Expr) GetExpression() string

func (*Expr) GetLocation

func (m *Expr) GetLocation() string

func (*Expr) GetTitle

func (m *Expr) GetTitle() string

func (*Expr) GoString

func (this *Expr) GoString() string

func (*Expr) Marshal

func (m *Expr) Marshal() (dAtA []byte, err error)

func (*Expr) MarshalTo

func (m *Expr) MarshalTo(dAtA []byte) (int, error)

func (*Expr) MarshalToSizedBuffer

func (m *Expr) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Expr) ProtoMessage

func (*Expr) ProtoMessage()

func (*Expr) Reset

func (m *Expr) Reset()

func (*Expr) Size

func (m *Expr) Size() (n int)

func (*Expr) String

func (this *Expr) String() string

func (*Expr) Unmarshal

func (m *Expr) Unmarshal(dAtA []byte) error

func (*Expr) XXX_DiscardUnknown

func (m *Expr) XXX_DiscardUnknown()

func (*Expr) XXX_Marshal

func (m *Expr) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Expr) XXX_Merge

func (m *Expr) XXX_Merge(src proto.Message)

func (*Expr) XXX_MessageName

func (*Expr) XXX_MessageName() string

func (*Expr) XXX_Size

func (m *Expr) XXX_Size() int

func (*Expr) XXX_Unmarshal

func (m *Expr) XXX_Unmarshal(b []byte) error

type Fraction

type Fraction struct {
	// The numerator in the fraction, e.g. 2 in 2/3.
	Numerator int64 `protobuf:"varint,1,opt,name=numerator,proto3" json:"numerator,omitempty"`
	// The value by which the numerator is divided, e.g. 3 in 2/3. Must be
	// positive.
	Denominator          int64    `protobuf:"varint,2,opt,name=denominator,proto3" json:"denominator,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Represents a fraction in terms of a numerator divided by a denominator.

func NewPopulatedFraction

func NewPopulatedFraction(r randyFraction, easy bool) *Fraction

func (*Fraction) Compare

func (this *Fraction) Compare(that interface{}) int

func (*Fraction) Descriptor

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

func (*Fraction) Equal

func (this *Fraction) Equal(that interface{}) bool

func (*Fraction) GetDenominator

func (m *Fraction) GetDenominator() int64

func (*Fraction) GetNumerator

func (m *Fraction) GetNumerator() int64

func (*Fraction) GoString

func (this *Fraction) GoString() string

func (*Fraction) Marshal

func (m *Fraction) Marshal() (dAtA []byte, err error)

func (*Fraction) MarshalTo

func (m *Fraction) MarshalTo(dAtA []byte) (int, error)

func (*Fraction) MarshalToSizedBuffer

func (m *Fraction) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Fraction) ProtoMessage

func (*Fraction) ProtoMessage()

func (*Fraction) Reset

func (m *Fraction) Reset()

func (*Fraction) Size

func (m *Fraction) Size() (n int)

func (*Fraction) String

func (this *Fraction) String() string

func (*Fraction) Unmarshal

func (m *Fraction) Unmarshal(dAtA []byte) error

func (*Fraction) XXX_DiscardUnknown

func (m *Fraction) XXX_DiscardUnknown()

func (*Fraction) XXX_Marshal

func (m *Fraction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Fraction) XXX_Merge

func (m *Fraction) XXX_Merge(src proto.Message)

func (*Fraction) XXX_MessageName

func (*Fraction) XXX_MessageName() string

func (*Fraction) XXX_Size

func (m *Fraction) XXX_Size() int

func (*Fraction) XXX_Unmarshal

func (m *Fraction) XXX_Unmarshal(b []byte) error

type LatLng

type LatLng struct {
	// The latitude in degrees. It must be in the range [-90.0, +90.0].
	Latitude float64 `protobuf:"fixed64,1,opt,name=latitude,proto3" json:"latitude,omitempty"`
	// The longitude in degrees. It must be in the range [-180.0, +180.0].
	Longitude            float64  `protobuf:"fixed64,2,opt,name=longitude,proto3" json:"longitude,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this must conform to the <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84 standard</a>. Values must be within normalized ranges.

func NewPopulatedLatLng

func NewPopulatedLatLng(r randyLatlng, easy bool) *LatLng

func (*LatLng) Compare

func (this *LatLng) Compare(that interface{}) int

func (*LatLng) Descriptor

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

func (*LatLng) Equal

func (this *LatLng) Equal(that interface{}) bool

func (*LatLng) GetLatitude

func (m *LatLng) GetLatitude() float64

func (*LatLng) GetLongitude

func (m *LatLng) GetLongitude() float64

func (*LatLng) GoString

func (this *LatLng) GoString() string

func (*LatLng) Marshal

func (m *LatLng) Marshal() (dAtA []byte, err error)

func (*LatLng) MarshalTo

func (m *LatLng) MarshalTo(dAtA []byte) (int, error)

func (*LatLng) MarshalToSizedBuffer

func (m *LatLng) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*LatLng) ProtoMessage

func (*LatLng) ProtoMessage()

func (*LatLng) Reset

func (m *LatLng) Reset()

func (*LatLng) Size

func (m *LatLng) Size() (n int)

func (*LatLng) String

func (this *LatLng) String() string

func (*LatLng) Unmarshal

func (m *LatLng) Unmarshal(dAtA []byte) error

func (*LatLng) XXX_DiscardUnknown

func (m *LatLng) XXX_DiscardUnknown()

func (*LatLng) XXX_Marshal

func (m *LatLng) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LatLng) XXX_Merge

func (m *LatLng) XXX_Merge(src proto.Message)

func (*LatLng) XXX_MessageName

func (*LatLng) XXX_MessageName() string

func (*LatLng) XXX_Size

func (m *LatLng) XXX_Size() int

func (*LatLng) XXX_Unmarshal

func (m *LatLng) XXX_Unmarshal(b []byte) error

type Money

type Money struct {
	// The three-letter currency code defined in ISO 4217.
	CurrencyCode string `protobuf:"bytes,1,opt,name=currency_code,json=currencyCode,proto3" json:"currency_code,omitempty"`
	// The whole units of the amount.
	// For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
	Units int64 `protobuf:"varint,2,opt,name=units,proto3" json:"units,omitempty"`
	// Number of nano (10^-9) units of the amount.
	// The value must be between -999,999,999 and +999,999,999 inclusive.
	// If `units` is positive, `nanos` must be positive or zero.
	// If `units` is zero, `nanos` can be positive, zero, or negative.
	// If `units` is negative, `nanos` must be negative or zero.
	// For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
	Nanos                int32    `protobuf:"varint,3,opt,name=nanos,proto3" json:"nanos,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Represents an amount of money with its currency type.

func NewPopulatedMoney

func NewPopulatedMoney(r randyMoney, easy bool) *Money

func (*Money) Compare

func (this *Money) Compare(that interface{}) int

func (*Money) Descriptor

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

func (*Money) Equal

func (this *Money) Equal(that interface{}) bool

func (*Money) GetCurrencyCode

func (m *Money) GetCurrencyCode() string

func (*Money) GetNanos

func (m *Money) GetNanos() int32

func (*Money) GetUnits

func (m *Money) GetUnits() int64

func (*Money) GoString

func (this *Money) GoString() string

func (*Money) Marshal

func (m *Money) Marshal() (dAtA []byte, err error)

func (*Money) MarshalTo

func (m *Money) MarshalTo(dAtA []byte) (int, error)

func (*Money) MarshalToSizedBuffer

func (m *Money) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Money) ProtoMessage

func (*Money) ProtoMessage()

func (*Money) Reset

func (m *Money) Reset()

func (*Money) Size

func (m *Money) Size() (n int)

func (*Money) String

func (this *Money) String() string

func (*Money) Unmarshal

func (m *Money) Unmarshal(dAtA []byte) error

func (*Money) XXX_DiscardUnknown

func (m *Money) XXX_DiscardUnknown()

func (*Money) XXX_Marshal

func (m *Money) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Money) XXX_Merge

func (m *Money) XXX_Merge(src proto.Message)

func (*Money) XXX_MessageName

func (*Money) XXX_MessageName() string

func (*Money) XXX_Size

func (m *Money) XXX_Size() int

func (*Money) XXX_Unmarshal

func (m *Money) XXX_Unmarshal(b []byte) error

type Month

type Month int32

Represents a month in the Gregorian calendar.

const (
	// The unspecifed month.
	Month_MONTH_UNSPECIFIED Month = 0
	// The month of January.
	Month_JANUARY Month = 1
	// The month of February.
	Month_FEBRUARY Month = 2
	// The month of March.
	Month_MARCH Month = 3
	// The month of April.
	Month_APRIL Month = 4
	// The month of May.
	Month_MAY Month = 5
	// The month of June.
	Month_JUNE Month = 6
	// The month of July.
	Month_JULY Month = 7
	// The month of August.
	Month_AUGUST Month = 8
	// The month of September.
	Month_SEPTEMBER Month = 9
	// The month of October.
	Month_OCTOBER Month = 10
	// The month of November.
	Month_NOVEMBER Month = 11
	// The month of December.
	Month_DECEMBER Month = 12
)

func (Month) EnumDescriptor

func (Month) EnumDescriptor() ([]byte, []int)

func (Month) String

func (x Month) String() string

type PostalAddress

type PostalAddress struct {
	// 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.
	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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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:

  • Users should not be presented with UI elements for input or editing of fields outside countries where that field is used.

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

func NewPopulatedPostalAddress

func NewPopulatedPostalAddress(r randyPostalAddress, easy bool) *PostalAddress

func (*PostalAddress) Compare

func (this *PostalAddress) Compare(that interface{}) int

func (*PostalAddress) Descriptor

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

func (*PostalAddress) Equal

func (this *PostalAddress) Equal(that interface{}) bool

func (*PostalAddress) GetAddressLines

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

func (*PostalAddress) GetAdministrativeArea

func (m *PostalAddress) GetAdministrativeArea() string

func (*PostalAddress) GetLanguageCode

func (m *PostalAddress) GetLanguageCode() string

func (*PostalAddress) GetLocality

func (m *PostalAddress) GetLocality() string

func (*PostalAddress) GetOrganization

func (m *PostalAddress) GetOrganization() string

func (*PostalAddress) GetPostalCode

func (m *PostalAddress) GetPostalCode() string

func (*PostalAddress) GetRecipients

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

func (*PostalAddress) GetRegionCode

func (m *PostalAddress) GetRegionCode() string

func (*PostalAddress) GetRevision

func (m *PostalAddress) GetRevision() int32

func (*PostalAddress) GetSortingCode

func (m *PostalAddress) GetSortingCode() string

func (*PostalAddress) GetSublocality

func (m *PostalAddress) GetSublocality() string

func (*PostalAddress) GoString

func (this *PostalAddress) GoString() string

func (*PostalAddress) Marshal

func (m *PostalAddress) Marshal() (dAtA []byte, err error)

func (*PostalAddress) MarshalTo

func (m *PostalAddress) MarshalTo(dAtA []byte) (int, error)

func (*PostalAddress) MarshalToSizedBuffer

func (m *PostalAddress) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*PostalAddress) ProtoMessage

func (*PostalAddress) ProtoMessage()

func (*PostalAddress) Reset

func (m *PostalAddress) Reset()

func (*PostalAddress) Size

func (m *PostalAddress) Size() (n int)

func (*PostalAddress) String

func (this *PostalAddress) String() string

func (*PostalAddress) Unmarshal

func (m *PostalAddress) Unmarshal(dAtA []byte) error

func (*PostalAddress) XXX_DiscardUnknown

func (m *PostalAddress) XXX_DiscardUnknown()

func (*PostalAddress) XXX_Marshal

func (m *PostalAddress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PostalAddress) XXX_Merge

func (m *PostalAddress) XXX_Merge(src proto.Message)

func (*PostalAddress) XXX_MessageName

func (*PostalAddress) XXX_MessageName() string

func (*PostalAddress) XXX_Size

func (m *PostalAddress) XXX_Size() int

func (*PostalAddress) XXX_Unmarshal

func (m *PostalAddress) XXX_Unmarshal(b []byte) error

type Quaternion

type Quaternion struct {
	// The x component.
	X float64 `protobuf:"fixed64,1,opt,name=x,proto3" json:"x,omitempty"`
	// The y component.
	Y float64 `protobuf:"fixed64,2,opt,name=y,proto3" json:"y,omitempty"`
	// The z component.
	Z float64 `protobuf:"fixed64,3,opt,name=z,proto3" json:"z,omitempty"`
	// The scalar component.
	W                    float64  `protobuf:"fixed64,4,opt,name=w,proto3" json:"w,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

A quaternion is defined as the quotient of two directed lines in a three-dimensional space or equivalently as the quotient of two Euclidean vectors (https://en.wikipedia.org/wiki/Quaternion).

Quaternions are often used in calculations involving three-dimensional rotations (https://en.wikipedia.org/wiki/Quaternions_and_spatial_rotation), as they provide greater mathematical robustness by avoiding the gimbal lock problems that can be encountered when using Euler angles (https://en.wikipedia.org/wiki/Gimbal_lock).

Quaternions are generally represented in this form:

w + xi + yj + zk

where x, y, z, and w are real numbers, and i, j, and k are three imaginary numbers.

Our naming choice `(x, y, z, w)` comes from the desire to avoid confusion for those interested in the geometric properties of the quaternion in the 3D Cartesian space. Other texts often use alternative names or subscripts, such as `(a, b, c, d)`, `(1, i, j, k)`, or `(0, 1, 2, 3)`, which are perhaps better suited for mathematical interpretations.

To avoid any confusion, as well as to maintain compatibility with a large number of software libraries, the quaternions represented using the protocol buffer below *must* follow the Hamilton convention, which defines `ij = k` (i.e. a right-handed algebra), and therefore:

i^2 = j^2 = k^2 = ijk = −1
ij = −ji = k
jk = −kj = i
ki = −ik = j

Please DO NOT use this to represent quaternions that follow the JPL convention, or any of the other quaternion flavors out there.

Definitions:

  • Quaternion norm (or magnitude): `sqrt(x^2 + y^2 + z^2 + w^2)`.
  • Unit (or normalized) quaternion: a quaternion whose norm is 1.
  • Pure quaternion: a quaternion whose scalar component (`w`) is 0.
  • Rotation quaternion: a unit quaternion used to represent rotation.
  • Orientation quaternion: a unit quaternion used to represent orientation.

A quaternion can be normalized by dividing it by its norm. The resulting quaternion maintains the same direction, but has a norm of 1, i.e. it moves on the unit sphere. This is generally necessary for rotation and orientation quaternions, to avoid rounding errors: https://en.wikipedia.org/wiki/Rotation_formalisms_in_three_dimensions

Note that `(x, y, z, w)` and `(-x, -y, -z, -w)` represent the same rotation, but normalization would be even more useful, e.g. for comparison purposes, if it would produce a unique representation. It is thus recommended that `w` be kept positive, which can be achieved by changing all the signs when `w` is negative.

func NewPopulatedQuaternion

func NewPopulatedQuaternion(r randyQuaternion, easy bool) *Quaternion

func (*Quaternion) Compare

func (this *Quaternion) Compare(that interface{}) int

func (*Quaternion) Descriptor

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

func (*Quaternion) Equal

func (this *Quaternion) Equal(that interface{}) bool

func (*Quaternion) GetW

func (m *Quaternion) GetW() float64

func (*Quaternion) GetX

func (m *Quaternion) GetX() float64

func (*Quaternion) GetY

func (m *Quaternion) GetY() float64

func (*Quaternion) GetZ

func (m *Quaternion) GetZ() float64

func (*Quaternion) GoString

func (this *Quaternion) GoString() string

func (*Quaternion) Marshal

func (m *Quaternion) Marshal() (dAtA []byte, err error)

func (*Quaternion) MarshalTo

func (m *Quaternion) MarshalTo(dAtA []byte) (int, error)

func (*Quaternion) MarshalToSizedBuffer

func (m *Quaternion) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Quaternion) ProtoMessage

func (*Quaternion) ProtoMessage()

func (*Quaternion) Reset

func (m *Quaternion) Reset()

func (*Quaternion) Size

func (m *Quaternion) Size() (n int)

func (*Quaternion) String

func (this *Quaternion) String() string

func (*Quaternion) Unmarshal

func (m *Quaternion) Unmarshal(dAtA []byte) error

func (*Quaternion) XXX_DiscardUnknown

func (m *Quaternion) XXX_DiscardUnknown()

func (*Quaternion) XXX_Marshal

func (m *Quaternion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Quaternion) XXX_Merge

func (m *Quaternion) XXX_Merge(src proto.Message)

func (*Quaternion) XXX_MessageName

func (*Quaternion) XXX_MessageName() string

func (*Quaternion) XXX_Size

func (m *Quaternion) XXX_Size() int

func (*Quaternion) XXX_Unmarshal

func (m *Quaternion) XXX_Unmarshal(b []byte) error

type TimeOfDay

type TimeOfDay struct {
	// Hours of day in 24 hour format. Should be from 0 to 23. An API may choose
	// to allow the value "24:00:00" for scenarios like business closing time.
	Hours int32 `protobuf:"varint,1,opt,name=hours,proto3" json:"hours,omitempty"`
	// Minutes of hour of day. Must be from 0 to 59.
	Minutes int32 `protobuf:"varint,2,opt,name=minutes,proto3" json:"minutes,omitempty"`
	// Seconds of minutes of the time. Must normally be from 0 to 59. An API may
	// allow the value 60 if it allows leap-seconds.
	Seconds int32 `protobuf:"varint,3,opt,name=seconds,proto3" json:"seconds,omitempty"`
	// Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.
	Nanos                int32    `protobuf:"varint,4,opt,name=nanos,proto3" json:"nanos,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Represents a time of day. The date and time zone are either not significant or are specified elsewhere. An API may choose to allow leap seconds. Related types are [google.type.Date][google.type.Date] and `google.protobuf.Timestamp`.

func NewPopulatedTimeOfDay

func NewPopulatedTimeOfDay(r randyTimeofday, easy bool) *TimeOfDay

func (*TimeOfDay) Compare

func (this *TimeOfDay) Compare(that interface{}) int

func (*TimeOfDay) Descriptor

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

func (*TimeOfDay) Equal

func (this *TimeOfDay) Equal(that interface{}) bool

func (*TimeOfDay) GetHours

func (m *TimeOfDay) GetHours() int32

func (*TimeOfDay) GetMinutes

func (m *TimeOfDay) GetMinutes() int32

func (*TimeOfDay) GetNanos

func (m *TimeOfDay) GetNanos() int32

func (*TimeOfDay) GetSeconds

func (m *TimeOfDay) GetSeconds() int32

func (*TimeOfDay) GoString

func (this *TimeOfDay) GoString() string

func (*TimeOfDay) Marshal

func (m *TimeOfDay) Marshal() (dAtA []byte, err error)

func (*TimeOfDay) MarshalTo

func (m *TimeOfDay) MarshalTo(dAtA []byte) (int, error)

func (*TimeOfDay) MarshalToSizedBuffer

func (m *TimeOfDay) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*TimeOfDay) ProtoMessage

func (*TimeOfDay) ProtoMessage()

func (*TimeOfDay) Reset

func (m *TimeOfDay) Reset()

func (*TimeOfDay) Size

func (m *TimeOfDay) Size() (n int)

func (*TimeOfDay) String

func (this *TimeOfDay) String() string

func (*TimeOfDay) Unmarshal

func (m *TimeOfDay) Unmarshal(dAtA []byte) error

func (*TimeOfDay) XXX_DiscardUnknown

func (m *TimeOfDay) XXX_DiscardUnknown()

func (*TimeOfDay) XXX_Marshal

func (m *TimeOfDay) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TimeOfDay) XXX_Merge

func (m *TimeOfDay) XXX_Merge(src proto.Message)

func (*TimeOfDay) XXX_MessageName

func (*TimeOfDay) XXX_MessageName() string

func (*TimeOfDay) XXX_Size

func (m *TimeOfDay) XXX_Size() int

func (*TimeOfDay) XXX_Unmarshal

func (m *TimeOfDay) XXX_Unmarshal(b []byte) error

type TimeZone

type TimeZone struct {
	// IANA Time Zone Database time zone, e.g. "America/New_York".
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Optional. IANA Time Zone Database version number, e.g. "2019a".
	Version              string   `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Represents a time zone from the [IANA Time Zone Database](https://www.iana.org/time-zones).

func NewPopulatedTimeZone

func NewPopulatedTimeZone(r randyDatetime, easy bool) *TimeZone

func (*TimeZone) Descriptor

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

func (*TimeZone) Equal

func (this *TimeZone) Equal(that interface{}) bool

func (*TimeZone) GetId

func (m *TimeZone) GetId() string

func (*TimeZone) GetVersion

func (m *TimeZone) GetVersion() string

func (*TimeZone) GoString

func (this *TimeZone) GoString() string

func (*TimeZone) Marshal

func (m *TimeZone) Marshal() (dAtA []byte, err error)

func (*TimeZone) MarshalTo

func (m *TimeZone) MarshalTo(dAtA []byte) (int, error)

func (*TimeZone) MarshalToSizedBuffer

func (m *TimeZone) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*TimeZone) ProtoMessage

func (*TimeZone) ProtoMessage()

func (*TimeZone) Reset

func (m *TimeZone) Reset()

func (*TimeZone) Size

func (m *TimeZone) Size() (n int)

func (*TimeZone) String

func (this *TimeZone) String() string

func (*TimeZone) Unmarshal

func (m *TimeZone) Unmarshal(dAtA []byte) error

func (*TimeZone) XXX_DiscardUnknown

func (m *TimeZone) XXX_DiscardUnknown()

func (*TimeZone) XXX_Marshal

func (m *TimeZone) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TimeZone) XXX_Merge

func (m *TimeZone) XXX_Merge(src proto.Message)

func (*TimeZone) XXX_MessageName

func (*TimeZone) XXX_MessageName() string

func (*TimeZone) XXX_Size

func (m *TimeZone) XXX_Size() int

func (*TimeZone) XXX_Unmarshal

func (m *TimeZone) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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