func (a *Arn) equalWith(second *Arn, CompareComponents []string) bool {
	val := reflect.ValueOf(a).Elem()
	secondFields := reflect.Indirect(reflect.ValueOf(second))

	for i := 0; i < val.NumField(); i++ {
		typeField := val.Type().Field(i)
		if !isValueInList(typeField.Name, CompareComponents) {
			continue
		}
		value := val.Field(i)
		secondValue := secondFields.FieldByName(typeField.Name)

		if value.Interface() != secondValue.Interface() {
			return false
		}
	}
	return true
}
// equalWith compares two ARNs components
equalWith compares two ARNs components
// equalWith compares two ARNs components
func (a *Arn) equalWith(second *Arn, CompareComponents []string) bool {
	val := reflect.ValueOf(a).Elem()
	secondFields := reflect.Indirect(reflect.ValueOf(second))
	for i := 0; i < val.NumField(); i++ {
		typeField := val.Type().Field(i)
		if !isValueInList(typeField.Name, CompareComponents) {
			continue
		}
		value := val.Field(i)
		secondValue := secondFields.FieldByName(typeField.Name)
		if value.Interface() != secondValue.Interface() {
			return false
		}
	}
	return true
}
func ( a * Arn ) equalWith ( second * Arn , CompareComponents [ ] string ) bool { val := reflect . ValueOf ( a ) . Elem ( ) secondFields := reflect . Indirect ( reflect . ValueOf ( second ) ) for i := 0 ; i < val . NumField ( ) ; i ++ { typeField := val . Type ( ) . Field ( i ) if ! isValueInList ( typeField . Name , CompareComponents ) { continue } value := val . Field ( i ) secondValue := secondFields . FieldByName ( typeField . Name ) if value . Interface ( ) != secondValue . Interface ( ) { return false } } return true }
equalWith compares two ARNs components
equalWith compares two ARNs components