

// Code generated by ""fitask" -type=InstanceGroupManager"; DO NOT EDIT

package gcetasks

import (
	"encoding/json"

	"k8s.io/kops/upup/pkg/fi"
)

// InstanceGroupManager

// JSON marshalling boilerplate
type realInstanceGroupManager InstanceGroupManager

// UnmarshalJSON implements conversion to JSON, supporting an alternate specification of the object as a string
func (o *InstanceGroupManager) UnmarshalJSON(data []byte) error {
	var jsonName string
	if err := json.Unmarshal(data, &jsonName); err == nil {
		o.Name = &jsonName
		return nil
	}

	var r realInstanceGroupManager
	if err := json.Unmarshal(data, &r); err != nil {
		return err
	}
	*o = InstanceGroupManager(r)
	return nil
}

var _ fi.HasLifecycle = &InstanceGroupManager{}

// GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle
func (o *InstanceGroupManager) GetLifecycle() *fi.Lifecycle {
	return o.Lifecycle
}

// SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle
func (o *InstanceGroupManager) SetLifecycle(lifecycle fi.Lifecycle) {
	o.Lifecycle = &lifecycle
}

var _ fi.HasName = &InstanceGroupManager{}

// GetName returns the Name of the object, implementing fi.HasName
func (o *InstanceGroupManager) GetName() *string {
	return o.Name
}

// SetName sets the Name of the object, implementing fi.SetName
func (o *InstanceGroupManager) SetName(name string) {
	o.Name = &name
}

// String is the stringer function for the task, producing readable output using fi.TaskAsString
func (o *InstanceGroupManager) String() string {
	return fi.TaskAsString(o)
}
