Class: Gapic::Model::Mixins::Mixin

Inherits:
Object
  • Object
show all
Defined in:
lib/gapic/model/mixins.rb

Overview

Model of a single mixin service

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(service, dependency, require_str, require_str_rest, client_class_name, client_class_name_rest, client_var_name) ⇒ Mixin

Returns a new instance of Mixin.

Parameters:

  • service (String)

    Full name of the service

  • dependency (Hash<String, String>)

    Service dependencies, in the { gem_name => version pattern } format

  • require_str (String)

    Path to require the client of the service

  • require_str_rest (String)

    Path to require the REST client of the service

  • client_class_name (String)

    Full name of the class of the client of the service

  • client_class_name_rest (String)

    Full name of the class of the REST client of the service

  • client_var_name (String)

    Name for the variable for the client of the mixin service to use when generating library's service



130
131
132
133
134
135
136
137
138
139
140
141
# File 'lib/gapic/model/mixins.rb', line 130

def initialize service, dependency, require_str, require_str_rest, client_class_name, client_class_name_rest,
               client_var_name
  @service = service
  @dependency = dependency
  @require_str = require_str
  @require_str_rest = require_str_rest
  @client_class_name = client_class_name
  @client_class_name_rest = client_class_name_rest
  @client_class_docname = client_class_name # For mixins, the doc name should be the full class name
  @client_class_docname_rest = client_class_name_rest # For mixins, the doc name should be the full class name
  @client_var_name = client_var_name
end

Instance Attribute Details

#client_class_docnameString (readonly)

Name of the class as it should appear in the documentation

Returns:

  • (String)


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
148
# File 'lib/gapic/model/mixins.rb', line 103

class Mixin
  attr_reader :service
  attr_reader :dependency
  attr_reader :require_str
  attr_reader :require_str_rest
  attr_reader :client_class_name
  attr_reader :client_class_name_rest
  attr_reader :client_class_docname
  attr_reader :client_class_docname_rest
  attr_reader :client_var_name

  # @param service [String]
  #   Full name of the service
  # @param dependency [Hash<String, String>]
  #   Service dependencies, in the
  #   `{ gem_name => version pattern }` format
  # @param require_str [String]
  #   Path to require the client of the service
  # @param require_str_rest [String]
  #   Path to require the REST client of the service
  # @param client_class_name [String]
  #   Full name of the class of the client of the service
  # @param client_class_name_rest [String]
  #   Full name of the class of the REST client of the service
  # @param client_var_name [String]
  #   Name for the variable for the client of the mixin service
  #   to use when generating library's service
  def initialize service, dependency, require_str, require_str_rest, client_class_name, client_class_name_rest,
                 client_var_name
    @service = service
    @dependency = dependency
    @require_str = require_str
    @require_str_rest = require_str_rest
    @client_class_name = client_class_name
    @client_class_name_rest = client_class_name_rest
    @client_class_docname = client_class_name # For mixins, the doc name should be the full class name
    @client_class_docname_rest = client_class_name_rest # For mixins, the doc name should be the full class name
    @client_var_name = client_var_name
  end

  # @return [String] The description to place in the comments to the
  #   mixin's attribute in the library services's client class
  def service_description
    "mix-in of the #{client_class_name.split('::')[-2]}"
  end
end

#client_class_docname_restString (readonly)

Name of the REST class as it should appear in the documentation

Returns:

  • (String)


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
148
# File 'lib/gapic/model/mixins.rb', line 103

class Mixin
  attr_reader :service
  attr_reader :dependency
  attr_reader :require_str
  attr_reader :require_str_rest
  attr_reader :client_class_name
  attr_reader :client_class_name_rest
  attr_reader :client_class_docname
  attr_reader :client_class_docname_rest
  attr_reader :client_var_name

  # @param service [String]
  #   Full name of the service
  # @param dependency [Hash<String, String>]
  #   Service dependencies, in the
  #   `{ gem_name => version pattern }` format
  # @param require_str [String]
  #   Path to require the client of the service
  # @param require_str_rest [String]
  #   Path to require the REST client of the service
  # @param client_class_name [String]
  #   Full name of the class of the client of the service
  # @param client_class_name_rest [String]
  #   Full name of the class of the REST client of the service
  # @param client_var_name [String]
  #   Name for the variable for the client of the mixin service
  #   to use when generating library's service
  def initialize service, dependency, require_str, require_str_rest, client_class_name, client_class_name_rest,
                 client_var_name
    @service = service
    @dependency = dependency
    @require_str = require_str
    @require_str_rest = require_str_rest
    @client_class_name = client_class_name
    @client_class_name_rest = client_class_name_rest
    @client_class_docname = client_class_name # For mixins, the doc name should be the full class name
    @client_class_docname_rest = client_class_name_rest # For mixins, the doc name should be the full class name
    @client_var_name = client_var_name
  end

  # @return [String] The description to place in the comments to the
  #   mixin's attribute in the library services's client class
  def service_description
    "mix-in of the #{client_class_name.split('::')[-2]}"
  end
