diff --git a/clients/calendar/README.md b/clients/calendar/README.md index ee0b794ba5..72c871579f 100644 --- a/clients/calendar/README.md +++ b/clients/calendar/README.md @@ -11,7 +11,7 @@ Install this package from [Hex](https://hex.pm) by adding ```elixir def deps do - [{:google_api_calendar, "~> 0.21"}] + [{:google_api_calendar, "~> 0.22"}] end ``` diff --git a/clients/calendar/lib/google_api/calendar/v3/api/events.ex b/clients/calendar/lib/google_api/calendar/v3/api/events.ex index c7ca01edf7..ca991f9f3e 100644 --- a/clients/calendar/lib/google_api/calendar/v3/api/events.ex +++ b/clients/calendar/lib/google_api/calendar/v3/api/events.ex @@ -365,14 +365,28 @@ defmodule GoogleApi.Calendar.V3.Api.Events do * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. * `:quotaUser` (*type:* `String.t`) - An opaque string that represents a user for quota purposes. Must not exceed 40 characters. * `:userIp` (*type:* `String.t`) - Deprecated. Please use quotaUser instead. - * `:alwaysIncludeEmail` (*type:* `boolean()`) - Deprecated and ignored. A value will always be returned in the email field for the organizer, creator and attendees, even if no real email address is available (i.e. a generated, non-working value will be provided). + * `:alwaysIncludeEmail` (*type:* `boolean()`) - Deprecated and ignored. + * `:eventTypes` (*type:* `list(String.t)`) - Event types to return. Optional. This parameter can be repeated multiple times to return events of different types. The default is ["default", "focusTime", "outOfOffice"]. * `:iCalUID` (*type:* `String.t`) - Specifies an event ID in the iCalendar format to be provided in the response. Optional. Use this if you want to search for an event by its iCalendar ID. * `:maxAttendees` (*type:* `integer()`) - The maximum number of attendees to include in the response. If there are more than the specified number of attendees, only the participant is returned. Optional. * `:maxResults` (*type:* `integer()`) - Maximum number of events returned on one result page. The number of events in the resulting page may be less than this value, or none at all, even if there are more events matching the query. Incomplete pages can be detected by a non-empty nextPageToken field in the response. By default the value is 250 events. The page size can never be larger than 2500 events. Optional. * `:orderBy` (*type:* `String.t`) - The order of the events returned in the result. Optional. The default is an unspecified, stable order. * `:pageToken` (*type:* `String.t`) - Token specifying which result page to return. Optional. * `:privateExtendedProperty` (*type:* `list(String.t)`) - Extended properties constraint specified as propertyName=value. Matches only private properties. This parameter might be repeated multiple times to return events that match all given constraints. - * `:q` (*type:* `String.t`) - Free text search terms to find events that match these terms in the following fields: summary, description, location, attendee's displayName, attendee's email. Optional. + * `:q` (*type:* `String.t`) - Free text search terms to find events that match these terms in the following fields: + + - summary + - description + - location + - attendee's displayName + - attendee's email + - organizer's displayName + - organizer's email + - workingLocationProperties.officeLocation.buildingId + - workingLocationProperties.officeLocation.deskId + - workingLocationProperties.officeLocation.label + - workingLocationProperties.customLocation.label + These search terms also match predefined keywords against all display title translations of working location, out-of-office, and focus-time events. For example, searching for "Office" or "Bureau" returns working location events of type officeLocation, whereas searching for "Out of office" or "Abwesend" returns out-of-office events. Optional. * `:sharedExtendedProperty` (*type:* `list(String.t)`) - Extended properties constraint specified as propertyName=value. Matches only shared properties. This parameter might be repeated multiple times to return events that match all given constraints. * `:showDeleted` (*type:* `boolean()`) - Whether to include deleted events (with status equals "cancelled") in the result. Cancelled instances of recurring events (but not the underlying recurring event) will still be included if showDeleted and singleEvents are both False. If showDeleted and singleEvents are both True, only single instances of deleted events (but not the underlying recurring events) are returned. Optional. The default is False. * `:showHiddenInvitations` (*type:* `boolean()`) - Whether to include hidden invitations in the result. Optional. The default is False. @@ -388,7 +402,7 @@ defmodule GoogleApi.Calendar.V3.Api.Events do - sharedExtendedProperty - timeMin - timeMax - - updatedMin If the syncToken expires, the server will respond with a 410 GONE response code and the client should clear its storage and perform a full synchronization without any syncToken. + - updatedMin All other query parameters should be the same as for the initial synchronization to avoid undefined behavior. If the syncToken expires, the server will respond with a 410 GONE response code and the client should clear its storage and perform a full synchronization without any syncToken. Learn more about incremental synchronization. Optional. The default is to return all entries. * `:timeMax` (*type:* `DateTime.t`) - Upper bound (exclusive) for an event's start time to filter by. Optional. The default is not to filter by start time. Must be an RFC3339 timestamp with mandatory time zone offset, for example, 2011-06-03T10:00:00-07:00, 2011-06-03T10:00:00Z. Milliseconds may be provided but are ignored. If timeMin is set, timeMax must be greater than timeMin. @@ -417,6 +431,7 @@ defmodule GoogleApi.Calendar.V3.Api.Events do :quotaUser => :query, :userIp => :query, :alwaysIncludeEmail => :query, + :eventTypes => :query, :iCalUID => :query, :maxAttendees => :query, :maxResults => :query, @@ -450,7 +465,7 @@ defmodule GoogleApi.Calendar.V3.Api.Events do end @doc """ - Moves an event to another calendar, i.e. changes an event's organizer. + Moves an event to another calendar, i.e. changes an event's organizer. Note that only default events can be moved; outOfOffice, focusTime and workingLocation events cannot be moved. ## Parameters @@ -746,14 +761,28 @@ defmodule GoogleApi.Calendar.V3.Api.Events do * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. * `:quotaUser` (*type:* `String.t`) - An opaque string that represents a user for quota purposes. Must not exceed 40 characters. * `:userIp` (*type:* `String.t`) - Deprecated. Please use quotaUser instead. - * `:alwaysIncludeEmail` (*type:* `boolean()`) - Deprecated and ignored. A value will always be returned in the email field for the organizer, creator and attendees, even if no real email address is available (i.e. a generated, non-working value will be provided). + * `:alwaysIncludeEmail` (*type:* `boolean()`) - Deprecated and ignored. + * `:eventTypes` (*type:* `list(String.t)`) - Event types to return. Optional. This parameter can be repeated multiple times to return events of different types. The default is ["default", "focusTime", "outOfOffice"]. * `:iCalUID` (*type:* `String.t`) - Specifies an event ID in the iCalendar format to be provided in the response. Optional. Use this if you want to search for an event by its iCalendar ID. * `:maxAttendees` (*type:* `integer()`) - The maximum number of attendees to include in the response. If there are more than the specified number of attendees, only the participant is returned. Optional. * `:maxResults` (*type:* `integer()`) - Maximum number of events returned on one result page. The number of events in the resulting page may be less than this value, or none at all, even if there are more events matching the query. Incomplete pages can be detected by a non-empty nextPageToken field in the response. By default the value is 250 events. The page size can never be larger than 2500 events. Optional. * `:orderBy` (*type:* `String.t`) - The order of the events returned in the result. Optional. The default is an unspecified, stable order. * `:pageToken` (*type:* `String.t`) - Token specifying which result page to return. Optional. * `:privateExtendedProperty` (*type:* `list(String.t)`) - Extended properties constraint specified as propertyName=value. Matches only private properties. This parameter might be repeated multiple times to return events that match all given constraints. - * `:q` (*type:* `String.t`) - Free text search terms to find events that match these terms in the following fields: summary, description, location, attendee's displayName, attendee's email. Optional. + * `:q` (*type:* `String.t`) - Free text search terms to find events that match these terms in the following fields: + + - summary + - description + - location + - attendee's displayName + - attendee's email + - organizer's displayName + - organizer's email + - workingLocationProperties.officeLocation.buildingId + - workingLocationProperties.officeLocation.deskId + - workingLocationProperties.officeLocation.label + - workingLocationProperties.customLocation.label + These search terms also match predefined keywords against all display title translations of working location, out-of-office, and focus-time events. For example, searching for "Office" or "Bureau" returns working location events of type officeLocation, whereas searching for "Out of office" or "Abwesend" returns out-of-office events. Optional. * `:sharedExtendedProperty` (*type:* `list(String.t)`) - Extended properties constraint specified as propertyName=value. Matches only shared properties. This parameter might be repeated multiple times to return events that match all given constraints. * `:showDeleted` (*type:* `boolean()`) - Whether to include deleted events (with status equals "cancelled") in the result. Cancelled instances of recurring events (but not the underlying recurring event) will still be included if showDeleted and singleEvents are both False. If showDeleted and singleEvents are both True, only single instances of deleted events (but not the underlying recurring events) are returned. Optional. The default is False. * `:showHiddenInvitations` (*type:* `boolean()`) - Whether to include hidden invitations in the result. Optional. The default is False. @@ -769,7 +798,7 @@ defmodule GoogleApi.Calendar.V3.Api.Events do - sharedExtendedProperty - timeMin - timeMax - - updatedMin If the syncToken expires, the server will respond with a 410 GONE response code and the client should clear its storage and perform a full synchronization without any syncToken. + - updatedMin All other query parameters should be the same as for the initial synchronization to avoid undefined behavior. If the syncToken expires, the server will respond with a 410 GONE response code and the client should clear its storage and perform a full synchronization without any syncToken. Learn more about incremental synchronization. Optional. The default is to return all entries. * `:timeMax` (*type:* `DateTime.t`) - Upper bound (exclusive) for an event's start time to filter by. Optional. The default is not to filter by start time. Must be an RFC3339 timestamp with mandatory time zone offset, for example, 2011-06-03T10:00:00-07:00, 2011-06-03T10:00:00Z. Milliseconds may be provided but are ignored. If timeMin is set, timeMax must be greater than timeMin. @@ -799,6 +828,7 @@ defmodule GoogleApi.Calendar.V3.Api.Events do :quotaUser => :query, :userIp => :query, :alwaysIncludeEmail => :query, + :eventTypes => :query, :iCalUID => :query, :maxAttendees => :query, :maxResults => :query, diff --git a/clients/calendar/lib/google_api/calendar/v3/metadata.ex b/clients/calendar/lib/google_api/calendar/v3/metadata.ex index 0da0429a08..f2be760f8c 100644 --- a/clients/calendar/lib/google_api/calendar/v3/metadata.ex +++ b/clients/calendar/lib/google_api/calendar/v3/metadata.ex @@ -20,7 +20,7 @@ defmodule GoogleApi.Calendar.V3 do API client metadata for GoogleApi.Calendar.V3. """ - @discovery_revision "20220722" + @discovery_revision "20240223" def discovery_revision(), do: @discovery_revision end diff --git a/clients/calendar/lib/google_api/calendar/v3/model/event.ex b/clients/calendar/lib/google_api/calendar/v3/model/event.ex index fd90b052c7..18f4dc9454 100644 --- a/clients/calendar/lib/google_api/calendar/v3/model/event.ex +++ b/clients/calendar/lib/google_api/calendar/v3/model/event.ex @@ -34,6 +34,7 @@ defmodule GoogleApi.Calendar.V3.Model.Event do There can be at most 25 attachments per event, * `description` (*type:* `String.t`, *default:* `nil`) - Description of the event. Can contain HTML. Optional. * `kind` (*type:* `String.t`, *default:* `calendar#event`) - Type of the resource ("calendar#event"). + * `outOfOfficeProperties` (*type:* `GoogleApi.Calendar.V3.Model.EventOutOfOfficeProperties.t`, *default:* `nil`) - Out of office event data. Used if eventType is outOfOffice. * `guestsCanModify` (*type:* `boolean()`, *default:* `false`) - Whether attendees other than the organizer can modify the event. Optional. The default is False. * `attendees` (*type:* `list(GoogleApi.Calendar.V3.Model.EventAttendee.t)`, *default:* `nil`) - The attendees of the event. See the Events with attendees guide for more information on scheduling events with other calendar users. Service accounts need to use domain-wide delegation of authority to populate the attendee list. * `start` (*type:* `GoogleApi.Calendar.V3.Model.EventDateTime.t`, *default:* `nil`) - The (inclusive) start time of the event. For a recurring event, this is the start time of the first instance. @@ -60,6 +61,7 @@ defmodule GoogleApi.Calendar.V3.Model.Event do * `colorId` (*type:* `String.t`, *default:* `nil`) - The color of the event. This is an ID referring to an entry in the event section of the colors definition (see the colors endpoint). Optional. * `guestsCanInviteOthers` (*type:* `boolean()`, *default:* `true`) - Whether attendees other than the organizer can invite others to the event. Optional. The default is True. * `extendedProperties` (*type:* `GoogleApi.Calendar.V3.Model.EventExtendedProperties.t`, *default:* `nil`) - Extended properties of the event. + * `workingLocationProperties` (*type:* `GoogleApi.Calendar.V3.Model.EventWorkingLocationProperties.t`, *default:* `nil`) - Working location event data. * `sequence` (*type:* `integer()`, *default:* `nil`) - Sequence number as per iCalendar. * `recurrence` (*type:* `list(String.t)`, *default:* `nil`) - List of RRULE, EXRULE, RDATE and EXDATE lines for a recurring event, as specified in RFC5545. Note that DTSTART and DTEND lines are not allowed in this field; event start and end times are specified in the start and end fields. This field is omitted for single events or instances of recurring events. * `transparency` (*type:* `String.t`, *default:* `opaque`) - Whether the event blocks time on the calendar. Optional. Possible values are: @@ -75,15 +77,17 @@ defmodule GoogleApi.Calendar.V3.Model.Event do Note that the icalUID and the id are not identical and only one of them should be supplied at event creation time. One difference in their semantics is that in recurring events, all occurrences of one event have different ids while they all share the same icalUIDs. * `end` (*type:* `GoogleApi.Calendar.V3.Model.EventDateTime.t`, *default:* `nil`) - The (exclusive) end time of the event. For a recurring event, this is the end time of the first instance. * `updated` (*type:* `DateTime.t`, *default:* `nil`) - Last modification time of the event (as a RFC3339 timestamp). Read-only. + * `focusTimeProperties` (*type:* `GoogleApi.Calendar.V3.Model.EventFocusTimeProperties.t`, *default:* `nil`) - Focus Time event data. Used if eventType is focusTime. * `originalStartTime` (*type:* `GoogleApi.Calendar.V3.Model.EventDateTime.t`, *default:* `nil`) - For an instance of a recurring event, this is the time at which this event would start according to the recurrence data in the recurring event identified by recurringEventId. It uniquely identifies the instance within the recurring event series even if the instance was moved to a different time. Immutable. * `locked` (*type:* `boolean()`, *default:* `false`) - Whether this is a locked event copy where no changes can be made to the main event fields "summary", "description", "location", "start", "end" or "recurrence". The default is False. Read-Only. * `created` (*type:* `DateTime.t`, *default:* `nil`) - Creation time of the event (as a RFC3339 timestamp). Read-only. * `htmlLink` (*type:* `String.t`, *default:* `nil`) - An absolute link to this event in the Google Calendar Web UI. Read-only. * `source` (*type:* `GoogleApi.Calendar.V3.Model.EventSource.t`, *default:* `nil`) - Source from which the event was created. For example, a web page, an email message or any document identifiable by an URL with HTTP or HTTPS scheme. Can only be seen or modified by the creator of the event. - * `eventType` (*type:* `String.t`, *default:* `default`) - Specific type of the event. Read-only. Possible values are: + * `eventType` (*type:* `String.t`, *default:* `default`) - Specific type of the event. This cannot be modified after the event is created. Possible values are: - "default" - A regular event or not further specified. - "outOfOffice" - An out-of-office event. - - "focusTime" - A focus-time event. + - "focusTime" - A focus-time event. + - "workingLocation" - A working location event. Currently, only "default " and "workingLocation" events can be created using the API. Extended support for other event types will be made available in later releases. * `iCalUID` (*type:* `String.t`, *default:* `nil`) - Event unique identifier as defined in RFC5545. It is used to uniquely identify events accross calendaring systems and must be supplied when importing events via the import method. Note that the iCalUID and the id are not identical and only one of them should be supplied at event creation time. One difference in their semantics is that in recurring events, all occurrences of one event have different ids while they all share the same iCalUIDs. To retrieve an event using its iCalUID, call the events.list method using the iCalUID parameter. To retrieve an event using its id, call the events.get method. """ @@ -102,6 +106,8 @@ defmodule GoogleApi.Calendar.V3.Model.Event do :attachments => list(GoogleApi.Calendar.V3.Model.EventAttachment.t()) | nil, :description => String.t() | nil, :kind => String.t() | nil, + :outOfOfficeProperties => + GoogleApi.Calendar.V3.Model.EventOutOfOfficeProperties.t() | nil, :guestsCanModify => boolean() | nil, :attendees => list(GoogleApi.Calendar.V3.Model.EventAttendee.t()) | nil, :start => GoogleApi.Calendar.V3.Model.EventDateTime.t() | nil, @@ -115,6 +121,8 @@ defmodule GoogleApi.Calendar.V3.Model.Event do :colorId => String.t() | nil, :guestsCanInviteOthers => boolean() | nil, :extendedProperties => GoogleApi.Calendar.V3.Model.EventExtendedProperties.t() | nil, + :workingLocationProperties => + GoogleApi.Calendar.V3.Model.EventWorkingLocationProperties.t() | nil, :sequence => integer() | nil, :recurrence => list(String.t()) | nil, :transparency => String.t() | nil, @@ -123,6 +131,7 @@ defmodule GoogleApi.Calendar.V3.Model.Event do :id => String.t() | nil, :end => GoogleApi.Calendar.V3.Model.EventDateTime.t() | nil, :updated => DateTime.t() | nil, + :focusTimeProperties => GoogleApi.Calendar.V3.Model.EventFocusTimeProperties.t() | nil, :originalStartTime => GoogleApi.Calendar.V3.Model.EventDateTime.t() | nil, :locked => boolean() | nil, :created => DateTime.t() | nil, @@ -143,6 +152,7 @@ defmodule GoogleApi.Calendar.V3.Model.Event do field(:attachments, as: GoogleApi.Calendar.V3.Model.EventAttachment, type: :list) field(:description) field(:kind) + field(:outOfOfficeProperties, as: GoogleApi.Calendar.V3.Model.EventOutOfOfficeProperties) field(:guestsCanModify) field(:attendees, as: GoogleApi.Calendar.V3.Model.EventAttendee, type: :list) field(:start, as: GoogleApi.Calendar.V3.Model.EventDateTime) @@ -156,6 +166,9 @@ defmodule GoogleApi.Calendar.V3.Model.Event do field(:colorId) field(:guestsCanInviteOthers) field(:extendedProperties, as: GoogleApi.Calendar.V3.Model.EventExtendedProperties) + + field(:workingLocationProperties, as: GoogleApi.Calendar.V3.Model.EventWorkingLocationProperties) + field(:sequence) field(:recurrence, type: :list) field(:transparency) @@ -164,6 +177,7 @@ defmodule GoogleApi.Calendar.V3.Model.Event do field(:id) field(:end, as: GoogleApi.Calendar.V3.Model.EventDateTime) field(:updated, as: DateTime) + field(:focusTimeProperties, as: GoogleApi.Calendar.V3.Model.EventFocusTimeProperties) field(:originalStartTime, as: GoogleApi.Calendar.V3.Model.EventDateTime) field(:locked) field(:created, as: DateTime) diff --git a/clients/calendar/lib/google_api/calendar/v3/model/event_focus_time_properties.ex b/clients/calendar/lib/google_api/calendar/v3/model/event_focus_time_properties.ex new file mode 100644 index 0000000000..183fbf3853 --- /dev/null +++ b/clients/calendar/lib/google_api/calendar/v3/model/event_focus_time_properties.ex @@ -0,0 +1,52 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Calendar.V3.Model.EventFocusTimeProperties do + @moduledoc """ + + + ## Attributes + + * `autoDeclineMode` (*type:* `String.t`, *default:* `nil`) - Whether to decline meeting invitations which overlap Focus Time events. Valid values are declineNone, meaning that no meeting invitations are declined; declineAllConflictingInvitations, meaning that all conflicting meeting invitations that conflict with the event are declined; and declineOnlyNewConflictingInvitations, meaning that only new conflicting meeting invitations which arrive while the Focus Time event is present are to be declined. + * `chatStatus` (*type:* `String.t`, *default:* `nil`) - The status to mark the user in Chat and related products. This can be available or doNotDisturb. + * `declineMessage` (*type:* `String.t`, *default:* `nil`) - Response message to set if an existing event or new invitation is automatically declined by Calendar. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :autoDeclineMode => String.t() | nil, + :chatStatus => String.t() | nil, + :declineMessage => String.t() | nil + } + + field(:autoDeclineMode) + field(:chatStatus) + field(:declineMessage) +end + +defimpl Poison.Decoder, for: GoogleApi.Calendar.V3.Model.EventFocusTimeProperties do + def decode(value, options) do + GoogleApi.Calendar.V3.Model.EventFocusTimeProperties.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Calendar.V3.Model.EventFocusTimeProperties do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/calendar/lib/google_api/calendar/v3/model/event_out_of_office_properties.ex b/clients/calendar/lib/google_api/calendar/v3/model/event_out_of_office_properties.ex new file mode 100644 index 0000000000..c33db27607 --- /dev/null +++ b/clients/calendar/lib/google_api/calendar/v3/model/event_out_of_office_properties.ex @@ -0,0 +1,49 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Calendar.V3.Model.EventOutOfOfficeProperties do + @moduledoc """ + + + ## Attributes + + * `autoDeclineMode` (*type:* `String.t`, *default:* `nil`) - Whether to decline meeting invitations which overlap Out of office events. Valid values are declineNone, meaning that no meeting invitations are declined; declineAllConflictingInvitations, meaning that all conflicting meeting invitations that conflict with the event are declined; and declineOnlyNewConflictingInvitations, meaning that only new conflicting meeting invitations which arrive while the Out of office event is present are to be declined. + * `declineMessage` (*type:* `String.t`, *default:* `nil`) - Response message to set if an existing event or new invitation is automatically declined by Calendar. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :autoDeclineMode => String.t() | nil, + :declineMessage => String.t() | nil + } + + field(:autoDeclineMode) + field(:declineMessage) +end + +defimpl Poison.Decoder, for: GoogleApi.Calendar.V3.Model.EventOutOfOfficeProperties do + def decode(value, options) do + GoogleApi.Calendar.V3.Model.EventOutOfOfficeProperties.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Calendar.V3.Model.EventOutOfOfficeProperties do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/calendar/lib/google_api/calendar/v3/model/event_working_location_properties.ex b/clients/calendar/lib/google_api/calendar/v3/model/event_working_location_properties.ex new file mode 100644 index 0000000000..132adc1de2 --- /dev/null +++ b/clients/calendar/lib/google_api/calendar/v3/model/event_working_location_properties.ex @@ -0,0 +1,68 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Calendar.V3.Model.EventWorkingLocationProperties do + @moduledoc """ + + + ## Attributes + + * `customLocation` (*type:* `GoogleApi.Calendar.V3.Model.EventWorkingLocationPropertiesCustomLocation.t`, *default:* `nil`) - If present, specifies that the user is working from a custom location. + * `homeOffice` (*type:* `any()`, *default:* `nil`) - If present, specifies that the user is working at home. + * `officeLocation` (*type:* `GoogleApi.Calendar.V3.Model.EventWorkingLocationPropertiesOfficeLocation.t`, *default:* `nil`) - If present, specifies that the user is working from an office. + * `type` (*type:* `String.t`, *default:* `nil`) - Type of the working location. Possible values are: + - "homeOffice" - The user is working at home. + - "officeLocation" - The user is working from an office. + - "customLocation" - The user is working from a custom location. Any details are specified in a sub-field of the specified name, but this field may be missing if empty. Any other fields are ignored. + Required when adding working location properties. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :customLocation => + GoogleApi.Calendar.V3.Model.EventWorkingLocationPropertiesCustomLocation.t() | nil, + :homeOffice => any() | nil, + :officeLocation => + GoogleApi.Calendar.V3.Model.EventWorkingLocationPropertiesOfficeLocation.t() | nil, + :type => String.t() | nil + } + + field(:customLocation, + as: GoogleApi.Calendar.V3.Model.EventWorkingLocationPropertiesCustomLocation + ) + + field(:homeOffice) + + field(:officeLocation, + as: GoogleApi.Calendar.V3.Model.EventWorkingLocationPropertiesOfficeLocation + ) + + field(:type) +end + +defimpl Poison.Decoder, for: GoogleApi.Calendar.V3.Model.EventWorkingLocationProperties do + def decode(value, options) do + GoogleApi.Calendar.V3.Model.EventWorkingLocationProperties.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Calendar.V3.Model.EventWorkingLocationProperties do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/calendar/lib/google_api/calendar/v3/model/event_working_location_properties_custom_location.ex b/clients/calendar/lib/google_api/calendar/v3/model/event_working_location_properties_custom_location.ex new file mode 100644 index 0000000000..a8c138a937 --- /dev/null +++ b/clients/calendar/lib/google_api/calendar/v3/model/event_working_location_properties_custom_location.ex @@ -0,0 +1,51 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Calendar.V3.Model.EventWorkingLocationPropertiesCustomLocation do + @moduledoc """ + If present, specifies that the user is working from a custom location. + + ## Attributes + + * `label` (*type:* `String.t`, *default:* `nil`) - An optional extra label for additional information. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :label => String.t() | nil + } + + field(:label) +end + +defimpl Poison.Decoder, + for: GoogleApi.Calendar.V3.Model.EventWorkingLocationPropertiesCustomLocation do + def decode(value, options) do + GoogleApi.Calendar.V3.Model.EventWorkingLocationPropertiesCustomLocation.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.Calendar.V3.Model.EventWorkingLocationPropertiesCustomLocation do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/calendar/lib/google_api/calendar/v3/model/event_working_location_properties_office_location.ex b/clients/calendar/lib/google_api/calendar/v3/model/event_working_location_properties_office_location.ex new file mode 100644 index 0000000000..314f9cab65 --- /dev/null +++ b/clients/calendar/lib/google_api/calendar/v3/model/event_working_location_properties_office_location.ex @@ -0,0 +1,63 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Calendar.V3.Model.EventWorkingLocationPropertiesOfficeLocation do + @moduledoc """ + If present, specifies that the user is working from an office. + + ## Attributes + + * `buildingId` (*type:* `String.t`, *default:* `nil`) - An optional building identifier. This should reference a building ID in the organization's Resources database. + * `deskId` (*type:* `String.t`, *default:* `nil`) - An optional desk identifier. + * `floorId` (*type:* `String.t`, *default:* `nil`) - An optional floor identifier. + * `floorSectionId` (*type:* `String.t`, *default:* `nil`) - An optional floor section identifier. + * `label` (*type:* `String.t`, *default:* `nil`) - The office name that's displayed in Calendar Web and Mobile clients. We recommend you reference a building name in the organization's Resources database. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :buildingId => String.t() | nil, + :deskId => String.t() | nil, + :floorId => String.t() | nil, + :floorSectionId => String.t() | nil, + :label => String.t() | nil + } + + field(:buildingId) + field(:deskId) + field(:floorId) + field(:floorSectionId) + field(:label) +end + +defimpl Poison.Decoder, + for: GoogleApi.Calendar.V3.Model.EventWorkingLocationPropertiesOfficeLocation do + def decode(value, options) do + GoogleApi.Calendar.V3.Model.EventWorkingLocationPropertiesOfficeLocation.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.Calendar.V3.Model.EventWorkingLocationPropertiesOfficeLocation do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/calendar/mix.exs b/clients/calendar/mix.exs index b5b7b96c98..16d97bd49a 100644 --- a/clients/calendar/mix.exs +++ b/clients/calendar/mix.exs @@ -18,7 +18,7 @@ defmodule GoogleApi.Calendar.Mixfile do use Mix.Project - @version "0.21.9" + @version "0.22.0" def project() do [