Class: Google::Apis::MigrationcenterV1alpha1::HostsEntry

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/migrationcenter_v1alpha1/classes.rb,
lib/google/apis/migrationcenter_v1alpha1/representations.rb,
lib/google/apis/migrationcenter_v1alpha1/representations.rb

Overview

Single /etc/hosts entry.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ HostsEntry

Returns a new instance of HostsEntry.



2045
2046
2047
# File 'lib/google/apis/migrationcenter_v1alpha1/classes.rb', line 2045

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#host_namesArray<String>

List of host names / aliases. Corresponds to the JSON property hostNames

Returns:

  • (Array<String>)


2038
2039
2040
# File 'lib/google/apis/migrationcenter_v1alpha1/classes.rb', line 2038

def host_names
  @host_names
end

#ipString

IP (raw, IPv4/6 agnostic). Corresponds to the JSON property ip

Returns:

  • (String)


2043
2044
2045
# File 'lib/google/apis/migrationcenter_v1alpha1/classes.rb', line 2043

def ip
  @ip
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2050
2051
2052
2053
# File 'lib/google/apis/migrationcenter_v1alpha1/classes.rb', line 2050

def update!(**args)
  @host_names = args[:host_names] if args.key?(:host_names)
  @ip = args[:ip] if args.key?(:ip)
end