end

#client_class_nameString (readonly)

Full name of the class of the client of the service

Returns:

  • (String)


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
148
# File 'lib/gapic/model/mixins.rb', line 103

class Mixin
  attr_reader :service
  attr_reader :dependency
  attr_reader :require_str
  attr_reader :require_str_rest
  attr_reader :client_class_name
  attr_reader :client_class_name_rest
  attr_reader :client_class_docname
  attr_reader :client_class_docname_rest
  attr_reader :client_var_name

  # @param service [String]
  #   Full name of the service
  # @param dependency [Hash<String, String>]
  #   Service dependencies, in the
  #   `{ gem_name => version pattern }` format
  # @param require_str [String]
  #   Path to require the client of the service
  # @param require_str_rest [String]
  #   Path to require the REST client of the service
  # @param client_class_name [String]
  #   Full name of the class of the client of the service
  # @param client_class_name_rest [String]
  #   Full name of the class of the REST client of the service
  # @param client_var_name [String]
  #   Name for the variable for the client of the mixin service
  #   to use when generating library's service
  def initialize service, dependency, require_str, require_str_rest, client_class_name, client_class_name_rest,
                 client_var_name
    @service = service
    @dependency = dependency
    @require_str = require_str
    @require_str_rest = require_str_rest
    @client_class_name = client_class_name
    @client_class_name_rest = client_class_name_rest
    @client_class_docname = client_class_name # For mixins, the doc name should be the full class name
    @client_class_docname_rest = client_class_name_rest # For mixins, the doc name should be the full class name
    @client_var_name = client_var_name
  end

  # @return [String] The description to place in the comments to the
  #   mixin's attribute in the library services's client class
  def service_description
    "mix-in of the #{client_class_name.split('::')[-2]}"
  end
end

#client_class_name_restString (readonly)

Full name of the class of the REST client of the service

Returns:

  • (String)


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
148
# File 'lib/gapic/model/mixins.rb', line 103

class Mixin
  attr_reader :service
  attr_reader :dependency
  attr_reader :require_str
  attr_reader :require_str_rest
  attr_reader :client_class_name
  attr_reader :client_class_name_rest
  attr_reader :client_class_docname
  attr_reader :client_class_docname_rest
  attr_reader :client_var_name

  # @param service [String]
  #   Full name of the service
  # @param dependency [Hash<String, String>]
  #   Service dependencies, in the
  #   `{ gem_name => version pattern }` format
  # @param require_str [String]
  #   Path to require the client of the service
  # @param require_str_rest [String]
  #   Path to require the REST client of the service
  # @param client_class_name [String]
  #   Full name of the class of the client of the service
  # @param client_class_name_rest [String]
  #   Full name of the class of the REST client of the service
  # @param client_var_name [String]
  #   Name for the variable for the client of the mixin service
  #   to use when generating library's service
  def initialize service, dependency, require_str, require_str_rest, client_class_name, client_class_name_rest,
                 client_var_name
    @service = service
    @dependency = dependency
    @require_str = require_str
    @require_str_rest = require_str_rest
    @client_class_name = client_class_name
    @client_class_name_rest = client_class_name_rest
    @client_class_docname = client_class_name # For mixins, the doc name should be the full class name
    @client_class_docname_rest = client_class_name_rest # For mixins, the doc name should be the full class name
    @client_var_name = client_var_name
  end

  # @return [String] The description to place in the comments to the
  #   mixin's attribute in the library services's client class
  def service_description
    "mix-in of the #{client_class_name.split('::')[-2]}"
  end
end

#client_var_nameString (readonly)

Name for the variable for the client of the mixin service to use when generating library's service

Returns:

  • (String)


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
148
# File 'lib/gapic/model/mixins.rb', line 103

