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

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

Overview

The authentication parameters to provide to the specified resource or URL that requires a username and password. Currently, only Basic HTTP authentication ( https://tools.ietf.org/html/rfc7617) is supported in Uptime checks.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ BasicAuthentication

Returns a new instance of BasicAuthentication.



342
343
344
# File 'lib/google/apis/monitoring_v3/classes.rb', line 342

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

Instance Attribute Details

#passwordString

The password to use when authenticating with the HTTP server. Corresponds to the JSON property password

Returns:

  • (String)


335
336
337
# File 'lib/google/apis/monitoring_v3/classes.rb', line 335

def password
  @password
end

#usernameString

The username to use when authenticating with the HTTP server. Corresponds to the JSON property username

Returns:

  • (String)


340
341
342
# File 'lib/google/apis/monitoring_v3/classes.rb', line 340

def username
  @username
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



347
348
349
350
# File 'lib/google/apis/monitoring_v3/classes.rb', line 347

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