Class: Openlayer::Models::Projects::CommitListResponse::Item

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openlayer/models/projects/commit_list_response.rb,
sig/openlayer/models/projects/commit_list_response.rbs

Defined Under Namespace

Modules: Status Classes: Commit, Links

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(id:, author_id:, file_size:, message:, ml_model_id:, storage_uri:, training_dataset_id:, validation_dataset_id:, date_created: nil, git_commit_ref: nil, git_commit_sha: nil, git_commit_url: nil) ⇒ Object

The details of a commit (project version).

Parameters:

  • id (String)

    The commit id.

  • author_id (String)

    The author id of the commit.

  • file_size (Integer, nil)

    The size of the commit bundle in bytes.

  • message (String)

    The commit message.

  • ml_model_id (String, nil)

    The model id.

  • storage_uri (String)

    The storage URI where the commit bundle is stored.

  • training_dataset_id (String, nil)

    The training dataset id.

  • validation_dataset_id (String, nil)

    The validation dataset id.

  • date_created (Time) (defaults to: nil)

    The commit creation date.

  • git_commit_ref (String) (defaults to: nil)

    The ref of the corresponding git commit.

  • git_commit_sha (Integer) (defaults to: nil)

    The SHA of the corresponding git commit.

  • git_commit_url (String) (defaults to: nil)

    The URL of the corresponding git commit.



17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
# File 'lib/openlayer/models/projects/commit_list_response.rb', line 17

