Method: PulpContainerClient::ContainerContainerDistribution#initialize

Defined in:
lib/pulp_container_client/models/container_container_distribution.rb

#initialize(attributes = {}) ⇒ ContainerContainerDistribution

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash


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
# File 'lib/pulp_container_client/models/container_container_distribution.rb', line 91

def initialize(attributes = {})
  if (!attributes.is_a?(Hash))
    fail ArgumentError, "The input argument (attributes) must be a hash in `PulpContainerClient::ContainerContainerDistribution` initialize method"
  end

  # check to see if the attribute exists and convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h|
    if (!self.class.attribute_map.key?(k.to_sym))
      fail ArgumentError, "`#{k}` is not a valid attribute in `PulpContainerClient::ContainerContainerDistribution`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
    end
    h[k.to_sym] = v
  }

  if attributes.key?(:'hidden')
    self.hidden = attributes[:'hidden']
  else
    self.hidden = false
  end

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

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

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

  if attributes.key?(:'pulp_labels')
    if (value = attributes[:'pulp_labels']).is_a?(Hash)
      self.pulp_labels = value
    end
  end

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

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

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

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