Skip to content

Commit

Permalink
feat: Automated regeneration of Classroom client
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshi-automation committed Nov 24, 2024
1 parent 03c2570 commit e3b02fd
Show file tree
Hide file tree
Showing 10 changed files with 758 additions and 3 deletions.
2 changes: 1 addition & 1 deletion clients/classroom/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Install this package from [Hex](https://hex.pm) by adding

```elixir
def deps do
[{:google_api_classroom, "~> 0.21"}]
[{:google_api_classroom, "~> 0.22"}]
end
```

Expand Down
472 changes: 472 additions & 0 deletions clients/classroom/lib/google_api/classroom/v1/api/courses.ex

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion clients/classroom/lib/google_api/classroom/v1/metadata.ex
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ defmodule GoogleApi.Classroom.V1 do
API client metadata for GoogleApi.Classroom.V1.
"""

@discovery_revision "20241007"
@discovery_revision "20241119"

def discovery_revision(), do: @discovery_revision
end
55 changes: 55 additions & 0 deletions clients/classroom/lib/google_api/classroom/v1/model/criterion.ex
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# 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.Classroom.V1.Model.Criterion do
@moduledoc """
A rubric criterion. Each criterion is a dimension on which performance is rated.
## Attributes
* `description` (*type:* `String.t`, *default:* `nil`) - The description of the criterion.
* `id` (*type:* `String.t`, *default:* `nil`) - The criterion ID. On creation, an ID is assigned.
* `levels` (*type:* `list(GoogleApi.Classroom.V1.Model.Level.t)`, *default:* `nil`) - The list of levels within this criterion.
* `title` (*type:* `String.t`, *default:* `nil`) - The title of the criterion.
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:description => String.t() | nil,
:id => String.t() | nil,
:levels => list(GoogleApi.Classroom.V1.Model.Level.t()) | nil,
:title => String.t() | nil
}

field(:description)
field(:id)
field(:levels, as: GoogleApi.Classroom.V1.Model.Level, type: :list)
field(:title)
end

defimpl Poison.Decoder, for: GoogleApi.Classroom.V1.Model.Criterion do
def decode(value, options) do
GoogleApi.Classroom.V1.Model.Criterion.decode(value, options)
end
end

defimpl Poison.Encoder, for: GoogleApi.Classroom.V1.Model.Criterion do
def encode(value, options) do
GoogleApi.Gax.ModelBase.encode(value, options)
end
end
55 changes: 55 additions & 0 deletions clients/classroom/lib/google_api/classroom/v1/model/level.ex
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# 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.Classroom.V1.Model.Level do
@moduledoc """
A level of the criterion.
## Attributes
* `description` (*type:* `String.t`, *default:* `nil`) - The description of the level.
* `id` (*type:* `String.t`, *default:* `nil`) - The level ID. On creation, an ID is assigned.
* `points` (*type:* `float()`, *default:* `nil`) - Optional points associated with this level. If set, all levels within the rubric must specify points and the value must be distinct across all levels within a single criterion. 0 is distinct from no points.
* `title` (*type:* `String.t`, *default:* `nil`) - The title of the level. If the level has no points set, title must be set.
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:description => String.t() | nil,
:id => String.t() | nil,
:points => float() | nil,
:title => String.t() | nil
}

field(:description)
field(:id)
field(:points)
field(:title)
end

defimpl Poison.Decoder, for: GoogleApi.Classroom.V1.Model.Level do
def decode(value, options) do
GoogleApi.Classroom.V1.Model.Level.decode(value, options)
end
end

defimpl Poison.Encoder, for: GoogleApi.Classroom.V1.Model.Level do
def encode(value, options) do
GoogleApi.Gax.ModelBase.encode(value, options)
end
end
Original file line number Diff line number Diff line change
@@ -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.Classroom.V1.Model.ListRubricsResponse do
@moduledoc """
Response when listing rubrics.
## Attributes
* `nextPageToken` (*type:* `String.t`, *default:* `nil`) - Token identifying the next page of results to return. If empty, no further results are available.
* `rubrics` (*type:* `list(GoogleApi.Classroom.V1.Model.Rubric.t)`, *default:* `nil`) - Rubrics that match the request.
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:nextPageToken => String.t() | nil,
:rubrics => list(GoogleApi.Classroom.V1.Model.Rubric.t()) | nil
}

field(:nextPageToken)
field(:rubrics, as: GoogleApi.Classroom.V1.Model.Rubric, type: :list)
end

defimpl Poison.Decoder, for: GoogleApi.Classroom.V1.Model.ListRubricsResponse do
def decode(value, options) do
GoogleApi.Classroom.V1.Model.ListRubricsResponse.decode(value, options)
end
end

