Skip to content

Commit 5efef59

Browse files
algolia-botmillotp
andcommitted
feat(specs): only use shortname in the source input [skip-bc] (generated)
algolia/api-clients-automation#4287 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Pierre Millot <[email protected]>
1 parent 928cf59 commit 5efef59

File tree

4 files changed

+3
-130
lines changed

4 files changed

+3
-130
lines changed

lib/algolia/models/ingestion/docker_image_type.rb

Lines changed: 0 additions & 32 deletions
This file was deleted.

lib/algolia/models/ingestion/docker_registry.rb

Lines changed: 0 additions & 32 deletions
This file was deleted.

lib/algolia/models/ingestion/source_docker.rb

Lines changed: 2 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -6,47 +6,32 @@
66
module Algolia
77
module Ingestion
88
class SourceDocker
9-
attr_accessor :image_type
10-
11-
attr_accessor :registry
12-
13-
# Docker image name.
9+
# Shortname of the image, as returned by the referential.
1410
attr_accessor :image
1511

16-
# Docker image version.
17-
attr_accessor :version
18-
1912
# Configuration of the spec.
2013
attr_accessor :configuration
2114

2215
# Attribute mapping from ruby-style variable name to JSON key.
2316
def self.attribute_map
2417
{
25-
:image_type => :imageType,
26-
:registry => :registry,
2718
:image => :image,
28-
:version => :version,
2919
:configuration => :configuration
3020
}
3121
end
3222

3323
# Returns the keys that uniquely identify this oneOf variant when present
3424
def self.discriminator_attributes
3525
[
36-
:registry,
3726
:image,
38-
:imageType,
3927
:configuration
4028
]
4129
end
4230

4331
# Attribute type mapping.
4432
def self.types_mapping
4533
{
46-
:image_type => :"DockerImageType",
47-
:registry => :"DockerRegistry",
4834
:image => :"String",
49-
:version => :"String",
5035
:configuration => :"Object"
5136
}
5237
end
@@ -81,28 +66,12 @@ def initialize(attributes = {})
8166
h[k.to_sym] = v
8267
}
8368

84-
if attributes.key?(:image_type)
85-
self.image_type = attributes[:image_type]
86-
else
87-
self.image_type = nil
88-
end
89-
90-
if attributes.key?(:registry)
91-
self.registry = attributes[:registry]
92-
else
93-
self.registry = nil
94-
end
95-
9669
if attributes.key?(:image)
9770
self.image = attributes[:image]
9871
else
9972
self.image = nil
10073
end
10174

102-
if attributes.key?(:version)
103-
self.version = attributes[:version]
104-
end
105-
10675
if attributes.key?(:configuration)
10776
self.configuration = attributes[:configuration]
10877
else
@@ -115,10 +84,7 @@ def initialize(attributes = {})
11584
def ==(other)
11685
return true if self.equal?(other)
11786
self.class == other.class &&
118-
image_type == other.image_type &&
119-
registry == other.registry &&
12087
image == other.image &&
121-
version == other.version &&
12288
configuration == other.configuration
12389
end
12490

@@ -131,7 +97,7 @@ def eql?(other)
13197
# Calculates hash code according to all attributes.
13298
# @return [Integer] Hash code
13399
def hash
134-
[image_type, registry, image, version, configuration].hash
100+
[image, configuration].hash
135101
end
136102

137103
# Builds the object from hash

lib/algolia/models/ingestion/source_update_docker.rb

Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,12 @@
66
module Algolia
77
module Ingestion
88
class SourceUpdateDocker
9-
attr_accessor :registry
10-
11-
# Docker image name.
12-
attr_accessor :image
13-
14-
# Docker image version.
15-
attr_accessor :version
16-
179
# Configuration of the spec.
1810
attr_accessor :configuration
1911

2012
# Attribute mapping from ruby-style variable name to JSON key.
2113
def self.attribute_map
2214
{
23-
:registry => :registry,
24-
:image => :image,
25-
:version => :version,
2615
:configuration => :configuration
2716
}
2817
end
@@ -37,9 +26,6 @@ def self.discriminator_attributes
3726
# Attribute type mapping.
3827
def self.types_mapping
3928
{
40-
:registry => :"DockerRegistry",
41-
:image => :"String",
42-
:version => :"String",
4329
:configuration => :"Object"
4430
}
4531
end
@@ -74,18 +60,6 @@ def initialize(attributes = {})
7460
h[k.to_sym] = v
7561
}
7662

77-
if attributes.key?(:registry)
78-
self.registry = attributes[:registry]
79-
end
80-
81-
if attributes.key?(:image)
82-
self.image = attributes[:image]
83-
end
84-
85-
if attributes.key?(:version)
86-
self.version = attributes[:version]
87-
end
88-
8963
if attributes.key?(:configuration)
9064
self.configuration = attributes[:configuration]
9165
else
@@ -98,9 +72,6 @@ def initialize(attributes = {})
9872
def ==(other)
9973
return true if self.equal?(other)
10074
self.class == other.class &&
101-
registry == other.registry &&
102-
image == other.image &&
103-
version == other.version &&
10475
configuration == other.configuration
10576
end
10677

@@ -113,7 +84,7 @@ def eql?(other)
11384
# Calculates hash code according to all attributes.
11485
# @return [Integer] Hash code
11586
def hash
116-
[registry, image, version, configuration].hash
87+
[configuration].hash
11788
end
11889

11990
# Builds the object from hash

0 commit comments

Comments
 (0)