github.com/opentofu/opentofu@v1.7.1/internal/plans/action_string.go (about)

     1  // Code generated by "stringer -type Action"; DO NOT EDIT.
     2  
     3  package plans
     4  
     5  import "strconv"
     6  
     7  func _() {
     8  	// An "invalid array index" compiler error signifies that the constant values have changed.
     9  	// Re-run the stringer command to generate them again.
    10  	var x [1]struct{}
    11  	_ = x[NoOp-0]
    12  	_ = x[Create-43]
    13  	_ = x[Read-8592]
    14  	_ = x[Update-126]
    15  	_ = x[DeleteThenCreate-8723]
    16  	_ = x[CreateThenDelete-177]
    17  	_ = x[Delete-45]
    18  	_ = x[Forget-46]
    19  }
    20  
    21  const (
    22  	_Action_name_0 = "NoOp"
    23  	_Action_name_1 = "Create"
    24  	_Action_name_2 = "DeleteForget"
    25  	_Action_name_3 = "Update"
    26  	_Action_name_4 = "CreateThenDelete"
    27  	_Action_name_5 = "Read"
    28  	_Action_name_6 = "DeleteThenCreate"
    29  )
    30  
    31  var (
    32  	_Action_index_2 = [...]uint8{0, 6, 12}
    33  )
    34  
    35  func (i Action) String() string {
    36  	switch {
    37  	case i == 0:
    38  		return _Action_name_0
    39  	case i == 43:
    40  		return _Action_name_1
    41  	case 45 <= i && i <= 46:
    42  		i -= 45
    43  		return _Action_name_2[_Action_index_2[i]:_Action_index_2[i+1]]
    44  	case i == 126:
    45  		return _Action_name_3
    46  	case i == 177:
    47  		return _Action_name_4
    48  	case i == 8592:
    49  		return _Action_name_5
    50  	case i == 8723:
    51  		return _Action_name_6
    52  	default:
    53  		return "Action(" + strconv.FormatInt(int64(i), 10) + ")"
    54  	}
    55  }