class Item < Openlayer::Internal::Type::BaseModel
  # @!attribute commit
  #   The details of a commit (project version).
  #
  #   @return [Openlayer::Models::Projects::CommitListResponse::Item::Commit]
  required :commit, -> { Openlayer::Models::Projects::CommitListResponse::Item::Commit }

  # @!attribute archived
  #   Whether the commit is archived.
  #
  #   @return [Boolean, nil]
  optional :archived, Openlayer::Internal::Type::Boolean, nil?: true

  # @!attribute deployment_status
  #   The deployment status associated with the commit's model.
  #
  #   @return [String, nil]
  optional :deployment_status, String, api_name: :deploymentStatus

  response_only do
    # @!attribute id
    #   The project version (commit) id.
    #
    #   @return [String]
    required :id, String

    # @!attribute date_archived
    #   The commit archive date.
    #
    #   @return [Time, nil]
    required :date_archived, Time, api_name: :dateArchived, nil?: true

    # @!attribute date_created
    #   The project version (commit) creation date.
    #
    #   @return [Time]
    required :date_created, Time, api_name: :dateCreated

    # @!attribute failing_goal_count
    #   The number of tests that are failing for the commit.
    #
    #   @return [Integer]
    required :failing_goal_count, Integer, api_name: :failingGoalCount

    # @!attribute ml_model_id
    #   The model id.
    #
    #   @return [String, nil]
    required :ml_model_id, String, api_name: :mlModelId, nil?: true

    # @!attribute passing_goal_count
    #   The number of tests that are passing for the commit.
    #
    #   @return [Integer]
    required :passing_goal_count, Integer, api_name: :passingGoalCount

    # @!attribute project_id
    #   The project id.
    #
    #   @return [String]
    required :project_id, String, api_name: :projectId

    # @!attribute status
    #   The commit status. Initially, the commit is `queued`, then, it switches to
    #   `running`. Finally, it can be `paused`, `failed`, or `completed`.
    #
    #   @return [Symbol, Openlayer::Models::Projects::CommitListResponse::Item::Status]
    required :status, enum: -> { Openlayer::Models::Projects::CommitListResponse::Item::Status }

    # @!attribute status_message
    #   The commit status message.
    #
    #   @return [String, nil]
    required :status_message, String, api_name: :statusMessage, nil?: true

    # @!attribute total_goal_count
    #   The total number of tests for the commit.
    #
    #   @return [Integer]
    required :total_goal_count, Integer, api_name: :totalGoalCount

    # @!attribute training_dataset_id
    #   The training dataset id.
    #
    #   @return [String, nil]
    required :training_dataset_id, String, api_name: :trainingDatasetId, nil?: true

    # @!attribute validation_dataset_id
    #   The validation dataset id.
    #
    #   @return [String, nil]
    required :validation_dataset_id, String, api_name: :validationDatasetId, nil?: true

    # @!attribute links
    #
    #   @return [Openlayer::Models::Projects::CommitListResponse::Item::Links, nil]
    optional :links, -> { Openlayer::Models::Projects::CommitListResponse::Item::Links }
  end

  # @!method initialize(id:, commit:, date_archived:, date_created:, failing_goal_count:, ml_model_id:, passing_goal_count:, project_id:, status:, status_message:, total_goal_count:, training_dataset_id:, validation_dataset_id:, archived: nil, deployment_status: nil, links: nil)
  #   Some parameter documentations has been truncated, see
  #   {Openlayer::Models::Projects::CommitListResponse::Item} for more details.
  #
  #   @param id [String] The project version (commit) id.
  #
  #   @param commit [Openlayer::Models::Projects::CommitListResponse::Item::Commit] The details of a commit (project version).
  #
  #   @param date_archived [Time, nil] The commit archive date.
  #
  #   @param date_created [Time] The project version (commit) creation date.
  #
  #   @param failing_goal_count [Integer] The number of tests that are failing for the commit.
  #
  #   @param ml_model_id [String, nil] The model id.
  #
  #   @param passing_goal_count [Integer] The number of tests that are passing for the commit.
  #
  #   @param project_id [String] The project id.
  #
  #   @param status [Symbol, Openlayer::Models::Projects::CommitListResponse::Item::Status] The commit status. Initially, the commit is `queued`, then, it switches to `runn
  #
  #   @param status_message [String, nil] The commit status message.
  #
  #   @param total_goal_count [Integer] The total number of tests for the commit.
  #
  #   @param training_dataset_id [String, nil] The training dataset id.
  #
  #   @param validation_dataset_id [String, nil] The validation dataset id.
  #
  #   @param archived [Boolean, nil] Whether the commit is archived.
  #
  #   @param deployment_status [String] The deployment status associated with the commit's model.
  #
  #   @param links [Openlayer::Models::Projects::CommitListResponse::Item::Links]

  # @see Openlayer::Models::Projects::CommitListResponse::Item#commit
  class Commit < Openlayer::Internal::Type::BaseModel
    # @!attribute message
    #   The commit message.
    #
    #   @return [String]
    required :message, String

    response_only do
      # @!attribute id
      #   The commit id.
      #
      #   @return [String]
      required :id, String

      # @!attribute author_id
      #   The author id of the commit.
      #
      #   @return [String]
      required :author_id, String, api_name: :authorId

      # @!attribute file_size
      #   The size of the commit bundle in bytes.
      #
      #   @return [Integer, nil]
      required :file_size, Integer, api_name: :fileSize, nil?: true

      # @!attribute ml_model_id
      #   The model id.
      #
      #   @return [String, nil]
      required :ml_model_id, String, api_name: :mlModelId, nil?: true

      # @!attribute storage_uri
      #   The storage URI where the commit bundle is stored.
      #
      #   @return [String]
      required :storage_uri, String, api_name: :storageUri

      # @!attribute training_dataset_id
      #   The training dataset id.
      #
      #   @return [String, nil]
      required :training_dataset_id, String, api_name: :trainingDatasetId, nil?: true

      # @!attribute validation_dataset_id
      #   The validation dataset id.
      #
      #   @return [String, nil]
      required :validation_dataset_id, String, api_name: :validationDatasetId, nil?: true

      # @!attribute date_created
      #   The commit creation date.
      #
      #   @return [Time, nil]
      optional :date_created, Time, api_name: :dateCreated

      # @!attribute git_commit_ref
      #   The ref of the corresponding git commit.
      #
      #   @return [String, nil]
      optional :git_commit_ref, String, api_name: :gitCommitRef

      # @!attribute git_commit_sha
      #   The SHA of the corresponding git commit.
      #
      #   @return [Integer, nil]
      optional :git_commit_sha, Integer, api_name: :gitCommitSha

      # @!attribute git_commit_url
      #   The URL of the corresponding git commit.
      #
      #   @return [String, nil]
      optional :git_commit_url, String, api_name: :gitCommitUrl
    end

    # @!method initialize(id:, author_id:, file_size:, message:, ml_model_id:, storage_uri:, training_dataset_id:, validation_dataset_id:, date_created: nil, git_commit_ref: nil, git_commit_sha: nil, git_commit_url: nil)
    #   The details of a commit (project version).
    #
    #   @param id [String] The commit id.
    #
    #   @param author_id [String] The author id of the commit.
    #
    #   @param file_size [Integer, nil] The size of the commit bundle in bytes.
    #
    #   @param message [String] The commit message.
    #
    #   @param ml_model_id [String, nil] The model id.
    #
    #   @param storage_uri [String] The storage URI where the commit bundle is stored.
    #
    #   @param training_dataset_id [String, nil] The training dataset id.
    #
    #   @param validation_dataset_id [String, nil] The validation dataset id.
    #
    #   @param date_created [Time] The commit creation date.
    #
    #   @param git_commit_ref [String] The ref of the corresponding git commit.
    #
    #   @param git_commit_sha [Integer] The SHA of the corresponding git commit.
    #
    #   @param git_commit_url [String] The URL of the corresponding git commit.
  end

  # The commit status. Initially, the commit is `queued`, then, it switches to
  # `running`. Finally, it can be `paused`, `failed`, or `completed`.
  #
  # @see Openlayer::Models::Projects::CommitListResponse::Item#status
  module Status
    extend Openlayer::Internal::Type::Enum

    QUEUED = :queued
    RUNNING = :running
    PAUSED = :paused
    FAILED = :failed
    COMPLETED = :completed
    UNKNOWN = :unknown

    # @!method self.values
    #   @return [Array<Symbol>]
  end

  # @see Openlayer::Models::Projects::CommitListResponse::Item#links
  class Links < Openlayer::Internal::Type::BaseModel
    # @!attribute app
    #
    #   @return [String]
    required :app, String

    # @!method initialize(app:)
    #   @param app [String]
  end
