Class: Google::Apis::MonitoringV3::BasicAuthentication

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

Overview

A type of authentication to perform against the specified resource or URL that uses username and password. Currently, only Basic authentication is supported in Uptime Monitoring.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ BasicAuthentication

Returns a new instance of BasicAuthentication



220
221
222
# File 'generated/google/apis/monitoring_v3/classes.rb', line 220

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

Instance Attribute Details

#passwordString

The password to authenticate. Corresponds to the JSON property password

Returns:

  • (String)


213
214
215
# File 'generated/google/apis/monitoring_v3/classes.rb', line 213

def password
  @password
end

#usernameString

The username to authenticate. Corresponds to the JSON property username

Returns:

  • (String)


218
219
220
# File 'generated/google/apis/monitoring_v3/classes.rb', line 218

def username
  @username
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



225
226
227
228
# File 'generated/google/apis/monitoring_v3/classes.rb', line 225

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