class Mixin
  attr_reader :service
  attr_reader :dependency
  attr_reader :require_str
  attr_reader :require_str_rest
  attr_reader :client_class_name
  attr_reader :client_class_name_rest
  attr_reader :client_class_docname
  attr_reader :client_class_docname_rest
  attr_reader :client_var_name

  # @param service [String]
  #   Full name of the service
  # @param dependency [Hash<String, String>]
  #   Service dependencies, in the
  #   `{ gem_name => version pattern }` format
  # @param require_str [String]
  #   Path to require the client of the service
  # @param require_str_rest [String]
  #   Path to require the REST client of the service
  # @param client_class_name [String]
  #   Full name of the class of the client of the service
  # @param client_class_name_rest [String]
  #   Full name of the class of the REST client of the service
  # @param client_var_name [String]
  #   Name for the variable for the client of the mixin service
  #   to use when generating library's service
  def initialize service, dependency, require_str, require_str_rest, client_class_name, client_class_name_rest,
                 client_var_name
    @service = service
    @dependency = dependency
    @require_str = require_str
    @require_str_rest = require_str_rest
    @client_class_name = client_class_name
    @client_class_name_rest = client_class_name_rest
    @client_class_docname = client_class_name # For mixins, the doc name should be the full class name
    @client_class_docname_rest = client_class_name_rest # For mixins, the doc name should be the full class name
    @client_var_name = client_var_name
  end

  # @return [String] The description to place in the comments to the
  #   mixin's attribute in the library services's client class
  def service_description
    "mix-in of the #{client_class_name.split('::')[-2]}"
  end
end

#dependencyHash<String, String> (readonly)

Service dependencies, in the { gem_name => version pattern } format

Returns:

  • (Hash<String, String>)


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
148
# File 'lib/gapic/model/mixins.rb', line 103

class Mixin
  attr_reader :service
  attr_reader :dependency
  attr_reader :require_str
  attr_reader :require_str_rest
  attr_reader :client_class_name
  attr_reader :client_class_name_rest
  attr_reader :client_class_docname
  attr_reader :client_class_docname_rest
  attr_reader :client_var_name

  # @param service [String]
  #   Full name of the service
  # @param dependency [Hash<String, String>]
  #   Service dependencies, in the
  #   `{ gem_name => version pattern }` format
  # @param require_str [String]
  #   Path to require the client of the service
  # @param require_str_rest [String]
  #   Path to require the REST client of the service
  # @param client_class_name [String]
  #   Full name of the class of the client of the service
  # @param client_class_name_rest [String]
  #   Full name of the class of the REST client of the service
  # @param client_var_name [String]
  #   Name for the variable for the client of the mixin service
  #   to use when generating library's service
  def initialize service, dependency, require_str, require_str_rest, client_class_name, client_class_name_rest,
                 client_var_name
    @service = service
    @dependency = dependency
    @require_str = require_str
    @require_str_rest = require_str_rest
    @client_class_name = client_class_name
    @client_class_name_rest = client_class_name_rest
    @client_class_docname = client_class_name # For mixins, the doc name should be the full class name
    @client_class_docname_rest = client_class_name_rest # For mixins, the doc name should be the full class name
    @client_var_name = client_var_name
  end

  # @return [String] The description to place in the comments to the
  #   mixin's attribute in the library services's client class
  def service_description
    "mix-in of the #{client_class_name.split('::')[-2]}"
  end
end

#require_strString (readonly)

Path to require the client of the service

Returns:

  • (String)


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
148
# File 'lib/gapic/model/mixins.rb', line 103

class Mixin
  attr_reader :service
  attr_reader :dependency
  attr_reader :require_str
  attr_reader :require_str_rest
  attr_reader :client_class_name
  attr_reader :client_class_name_rest
  attr_reader :client_class_docname
  attr_reader :client_class_docname_rest
  attr_reader :client_var_name

  # @param service [String]
  #   Full name of the service
  # @param dependency [Hash<String, String>]
  #   Service dependencies, in the
  #   `{ gem_name => version pattern }` format
  # @param require_str [String]
  #   Path to require the client of the service
  # @param require_str_rest [String]
  #   Path to require the REST client of the service
  # @param client_class_name [String]
  #   Full name of the class of the client of the service
  # @param client_class_name_rest [String]
  #   Full name of the class of the REST client of the service
  # @param client_var_name [String]
  #   Name for the variable for the client of the mixin service
  #   to use when generating library's service
  def initialize service, dependency, require_str, require_str_rest, client_class_name, client_class_name_rest,
                 client_var_name
    @service = service
    @dependency = dependency
    @require_str = require_str
    @require_str_rest = require_str_rest
    @client_class_name = client_class_name
    @client_class_name_rest = client_class_name_rest
    @client_class_docname = client_class_name # For mixins, the doc name should be the full class name
    @client_class_docname_rest = client_class_name_rest # For mixins, the doc name should be the full class name
    @client_var_name = client_var_name
  end

  # @return [String] The description to place in the comments to the
  #   mixin's attribute in the library services's client class
  def service_description
    "mix-in of the #{client_class_name.split('::')[-2]}"
  end
