Skip to content

Commit

Permalink
feat(specs): only use shortname in the source input [skip-bc] (genera…
Browse files Browse the repository at this point in the history
…ted)

algolia/api-clients-automation#4287

Co-authored-by: algolia-bot <[email protected]>
Co-authored-by: Pierre Millot <[email protected]>
  • Loading branch information
algolia-bot and millotp committed Jan 8, 2025
1 parent 928cf59 commit 5efef59
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 130 deletions.
32 changes: 0 additions & 32 deletions lib/algolia/models/ingestion/docker_image_type.rb

This file was deleted.

32 changes: 0 additions & 32 deletions lib/algolia/models/ingestion/docker_registry.rb

This file was deleted.

38 changes: 2 additions & 36 deletions lib/algolia/models/ingestion/source_docker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,47 +6,32 @@
module Algolia
module Ingestion
class SourceDocker
attr_accessor :image_type

attr_accessor :registry

# Docker image name.
# Shortname of the image, as returned by the referential.
attr_accessor :image

# Docker image version.
attr_accessor :version

# Configuration of the spec.
attr_accessor :configuration

# Attribute mapping from ruby-style variable name to JSON key.
def self.attribute_map
{
:image_type => :imageType,
:registry => :registry,
:image => :image,
:version => :version,
:configuration => :configuration
}
end

# Returns the keys that uniquely identify this oneOf variant when present
def self.discriminator_attributes
[
:registry,
:image,
:imageType,
:configuration
]
end

# Attribute type mapping.
def self.types_mapping
{
:image_type => :"DockerImageType",
:registry => :"DockerRegistry",
:image => :"String",
:version => :"String",
:configuration => :"Object"
}
end
Expand Down Expand Up @@ -81,28 +66,12 @@ def initialize(attributes = {})
h[k.to_sym] = v
}

if attributes.key?(:image_type)
self.image_type = attributes[:image_type]
else
self.image_type = nil
end

if attributes.key?(:registry)
self.registry = attributes[:registry]
else
self.registry = nil
end

if attributes.key?(:image)
self.image = attributes[:image]
else
self.image = nil
end

if attributes.key?(:version)
self.version = attributes[:version]
end

if attributes.key?(:configuration)
self.configuration = attributes[:configuration]
else
Expand All @@ -115,10 +84,7 @@ def initialize(attributes = {})
def ==(other)
return true if self.equal?(other)
self.class == other.class &&
image_type == other.image_type &&
registry == other.registry &&
image == other.image &&
version == other.version &&
configuration == other.configuration
end

Expand All @@ -131,7 +97,7 @@ def eql?(other)
# Calculates hash code according to all attributes.
# @return [Integer] Hash code
def hash
[image_type, registry, image, version, configuration].hash
[image, configuration].hash
end

# Builds the object from hash
Expand Down
31 changes: 1 addition & 30 deletions lib/algolia/models/ingestion/source_update_docker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,12 @@
module Algolia
module Ingestion
class SourceUpdateDocker
attr_accessor :registry

# Docker image name.
attr_accessor :image

# Docker image version.
attr_accessor :version

# Configuration of the spec.
attr_accessor :configuration

# Attribute mapping from ruby-style variable name to JSON key.
def self.attribute_map
{
:registry => :registry,
:image => :image,
:version => :version,
:configuration => :configuration
}
end
Expand All @@ -37,9 +26,6 @@ def self.discriminator_attributes
# Attribute type mapping.
def self.types_mapping
{
:registry => :"DockerRegistry",
:image => :"String",
:version => :"String",
:configuration => :"Object"
}
end
Expand Down Expand Up @@ -74,18 +60,6 @@ def initialize(attributes = {})
h[k.to_sym] = v
}

if attributes.key?(:registry)
self.registry = attributes[:registry]
end

if attributes.key?(:image)
self.image = attributes[:image]
end

if attributes.key?(:version)
self.version = attributes[:version]
end

if attributes.key?(:configuration)
self.configuration = attributes[:configuration]
else
Expand All @@ -98,9 +72,6 @@ def initialize(attributes = {})
def ==(other)
return true if self.equal?(other)
self.class == other.class &&
registry == other.registry &&
image == other.image &&
version == other.version &&
configuration == other.configuration
end

Expand All @@ -113,7 +84,7 @@ def eql?(other)
# Calculates hash code according to all attributes.
# @return [Integer] Hash code
def hash
[registry, image, version, configuration].hash
[configuration].hash
end

# Builds the object from hash
Expand Down

0 comments on commit 5efef59

Please sign in to comment.