scope.go raw

   1  // Copyright (c) 2016, 2018, 2025, Oracle and/or its affiliates.  All rights reserved.
   2  // This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
   3  // Code generated. DO NOT EDIT.
   4  
   5  // DNS API
   6  //
   7  // API for the DNS service. Use this API to manage DNS zones, records, and other DNS resources.
   8  // For more information, see Overview of the DNS Service (https://docs.oracle.com/iaas/Content/DNS/Concepts/dnszonemanagement.htm).
   9  //
  10  
  11  package dns
  12  
  13  import (
  14  	"strings"
  15  )
  16  
  17  // ScopeEnum Enum with underlying type: string
  18  type ScopeEnum string
  19  
  20  // Set of constants representing the allowable values for ScopeEnum
  21  const (
  22  	ScopeGlobal  ScopeEnum = "GLOBAL"
  23  	ScopePrivate ScopeEnum = "PRIVATE"
  24  )
  25  
  26  var mappingScopeEnum = map[string]ScopeEnum{
  27  	"GLOBAL":  ScopeGlobal,
  28  	"PRIVATE": ScopePrivate,
  29  }
  30  
  31  var mappingScopeEnumLowerCase = map[string]ScopeEnum{
  32  	"global":  ScopeGlobal,
  33  	"private": ScopePrivate,
  34  }
  35  
  36  // GetScopeEnumValues Enumerates the set of values for ScopeEnum
  37  func GetScopeEnumValues() []ScopeEnum {
  38  	values := make([]ScopeEnum, 0)
  39  	for _, v := range mappingScopeEnum {
  40  		values = append(values, v)
  41  	}
  42  	return values
  43  }
  44  
  45  // GetScopeEnumStringValues Enumerates the set of values in String for ScopeEnum
  46  func GetScopeEnumStringValues() []string {
  47  	return []string{
  48  		"GLOBAL",
  49  		"PRIVATE",
  50  	}
  51  }
  52  
  53  // GetMappingScopeEnum performs case Insensitive comparison on enum value and return the desired enum
  54  func GetMappingScopeEnum(val string) (ScopeEnum, bool) {
  55  	enum, ok := mappingScopeEnumLowerCase[strings.ToLower(val)]
  56  	return enum, ok
  57  }
  58