end

Instance Attribute Details

#archivedBoolean?

Whether the commit is archived.

Parameters:

  • value (Boolean, nil)

Returns:

  • (Boolean, nil)


28
# File 'lib/openlayer/models/projects/commit_list_response.rb', line 28

optional :archived, Openlayer::Internal::Type::Boolean, nil?: true

#commitOpenlayer::Models::Projects::CommitListResponse::Item::Commit

The details of a commit (project version).



22
# File 'lib/openlayer/models/projects/commit_list_response.rb', line 22

required :commit, -> { Openlayer::Models::Projects::CommitListResponse::Item::Commit }

#date_archivedTime?

Returns the value of attribute date_archived.

Returns:

  • (Time, nil)


52
53
54
# File 'sig/openlayer/models/projects/commit_list_response.rbs', line 52

def date_archived
  @date_archived
end

#date_createdTime

Returns the value of attribute date_created.

Returns:

  • (Time)


54
55
56
# File 'sig/openlayer/models/projects/commit_list_response.rbs', line 54

def date_created
  @date_created
end

#deployment_statusString?

The deployment status associated with the commit's model.

Parameters:

  • (String)

Returns:

  • (String, nil)


34
# File 'lib/openlayer/models/projects/commit_list_response.rb', line 34

optional :deployment_status, String, api_name: :deploymentStatus

#failing_goal_countInteger

Returns the value of attribute failing_goal_count.

Returns:

  • (Integer)


56
57
58
# File 'sig/openlayer/models/projects/commit_list_response.rbs', line 56

def failing_goal_count
  @failing_goal_count
end

#idString

Returns the value of attribute id.

Returns:

  • (String)


50
51
52
# File 'sig/openlayer/models/projects/commit_list_response.rbs', line 50

def id
  @id
end

Returns the value of attribute links.



74
75
76
# File 'sig/openlayer/models/projects/commit_list_response.rbs', line 74

def links
  @links
end

#ml_model_idString?

Returns the value of attribute ml_model_id.

Returns:

  • (String, nil)


58
59
60
# File 'sig/openlayer/models/projects/commit_list_response.rbs', line 58

def ml_model_id
  @ml_model_id
end

#passing_goal_countInteger

Returns the value of attribute passing_goal_count.

Returns:

  • (Integer)


60
61
62
# File 'sig/openlayer/models/projects/commit_list_response.rbs', line 60

def passing_goal_count
  @passing_goal_count
end

#project_idString

Returns the value of attribute project_id.

Returns:

  • (String)


62
63
64
# File 'sig/openlayer/models/projects/commit_list_response.rbs', line 62

def project_id
  @project_id
end

#statusOpenlayer::Models::Projects::CommitListResponse::Item::status

Returns the value of attribute status.

Returns:

  • (Openlayer::Models::Projects::CommitListResponse::Item::status)


64
65
66
# File 'sig/openlayer/models/projects/commit_list_response.rbs', line 64

def status
  @status
end

#status_messageString?

Returns the value of attribute status_message.

Returns:

  • (String, nil)


66
67
68
# File 'sig/openlayer/models/projects/commit_list_response.rbs', line 66

def status_message
  @status_message
end

#total_goal_countInteger

Returns the value of attribute total_goal_count.

Returns:

  • (Integer)


68
69
70
# File 'sig/openlayer/models/projects/commit_list_response.rbs', line 68

def total_goal_count
  @total_goal_count
end

#training_dataset_idString?

Returns the value of attribute training_dataset_id.

Returns:

  • (String, nil)


70
71
72
# File 'sig/openlayer/models/projects/commit_list_response.rbs', line 70

def training_dataset_id
  @training_dataset_id
end

#validation_dataset_idString?

Returns the value of attribute validation_dataset_id.

Returns:

  • (String, nil)


72
73
74
# File 'sig/openlayer/models/projects/commit_list_response.rbs', line 72

def validation_dataset_id
  @validation_dataset_id
end

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/openlayer/models/projects/commit_list_response.rb', line 270

Instance Method Details

#links=Object (readonly)



76
# File 'sig/openlayer/models/projects/commit_list_response.rbs', line 76

def links=: (

#to_hash{

Returns:

  • ({)


99
# File 'sig/openlayer/models/projects/commit_list_response.rbs', line 99

def to_hash: -> {