defimpl Poison.Encoder, for: GoogleApi.Classroom.V1.Model.ListRubricsResponse do
def encode(value, options) do
GoogleApi.Gax.ModelBase.encode(value, options)
end
end
64 changes: 64 additions & 0 deletions clients/classroom/lib/google_api/classroom/v1/model/rubric.ex
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# 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.Classroom.V1.Model.Rubric do
@moduledoc """
The rubric of the course work. A rubric is a scoring guide used to evaluate student work and give feedback. For further details, see [Rubrics structure and known limitations](/classroom/rubrics/limitations).
## Attributes
* `courseId` (*type:* `String.t`, *default:* `nil`) - Identifier of the course. Read-only.
* `courseWorkId` (*type:* `String.t`, *default:* `nil`) - Identifier for the course work this corresponds to. Read-only.
* `creationTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Timestamp when this rubric was created. Read-only.
* `criteria` (*type:* `list(GoogleApi.Classroom.V1.Model.Criterion.t)`, *default:* `nil`) - List of criteria. Each criterion is a dimension on which performance is rated.
* `id` (*type:* `String.t`, *default:* `nil`) - Classroom-assigned identifier for the rubric. This is unique among rubrics for the relevant course work. Read-only.
* `sourceSpreadsheetId` (*type:* `String.t`, *default:* `nil`) - Input only. Immutable. Google Sheets ID of the spreadsheet. This spreadsheet must contain formatted rubric settings. See [Create or reuse a rubric for an assignment](https://support.google.com/edu/classroom/answer/9335069). Use of this field requires the `https://www.googleapis.com/auth/spreadsheets.readonly` or `https://www.googleapis.com/auth/spreadsheets` scope.
* `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Timestamp of the most recent change to this rubric. Read-only.
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:courseId => String.t() | nil,
:courseWorkId => String.t() | nil,
:creationTime => DateTime.t() | nil,
:criteria => list(GoogleApi.Classroom.V1.Model.Criterion.t()) | nil,
:id => String.t() | nil,
:sourceSpreadsheetId => String.t() | nil,
:updateTime => DateTime.t() | nil
}

field(:courseId)
field(:courseWorkId)
field(:creationTime, as: DateTime)
field(:criteria, as: GoogleApi.Classroom.V1.Model.Criterion, type: :list)
field(:id)
field(:sourceSpreadsheetId)
field(:updateTime, as: DateTime)
end

defimpl Poison.Decoder, for: GoogleApi.Classroom.V1.Model.Rubric do
def decode(value, options) do
GoogleApi.Classroom.V1.Model.Rubric.decode(value, options)
end
end

defimpl Poison.Encoder, for: GoogleApi.Classroom.V1.Model.Rubric do
def encode(value, options) do
GoogleApi.Gax.ModelBase.encode(value, options)
end
end
Original file line number Diff line number Diff line change
@@ -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.Classroom.V1.Model.RubricGrade do
@moduledoc """
A rubric grade set for the student submission. There is at most one entry per rubric criterion.
## Attributes
* `criterionId` (*type:* `String.t`, *default:* `nil`) - Optional. Criterion ID.
* `levelId` (*type:* `String.t`, *default:* `nil`) - Optional. Optional level ID of the selected level. If empty, no level was selected.
* `points` (*type:* `float()`, *default:* `nil`) - Optional. Optional points assigned for this criterion, typically based on the level. Levels might or might not have points. If unset, no points were set for this criterion.
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:criterionId => String.t() | nil,
:levelId => String.t() | nil,
:points => float() | nil
}

field(:criterionId)
field(:levelId)
field(:points)
end

defimpl Poison.Decoder, for: GoogleApi.Classroom.V1.Model.RubricGrade do
def decode(value, options) do
GoogleApi.Classroom.V1.Model.RubricGrade.decode(value, options)
end
end

