Sha256: 1b984a05be00c42b37445e6679b9159d0e4f7b16b27698812a39a2e5cc8b7849

Contents?: true

Size: 1.68 KB

Versions: 2

Compression:

Stored size: 1.68 KB

Contents

# encoding: utf-8
# Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.

module Azure::ARM::CDN
  module Models
    #
    # Parameters required for endpoint purge.
    #
    class PurgeParameters

      include MsRestAzure

      # @return [Array<String>] The path to the content to be purged. Can
      # describe a file path or a wild card directory.
      attr_accessor :content_paths

      #
      # Validate the object. Throws ValidationError if validation fails.
      #
      def validate
        fail MsRest::ValidationError, 'property content_paths is nil' if @content_paths.nil?
        @content_paths.each{ |e| e.validate if e.respond_to?(:validate) } unless @content_paths.nil?
      end

      #
      # Serializes given Model object into Ruby Hash.
      # @param object Model object to serialize.
      # @return [Hash] Serialized object in form of Ruby Hash.
      #
      def self.serialize_object(object)
        object.validate
        output_object = {}

        serialized_property = object.content_paths
        output_object['contentPaths'] = serialized_property unless serialized_property.nil?

        output_object
      end

      #
      # Deserializes given Ruby Hash into Model object.
      # @param object [Hash] Ruby Hash object to deserialize.
      # @return [PurgeParameters] Deserialized object.
      #
      def self.deserialize_object(object)
        return if object.nil?
        output_object = PurgeParameters.new

        deserialized_property = object['contentPaths']
        output_object.content_paths = deserialized_property

        output_object
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
azure_mgmt_cdn-0.3.1 lib/azure_mgmt_cdn/models/purge_parameters.rb
azure_mgmt_cdn-0.3.0 lib/azure_mgmt_cdn/models/purge_parameters.rb