end

#require_str_restString (readonly)

Path to require the REST client of the service

Returns:

  • (String)


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
148
# File 'lib/gapic/model/mixins.rb', line 103

class Mixin
  attr_reader :service
  attr_reader :dependency
  attr_reader :require_str
  attr_reader :require_str_rest
  attr_reader :client_class_name
  attr_reader :client_class_name_rest
  attr_reader :client_class_docname
  attr_reader :client_class_docname_rest
  attr_reader :client_var_name

  # @param service [String]
  #   Full name of the service
  # @param dependency [Hash<String, String>]
  #   Service dependencies, in the
  #   `{ gem_name => version pattern }` format
  # @param require_str [String]
  #   Path to require the client of the service
  # @param require_str_rest [String]
  #   Path to require the REST client of the service
  # @param client_class_name [String]
  #   Full name of the class of the client of the service
  # @param client_class_name_rest [String]
  #   Full name of the class of the REST client of the service
  # @param client_var_name [String]
  #   Name for the variable for the client of the mixin service
  #   to use when generating library's service
  def initialize service, dependency, require_str, require_str_rest, client_class_name, client_class_name_rest,
                 client_var_name
    @service = service
    @dependency = dependency
    @require_str = require_str
    @require_str_rest = require_str_rest
    @client_class_name = client_class_name
    @client_class_name_rest = client_class_name_rest
    @client_class_docname = client_class_name # For mixins, the doc name should be the full class name
    @client_class_docname_rest = client_class_name_rest # For mixins, the doc name should be the full class name
    @client_var_name = client_var_name
  end

  # @return [String] The description to place in the comments to the
  #   mixin's attribute in the library services's client class
  def service_description
    "mix-in of the #{client_class_name.split('::')[-2]}"
  end
end

#serviceString (readonly)

Full name of the service

Returns:

  • (String)


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
148
# File 'lib/gapic/model/mixins.rb', line 103

class Mixin
  attr_reader :service
  attr_reader :dependency
  attr_reader :require_str
  attr_reader :require_str_rest
  attr_reader :client_class_name
  attr_reader :client_class_name_rest
  attr_reader :client_class_docname
  attr_reader :client_class_docname_rest
  attr_reader :client_var_name

  # @param service [String]
  #   Full name of the service
  # @param dependency [Hash<String, String>]
  #   Service dependencies, in the
  #   `{ gem_name => version pattern }` format
  # @param require_str [String]
  #   Path to require the client of the service
  # @param require_str_rest [String]
  #   Path to require the REST client of the service
  # @param client_class_name [String]
  #   Full name of the class of the client of the service
  # @param client_class_name_rest [String]
  #   Full name of the class of the REST client of the service
  # @param client_var_name [String]
  #   Name for the variable for the client of the mixin service
  #   to use when generating library's service
  def initialize service, dependency, require_str, require_str_rest, client_class_name, client_class_name_rest,
                 client_var_name
    @service = service
    @dependency = dependency
    @require_str = require_str
    @require_str_rest = require_str_rest
    @client_class_name = client_class_name
    @client_class_name_rest = client_class_name_rest
    @client_class_docname = client_class_name # For mixins, the doc name should be the full class name
    @client_class_docname_rest = client_class_name_rest # For mixins, the doc name should be the full class name
    @client_var_name = client_var_name
  end

  # @return [String] The description to place in the comments to the
  #   mixin's attribute in the library services's client class
  def service_description
    "mix-in of the #{client_class_name.split('::')[-2]}"
  end
end

Instance Method Details

#service_descriptionString

Returns The description to place in the comments to the mixin's attribute in the library services's client class.

Returns:

  • (String)

    The description to place in the comments to the mixin's attribute in the library services's client class



145
146
147
# File 'lib/gapic/model/mixins.rb', line 145

def service_description
  "mix-in of the #{client_class_name.split('::')[-2]}"
end