defimpl Poison.Encoder, for: GoogleApi.Classroom.V1.Model.RubricGrade do
def encode(value, options) do
GoogleApi.Gax.ModelBase.encode(value, options)
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,15 @@ defmodule GoogleApi.Classroom.V1.Model.StudentSubmission do
* `alternateLink` (*type:* `String.t`, *default:* `nil`) - Absolute link to the submission in the Classroom web UI. Read-only.
* `assignedGrade` (*type:* `float()`, *default:* `nil`) - Optional grade. If unset, no grade was set. This value must be non-negative. Decimal (that is, non-integer) values are allowed, but are rounded to two decimal places. This may be modified only by course teachers.
* `assignedRubricGrades` (*type:* `%{optional(String.t) => GoogleApi.Classroom.V1.Model.RubricGrade.t}`, *default:* `nil`) - Assigned rubric grades based on the rubric's Criteria. This map is empty if there is no rubric attached to this course work or if a rubric is attached, but no grades have been set on any Criteria. Entries are only populated for grades that have been set. Key: The rubric's criterion ID. Read-only.
* `assignmentSubmission` (*type:* `GoogleApi.Classroom.V1.Model.AssignmentSubmission.t`, *default:* `nil`) - Submission content when course_work_type is ASSIGNMENT. Students can modify this content using ModifyAttachments.
* `associatedWithDeveloper` (*type:* `boolean()`, *default:* `nil`) - Whether this student submission is associated with the Developer Console project making the request. See CreateCourseWork for more details. Read-only.
* `courseId` (*type:* `String.t`, *default:* `nil`) - Identifier of the course. Read-only.
* `courseWorkId` (*type:* `String.t`, *default:* `nil`) - Identifier for the course work this corresponds to. Read-only.
* `courseWorkType` (*type:* `String.t`, *default:* `nil`) - Type of course work this submission is for. Read-only.
* `creationTime` (*type:* `DateTime.t`, *default:* `nil`) - Creation time of this submission. This may be unset if the student has not accessed this item. Read-only.
* `draftGrade` (*type:* `float()`, *default:* `nil`) - Optional pending grade. If unset, no grade was set. This value must be non-negative. Decimal (that is, non-integer) values are allowed, but are rounded to two decimal places. This is only visible to and modifiable by course teachers.
* `draftRubricGrades` (*type:* `%{optional(String.t) => GoogleApi.Classroom.V1.Model.RubricGrade.t}`, *default:* `nil`) - Pending rubric grades based on the rubric's criteria. This map is empty if there is no rubric attached to this course work or if a rubric is attached, but no grades have been set on any criteria. Entries are only populated for grades that have been set. Key: The rubric's criterion ID. Read-only.
* `id` (*type:* `String.t`, *default:* `nil`) - Classroom-assigned Identifier for the student submission. This is unique among submissions for the relevant course work. Read-only.
* `late` (*type:* `boolean()`, *default:* `nil`) - Whether this submission is late. Read-only.
* `multipleChoiceSubmission` (*type:* `GoogleApi.Classroom.V1.Model.MultipleChoiceSubmission.t`, *default:* `nil`) - Submission content when course_work_type is MULTIPLE_CHOICE_QUESTION.
Expand All @@ -45,13 +47,17 @@ defmodule GoogleApi.Classroom.V1.Model.StudentSubmission do
@type t :: %__MODULE__{
:alternateLink => String.t() | nil,
:assignedGrade => float() | nil,
:assignedRubricGrades =>
%{optional(String.t()) => GoogleApi.Classroom.V1.Model.RubricGrade.t()} | nil,
:assignmentSubmission => GoogleApi.Classroom.V1.Model.AssignmentSubmission.t() | nil,
:associatedWithDeveloper => boolean() | nil,
:courseId => String.t() | nil,
:courseWorkId => String.t() | nil,
:courseWorkType => String.t() | nil,
:creationTime => DateTime.t() | nil,
:draftGrade => float() | nil,
:draftRubricGrades =>
%{optional(String.t()) => GoogleApi.Classroom.V1.Model.RubricGrade.t()} | nil,
:id => String.t() | nil,
:late => boolean() | nil,
:multipleChoiceSubmission =>
Expand All @@ -65,13 +71,15 @@ defmodule GoogleApi.Classroom.V1.Model.StudentSubmission do

field(:alternateLink)
field(:assignedGrade)
field(:assignedRubricGrades, as: GoogleApi.Classroom.V1.Model.RubricGrade, type: :map)
field(:assignmentSubmission, as: GoogleApi.Classroom.V1.Model.AssignmentSubmission)
field(:associatedWithDeveloper)
field(:courseId)
field(:courseWorkId)
field(:courseWorkType)
field(:creationTime, as: DateTime)
field(:draftGrade)
field(:draftRubricGrades, as: GoogleApi.Classroom.V1.Model.RubricGrade, type: :map)
field(:id)
field(:late)
field(:multipleChoiceSubmission, as: GoogleApi.Classroom.V1.Model.MultipleChoiceSubmission)
Expand Down
2 changes: 1 addition & 1 deletion clients/classroom/mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
defmodule GoogleApi.Classroom.Mixfile do
use Mix.Project

@version "0.21.2"
@version "0.22.0"

def project() do
[
Expand Down

0 comments on commit e3b02fd

Please sign in to comment.